if __GNUC__ is defined, inline a test for an exact type match for
authorTim Janik <timj@gtk.org>
Sun, 29 Jul 2001 16:02:45 +0000 (16:02 +0000)
committerTim Janik <timj@src.gnome.org>
Sun, 29 Jul 2001 16:02:45 +0000 (16:02 +0000)
Wed Jul 18 19:42:31 2001  Tim Janik  <timj@gtk.org>

        * gtype.h: if __GNUC__ is defined, inline a test for an exact type
        match for instances and classes in G_TYPE_CHECK_INSTANCE_TYPE() and
        G_TYPE_CHECK_CLASS_TYPE() before calling g_type_instance_is_a().

Sun Jul 29 16:08:17 2001  Tim Janik  <timj@gtk.org>

        * glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().

        * glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
        errors and warnings to stderr.

13 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
docs/reference/glib/tmpl/glib-unused.sgml
docs/reference/glib/tmpl/iochannels.sgml
docs/reference/glib/tmpl/scanner.sgml
glib/gscanner.c
glib/gscanner.h

index db5eac1..4c0030f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun Jul 29 16:08:17 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
+
+       * glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
+       errors and warnings to stderr.
+
 2001-07-27  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib/gtypes.h: Use G_GNUC_EXTENSION instead of
index db5eac1..4c0030f 100644 (file)
@@ -1,3 +1,10 @@
+Sun Jul 29 16:08:17 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
+
+       * glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
+       errors and warnings to stderr.
+
 2001-07-27  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib/gtypes.h: Use G_GNUC_EXTENSION instead of
index db5eac1..4c0030f 100644 (file)
@@ -1,3 +1,10 @@
+Sun Jul 29 16:08:17 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
+
+       * glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
+       errors and warnings to stderr.
+
 2001-07-27  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib/gtypes.h: Use G_GNUC_EXTENSION instead of
index db5eac1..4c0030f 100644 (file)
@@ -1,3 +1,10 @@
+Sun Jul 29 16:08:17 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
+
+       * glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
+       errors and warnings to stderr.
+
 2001-07-27  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib/gtypes.h: Use G_GNUC_EXTENSION instead of
index db5eac1..4c0030f 100644 (file)
@@ -1,3 +1,10 @@
+Sun Jul 29 16:08:17 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
+
+       * glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
+       errors and warnings to stderr.
+
 2001-07-27  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib/gtypes.h: Use G_GNUC_EXTENSION instead of
index db5eac1..4c0030f 100644 (file)
@@ -1,3 +1,10 @@
+Sun Jul 29 16:08:17 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
+
+       * glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
+       errors and warnings to stderr.
+
 2001-07-27  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib/gtypes.h: Use G_GNUC_EXTENSION instead of
index db5eac1..4c0030f 100644 (file)
@@ -1,3 +1,10 @@
+Sun Jul 29 16:08:17 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
+
+       * glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
+       errors and warnings to stderr.
+
 2001-07-27  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib/gtypes.h: Use G_GNUC_EXTENSION instead of
index db5eac1..4c0030f 100644 (file)
@@ -1,3 +1,10 @@
+Sun Jul 29 16:08:17 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
+
+       * glib/gscanner.c (g_scanner_msg_handler): by default, print scanner
+       errors and warnings to stderr.
+
 2001-07-27  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * glib/gtypes.h: Use G_GNUC_EXTENSION instead of
index b477625..0c63db5 100644 (file)
 @hook_list: 
 @hook: 
 
+<!-- ##### ENUM GIOFileMode ##### -->
+<para>
+
+</para>
+
+@G_IO_FILE_MODE_READ: 
+@G_IO_FILE_MODE_WRITE: 
+@G_IO_FILE_MODE_APPEND: 
+@G_IO_FILE_MODE_READ_WRITE: 
+@G_IO_FILE_MODE_READ_WRITE_TRUNCATE: 
+@G_IO_FILE_MODE_READ_WRITE_APPEND: 
+
 <!-- ##### MACRO G_CHANNEL_ERROR ##### -->
 <para>
 
@@ -79,6 +91,14 @@ depending on the system type.
 </para>
 
 
+<!-- ##### MACRO G_IO_CHANNEL_ENCODE_RAW ##### -->
+<para>
+Encoding for nonbuffered IO. With this encoding, data must be
+read using g_io_channel_read_chars(); the other functions will
+not work.
+</para>
+
+
 <!-- ##### MACRO access ##### -->
 <para>
 
