cleanups of the structure fields (binary incompatible).
authorTim Janik <timj@gtk.org>
Fri, 12 Jun 1998 14:39:38 +0000 (14:39 +0000)
committerTim Janik <timj@src.gnome.org>
Fri, 12 Jun 1998 14:39:38 +0000 (14:39 +0000)
Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>

        * glib.h (GScanner): cleanups of the structure fields (binary
        incompatible).

12 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib.h
glib/glib.h
glib/gscanner.c
gscanner.c

index 6286236..81e4caa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h (GScanner): cleanups of the structure fields (binary
+       incompatible).
+
 Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>
 
        * glib.h: add new hash and equal functions g_int_*.  complement
index 6286236..81e4caa 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h (GScanner): cleanups of the structure fields (binary
+       incompatible).
+
 Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>
 
        * glib.h: add new hash and equal functions g_int_*.  complement
index 6286236..81e4caa 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h (GScanner): cleanups of the structure fields (binary
+       incompatible).
+
 Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>
 
        * glib.h: add new hash and equal functions g_int_*.  complement
index 6286236..81e4caa 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h (GScanner): cleanups of the structure fields (binary
+       incompatible).
+
 Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>
 
        * glib.h: add new hash and equal functions g_int_*.  complement
index 6286236..81e4caa 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h (GScanner): cleanups of the structure fields (binary
+       incompatible).
+
 Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>
 
        * glib.h: add new hash and equal functions g_int_*.  complement
index 6286236..81e4caa 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h (GScanner): cleanups of the structure fields (binary
+       incompatible).
+
 Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>
 
        * glib.h: add new hash and equal functions g_int_*.  complement
index 6286236..81e4caa 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h (GScanner): cleanups of the structure fields (binary
+       incompatible).
+
 Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>
 
        * glib.h: add new hash and equal functions g_int_*.  complement
index 6286236..81e4caa 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
+
+       * glib.h (GScanner): cleanups of the structure fields (binary
+       incompatible).
+
 Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>
 
        * glib.h: add new hash and equal functions g_int_*.  complement
diff --git a/glib.h b/glib.h
index c3733d4..cac097f 100644 (file)
--- a/glib.h
+++ b/glib.h
@@ -1118,30 +1118,42 @@ struct  _GScannerConfig
 
 struct _GScanner
 {
-  /* unused portions */
+  /* unused fields */
   gpointer             user_data;
-  const gchar          *input_name;
-  guint                        parse_errors;
   guint                        max_parse_errors;
-  
-  /* maintained/used by the g_scanner_*() functions */
+
+  /* g_scanner_error() increments this field */
+  guint                        parse_errors;
+
+  /* name of input stream, featured by the default message handler */
+  const gchar          *input_name;
+
+  /* data pointer for derived structures */
+  gpointer             derived_data;
+
+  /* link into the scanner configuration */
   GScannerConfig       *config;
+
+  /* fields filled in after g_scanner_get_next_token() */
   GTokenType           token;
   GValue               value;
   guint                        line;
   guint                        position;
-  
-  /* to be considered private */
+
+  /* fields filled in after g_scanner_peek_next_token() */
   GTokenType           next_token;
   GValue               next_value;
   guint                        next_line;
   guint                        next_position;
+
+  /* to be considered private */
   GHashTable           *symbol_table;
   const gchar          *text;
   guint                        text_len;
   gint                 input_fd;
   gint                 peeked_char;
 
+  /* handler function for _warn and _error */
   GScannerMsgFunc      msg_handler;
 };
 
index c3733d4..cac097f 100644 (file)
@@ -1118,30 +1118,42 @@ struct  _GScannerConfig
 
 struct _GScanner
 {
-  /* unused portions */
+  /* unused fields */
   gpointer             user_data;
-  const gchar          *input_name;
-  guint                        parse_errors;
   guint                        max_parse_errors;
-  
-  /* maintained/used by the g_scanner_*() functions */
+
+  /* g_scanner_error() increments this field */
+  guint                        parse_errors;
+
+  /* name of input stream, featured by the default message handler */
+  const gchar          *input_name;
+
+  /* data pointer for derived structures */
+  gpointer             derived_data;
+
+  /* link into the scanner configuration */
   GScannerConfig       *config;
+
+  /* fields filled in after g_scanner_get_next_token() */
   GTokenType           token;
   GValue               value;
   guint                        line;
   guint                        position;
-  
-  /* to be considered private */
+
+  /* fields filled in after g_scanner_peek_next_token() */
   GTokenType           next_token;
   GValue               next_value;
   guint                        next_line;
   guint                        next_position;
+
+  /* to be considered private */
   GHashTable           *symbol_table;
   const gchar          *text;
   guint                        text_len;
   gint                 input_fd;
   gint                 peeked_char;
 
+  /* handler function for _warn and _error */
   GScannerMsgFunc      msg_handler;
 };
 
index ccb6960..41fcb4a 100644 (file)
@@ -159,9 +159,10 @@ g_scanner_new (GScannerConfig      *config_templ)
   scanner = g_new0 (GScanner, 1);
   
   scanner->user_data = NULL;
-  scanner->input_name = NULL;
-  scanner->parse_errors        = 0;
   scanner->max_parse_errors = 0;
+  scanner->parse_errors        = 0;
+  scanner->input_name = NULL;
+  scanner->derived_data = NULL;
   
   scanner->config = g_new0 (GScannerConfig, 1);
   
@@ -199,7 +200,7 @@ g_scanner_new (GScannerConfig       *config_templ)
   scanner->next_value.v_int = 0;
   scanner->next_line = 1;
   scanner->next_position = 0;
-  
+
   scanner->symbol_table = g_hash_table_new (g_str_hash, g_str_equal);
   scanner->text = NULL;
   scanner->text_len = 0;
index ccb6960..41fcb4a 100644 (file)
@@ -159,9 +159,10 @@ g_scanner_new (GScannerConfig      *config_templ)
   scanner = g_new0 (GScanner, 1);
   
   scanner->user_data = NULL;
-  scanner->input_name = NULL;
-  scanner->parse_errors        = 0;
   scanner->max_parse_errors = 0;
+  scanner->parse_errors        = 0;
+  scanner->input_name = NULL;
+  scanner->derived_data = NULL;
   
   scanner->config = g_new0 (GScannerConfig, 1);
   
@@ -199,7 +200,7 @@ g_scanner_new (GScannerConfig       *config_templ)
   scanner->next_value.v_int = 0;
   scanner->next_line = 1;
   scanner->next_position = 0;
-  
+
   scanner->symbol_table = g_hash_table_new (g_str_hash, g_str_equal);
   scanner->text = NULL;
   scanner->text_len = 0;