version 1.18 | | version 1.19 |
---|
| | |
/* | | /* |
* static char *rcsid_porting_c = | | * static char *rcsid_porting_c = |
* "$Id: porting.c,v 1.18 2003/02/04 06:26:06 garbled Exp $"; | | * "$Id: porting.c,v 1.19 2003/03/08 05:35:32 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
*/ | | */ |
| | |
void save_long(char *buf, char *name, long n) { | | void save_long(char *buf, char *name, long n) { |
#if 0 /* This doesn't work, since buf is always the beginning */ | | |
char *cp, *var; | | |
for(cp=buf;*name!='\0';) | | |
*cp++ = *name++; | | |
*cp++=' '; | | |
for(var=ltostr10(n);*var!='\0';) | | |
*cp++ = *name++; | | |
*cp='\0'; | | |
#else | | |
char buf2[MAX_BUF]; | | char buf2[MAX_BUF]; |
| | |
strcpy(buf2,name); | | strcpy(buf2,name); |
strcat(buf2," "); | | strcat(buf2," "); |
strcat(buf2,ltostr10(n)); | | strcat(buf2,ltostr10(n)); |
strcat(buf2,"\n"); | | strcat(buf2,"\n"); |
strcat(buf,buf2); | | strcat(buf,buf2); |
#endif | | } |
| | |
| | |
| | |
| | void save_long_long(char *buf, char *name, sint64 n) { |
| | char buf2[MAX_BUF]; |
| | |
| | sprintf(buf2,"%s %lld\n", name, n); |
| | strcat(buf,buf2); |
} | | } |
| | |
/* This is a list of the suffix, uncompress and compress functions. Thus, | | /* This is a list of the suffix, uncompress and compress functions. Thus, |