#include "rle.h"
#include <stdio.h>
#include <time.h>
Go to the source code of this file.
Definition at line 54 of file rle_addhist.c.
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);
char * rle_getcom(const char *name, rle_hdr *the_hdr)
const char * rle_putcom(const char *value, rle_hdr *the_hdr)