55 |
extern gchar **qso; |
extern gchar **qso; |
56 |
|
|
57 |
/* backup a log */ |
/* backup a log */ |
58 |
void |
void |
59 |
backuplog (gchar *filename, gchar *backupfilename) |
backuplog (gchar *filename, gchar *backupfilename) |
60 |
{ |
{ |
61 |
gint ch; |
gint ch; |
63 |
|
|
64 |
in = fopen (filename,"r"); |
in = fopen (filename,"r"); |
65 |
out = fopen (backupfilename,"w"); |
out = fopen (backupfilename,"w"); |
66 |
while ( (ch = getc (in) ) != EOF) putc (ch, out); |
if (in && out) |
67 |
fclose (in); |
{ |
68 |
fclose (out); |
while ( (ch = getc (in) ) != EOF) putc (ch, out); |
69 |
|
fclose (in); |
70 |
|
fclose (out); |
71 |
|
} |
72 |
} |
} |
73 |
|
|
74 |
/* extract name of the log from filename, returned string should be free'd */ |
/* extract name of the log from filename, returned string should be free'd */ |