[FORMATTING] Fix formatting

svn path=/trunk/; revision=31744
This commit is contained in:
Hervé Poussineau 2008-01-12 17:54:45 +00:00
parent 896d74327d
commit f94c2a7484

View file

@ -1,5 +1,4 @@
/* $Id$
*
/*
* buildno - Generate the build number for ReactOS
*
* Copyright (c) 1999,2000 Emanuele Aliberti
@ -40,28 +39,11 @@ static char * argv0 = "";
static char * filename = "";
static char * kernel_version_build_type = 0;
#ifdef DBG
void
tm_dump (const char *tag, struct tm * t)
{
printf ("%s->tm_sec = %d\n", tag, t->tm_sec);
printf ("%s->tm_min = %d\n", tag, t->tm_min);
printf ("%s->tm_hour = %d\n", tag, t->tm_hour);
printf ("%s->tm_mday = %d\n", tag, t->tm_mday);
printf ("%s->tm_mon = %d\n", tag, t->tm_mon);
printf ("%s->tm_year = %d\n", tag, t->tm_year);
printf ("%s->tm_wday = %d\n", tag, t->tm_wday);
printf ("%s->tm_yday = %d\n", tag, t->tm_yday);
printf ("%s->tm_isdst = %d\n\n", tag, t->tm_isdst);
}
#endif
int count_wide_string( wchar_t *str )
{
int i;
for( i = 0; str[i]; i++ );
for( i = 0; str[i]; i++ )
;
return i;
}
@ -82,7 +64,8 @@ GetRev(void)
{
while((ch=fgetc(fp)) != EOF)
{
if (ch == 10) count++; /* seems to used as a seperator */
if (ch == 10)
count++; /* seems to used as a seperator */
if (count > 3)
break;
if ((count == 3) && (chars < sizeof(Revision)))
@ -286,9 +269,10 @@ usage (void)
{
fprintf (
stderr,
"Usage: %s [-{p|q}] path-to-header\n\n -p print version number and exit\n -q run in quiet mode\n",
argv0
);
"Usage: %s [-{p|q}] path-to-header\n\n"
" -p print version number and exit\n"
" -q run in quiet mode\n",
argv0);
exit (EXIT_SUCCESS);
}
@ -342,13 +326,9 @@ main (int argc, char * argv [])
default:
usage ();
}
/*
* Set TZ information.
*/
/* Set TZ information. */
tzset ();
/*
* We are building TODAY!
*/
/* We are building TODAY! */
if (! quiet)
{
printf ( "\nReactOS Build Number Generator\n\n");
@ -357,7 +337,8 @@ main (int argc, char * argv [])
/* Convert kernel_version_build_type to a host-friendly string */
length = count_wide_string(KERNEL_VERSION_BUILD_TYPE);
kernel_version_build_type = (char *)malloc(length+1);
for( i = 0; KERNEL_VERSION_BUILD_TYPE[i]; i++ ) {
for( i = 0; KERNEL_VERSION_BUILD_TYPE[i]; i++ )
{
kernel_version_build_type[i] = KERNEL_VERSION_BUILD_TYPE[i];
}
kernel_version_build_type[i] = 0;
@ -365,21 +346,14 @@ main (int argc, char * argv [])
time (& t1); /* current build time */
t1_tm = gmtime (& t1);
#ifdef DBG
tm_dump ("t1", t1_tm);
#endif
t1_tm->tm_year += 1900;
#ifdef DBG
tm_dump ("t1", t1_tm);
#endif
if (! quiet)
{
printf (
"Current date: %4d-%02d-%02d\n\n",
t1_tm->tm_year,
(t1_tm->tm_mon + 1),
t1_tm->tm_mday
);
t1_tm->tm_mday);
}
/*
* Compute build number.
@ -393,18 +367,14 @@ main (int argc, char * argv [])
printf (
"ROS Version : %d.%d",
KERNEL_VERSION_MAJOR,
KERNEL_VERSION_MINOR
);
KERNEL_VERSION_MINOR);
if (0 != KERNEL_VERSION_PATCH_LEVEL)
{
printf(".%d", KERNEL_VERSION_PATCH_LEVEL);
}
printf("-%s (Build %s)\n\n", kernel_version_build_type, buildstr);
}
/*
* (Over)write the include file, unless
* the user switched on -p.
*/
/* (Over)write the include file, unless the user switched on -p. */
if (! print_only)
{
write_h (build, buildstr);
@ -419,5 +389,4 @@ main (int argc, char * argv [])
return EXIT_SUCCESS;
}
/* EOF */