@@ -97,6 +117,21 @@ depending on the system type.
 </para>
 
 
+<!-- ##### FUNCTION g_channel_error_from_errno ##### -->
+<para>
+
+</para>
+
+@en: 
+@Returns: 
+
+<!-- ##### FUNCTION g_channel_error_quark ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
 <!-- ##### FUNCTION g_convert_error_quark ##### -->
 <para>
 
@@ -159,6 +194,17 @@ To use this function you must configure glib with the flag
 
 @mem: the memory to check.
 
+<!-- ##### FUNCTION g_scanner_stat_mode ##### -->
+<para>
+Gets the file attributes.
+This is the <structfield>st_mode</structfield> field from the
+<structname>stat</structname> structure. See the <function>stat()</function>
+documentation.
+</para>
+
+@filename: the file name.
+@Returns: the file attributes.
+
 <!-- ##### FUNCTION g_source_add ##### -->
 <para>
 </para>
index c8e84f5..557911d 100644 (file)
@@ -77,7 +77,6 @@ A data structure representing an IO Channel. The fields should be considered
 private and should only be accessed with the following functions.
 </para>
 
-@channel_flags: 
 @ref_count: 
 @funcs: 
 @encoding: 
@@ -88,12 +87,12 @@ private and should only be accessed with the following functions.
 @read_buf: 
 @encoded_read_buf: 
 @write_buf: 
+@partial_write_buf: 
 @use_buffer: 
 @do_encode: 
-@ready_to_read: 
-@ready_to_write: 
 @close_on_unref: 
-@seekable_cached: 
+@is_readable: 
+@is_writeable: 
 @is_seekable: 
 
 <!-- ##### FUNCTION g_io_channel_unix_new ##### -->
