34 #include <sys/types.h>
55 register char *argv[];
56 rle_hdr *in_hdr,*out_hdr;
58 register int length,i;
64 char *timedate,*old= NULL;
67 if(getenv(
"NO_ADD_RLE_HISTORY"))
return;
71 length+= strlen(argv[i]) +1;
74 timedate=ctime(&temp);
75 length+= strlen(timedate);
77 length+= strlen(padding) + 3 + strlen(histoire) + 1;
81 if((old) && (*old)) length+= strlen(old);
85 if((newc=(
char *)malloc((
unsigned int) length)) == NULL)
return;
87 (
void)strcpy(newc,histoire);(
void)strcat(newc,
"=");
88 if((old) && (*old)) (
void)strcat(newc,old);
91 (
void)strcat(newc,argv[i]);(
void)strcat(newc,
" ");
93 (
void)strcat(newc,
"on ");(
void)strcat(newc,timedate);
94 (
void)strcat(newc,padding);
void rle_addhist(argv, rle_hdr *in_hdr, rle_hdr *out_hdr)
char * rle_getcom(char *name, rle_hdr *the_hdr) const
const char * rle_putcom(char *value, rle_hdr *the_hdr) const