コード例 #1
0
ファイル: console.cpp プロジェクト: Subsentient/packrat
void Console::SetCurrentAction(const char *InAction, FILE *OutDescriptor, const char *Color)
{
	static PkString Current;
	
	fputs(CONSOLE_CTL_RESTORESTATE, OutDescriptor);
	for (size_t Inc = 0; Inc < Current.length(); ++Inc)
	{
		putc(' ', OutDescriptor);
	}
	
	char Buf[4096];
	snprintf(Buf, sizeof Buf, CONSOLE_CTL_RESTORESTATE CONSOLE_CTL_SAVESTATE CONSOLE_COLOR_CYAN ">>%s" CONSOLE_ENDCOLOR " %s%s%s" ,
			Subject ? +(PkString(CONSOLE_COLOR_GREEN " [") + Subject + "]" CONSOLE_ENDCOLOR): "", Color ? Color : "", InAction, Color ? CONSOLE_ENDCOLOR : "");
	Current = Buf;
	
	fputs(Buf, OutDescriptor);
}
コード例 #2
0
ファイル: console.cpp プロジェクト: Subsentient/packrat
void Console::VomitActionError(const char *ErrMsg, FILE *OutDescriptor)
{
	fputs(PkString() + "\n" CONSOLE_COLOR_RED "ERROR:" CONSOLE_ENDCOLOR " " + ErrMsg + "\n", OutDescriptor);
}
コード例 #3
0
ファイル: PkGamsUtils.cpp プロジェクト: CompBioUIC/Kinalyzer
// Determines GMS output file name from base file name
void getGMSOutputFileName( PkString& outGMSFileName, const PkString& baseFileName )
{
	outGMSFileName = baseFileName + PkString( ".gms" );
}
コード例 #4
0
// Obtains the file name that is the result of running the write solution script
void getWriteSolutionScriptOutputFileName( PkString& outFileName, const PkString& baseFileName )
{
    outFileName = baseFileName + PkString( ".soln" );
}
コード例 #5
0
ファイル: PkGamsUtils.cpp プロジェクト: CompBioUIC/Kinalyzer
// Executes the Gams set cover solver
void execGams( const char* gamsInputFileName )
{
	PkString strGamsCmd = (PkString( "gams " ) + PkString( gamsInputFileName ));
	system( strGamsCmd.c_str() );
}