@@ -138,18 +137,6 @@ programmer (unless you are creating a new type of #GIOChannel).
 @Returns: 
 
 
-<!-- ##### ENUM GIOFileMode ##### -->
-<para>
-
-</para>
-
-@G_IO_FILE_MODE_READ: 
-@G_IO_FILE_MODE_WRITE: 
-@G_IO_FILE_MODE_APPEND: 
-@G_IO_FILE_MODE_READ_WRITE: 
-@G_IO_FILE_MODE_READ_WRITE_TRUNCATE: 
-@G_IO_FILE_MODE_READ_WRITE_APPEND: 
-
 <!-- ##### FUNCTION g_io_channel_read_chars ##### -->
 <para>
 
@@ -271,14 +258,51 @@ operation.
 @G_SEEK_SET: 
 @G_SEEK_END: 
 
-<!-- ##### FUNCTION g_io_channel_close ##### -->
+<!-- ##### FUNCTION g_io_channel_shutdown ##### -->
 <para>
+
 </para>
 
 @channel: 
+@flush: 
+@err: 
+@Returns: 
+
+
+<!-- ##### ENUM GIOStatus ##### -->
+<para>
+
+</para>
+
+@G_IO_STATUS_ERROR: 
+@G_IO_STATUS_NORMAL: 
+@G_IO_STATUS_EOF: 
+@G_IO_STATUS_AGAIN: 
+
+<!-- ##### ENUM GIOChannelError ##### -->
+<para>
+
+</para>
+
+@G_IO_CHANNEL_ERROR_FBIG: 
+@G_IO_CHANNEL_ERROR_INVAL: 
+@G_IO_CHANNEL_ERROR_IO: 
+@G_IO_CHANNEL_ERROR_ISDIR: 
+@G_IO_CHANNEL_ERROR_NOSPC: 
+@G_IO_CHANNEL_ERROR_NXIO: 
+@G_IO_CHANNEL_ERROR_OVERFLOW: 
+@G_IO_CHANNEL_ERROR_PIPE: 
+@G_IO_CHANNEL_ERROR_PCHAR_FLUSH: 
+@G_IO_CHANNEL_ERROR_FAILED: 
+
+<!-- ##### MACRO G_IO_CHANNEL_ERROR ##### -->
+<para>
+
+</para>
+
 
 
-<!-- ##### FUNCTION g_channel_error_quark ##### -->
+<!-- ##### FUNCTION g_io_channel_error_quark ##### -->
 <para>
 
 </para>
@@ -286,7 +310,7 @@ operation.
 @Returns: 
 
 
-<!-- ##### FUNCTION g_channel_error_from_errno ##### -->
+<!-- ##### FUNCTION g_io_channel_error_from_errno ##### -->
 <para>
 
 </para>
@@ -538,7 +562,7 @@ generic way.
 
 
 
-<!-- ##### FUNCTION g_io_channel_get_encoding ##### -->
+<!-- ##### FUNCTION g_io_channel_get_buffered ##### -->
 <para>
 
 </para>
@@ -547,24 +571,33 @@ generic way.
 @Returns: 
 
 
-<!-- ##### FUNCTION g_io_channel_set_encoding ##### -->
+<!-- ##### FUNCTION g_io_channel_set_buffered ##### -->
+<para>
+
+</para>
+
+@channel: 
+@buffered: 
+
+
+<!-- ##### FUNCTION g_io_channel_get_encoding ##### -->
 <para>
 
 </para>
 
 @channel: 
-@encoding: 
-@error: 
 @Returns: 
 
 
-<!-- ##### MACRO G_IO_CHANNEL_ENCODE_RAW ##### -->
+<!-- ##### FUNCTION g_io_channel_set_encoding ##### -->
 <para>
-Encoding for nonbuffered IO. With this encoding, data must be
-read using g_io_channel_read_chars(); the other functions will
-not work.
+
 </para>
 
+@channel: 
+@encoding: 
+@error: 
+@Returns: 
 
 
 <!-- ##### FUNCTION g_io_channel_read ##### -->
@@ -611,3 +644,10 @@ g_io_channel_write(), and g_io_channel_seek().
 @Returns: 
 
 
+<!-- ##### FUNCTION g_io_channel_close ##### -->
+<para>
+</para>
+
+@channel: 
+
+
index 2be0149..7a67888 100644 (file)
@@ -152,18 +152,6 @@ Prepares to scan a file.
 @scanner: 
 
 
-<!-- ##### FUNCTION g_scanner_stat_mode ##### -->
-<para>
-Gets the file attributes.
-This is the <structfield>st_mode</structfield> field from the
-<structname>stat</structname> structure. See the <function>stat()</function>
-documentation.
-</para>
-
-@filename: the file name.
-@Returns: the file attributes.
-
-
 <!-- ##### FUNCTION g_scanner_input_text ##### -->
 <para>
 Prepares to scan a text buffer.
index e73034a..04ce705 100644 (file)
@@ -46,8 +46,6 @@
 #include       <unistd.h>
 #endif
 #include       <errno.h>
-#include       <sys/types.h>   /* needed for sys/stat.h */
-#include       <sys/stat.h>
 #ifdef G_OS_WIN32
 #include       <io.h>          /* For _read() */
 #endif
@@ -293,10 +291,10 @@ g_scanner_msg_handler (GScanner           *scanner,
 {
   g_return_if_fail (scanner != NULL);
   
-  fprintf (stdout, "%s:%d: ", scanner->input_name, scanner->line);
+  fprintf (stderr, "%s:%d: ", scanner->input_name, scanner->line);
   if (is_error)
-    fprintf (stdout, "error: ");
-  fprintf (stdout, "%s\n", message);
+    fprintf (stderr, "error: ");
+  fprintf (stderr, "%s\n", message);
 }
 
 void
@@ -1106,25 +1104,6 @@ g_scanner_unexp_token (GScanner          *scanner,
   g_free (expected_string);
 }
 
-gint
-g_scanner_stat_mode (const gchar *filename)
-{
-  struct stat  *stat_buf;
-  gint         st_mode;
-  
-  stat_buf = g_new0 (struct stat, 1);
-#ifdef HAVE_LSTAT  
-  lstat (filename, stat_buf);
-#else
-  stat (filename, stat_buf);
-#endif
-  st_mode = stat_buf->st_mode;
-  
-  g_free (stat_buf);
-  
-  return st_mode;
-}
-
 static void
 g_scanner_get_token_i (GScanner        *scanner,
                       GTokenType       *token_p,
index cbcc48c..951d3ff 100644 (file)
@@ -244,7 +244,6 @@ void                g_scanner_error                 (GScanner       *scanner,
 void           g_scanner_warn                  (GScanner       *scanner,
                                                 const gchar    *format,
                                                 ...) G_GNUC_PRINTF (2,3);
-gint           g_scanner_stat_mode             (const gchar    *filename);
 /* keep downward source compatibility */
 #define                g_scanner_add_symbol( scanner, symbol, value )  G_STMT_START { \
   g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \