[java-atk-wrapper] Rename log_file to jaw_log_file



commit 7d4a73b9e17a7d936d220115778f87319fa30c82
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Sat Jul 27 18:00:46 2019 +0200

    Rename log_file to jaw_log_file
    
    To avoid namespace pollution

 jni/src/AtkWrapper.c | 8 ++++----
 jni/src/jawutil.h    | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index f159c18..1cf7598 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -30,7 +30,7 @@
 #include "AtkWrapper.h"
 
 int jaw_debug = 0;
-FILE *log_file;
+FILE *jaw_log_file;
 
 #ifdef __cplusplus
 extern "C" {
@@ -97,10 +97,10 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_initNativeLibrary(void)
   }
   if (jaw_debug)
   {
-    log_file = fopen("log_file.txt","w+");
-    if (!log_file)
+    jaw_log_file = fopen("jaw_log_file.txt","w+");
+    if (!jaw_log_file)
     {
-      fprintf(stderr, "Error opening log file log_file.txt\n");
+      fprintf(stderr, "Error opening log file jaw_log_file.txt\n");
       exit(1);
     }
   }
diff --git a/jni/src/jawutil.h b/jni/src/jawutil.h
index a340560..5d01dd5 100644
--- a/jni/src/jawutil.h
+++ b/jni/src/jawutil.h
@@ -26,11 +26,11 @@
 #include <time.h>
 
 extern int jaw_debug;
-extern FILE *log_file;
+extern FILE *jaw_log_file;
 
 #define PRINT_AND_FLUSH(fmt, ...) do { \
-    fprintf(log_file, "TIME:[%lu] PID:{%d} %s" fmt "\n", (unsigned long) time(NULL), (int)getpid(), 
__func__, ##__VA_ARGS__); \
-    fflush(log_file); \
+    fprintf(jaw_log_file, "TIME:[%lu] PID:{%d} %s" fmt "\n", (unsigned long) time(NULL), (int)getpid(), 
__func__, ##__VA_ARGS__); \
+    fflush(jaw_log_file); \
 } while (0)
 
 #define JAW_DEBUG_I(fmt, ...) do { \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]