static void StartCompile( void ) { OpenLst(); if( (Options & OPT_QUIET) == 0 && (Options & OPT_TYPE) == 0 ) { TOutBanner(); } PrtBanner(); PrtOptions(); }
static void StartCompile( void ) { OpenLst(); if( !(Options & OPT_QUIET) && !(Options & OPT_TYPE) ) { TOutBanner(); } PrtBanner(); PrtOptions(); }
static void Usage( void ) { //============================= char buff[LIST_BUFF_SIZE+1]; PrtBanner(); puts( "" ); MsgBuffer( CL_USAGE_LINE, buff, _NAME_ ); puts( buff ); puts( "" ); ShowOptions( buff ); }
int main( int argc, char *argv[] ) { //====================================== int rc; char *wfl_env; char *p; char *q; char *cmd; /* unused parameters */ (void)argc; __InitResource(); __ErrorInit( argv[0] ); CmpOpts[0] = NULL; SwitchChars[0] = '-'; SwitchChars[1] = _dos_switch_char(); SwitchChars[2] = '\0'; Word = MemAlloc( MAX_CMD ); cmd = MemAlloc( 2*MAX_CMD ); // for "WFL" environment variable and command line // add "WFL" environment variable to "cmd" unless "/y" is specified // in "cmd" or the "WFL" environment string wfl_env = getenv( WFLENV ); if( wfl_env != NULL ) { strcpy( cmd, wfl_env ); strcat( cmd, " " ); p = cmd + strlen( cmd ); getcmd( p ); for( q = cmd; (q = strpbrk( q, SwitchChars )) != NULL; ) { if( tolower( *(++q) ) == 'y' ) { getcmd( cmd ); p = cmd; break; } } } else { getcmd( cmd ); p = cmd; } p = SkipSpaces( p ); if( ( *p == '\0' ) || ( strncmp( p, "? ", 2 ) == 0 ) ) { Usage(); rc = 1; } else { Fp = fopen( TEMPFILE, "w" ); if( Fp == NULL ) { PrintMsg( CL_ERROR_OPENING_TMP_FILE ); rc = 1; } else { ObjName = NULL; rc = Parse( argc, argv ); if( rc == 0 ) { if( !Flags.quiet ) { PrtBanner(); } rc = CompLink(); } if( rc == 1 ) fclose( Fp ); if( LinkName != NULL ) { if( stricmp( LinkName, TEMPFILE ) != 0 ) { remove( LinkName ); rename( TEMPFILE, LinkName ); } } else { remove( TEMPFILE ); } } } free( Word ); free( cmd ); wfl_exit( rc == 0 ? 0 : 1 ); return( 0 ); }