1%{
2#include "wisebase.h"
3#include <time.h>
4%}
5
6
7%{
8#include "wisetime.h"
9
10%func
11returns a buffer
12of the current date and time
13%%
14char * now_string(void)
15{
16  char * temp;
17  char * runner;
18  time_t now;
19
20  now=time(NULL);
21  temp=ctime(&now);
22  runner=temp+strlen(temp);
23  runner--;
24  *runner='\0'; /* got rid of annoying new line */
25  return temp;
26}
27
28%func
29puts now_string into file, with
30no newline
31%%
32void time_stamp(FILE * ofp)
33{
34  time_t now;
35
36  now=time(NULL);
37  fputs(ctime(&now),ofp);
38
39  return;
40}
41
42%}
43
44