diff --git a/ChangeLog b/ChangeLog index db5eac106..4c0030fec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sun Jul 29 16:08:17 2001 Tim Janik + + * 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 * glib/gtypes.h: Use G_GNUC_EXTENSION instead of diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index db5eac106..4c0030fec 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Sun Jul 29 16:08:17 2001 Tim Janik + + * 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 * glib/gtypes.h: Use G_GNUC_EXTENSION instead of diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index db5eac106..4c0030fec 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Sun Jul 29 16:08:17 2001 Tim Janik + + * 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 * glib/gtypes.h: Use G_GNUC_EXTENSION instead of diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index db5eac106..4c0030fec 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +Sun Jul 29 16:08:17 2001 Tim Janik + + * 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 * glib/gtypes.h: Use G_GNUC_EXTENSION instead of diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index db5eac106..4c0030fec 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Sun Jul 29 16:08:17 2001 Tim Janik + + * 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 * glib/gtypes.h: Use G_GNUC_EXTENSION instead of diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index db5eac106..4c0030fec 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Sun Jul 29 16:08:17 2001 Tim Janik + + * 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 * glib/gtypes.h: Use G_GNUC_EXTENSION instead of diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index db5eac106..4c0030fec 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Sun Jul 29 16:08:17 2001 Tim Janik + + * 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 * glib/gtypes.h: Use G_GNUC_EXTENSION instead of diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index db5eac106..4c0030fec 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Sun Jul 29 16:08:17 2001 Tim Janik + + * 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 * glib/gtypes.h: Use G_GNUC_EXTENSION instead of diff --git a/docs/reference/glib/tmpl/glib-unused.sgml b/docs/reference/glib/tmpl/glib-unused.sgml index b47762529..0c63db5f9 100644 --- a/docs/reference/glib/tmpl/glib-unused.sgml +++ b/docs/reference/glib/tmpl/glib-unused.sgml @@ -59,6 +59,18 @@ @hook_list: @hook: + + + + + +@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: + @@ -79,6 +91,14 @@ depending on the system type. + + +Encoding for nonbuffered IO. With this encoding, data must be +read using g_io_channel_read_chars(); the other functions will +not work. + + + @@ -97,6 +117,21 @@ depending on the system type. + + + + + +@en: +@Returns: + + + + + + +@Returns: + @@ -159,6 +194,17 @@ To use this function you must configure glib with the flag @mem: the memory to check. + + +Gets the file attributes. +This is the st_mode field from the +stat structure. See the stat() +documentation. + + +@filename: the file name. +@Returns: the file attributes. + diff --git a/docs/reference/glib/tmpl/iochannels.sgml b/docs/reference/glib/tmpl/iochannels.sgml index c8e84f5ce..557911de2 100644 --- a/docs/reference/glib/tmpl/iochannels.sgml +++ b/docs/reference/glib/tmpl/iochannels.sgml @@ -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. -@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: @@ -138,18 +137,6 @@ programmer (unless you are creating a new type of #GIOChannel). @Returns: - - - - - -@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: - @@ -271,14 +258,51 @@ operation. @G_SEEK_SET: @G_SEEK_END: - + + @channel: +@flush: +@err: +@Returns: - + + + + + +@G_IO_STATUS_ERROR: +@G_IO_STATUS_NORMAL: +@G_IO_STATUS_EOF: +@G_IO_STATUS_AGAIN: + + + + + + +@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: + + + + + + + + + @@ -286,7 +310,7 @@ operation. @Returns: - + @@ -538,6 +562,24 @@ generic way. + + + + + +@channel: +@Returns: + + + + + + + +@channel: +@buffered: + + @@ -558,15 +600,6 @@ generic way. @Returns: - - -Encoding for nonbuffered IO. With this encoding, data must be -read using g_io_channel_read_chars(); the other functions will -not work. - - - - @@ -611,3 +644,10 @@ g_io_channel_write(), and g_io_channel_seek(). @Returns: + + + + +@channel: + + diff --git a/docs/reference/glib/tmpl/scanner.sgml b/docs/reference/glib/tmpl/scanner.sgml index 2be014943..7a67888c2 100644 --- a/docs/reference/glib/tmpl/scanner.sgml +++ b/docs/reference/glib/tmpl/scanner.sgml @@ -152,18 +152,6 @@ Prepares to scan a file. @scanner: - - -Gets the file attributes. -This is the st_mode field from the -stat structure. See the stat() -documentation. - - -@filename: the file name. -@Returns: the file attributes. - - Prepares to scan a text buffer. diff --git a/glib/gscanner.c b/glib/gscanner.c index e73034a7f..04ce705ae 100644 --- a/glib/gscanner.c +++ b/glib/gscanner.c @@ -46,8 +46,6 @@ #include #endif #include -#include /* needed for sys/stat.h */ -#include #ifdef G_OS_WIN32 #include /* 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, diff --git a/glib/gscanner.h b/glib/gscanner.h index cbcc48c27..951d3ff20 100644 --- a/glib/gscanner.h +++ b/glib/gscanner.h @@ -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)); \