Add very old versions (for history).
[opsoft_archive.git] / silentbob / silentbob-1.4 / src / log.cxx
blob6b4cabbc16545ff83f0ac68b1e15ab32e8e68d73
1 /*
2 * (c) Oleg Puchinin 2006
3 * graycardinalster@gmail.com
5 */
7 #include "head.h"
9 #if 0
10 int log_write (char *log_name, char *log_str)
12 FILE * myfile;
13 char buf[1024];
14 char ts[512];
16 sprintf (buf, "/home/oleg/bob_%s.log", log_name);
17 myfile = fopen (buf, "a");
18 if (! myfile)
19 return -1;
21 Dtimestr (ts, 512);
22 fprintf (myfile, "%s - %s\n", ts, log_str);
23 fclose (myfile);
25 return 0;
28 int log_globals (char *file, int type, int size)
30 char buf[512];
31 sprintf (buf, "file=%s type=%i size=%i", file, type, size);
32 return log_write ("globals", buf);
35 int log_init ()
37 char str[512];
38 sprintf (str, "home=%s tmp_files=%s tmp_tags=%s",
39 ENV->home_dir, ENV->tmp_files, ENV->tmp_tags);
40 return log_write ("init", str);
43 #else
44 int log_write (char *log_name, char *log_str)
46 return 0;
49 int log_globals (char *file, int type, int size)
51 return 0;
54 int log_init ()
56 return 0;
58 #endif