]> mj.ucw.cz Git - libucw.git/blobdiff - lib/log-file.c
Added the local copy of the regex library back.
[libucw.git] / lib / log-file.c
index f880dc1ddf9049cd62e2b9d98b1a1af3bba76d29..0b22ff243e8811618dadf45c201b17b9051f74ec 100644 (file)
@@ -20,7 +20,7 @@
 static char *log_name_patt;
 static int log_params;
 static int log_filename_size;
-volatile int log_switch_nest;
+static int log_switch_nest;
 
 static int
 do_log_switch(struct tm *tm)
@@ -67,7 +67,7 @@ internal_log_switch(struct tm *tm)
 }
 
 void
-log_file(byte *name)
+log_file(const char *name)
 {
   if (name)
     {
@@ -94,6 +94,19 @@ log_fork(void)
   log_pid = getpid();
 }
 
+void
+log_switch_disable(void)
+{
+  log_switch_nest++;
+}
+
+void
+log_switch_enable(void)
+{
+  ASSERT(log_switch_nest);
+  log_switch_nest--;
+}
+
 #ifdef TEST
 
 int main(int argc, char **argv)