• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Output函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Output函数的典型用法代码示例。如果您正苦于以下问题:C++ Output函数的具体用法?C++ Output怎么用?C++ Output使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Output函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Output

void CSocketClient::OnError( const _tstring &message )
{
	Output( message );
}
开发者ID:XeanoRRR,项目名称:mmo-resourse,代码行数:4,代码来源:SocketClient.cpp


示例2: main

int main(int argc, char* argv[])
{
  PRTime start = _PR_Now();
  char exePath[MAXPATHLEN];

#ifdef XP_MACOSX
  TriggerQuirks();
#endif

  nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
  if (NS_FAILED(rv)) {
    Output("Couldn't calculate the application directory.\n");
    return 255;
  }

  char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]);
  if (!lastSlash || (size_t(lastSlash - exePath) > MAXPATHLEN - sizeof(XPCOM_DLL) - 1))
    return 255;

  strcpy(++lastSlash, XPCOM_DLL);

  int gotCounters;
#if defined(XP_UNIX)
  struct rusage initialRUsage;
  gotCounters = !getrusage(RUSAGE_SELF, &initialRUsage);
#elif defined(XP_WIN)
  IO_COUNTERS ioCounters;
  gotCounters = GetProcessIoCounters(GetCurrentProcess(), &ioCounters);
#endif

  // We do this because of data in bug 771745
  XPCOMGlueEnablePreload();

  rv = XPCOMGlueStartup(exePath);
  if (NS_FAILED(rv)) {
    Output("Couldn't load XPCOM.\n");
    return 255;
  }
  // Reset exePath so that it is the directory name and not the xpcom dll name
  *lastSlash = 0;

  rv = XPCOMGlueLoadXULFunctions(kXULFuncs);
  if (NS_FAILED(rv)) {
    Output("Couldn't load XRE functions.\n");
    return 255;
  }

  XRE_StartupTimelineRecord(mozilla::StartupTimeline::START, start);

#ifdef XRE_HAS_DLL_BLOCKLIST
  XRE_SetupDllBlocklist();
#endif

  if (gotCounters) {
#if defined(XP_WIN)
    XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_OPS,
                            int(ioCounters.ReadOperationCount));
    XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_TRANSFER,
                            int(ioCounters.ReadTransferCount / 1024));
    IO_COUNTERS newIoCounters;
    if (GetProcessIoCounters(GetCurrentProcess(), &newIoCounters)) {
      XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_OPS,
                              int(newIoCounters.ReadOperationCount - ioCounters.ReadOperationCount));
      XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_TRANSFER,
                              int((newIoCounters.ReadTransferCount - ioCounters.ReadTransferCount) / 1024));
    }
#elif defined(XP_UNIX)
    XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_HARD_FAULTS,
                            int(initialRUsage.ru_majflt));
    struct rusage newRUsage;
    if (!getrusage(RUSAGE_SELF, &newRUsage)) {
      XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_HARD_FAULTS,
                              int(newRUsage.ru_majflt - initialRUsage.ru_majflt));
    }
#endif
  }

  int result;
  {
    ScopedLogging log;
    result = do_main(argc, argv);
  }

  XPCOMGlueShutdown();
  return result;
}
开发者ID:TeLLie,项目名称:mozilla-os2,代码行数:86,代码来源:nsBrowserApp.cpp


示例3: UserComment

void UserComment (const char* Comment)
/* Output a comment line */
{
    Output ("; %s", Comment);
    LineFeed ();
}
开发者ID:bowlofstew,项目名称:cc65,代码行数:6,代码来源:output.c


示例4: zero

