Avoid C99 comments, use old-style C comments instead.

This doesn't make the code uglier or harder to read, yet it makes the
code more portable.  This also simplifies checking for other potential
incompatibilities.  "gcc -std=c89 -pedantic" can flag many incompatible
constructs as warnings, but C99 comments will cause it to emit an error.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Pavel Roskin
2006-07-10 02:57:51 -04:00
committed by Junio C Hamano
parent 82e5a82fd7
commit a9486b02ec
10 changed files with 33 additions and 31 deletions

View File

@ -240,14 +240,14 @@ static void convert_date(void *buffer, unsigned long size, unsigned char *result
{
char *new = xmalloc(size + 100);
unsigned long newlen = 0;
// "tree <sha1>\n"
/* "tree <sha1>\n" */
memcpy(new + newlen, buffer, 46);
newlen += 46;
buffer = (char *) buffer + 46;
size -= 46;
// "parent <sha1>\n"
/* "parent <sha1>\n" */
while (!memcmp(buffer, "parent ", 7)) {
memcpy(new + newlen, buffer, 48);
newlen += 48;
@ -255,12 +255,12 @@ static void convert_date(void *buffer, unsigned long size, unsigned char *result
size -= 48;
}
// "author xyz <xyz> date"
/* "author xyz <xyz> date" */
newlen += convert_date_line(new + newlen, &buffer, &size);
// "committer xyz <xyz> date"
/* "committer xyz <xyz> date" */
newlen += convert_date_line(new + newlen, &buffer, &size);
// Rest
/* Rest */
memcpy(new + newlen, buffer, size);
newlen += size;