コード例 #1
0
ファイル: advice_unwind.c プロジェクト: cmusatyalab/coda
main(int argc, char *argv[])
{
    if (TestAndLock()) {
        fprintf(stderr, "Another unwind running or abandoned, please check\n");
        exit(EXIT_FAILURE);
    }
    ParseArgs(argc, argv);

    InitSignals();

    InitLog();

    if (chdir(CodaUserDir)) {
        RemoveLock();
        Die("Could not cd into %s", CodaUserDir);
    }
    if (InitDB(DataBaseName)) {
        RemoveLock();
        fprintf(stderr, "Could not connect to database %s", DataBaseName);
        exit(EXIT_FAILURE);
    }
    LogMsg(100, LogLevel, LogFile, "Enter ProcessEachUser");
    ProcessEachUser();
    RemoveLock();
    Log_Done();
}
コード例 #2
0
ファイル: mondutil.c プロジェクト: chutzimir/coda
static void QuitSignal() {
    LogMsg(0,LogLevel,LogFile, "Quit signal caught");
    LogMsg(0,LogLevel,LogFile, "***** Terminating");
    Data_Done();
    Log_Done();
    exit(0);
}
コード例 #3
0
ファイル: unwind.c プロジェクト: chutzimir/coda
main (int argc, char *argv[])
{
    if (TestAndLock()) {
	fprintf(stderr,
		"Another unwind running or abandoned, please check\n");
	exit(-1);
    }
    ParseArgs(argc, argv);
    InitSignals();
    InitLog();
    if (chdir(WorkingDir)) {
	RemoveLock();
	Die("Could not cd into %s",WorkingDir);
    }
    if (InitDB(DataBaseName)) {
	RemoveLock();
	fprintf(stderr,"Could not connect to database %s",DataBaseName);
	exit(-1);
    }
    GetFilesAndSpool();
    RemoveLock();
    Log_Done();
}
コード例 #4
0
ファイル: mondutil.c プロジェクト: chutzimir/coda
void BrainSurgeon()
{
    bool rc;
    
    LogMsg(1000,LogLevel,LogFile,"Starting Brain Surgeon thread");
    if (lobotomy == mfalse)
	LWP_WaitProcess(DoLobotomy);
    /* we only get here if a lobotomy has been arranged */
    LogMsg(0,LogLevel,LogFile, "***** Lobotomizing");
    extern bbuf *buffer;
    buffer->flush_the_tank();
    while((rc = buffer->empty()) != mtrue) {
	LWP_DispatchProcess();
    }
/*
** if we've gotten here, we know that no new requests have
** entered the buffer, and the buffer is empty, so die
** gracefully.
*/
    Data_Done();
    Log_Done();
    RestoreSignals();
    exit(0);
}
コード例 #5
0
ファイル: context.c プロジェクト: BigHNF/tcpmp-revive
void Context_Done()
{
	context* p = Context();
	if (!p) return;

	Player_Done();
	Color_Done();
	Equalizer_Done();
#ifdef NO_PLUGINS
	Static_Done();
#else
	Plugins_Done();
#endif
#ifdef TARGET_PALMOS
	//About_Done();
	//BenchResult_Done();
	//MediaInfo_Done();
	//Settings_Done();
	//Win_Done();
	Law_Done();
	ADPCM_Done();
	NSV_Done();
	MPG_Done();
	MP4_Done();
	ASF_Done();
	AVI_Done();
	WAV_Done();
	OverlayHIRES_Done();
#elif defined(TARGET_WIN32) || defined(TARGET_WINCE)
	OverlayDDraw_Done();
	OverlayFlyTV_Done();
	OverlayGDI_Done();
	OverlayXScale_Done();
#if defined(TARGET_WINCE)
	OverlayRAW_Done();
	OverlayGAPI_Done();
	OverlayDirect_Done();
	OverlayS1D13806_Done();
#else
	OverlayConsole_Done();
#endif
#elif defined(TARGET_SYMBIAN)
	OverlaySymbian_Done();
#endif
#if defined(CONFIG_SUBS)
	SubTitle_Done();
#endif
	SoftIDCT_Done();
	WaveOut_Done();
	M3U_Done();
	PLS_Done();
	ASX_Done();
	Overlay_Done();
	IDCT_Done();
	Timer_Done();
	NullOutput_Done();
	RawAudio_Done();
	RawImage_Done();
	FormatBase_Done();
	Format_Done();
	Association_Done();
	Video_Done();
	Audio_Done();
	Codec_Done();
	Flow_Done();
	Playlist_Done();
	Advanced_Done();
	Stream_Done();

	Platform_Done();
	Node_Done();
	Blit_Done();
	PCM_Done();
	String_Done();
	DynCode_Done();
	Mem_Done();
	Log_Done();

#ifdef PREALLOC
	{ int i; for (i=0;i<PREALLOC;++i) free(q[i]); }
#endif
	free(p);
}