%{ #include "wisebase.h" #include %} %{ #include "wisetime.h" %func returns a buffer of the current date and time %% char * now_string(void) { char * temp; char * runner; time_t now; now=time(NULL); temp=ctime(&now); runner=temp+strlen(temp); runner--; *runner='\0'; /* got rid of annoying new line */ return temp; } %func puts now_string into file, with no newline %% void time_stamp(FILE * ofp) { time_t now; now=time(NULL); fputs(ctime(&now),ofp); return; } %}