void SecularUpdateLast
( bool  initialize,
  const Real& rho,
  const Matrix<Real>& z,
        LastState<Real>& state,
  const SecularEVDCtrl<Real>& ctrl )
{
    DEBUG_CSE
    const Real zero(0);
    const Int n = state.dMinusShift.Height();
    const Int origin = n-1;

    if( state.secular <= zero )
        state.rootRelLowerBound =
          Max( state.rootRelLowerBound, state.rootRelEst );
    else
        state.rootRelUpperBound =
          Min( state.rootRelUpperBound, state.rootRelEst );
    if( ctrl.progress )
        Output
        ("Relative interval is [",state.rootRelLowerBound,",",
         state.rootRelUpperBound,"]");

    const Real kGap = state.dMinusShift(origin);
    const Real km1Gap = state.dMinusShift(origin-1);

    Real a = state.secular - km1Gap*state.psiMinusDeriv -
      kGap*state.psiOriginDeriv;

    Real eta;
    if( initialize )
    {
        // Force flipping always?
        if( ctrl.negativeFix == CLIP_NEGATIVES )
            a = Max( a, zero );
        else
            a = Abs( a );

        if( a == zero )
        {
            // TODO(poulson): Explain this special case.
            //
            // Note that LAPACK's {s,d}lasd4 [CITATION] uses the equivalent of 
            //
            //     eta = rho - rootEst,
            //
            // while LAPACK's {s,d}laed4 [CITATION] has such an updated
            // commented out and
            // instead performs the following.
            eta = state.rootRelUpperBound - state.rootRelEst;
        }
        else
        {
            // We Approach From the Right with psi_{n-2}(x) osculatorally
            // interpolated as G(x; d(n-2)^2, r, s) and phi_{n-2}(x) exactly
            // represented as F(x; p, q). See the discussion surrounding Eq'n
            // (23) of LAWN 89 [CITATION], but keep in mind that we use the
            // definitions (a,b,c) corresponding to the standard quadratic 
            // equation a x^2 + b x + c = 0 rather than the notation of LAWN 89.
            const Real bNeg =
              (kGap+km1Gap)*state.secular -
              kGap*km1Gap*(state.psiMinusDeriv+state.psiOriginDeriv);
            const Real c = kGap*km1Gap*state.secular;
            eta = SolveQuadraticPlus( a, bNeg, c, ctrl.negativeFix );
        }
    }
    else
    {
        const Real bNeg =
          (kGap+km1Gap)*state.secular -
          kGap*km1Gap*(state.psiMinusDeriv+state.psiOriginDeriv);
        const Real c = kGap*km1Gap*state.secular;
        eta = SolveQuadraticPlus( a, bNeg, c, ctrl.negativeFix );
    }

    if( state.secular*eta >= zero )
    {
        // The current update does not move in the right direction, so fall back
        // to a small Newton step (as the derivative is likely large).
        if( ctrl.progress )
            Output("Falling back to Newton step");
        eta = -state.secular / (state.psiMinusDeriv+state.psiOriginDeriv);
    }

    const Real rootRelEstProp = state.rootRelEst + eta;
    if( rootRelEstProp > state.rootRelUpperBound ||
        rootRelEstProp < state.rootRelLowerBound )
    {
        if( ctrl.progress )
            Output("Stepped out of bounds");
        // Move halfway towards the bound instead of exceeding it. Note that 
        // LAPACK's {s,d}laed4 [CITATION] follows this strategy, but LAPACK's
        // {s,d}lasd4 uses trivial upper and lower bounds rather than
        // continually updating them.
        if( state.secular < zero )
            eta = (state.rootRelUpperBound - state.rootRelEst) / 2;
        else 
            eta = (state.rootRelLowerBound - state.rootRelEst) / 2;
    }

//.........这里部分代码省略.........
开发者ID:YingzhouLi,项目名称:Elemental,代码行数:101,代码来源:SecularEVD.cpp


示例5: usage

static void usage( void )
{
    ShowProductInfo();

    Output( "Usage: dmpobj [options] objfile[" OBJSUFFIX "]..." CRLF );
    Output( "Options:" CRLF );
    Output( "-l\t\tProduce listing file" CRLF );
    Output( "-d\t\tPrint descriptive titles for some output" CRLF );
    Output( "-t\t\tPrint names for some index values and list at end" CRLF );
    Output( "-c\t\tDump COMENT records without interpretation" CRLF );
    Output( "-i\t\tOriginal Intel OMF-86 format" CRLF );
    Output( "-q\t\tQuiet, don't show product info" CRLF );
    Output( "-r\t\tProvide raw dump of records as well" CRLF );
    Output( "-rec=xxx\tProvide dump of selected record type" CRLF );
    Output( "\t\t  (by number or by symbolic name)" CRLF );
    leave( 1 );
}
开发者ID:Graham-stott,项目名称:open-watcom-v2,代码行数:17,代码来源:dmpobj.c


示例6: RelocateStarportIfUnderwaterOrBuried


//.........这里部分代码省略.........
	matrix3x3d rotNotUnderwaterWithLeastVariation = rot;
	vector3d posNotUnderwaterWithLeastVariation = pos;
	const double heightVariationCheckThreshold = 0.008; // max variation to radius radius ratio to check for local slope, ganymede is around 0.01
	const double terrainHeightVariation = planet->GetMaxFeatureRadius(); //in radii

	//Output("%s: terrain height variation %f\n", sbody->name.c_str(), terrainHeightVariation);

	// 6 points are sampled around the starport center by adding/subtracting delta to to coords
	// points must stay within max height variation to be accepted
	//    1. delta should be chosen such that it a distance from the starport center that encloses landing pads for the largest starport
	//    2. maxSlope should be set so maxHeightVariation is less than the height of the landing pads
	const double delta = 20.0/radius; // in radii
	const double maxSlope = 0.2; // 0.0 to 1.0
	const double maxHeightVariation = maxSlope*delta*radius; // in m

	matrix3x3d rot_ = rot;
	vector3d pos_ = pos;

	bool manualRelocationIsEasy = !(planet->GetSystemBody()->GetType() == SystemBody::TYPE_PLANET_ASTEROID || terrainHeightVariation > heightVariationCheckThreshold);

	// warn and leave it up to the user to relocate custom starports when it's easy to relocate manually, i.e. not on asteroids and other planets which are likely to have high variation in a lot of places
	const bool isRelocatableIfBuried = !(sbody->IsCustomBody() && manualRelocationIsEasy);

	bool isInitiallyUnderwater = false;
	bool initialVariationTooHigh = false;

	Random r(sbody->GetSeed());

	for (int tries = 0; tries < 200; tries++) {
		variationWithinLimits = true;

		const double height = planet->GetTerrainHeight(pos_) - radius; // in m

		// check height at 6 points around the starport center stays within variation tolerances
		// GetHeight gives a varying height field in 3 dimensions.
		// Given it's smoothly varying it's fine to sample it in arbitary directions to get an idea of how sharply it varies
		double v[6];
		v[0] = fabs(planet->GetTerrainHeight(vector3d(pos_.x+delta, pos_.y, pos_.z))-radius-height);
		v[1] = fabs(planet->GetTerrainHeight(vector3d(pos_.x-delta, pos_.y, pos_.z))-radius-height);
		v[2] = fabs(planet->GetTerrainHeight(vector3d(pos_.x, pos_.y, pos_.z+delta))-radius-height);
		v[3] = fabs(planet->GetTerrainHeight(vector3d(pos_.x, pos_.y, pos_.z-delta))-radius-height);
		v[4] = fabs(planet->GetTerrainHeight(vector3d(pos_.x, pos_.y+delta, pos_.z))-radius-height);
		v[5] = fabs(planet->GetTerrainHeight(vector3d(pos_.x, pos_.y-delta, pos_.z))-radius-height);

		// break if variation for all points is within limits
		double variationMax = 0.0;
		for (int i = 0; i < 6; i++) {
			variationWithinLimits = variationWithinLimits && (v[i] < maxHeightVariation);
			variationMax = (v[i] > variationMax)? v[i]:variationMax;
		}

		// check if underwater
		const bool starportUnderwater = (height <= 0.0);

		//Output("%s: try no: %i, Match found: %i, best variation in previous results %f, variationMax this try: %f, maxHeightVariation: %f, Starport is underwater: %i\n",
		//	sbody->name.c_str(), tries, (variationWithinLimits && !starportUnderwater), bestVariation, variationMax, maxHeightVariation, starportUnderwater);

		if  (tries == 0) {
			isInitiallyUnderwater = starportUnderwater;
			initialVariationTooHigh = !variationWithinLimits;
		}

		if (!starportUnderwater && variationMax < bestVariation) {
			bestVariation = variationMax;
			posNotUnderwaterWithLeastVariation = pos_;
			rotNotUnderwaterWithLeastVariation = rot_;
		}

		if (variationWithinLimits && !starportUnderwater) break;

		// try new random position
		const double r2 = r.Double(); 	// function parameter evaluation order is implementation-dependent
		const double r1 = r.Double();	// can't put two rands in the same expression
		rot_ = matrix3x3d::RotateZ(2*M_PI*r1)
			* matrix3x3d::RotateY(2*M_PI*r2);
		pos_ = rot_ * vector3d(0,1,0);
	}

	if (isInitiallyUnderwater || (isRelocatableIfBuried && initialVariationTooHigh)) {
		pos = posNotUnderwaterWithLeastVariation;
		rot = rotNotUnderwaterWithLeastVariation;
	}

	if (sbody->IsCustomBody()) {
		const SystemPath &p = sbody->GetPath();
		if (initialVariationTooHigh) {
			if (isRelocatableIfBuried) {
				Output("Warning: Lua custom Systems definition: Surface starport has been automatically relocated. This is in order to place it on flatter ground to reduce the chance of landing pads being buried. This is not an error as such and you may attempt to move the starport to another location by changing latitude and longitude fields.\n      Surface starport name: %s, Body name: %s, In sector: x = %i, y = %i, z = %i.\n",
					sbody->GetName().c_str(), sbody->GetParent()->GetName().c_str(), p.sectorX, p.sectorY, p.sectorZ);
			} else {
				Output("Warning: Lua custom Systems definition: Surface starport may have landing pads buried. The surface starport has not been automatically relocated as the planet appears smooth enough to manually relocate easily. This is not an error as such and you may attempt to move the starport to another location by changing latitude and longitude fields.\n      Surface starport name: %s, Body name: %s, In sector: x = %i, y = %i, z = %i.\n",
					sbody->GetName().c_str(), sbody->GetParent()->GetName().c_str(), p.sectorX, p.sectorY, p.sectorZ);
			}
		}
		if (isInitiallyUnderwater) {
			Output("Error: Lua custom Systems definition: Surface starport is underwater (height not greater than 0.0) and has been automatically relocated. Please move the starport to another location by changing latitude and longitude fields.\n      Surface starport name: %s, Body name: %s, In sector: x = %i, y = %i, z = %i.\n",
				sbody->GetName().c_str(), sbody->GetParent()->GetName().c_str(), p.sectorX, p.sectorY, p.sectorZ);
		}
	}
}
开发者ID:giriko,项目名称:pioneer,代码行数:101,代码来源:Space.cpp


