Author: cfinck Date: Sat Jan 30 14:39:19 2010 New Revision: 45345
URL: http://svn.reactos.org/svn/reactos?rev=45345&view=rev Log: [FORMATTING] Fix indentation and comment style. No code changes.
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/buildtime.c
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/buildtime.c URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Tools/bui... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Tools/buildtime.c [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Tools/buildtime.c [iso-8859-1] Sat Jan 30 14:39:19 2010 @@ -19,36 +19,36 @@
static LPTSTR SkipSelfArgument(LPTSTR lpszCommandLine) { - LPTSTR p = lpszCommandLine; - int quote = 0; + LPTSTR p = lpszCommandLine; + int quote = 0;
- // Skip leading whitespace - while(*p != 0 && _istspace(*p)) - ++ p; + // Skip leading whitespace + while(*p != 0 && _istspace(*p)) + ++ p;
- if(*p == 0) - return p; + if(*p == 0) + return p;
- // Skip argument 0 - // BUGBUG: the assumption is that argument 0 never contains escaped quotes - do - { - if(*p == TEXT('"')) - { - quote = !quote; - ++ p; - continue; - } + // Skip argument 0 + // BUGBUG: the assumption is that argument 0 never contains escaped quotes + do + { + if(*p == TEXT('"')) + { + quote = !quote; + ++ p; + continue; + }
- ++ p; - } - while(*p != 0 && (quote || !_istspace(*p))); + ++ p; + } + while(*p != 0 && (quote || !_istspace(*p)));
- // Skip trailing whitespace - while(*p != 0 && _istspace(*p)) - ++ p; + // Skip trailing whitespace + while(*p != 0 && _istspace(*p)) + ++ p;
- return p; + return p; }
int main() @@ -57,69 +57,51 @@ time_t StartTime, FinishTime; double TotalTime; int Hour, Minute, Second; - int Status; + int Status;
- // // Get the command line to pass on. - // FullCommandLine = GetCommandLine(); CommandLine = SkipSelfArgument(FullCommandLine);
- // // If nothing is on the command-line exit - // if (CommandLine[0] == 0) { - fprintf(stderr, "buildtime: required parameter not specified\n"); + fprintf(stderr, "buildtime: required parameter not specified\n"); return 1; }
CommandLineBuffer = malloc((strlen(CommandLine) + 2 + 1)); if (!CommandLineBuffer) { - fprintf(stderr, "buildtime: unable to allocate memory\n"); + fprintf(stderr, "buildtime: unable to allocate memory\n"); return 1; }
- CommandLineBuffer[0] = 0; + CommandLineBuffer[0] = 0; strcat(CommandLineBuffer, CommandLine);
- // // Grab the starting timestamp. - // time(&StartTime);
- // // Run the program (Status is 1 on failure). - // Status = system(CommandLineBuffer);
- // // Grab the finishing timestamp. - // time(&FinishTime);
- // // Get the elapsed time. - // TotalTime = difftime(FinishTime, StartTime);
- // // Convert the elapsed time to a human readable format. - // Second = (int)TotalTime % 60; TotalTime = TotalTime / 60; Minute = (int)TotalTime % 60; Hour = TotalTime / 60;
- // // Print the total build time. - // printf("\nTotal Build Time: %02d:%02d:%02d", Hour, Minute, Second);
- // // Free the memory we allocated for the command line. - // free(CommandLineBuffer);
return Status;