示例7: readcsPing

void readcsPing(const int client, const int server)
{
	(void)client;
	(void)server;
	Output("\n> 0x%02x ; PONG",OPC_PING);
}
开发者ID:RadioactiveGangsters,项目名称:RIDRelay,代码行数:6,代码来源:Packet.c


示例8: readcsUpdate

void readcsUpdate(const int client, const int server)
{
	(void)client;
	(void)server;
	Output("\n> 0x%02x ; update request",OPC_UPDATE);
}
开发者ID:RadioactiveGangsters,项目名称:RIDRelay,代码行数:6,代码来源:Packet.c


示例9: Output

void CLogOutput::Print(int priority, const std::string& text)
{
	Output(priority, text.c_str());
}
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:4,代码来源:LogOutput.cpp


示例10: SDLInit

string SDLInit(const char *title, const int2 &desired_screensize, bool isfullscreen, int vsync)
{
    //SDL_SetMainReady();
    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER /* | SDL_INIT_AUDIO*/) < 0)
    {
        return SDLError("Unable to initialize SDL");
    }

    SDL_SetEventFilter(SDLHandleAppEvents, nullptr);

    Output(OUTPUT_INFO, "SDL initialized...");

    SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);

    // on demand now
    //extern bool sfxr_init();
    //if (!sfxr_init())
    //   return SDLError("Unable to initialize audio");

    #ifdef PLATFORM_ES2
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
    #else
        //certain older Intel HD GPUs and also Nvidia Quadro 1000M don't support 3.1 ? the 1000M is supposed to support 4.2
        //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
        //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
        #ifdef __APPLE__
            SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY);
            SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG);
        #elif defined(_WIN32)
            //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
            //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
            //SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY);
        #endif
        #if defined(__APPLE__) || defined(_WIN32)
            SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
            SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
        #endif
    #endif

    //SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0);      // set this if we're in 2D mode for speed on mobile?
    SDL_GL_SetAttribute(SDL_GL_RETAINED_BACKING, 1);    // because we redraw the screen each frame

    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

    Output(OUTPUT_INFO, "SDL about to figure out display mode...");

    #ifdef PLATFORM_ES2
        landscape = desired_screensize.x() >= desired_screensize.y();
        int modes = SDL_GetNumDisplayModes(0);
        screensize = int2(1280, 720);
        for (int i = 0; i < modes; i++)
        {
            SDL_DisplayMode mode;
            SDL_GetDisplayMode(0, i, &mode);
            Output(OUTPUT_INFO, "mode: %d %d", mode.w, mode.h);
            if (landscape ? mode.w > screensize.x() : mode.h > screensize.y())
            {
                screensize = int2(mode.w, mode.h);
            }
        }

        Output(OUTPUT_INFO, "chosen resolution: %d %d", screensize.x(), screensize.y());
        Output(OUTPUT_INFO, "SDL about to create window...");

        _sdl_window = SDL_CreateWindow(title,
                                        0, 0,
                                        screensize.x(), screensize.y(),
                                        SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS);

        Output(OUTPUT_INFO, _sdl_window ? "SDL window passed..." : "SDL window FAILED...");

        if (landscape) SDL_SetHint("SDL_HINT_ORIENTATIONS", "LandscapeLeft LandscapeRight");

        int ax = 0, ay = 0;
        SDL_GetWindowSize(_sdl_window, &ax, &ay);
        int2 actualscreensize(ax, ay);
        //screenscalefactor = screensize.x / actualscreensize.x;  // should be 2 on retina
        #ifdef __IOS__
            assert(actualscreensize == screensize);
            screensize = actualscreensize;
        #else
            screensize = actualscreensize;  // __ANDROID__
            Output(OUTPUT_INFO, "obtained resolution: %d %d", screensize.x(), screensize.y());
        #endif
    #else
        screensize = desired_screensize;
        _sdl_window = SDL_CreateWindow(title,
                                        SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
                                        screensize.x(), screensize.y(),
                                        SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE |
                                            (isfullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0));
    #endif

    if (!_sdl_window)
        return SDLError("Unable to create window");

    Output(OUTPUT_INFO, "SDL window opened...");


    _sdl_context = SDL_GL_CreateContext(_sdl_window);
//.........这里部分代码省略.........
开发者ID:The-Mad-Pirate,项目名称:lobster,代码行数:101,代码来源:sdlsystem.cpp


示例11: ASM

static ASM(void) errfunc(REG(d0, UBYTE c), REG(a3, xadUINT32 pd))
{
  UBYTE d = c;
  if(c)
    Write(Output(), &d, 1);
}
开发者ID:GitHubGeek,项目名称:Sequential,代码行数:6,代码来源:debug.c


示例12: OutRecordsDsbl

void    OutRecordsDsbl(void)
{
  InitPushCRC();
  Push(&mpfRecordDsbl, sizeof(mpfRecordDsbl));
  Output(sizeof(mpfRecordDsbl));
}
开发者ID:feilongfl,项目名称:tm4c1294ncpdt,代码行数:6,代码来源:records_dsbl.c


示例13: Input

Controler::Controler(){
    in = Input();
    com = Computer();
    out = Output();
    eh = ExceptionHandler();
}
开发者ID:kangdonghoon,项目名称:JavaStudy,代码行数:6,代码来源:Gugudan.cpp


示例14: readscPing

void readscPing(const int server, const int client)
{
	(void)client;
	(void)server;
	Output("\n< 0x%02x ; PING",OPC_PING);
}
开发者ID:RadioactiveGangsters,项目名称:RIDRelay,代码行数:6,代码来源:Packet.c


示例15: Output

void DumpVisitor::PutIndent() const
{
	for (unsigned int i = 0; i < m_level; i++)
		Output("  ");
}
开发者ID:Ikesters,项目名称:pioneer,代码行数:5,代码来源:DumpVisitor.cpp


示例16: Output

bool wxCrashReportImpl::Generate(int flags, EXCEPTION_POINTERS *ep)
{
    if ( m_hFile == INVALID_HANDLE_VALUE )
        return false;

#if wxUSE_DBGHELP
    if ( !ep )
        ep = wxGlobalSEInformation;

    if ( !ep )
    {
        Output(wxT("Context for crash report generation not available."));
        return false;
    }

    // show to the user that we're doing something...
    BusyCursor busyCursor;

    // user-specified crash report flags override those specified by the
    // programmer
    TCHAR envFlags[64];
    DWORD dwLen = ::GetEnvironmentVariable
                    (
                        wxT("WX_CRASH_FLAGS"),
                        envFlags,
                        WXSIZEOF(envFlags)
                    );

    int flagsEnv;
    if ( dwLen && dwLen < WXSIZEOF(envFlags) &&
            wxSscanf(envFlags, wxT("%d"), &flagsEnv) == 1 )
    {
        flags = flagsEnv;
    }

    if ( wxDbgHelpDLL::Init() )
    {
        MINIDUMP_EXCEPTION_INFORMATION minidumpExcInfo;

        minidumpExcInfo.ThreadId = ::GetCurrentThreadId();
        minidumpExcInfo.ExceptionPointers = ep;
        minidumpExcInfo.ClientPointers = FALSE; // in our own address space

        // do generate the dump
        MINIDUMP_TYPE dumpFlags;
        if ( flags & wxCRASH_REPORT_LOCALS )
        {
            // the only way to get local variables is to dump the entire
            // process memory space -- but this makes for huge (dozens or
            // even hundreds of Mb) files
            dumpFlags = MiniDumpWithFullMemory;
        }
        else if ( flags & wxCRASH_REPORT_GLOBALS )
        {
            // MiniDumpWriteDump() has the option for dumping just the data
            // segment which contains all globals -- exactly what we need
            dumpFlags = MiniDumpWithDataSegs;
        }
        else // minimal dump
        {
            // the file size is not much bigger than when using MiniDumpNormal
            // if we use the flags below, but the minidump is much more useful
            // as it contains the values of many (but not all) local variables
            dumpFlags = (MINIDUMP_TYPE)(MiniDumpScanMemory
#if _MSC_VER > 1300
                                        |MiniDumpWithIndirectlyReferencedMemory
#endif
                                        );
        }

        if ( !wxDbgHelpDLL::MiniDumpWriteDump
              (
                ::GetCurrentProcess(),
                ::GetCurrentProcessId(),
                m_hFile,                    // file to write to
                dumpFlags,                  // kind of dump to craete
                &minidumpExcInfo,
                NULL,                       // no extra user-defined data
                NULL                        // no callbacks
              ) )
        {
            Output(wxT("MiniDumpWriteDump() failed."));

            return false;
        }

        return true;
    }
    else // dbghelp.dll couldn't be loaded
    {
        Output(wxT("%s"), wxDbgHelpDLL::GetErrorMessage().c_str());
    }
#else // !wxUSE_DBGHELP
    wxUnusedVar(flags);
    wxUnusedVar(ep);

    Output(wxT("Support for crash report generation was not included ")
           wxT("in this wxWidgets version."));
#endif // wxUSE_DBGHELP/!wxUSE_DBGHELP

//.........这里部分代码省略.........
开发者ID:Richard-Ni,项目名称:wxWidgets,代码行数:101,代码来源:crashrpt.cpp


示例17: OutputEndl

 // output end of line
 void OutputEndl() { Output(wxT("\r\n")); }
开发者ID:Richard-Ni,项目名称:wxWidgets,代码行数:2,代码来源:crashrpt.cpp


示例18: finalout

finalout()
{

INT c ;
INT bbtop, bbbottom, bbleft, bbright ;

/* dump the results of the placement to graphics file */
G( graphics_dump() ) ;
G( TWsetMode(1) ) ;
G( draw_the_data() ) ;
G( TWsetMode(0) ) ;


/* we known wire area at this point don't need to estimate */
turn_wireest_on(FALSE) ;

/* let the user know which pins we couldn't place */
set_pin_verbosity( TRUE ) ;

/* before channel graph generation and global routing let use tweak */
/* placement if desired */
if( doGraphicsG && wait_for_userG ){
    G( TWmessage( "TimberWolfMC waiting for your response" ) ) ;
    G( process_graphics() ) ;
} 

savewolf( TRUE ) ;  /* for debug purposes force save to occur */
if( scale_dataG > 1 ){
    /* end of the line for scaled case - 
	will return to parent to continue using saved placement. */
    closegraphics() ;
    YexitPgm( PGMOK ) ;
}
grid_cells() ;      /* force cells to grid locations */
compact(VIOLATIONSONLY); /* remove cell overlap */

/* if this is a partitioning run determine row placement */
if( doPartitionG && !(quickrouteG) ){
    set_determine_side( FALSE ) ;  /* allow SC to pick side */
    G( set_graphic_context( PARTITION_PLACEMENT ) ) ;
    config_rows() ;
    print_paths() ; /* print path information */
    Output( 0 ) ;
    return ;
}
/* do final placement of pads using virtual core to insure pads */
/* are outside of core */
setVirtualCore( TRUE ) ;
placepads() ;

/* before channel graph generation and global routing let use tweak */
/* placement if desired */
check_graphics() ;

if( !scale_dataG ){ 
    /* reload bins to get new overlap penalty */
    loadbins(FALSE) ; /* wireArea not known */
}
prnt_cost( "\nFINAL PLACEMENT RESULTS AFTER VIOLATION REMOVAL ARE:\n" ) ;

print_paths() ; /* print path information */
Output( 0 ) ;

if( doCompactionG > 0 || quickrouteG ) {
    gmain( CHANNELGRAPH ) ;
    rmain( NOCONSTRAINTS ) ;
    gmain( UPDATE_ROUTING ) ;
    adapt_wire_estimator() ;
    check_graphics() ;

    if( quickrouteG ){
	return ;
    }

    for( c = 1 ; c <= doCompactionG ; c++ ) {

	funccostG = findcost() ;
	sprintf(YmsgG,"\n\nCompactor Pass Number: %d begins with:\n", c ) ;
	prnt_cost( YmsgG ) ;

	wirecosts() ;


	grid_cells() ;      /* force cells to grid locations */
	compact(COMPACT);   /* remove white space */
	reorigin() ;
	check_graphics() ;

	sprintf(YmsgG,"\n\nCompactor Pass Number: %d after cost:\n", c ) ;
	prnt_cost( YmsgG ) ;

	Output( c ) ;

	gmain( CHANNELGRAPH ) ;

	if( c == doCompactionG ){
	    rmain( CONSTRAINTS ) ;
	} else {
	    rmain( NOCONSTRAINTS ) ;
	    gmain( UPDATE_ROUTING ) ;
//.........这里部分代码省略.........
开发者ID:ChunHungLiu,项目名称:timberwolf,代码行数:101,代码来源:finalout.c


示例19: GVDM_LOG

// Blocks until decoded sample is produced by the deoder.
nsresult
GonkVideoDecoderManager::Output(int64_t aStreamOffset,
                                RefPtr<MediaData>& aOutData)
{
  aOutData = nullptr;
  status_t err;
  if (mDecoder == nullptr) {
    GVDM_LOG("Decoder is not inited");
    return NS_ERROR_UNEXPECTED;
  }
  err = mDecoder->Output(&mVideoBuffer, READ_OUTPUT_BUFFER_TIMEOUT_US);

  switch (err) {
    case OK:
    {
      RefPtr<VideoData> data;
      nsresult rv = CreateVideoData(aStreamOffset, getter_AddRefs(data));
      if (rv == NS_ERROR_NOT_AVAILABLE) {
        // Decoder outputs a empty video buffer, try again
        return NS_ERROR_NOT_AVAILABLE;
      } else if (rv != NS_OK || data == nullptr) {
        GVDM_LOG("Failed to create VideoData");
        return NS_ERROR_UNEXPECTED;
      }
      aOutData = data;
      return NS_OK;
    }
    case android::INFO_FORMAT_CHANGED:
    {
      // If the format changed, update our cached info.
      GVDM_LOG("Decoder format changed");
      if (!SetVideoFormat()) {
        return NS_ERROR_UNEXPECTED;
      }
      return Output(aStreamOffset, aOutData);
    }
    case android::INFO_OUTPUT_BUFFERS_CHANGED:
    {
      if (mDecoder->UpdateOutputBuffers()) {
        return Output(aStreamOffset, aOutData);
      }
      GVDM_LOG("Fails to update output buffers!");
      return NS_ERROR_FAILURE;
    }
    case -EAGAIN:
    {
//      GVDM_LOG("Need to try again!");
      return NS_ERROR_NOT_AVAILABLE;
    }
    case android::ERROR_END_OF_STREAM:
    {
      GVDM_LOG("Got the EOS frame!");
      RefPtr<VideoData> data;
      nsresult rv = CreateVideoData(aStreamOffset, getter_AddRefs(data));
      if (rv == NS_ERROR_NOT_AVAILABLE) {
        // For EOS, no need to do any thing.
        return NS_ERROR_ABORT;
      }
      if (rv != NS_OK || data == nullptr) {
        GVDM_LOG("Failed to create video data");
        return NS_ERROR_UNEXPECTED;
      }
      aOutData = data;
      return NS_ERROR_ABORT;
    }
    case -ETIMEDOUT:
    {
      GVDM_LOG("Timeout. can try again next time");
      return NS_ERROR_UNEXPECTED;
    }
    default:
    {
      GVDM_LOG("Decoder failed, err=%d", err);
      return NS_ERROR_UNEXPECTED;
    }
  }

  return NS_OK;
}
开发者ID:npark-mozilla,项目名称:gecko-dev,代码行数:80,代码来源:GonkVideoDecoderManager.cpp


示例20: Result

void    Result(uchar  bT) {
  InitPushCRC();
  PushChar(bT);

  Output(1);
}
开发者ID:feilongfl,项目名称:tm4c1294ncpdt,代码行数:6,代码来源:ports.c



注:本文中的Output函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ OutputDebugString函数代码示例发布时间:2022-05-30
下一篇:
C++ OutPacket函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap