From 110c6cbac8d9cbddc27dcdf3f6c22889262fcc54 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 5 Nov 2000 16:38:16 +0000 Subject: [PATCH] Added 2000-11-05 Havoc Pennington * glib/tmpl/spawn.sgml, glib/tmpl/markup.sgml, glib/tmpl/fileutils.sgml: Added * glib/Makefile.am: Add new files * glib/glib-sections.txt: Add stuff from -unused 2000-11-05 Havoc Pennington * gutils.c (g_find_program_in_path): cleanup docs, sync param names to those in the header * gfileutils.c (g_mkstemp): clean up docs * gshell.h: sync param names with param names in .c file * gfileutils.h (enum GFileTest): remove trailing comma from last member, confuses gtk-doc * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow convention --- ChangeLog | 15 +++ ChangeLog.pre-2-0 | 15 +++ ChangeLog.pre-2-10 | 15 +++ ChangeLog.pre-2-12 | 15 +++ ChangeLog.pre-2-2 | 15 +++ ChangeLog.pre-2-4 | 15 +++ ChangeLog.pre-2-6 | 15 +++ ChangeLog.pre-2-8 | 15 +++ docs/reference/ChangeLog | 9 ++ docs/reference/glib/Makefile.am | 4 + docs/reference/glib/glib-sections.txt | 67 ++++++++++ docs/reference/glib/tmpl/caches.sgml | 6 +- docs/reference/glib/tmpl/fileutils.sgml | 104 ++++++++++++++++ docs/reference/glib/tmpl/glib-unused.sgml | 11 -- docs/reference/glib/tmpl/hash_tables.sgml | 18 ++- docs/reference/glib/tmpl/markup.sgml | 121 ++++++++++++++++++ docs/reference/glib/tmpl/misc_utils.sgml | 9 ++ docs/reference/glib/tmpl/relations.sgml | 4 +- docs/reference/glib/tmpl/spawn.sgml | 145 ++++++++++++++++++++++ docs/reference/glib/tmpl/strings.sgml | 10 ++ gfileutils.c | 11 +- gfileutils.h | 2 +- glib/gfileutils.c | 11 +- glib/gfileutils.h | 2 +- glib/gmarkup.c | 4 +- glib/gmarkup.h | 2 +- glib/gshell.h | 4 +- glib/gutils.c | 24 ++-- gmarkup.c | 4 +- gmarkup.h | 2 +- gshell.h | 4 +- gutils.c | 24 ++-- 32 files changed, 661 insertions(+), 61 deletions(-) create mode 100644 docs/reference/glib/tmpl/fileutils.sgml create mode 100644 docs/reference/glib/tmpl/markup.sgml create mode 100644 docs/reference/glib/tmpl/spawn.sgml diff --git a/ChangeLog b/ChangeLog index 179ca87f2..3f857f54d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2000-11-05 Havoc Pennington + + * gutils.c (g_find_program_in_path): cleanup docs, sync param + names to those in the header + + * gfileutils.c (g_mkstemp): clean up docs + + * gshell.h: sync param names with param names in .c file + + * gfileutils.h (enum GFileTest): remove trailing comma from last + member, confuses gtk-doc + + * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow + convention + 2000-11-02 Sebastian Wilhelmi * gasyncqueue.c: Added documentation for asyncronous queues. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 179ca87f2..3f857f54d 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,18 @@ +2000-11-05 Havoc Pennington + + * gutils.c (g_find_program_in_path): cleanup docs, sync param + names to those in the header + + * gfileutils.c (g_mkstemp): clean up docs + + * gshell.h: sync param names with param names in .c file + + * gfileutils.h (enum GFileTest): remove trailing comma from last + member, confuses gtk-doc + + * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow + convention + 2000-11-02 Sebastian Wilhelmi * gasyncqueue.c: Added documentation for asyncronous queues. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 179ca87f2..3f857f54d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,18 @@ +2000-11-05 Havoc Pennington + + * gutils.c (g_find_program_in_path): cleanup docs, sync param + names to those in the header + + * gfileutils.c (g_mkstemp): clean up docs + + * gshell.h: sync param names with param names in .c file + + * gfileutils.h (enum GFileTest): remove trailing comma from last + member, confuses gtk-doc + + * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow + convention + 2000-11-02 Sebastian Wilhelmi * gasyncqueue.c: Added documentation for asyncronous queues. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 179ca87f2..3f857f54d 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,18 @@ +2000-11-05 Havoc Pennington + + * gutils.c (g_find_program_in_path): cleanup docs, sync param + names to those in the header + + * gfileutils.c (g_mkstemp): clean up docs + + * gshell.h: sync param names with param names in .c file + + * gfileutils.h (enum GFileTest): remove trailing comma from last + member, confuses gtk-doc + + * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow + convention + 2000-11-02 Sebastian Wilhelmi * gasyncqueue.c: Added documentation for asyncronous queues. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 179ca87f2..3f857f54d 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,18 @@ +2000-11-05 Havoc Pennington + + * gutils.c (g_find_program_in_path): cleanup docs, sync param + names to those in the header + + * gfileutils.c (g_mkstemp): clean up docs + + * gshell.h: sync param names with param names in .c file + + * gfileutils.h (enum GFileTest): remove trailing comma from last + member, confuses gtk-doc + + * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow + convention + 2000-11-02 Sebastian Wilhelmi * gasyncqueue.c: Added documentation for asyncronous queues. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 179ca87f2..3f857f54d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,18 @@ +2000-11-05 Havoc Pennington + + * gutils.c (g_find_program_in_path): cleanup docs, sync param + names to those in the header + + * gfileutils.c (g_mkstemp): clean up docs + + * gshell.h: sync param names with param names in .c file + + * gfileutils.h (enum GFileTest): remove trailing comma from last + member, confuses gtk-doc + + * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow + convention + 2000-11-02 Sebastian Wilhelmi * gasyncqueue.c: Added documentation for asyncronous queues. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 179ca87f2..3f857f54d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,18 @@ +2000-11-05 Havoc Pennington + + * gutils.c (g_find_program_in_path): cleanup docs, sync param + names to those in the header + + * gfileutils.c (g_mkstemp): clean up docs + + * gshell.h: sync param names with param names in .c file + + * gfileutils.h (enum GFileTest): remove trailing comma from last + member, confuses gtk-doc + + * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow + convention + 2000-11-02 Sebastian Wilhelmi * gasyncqueue.c: Added documentation for asyncronous queues. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 179ca87f2..3f857f54d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,18 @@ +2000-11-05 Havoc Pennington + + * gutils.c (g_find_program_in_path): cleanup docs, sync param + names to those in the header + + * gfileutils.c (g_mkstemp): clean up docs + + * gshell.h: sync param names with param names in .c file + + * gfileutils.h (enum GFileTest): remove trailing comma from last + member, confuses gtk-doc + + * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow + convention + 2000-11-02 Sebastian Wilhelmi * gasyncqueue.c: Added documentation for asyncronous queues. diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 8b658402d..4da41bf3a 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,12 @@ +2000-11-05 Havoc Pennington + + * glib/tmpl/spawn.sgml, glib/tmpl/markup.sgml, + glib/tmpl/fileutils.sgml: Added + + * glib/Makefile.am: Add new files + + * glib/glib-sections.txt: Add stuff from -unused + Fri Nov 3 07:33:15 2000 Tim Janik * gobject/gobject-docs.sgml: added &gobject-closures; section. diff --git a/docs/reference/glib/Makefile.am b/docs/reference/glib/Makefile.am index cd92ff5b8..1749bc226 100644 --- a/docs/reference/glib/Makefile.am +++ b/docs/reference/glib/Makefile.am @@ -34,6 +34,7 @@ tmpl_sources = \ tmpl/datasets.sgml \ tmpl/date.sgml \ tmpl/error_reporting.sgml \ + tmpl/fileutils.sgml \ tmpl/glib-unused.sgml \ tmpl/hash_tables.sgml \ tmpl/hooks.sgml \ @@ -44,6 +45,7 @@ tmpl_sources = \ tmpl/macros.sgml \ tmpl/macros_misc.sgml \ tmpl/main.sgml \ + tmpl/markup.sgml \ tmpl/memory.sgml \ tmpl/memory_chunks.sgml \ tmpl/messages.sgml \ @@ -55,6 +57,8 @@ tmpl_sources = \ tmpl/random_numbers.sgml \ tmpl/relations.sgml \ tmpl/scanner.sgml \ + tmpl/shell.sgml \ + tmpl/spawn.sgml \ tmpl/string_chunks.sgml \ tmpl/string_utils.sgml \ tmpl/strings.sgml \ diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index 1892b4424..39630e934 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -678,6 +678,69 @@ g_timer_reset g_timer_destroy +
+Spawning Processes (fork/exec) +spawn +GSpawnError +G_SPAWN_ERROR +GSpawnFlags +GSpawnChildSetupFunc +g_spawn_async_with_pipes +g_spawn_async +g_spawn_sync +g_spawn_command_line_async +g_spawn_command_line_sync + +g_spawn_error_quark +
+ +
+Simple XML Subset Parser +markup +GMarkupError +G_MARKUP_ERROR +GMarkupParseFlags +GMarkupParseContext +GMarkupParser +g_markup_escape_text +g_markup_parse_context_end_parse +g_markup_parse_context_free +g_markup_parse_context_get_position +g_markup_parse_context_new +g_markup_parse_context_parse + +g_markup_error_quark +
+ + +
+Shell-related Utilities +shell +GShellError +G_SHELL_ERROR +g_shell_parse_argv +g_shell_quote +g_shell_unquote + +g_shell_error_quark +
+ + +
+File Utilities +fileutils +GFileError +G_FILE_ERROR +GFileTest +g_file_error_from_errno +g_file_get_contents +g_file_test +g_mkstemp + +g_file_error_quark +
+ +
String Utility Functions string_utils @@ -890,6 +953,9 @@ g_path_get_dirname g_filename_to_utf8 g_filename_from_utf8 + +g_find_program_in_path + g_bit_nth_lsf g_bit_nth_msf @@ -1223,6 +1289,7 @@ g_str_hash strings GString g_string_new +g_string_new_len g_string_sized_new g_string_assign g_string_sprintf diff --git a/docs/reference/glib/tmpl/caches.sgml b/docs/reference/glib/tmpl/caches.sgml index 119b732f6..33752e5c2 100644 --- a/docs/reference/glib/tmpl/caches.sgml +++ b/docs/reference/glib/tmpl/caches.sgml @@ -51,11 +51,11 @@ called by g_cache_remove() when the object is no longer needed (i.e. its reference count drops to 0). @hash_key_func: a function to create a hash value from a key. @hash_value_func: a function to create a hash value from a value. -@key_compare_func: -@Returns: a new #GCache. - @key_equal_func: a function to compare two keys. It should return TRUE if the two keys are equivalent. +@Returns: a new #GCache. + +@key_compare_func: diff --git a/docs/reference/glib/tmpl/fileutils.sgml b/docs/reference/glib/tmpl/fileutils.sgml new file mode 100644 index 000000000..bc1db140a --- /dev/null +++ b/docs/reference/glib/tmpl/fileutils.sgml @@ -0,0 +1,104 @@ + +File Utilities + + + + + + + + + + + + + + + + + + + +@G_FILE_ERROR_EXIST: +@G_FILE_ERROR_ISDIR: +@G_FILE_ERROR_ACCES: +@G_FILE_ERROR_NAMETOOLONG: +@G_FILE_ERROR_NOENT: +@G_FILE_ERROR_NOTDIR: +@G_FILE_ERROR_NXIO: +@G_FILE_ERROR_NODEV: +@G_FILE_ERROR_ROFS: +@G_FILE_ERROR_TXTBSY: +@G_FILE_ERROR_FAULT: +@G_FILE_ERROR_LOOP: +@G_FILE_ERROR_NOSPC: +@G_FILE_ERROR_NOMEM: +@G_FILE_ERROR_MFILE: +@G_FILE_ERROR_NFILE: +@G_FILE_ERROR_BADF: +@G_FILE_ERROR_INVAL: +@G_FILE_ERROR_PIPE: +@G_FILE_ERROR_AGAIN: +@G_FILE_ERROR_INTR: +@G_FILE_ERROR_IO: +@G_FILE_ERROR_PERM: +@G_FILE_ERROR_FAILED: + + + + + + + + + + + + + +@G_FILE_TEST_IS_REGULAR: +@G_FILE_TEST_IS_SYMLINK: +@G_FILE_TEST_IS_DIR: +@G_FILE_TEST_IS_EXECUTABLE: +@G_FILE_TEST_EXISTS: + + + + + + +@err_no: +@Returns: + + + + + + + +@filename: +@contents: +@length: +@error: +@Returns: + + + + + + + +@filename: +@test: +@Returns: + + + + + + + +@tmpl: +@Returns: + + diff --git a/docs/reference/glib/tmpl/glib-unused.sgml b/docs/reference/glib/tmpl/glib-unused.sgml index 4ee604a83..4387d5a83 100644 --- a/docs/reference/glib/tmpl/glib-unused.sgml +++ b/docs/reference/glib/tmpl/glib-unused.sgml @@ -65,17 +65,6 @@ Turns the argument into a string literal by using the '#' stringizing operator. - - -Specifies the type of a function used to test two values for -equality. The function should return TRUE if both values are equal and -FALSE otherwise. - - -@a: a value. -@b: a value to compare with. -@Returns: TRUE if @a = @b; FALSE otherwise. - diff --git a/docs/reference/glib/tmpl/hash_tables.sgml b/docs/reference/glib/tmpl/hash_tables.sgml index edbab1812..c6380386b 100644 --- a/docs/reference/glib/tmpl/hash_tables.sgml +++ b/docs/reference/glib/tmpl/hash_tables.sgml @@ -69,15 +69,15 @@ Hash values are used to determine where keys are stored within the #GHashTable data structure. The g_direct_hash(), g_int_hash() and g_str_hash() functions are provided for some common types of keys. If hash_func is NULL, g_direct_hash() is used. -@key_compare_func: -@Returns: a new #GHashTable. - @key_equal_func: a function to check two keys for equality. This is used when looking up keys in the #GHashTable. The g_direct_equal(), g_int_equal() and g_str_equal() functions are provided for the most common types of keys. If @key_equal_func is NULL, keys are compared directly in a similar fashion to g_direct_equal(), but without the overhead of a function call. +@Returns: a new #GHashTable. + +@key_compare_func: @@ -104,6 +104,18 @@ lookup. @Returns: the hash value corresponding to the key. + + +Specifies the type of a function used to test two values for +equality. The function should return TRUE if both values are equal and +FALSE otherwise. + + +@a: a value. +@b: a value to compare with. +@Returns: TRUE if @a = @b; FALSE otherwise. + + Inserts a new key and value into a #GHashTable. diff --git a/docs/reference/glib/tmpl/markup.sgml b/docs/reference/glib/tmpl/markup.sgml new file mode 100644 index 000000000..8079a4c5d --- /dev/null +++ b/docs/reference/glib/tmpl/markup.sgml @@ -0,0 +1,121 @@ + +Simple XML Subset Parser + + + + + + + + + + + + + + + + + + + +@G_MARKUP_ERROR_BAD_UTF8: +@G_MARKUP_ERROR_EMPTY: +@G_MARKUP_ERROR_PARSE: +@G_MARKUP_ERROR_UNKNOWN_ELEMENT: +@G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: +@G_MARKUP_ERROR_INVALID_CONTENT: + + + + + + + + + + + + + +@G_MARKUP_FOO: + + + + + + + + + + + + +@start_element: +@end_element: +@text: +@passthrough: +@error: + + + + + + +@text: +@length: +@Returns: + + + + + + + +@context: +@error: +@Returns: + + + + + + + +@context: + + + + + + + +@context: +@line_number: +@char_number: + + + + + + + +@parser: +@flags: +@user_data: +@user_data_dnotify: +@Returns: + + + + + + + +@context: +@text: +@text_len: +@error: +@Returns: + + diff --git a/docs/reference/glib/tmpl/misc_utils.sgml b/docs/reference/glib/tmpl/misc_utils.sgml index 8799e4166..e15bfb474 100644 --- a/docs/reference/glib/tmpl/misc_utils.sgml +++ b/docs/reference/glib/tmpl/misc_utils.sgml @@ -188,6 +188,15 @@ freed when no longer needed. @Returns: + + + + + +@program: +@Returns: + + Find the position of the first bit set in @mask, searching from (but not diff --git a/docs/reference/glib/tmpl/relations.sgml b/docs/reference/glib/tmpl/relations.sgml index d6bc52504..5e8318199 100644 --- a/docs/reference/glib/tmpl/relations.sgml +++ b/docs/reference/glib/tmpl/relations.sgml @@ -83,9 +83,9 @@ Note that this must be called before any records are added to the #GRelation. @relation: a #GRelation. @field: the field to index, counting from 0. @hash_func: a function to produce a hash value from the field data. -@key_compare_func: - @key_equal_func: a function to compare two values of the given field. + +@key_compare_func: diff --git a/docs/reference/glib/tmpl/spawn.sgml b/docs/reference/glib/tmpl/spawn.sgml new file mode 100644 index 000000000..3cf178fdb --- /dev/null +++ b/docs/reference/glib/tmpl/spawn.sgml @@ -0,0 +1,145 @@ + +Spawning Processes (fork/exec) + + + + + + + + + + + + + + + + + + + +@G_SPAWN_ERROR_FORK: +@G_SPAWN_ERROR_READ: +@G_SPAWN_ERROR_CHDIR: +@G_SPAWN_ERROR_ACCES: +@G_SPAWN_ERROR_PERM: +@G_SPAWN_ERROR_2BIG: +@G_SPAWN_ERROR_NOEXEC: +@G_SPAWN_ERROR_NAMETOOLONG: +@G_SPAWN_ERROR_NOENT: +@G_SPAWN_ERROR_NOMEM: +@G_SPAWN_ERROR_NOTDIR: +@G_SPAWN_ERROR_LOOP: +@G_SPAWN_ERROR_TXTBUSY: +@G_SPAWN_ERROR_IO: +@G_SPAWN_ERROR_NFILE: +@G_SPAWN_ERROR_MFILE: +@G_SPAWN_ERROR_INVAL: +@G_SPAWN_ERROR_ISDIR: +@G_SPAWN_ERROR_LIBBAD: +@G_SPAWN_ERROR_FAILED: + + + + + + + + + + + + + +@G_SPAWN_LEAVE_DESCRIPTORS_OPEN: +@G_SPAWN_DO_NOT_REAP_CHILD: +@G_SPAWN_SEARCH_PATH: +@G_SPAWN_STDOUT_TO_DEV_NULL: +@G_SPAWN_STDERR_TO_DEV_NULL: +@G_SPAWN_CHILD_INHERITS_STDIN: + + + + + + +@user_data: + + + + + + + +@working_directory: +@argv: +@envp: +@flags: +@child_setup: +@user_data: +@child_pid: +@standard_input: +@standard_output: +@standard_error: +@error: +@Returns: + + + + + + + +@working_directory: +@argv: +@envp: +@flags: +@child_setup: +@user_data: +@child_pid: +@error: +@Returns: + + + + + + + +@working_directory: +@argv: +@envp: +@flags: +@child_setup: +@user_data: +@standard_output: +@standard_error: +@exit_status: +@error: +@Returns: + + + + + + + +@command_line: +@error: +@Returns: + + + + + + + +@command_line: +@standard_output: +@standard_error: +@exit_status: +@error: +@Returns: + + diff --git a/docs/reference/glib/tmpl/strings.sgml b/docs/reference/glib/tmpl/strings.sgml index fd4408b5d..23bfc3bc6 100644 --- a/docs/reference/glib/tmpl/strings.sgml +++ b/docs/reference/glib/tmpl/strings.sgml @@ -45,6 +45,16 @@ Creates a new #GString, initialized with the given string. @Returns: the new #GString. + + + + + +@init: +@len: +@Returns: + + Creates a new GString, with enough space for @dfl_size characters. diff --git a/gfileutils.c b/gfileutils.c index 857e069ac..c9c0d9e19 100644 --- a/gfileutils.c +++ b/gfileutils.c @@ -502,10 +502,17 @@ g_file_get_contents (const gchar *filename, #endif } +/* + * mkstemp() implementation is from the GNU C library. + * Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc. + */ /** * g_mkstemp: + * @tmpl: template filename * - * Open a temporary file + * Open a temporary file. See "man mkstemp" on most UNIX-like systems. + * This is a portability wrapper, which simply calls mkstemp() on systems + * that have it, and implements it in GLib otherwise. * * The parameter is a string that should match the rules for mktemp, i.e. * end in "XXXXXX". The X string will be modified to form the name @@ -516,8 +523,6 @@ g_file_get_contents (const gchar *filename, * on platforms where there is a difference. The file handle should be * closed with close(). In case of errors, -1 is returned. * - * From the GNU C library. - * Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc. */ int g_mkstemp (char *tmpl) diff --git a/gfileutils.h b/gfileutils.h index e452ea7bf..dba134e84 100644 --- a/gfileutils.h +++ b/gfileutils.h @@ -65,7 +65,7 @@ typedef enum G_FILE_TEST_IS_SYMLINK = 1 << 1, G_FILE_TEST_IS_DIR = 1 << 2, G_FILE_TEST_IS_EXECUTABLE = 1 << 3, - G_FILE_TEST_EXISTS = 1 << 4, + G_FILE_TEST_EXISTS = 1 << 4 } GFileTest; GQuark g_file_error_quark (void); diff --git a/glib/gfileutils.c b/glib/gfileutils.c index 857e069ac..c9c0d9e19 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -502,10 +502,17 @@ g_file_get_contents (const gchar *filename, #endif } +/* + * mkstemp() implementation is from the GNU C library. + * Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc. + */ /** * g_mkstemp: + * @tmpl: template filename * - * Open a temporary file + * Open a temporary file. See "man mkstemp" on most UNIX-like systems. + * This is a portability wrapper, which simply calls mkstemp() on systems + * that have it, and implements it in GLib otherwise. * * The parameter is a string that should match the rules for mktemp, i.e. * end in "XXXXXX". The X string will be modified to form the name @@ -516,8 +523,6 @@ g_file_get_contents (const gchar *filename, * on platforms where there is a difference. The file handle should be * closed with close(). In case of errors, -1 is returned. * - * From the GNU C library. - * Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc. */ int g_mkstemp (char *tmpl) diff --git a/glib/gfileutils.h b/glib/gfileutils.h index e452ea7bf..dba134e84 100644 --- a/glib/gfileutils.h +++ b/glib/gfileutils.h @@ -65,7 +65,7 @@ typedef enum G_FILE_TEST_IS_SYMLINK = 1 << 1, G_FILE_TEST_IS_DIR = 1 << 2, G_FILE_TEST_IS_EXECUTABLE = 1 << 3, - G_FILE_TEST_EXISTS = 1 << 4, + G_FILE_TEST_EXISTS = 1 << 4 } GFileTest; GQuark g_file_error_quark (void); diff --git a/glib/gmarkup.c b/glib/gmarkup.c index e9b0efc4d..d3593e493 100644 --- a/glib/gmarkup.c +++ b/glib/gmarkup.c @@ -263,7 +263,7 @@ mark_error (GMarkupParseContext *context, static void set_error (GMarkupParseContext *context, GError **error, - GMarkupErrorType code, + GMarkupError code, const gchar *format, ...) { @@ -336,7 +336,7 @@ set_unescape_error (GMarkupParseContext *context, GError **error, const gchar *remaining_text, const gchar *remaining_text_end, - GMarkupErrorType code, + GMarkupError code, const gchar *format, ...) { diff --git a/glib/gmarkup.h b/glib/gmarkup.h index 00a16b0d6..487678d12 100644 --- a/glib/gmarkup.h +++ b/glib/gmarkup.h @@ -39,7 +39,7 @@ typedef enum G_MARKUP_ERROR_UNKNOWN_ELEMENT, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, G_MARKUP_ERROR_INVALID_CONTENT -} GMarkupErrorType; +} GMarkupError; #define G_MARKUP_ERROR g_markup_error_quark () diff --git a/glib/gshell.h b/glib/gshell.h index 4f08c2404..c433cbaeb 100644 --- a/glib/gshell.h +++ b/glib/gshell.h @@ -42,8 +42,8 @@ gchar* g_shell_quote (const gchar *unquoted_string); gchar* g_shell_unquote (const gchar *quoted_string, GError **error); gboolean g_shell_parse_argv (const gchar *command_line, - gint *argc, - gchar ***argv, + gint *argcp, + gchar ***argvp, GError **error); G_END_DECLS diff --git a/glib/gutils.c b/glib/gutils.c index fac67375d..8d1ac84c6 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -159,29 +159,29 @@ my_strchrnul (const gchar *str, gchar c) /** * g_find_program_in_path: - * @file: a program name + * @program: a program name * - * Locates the first executable named @file in the user's path, in the + * Locates the first executable named @program in the user's path, in the * same way that execvp() would locate it. Returns an allocated string * with the absolute path name, or NULL if the program is not found in - * the path. If @file is already an absolute path, returns a copy of - * @file if @file exists and is executable, and NULL otherwise. + * the path. If @program is already an absolute path, returns a copy of + * @program if @program exists and is executable, and NULL otherwise. * * Return value: absolute path, or NULL **/ gchar* -g_find_program_in_path (const gchar *file) +g_find_program_in_path (const gchar *program) { gchar *path, *p, *name, *freeme; size_t len; size_t pathlen; - g_return_val_if_fail (file != NULL, NULL); + g_return_val_if_fail (program != NULL, NULL); - if (*file == '/') + if (*program == '/') { - if (g_file_test (file, G_FILE_TEST_IS_EXECUTABLE)) - return g_strdup (file); + if (g_file_test (program, G_FILE_TEST_IS_EXECUTABLE)) + return g_strdup (program); else return NULL; } @@ -190,7 +190,7 @@ g_find_program_in_path (const gchar *file) if (path == NULL) { /* There is no `PATH' in the environment. The default - * search path in libc is the current directory followed by + * search path in GNU libc is the current directory followed by * the path `confstr' returns for `_CS_PATH'. */ @@ -202,12 +202,12 @@ g_find_program_in_path (const gchar *file) path = "/bin:/usr/bin:."; } - len = strlen (file) + 1; + len = strlen (program) + 1; pathlen = strlen (path); freeme = name = g_malloc (pathlen + len + 1); /* Copy the file name at the top, including '\0' */ - memcpy (name + pathlen + 1, file, len); + memcpy (name + pathlen + 1, program, len); name = name + pathlen; /* And add the slash before the filename */ *name = '/'; diff --git a/gmarkup.c b/gmarkup.c index e9b0efc4d..d3593e493 100644 --- a/gmarkup.c +++ b/gmarkup.c @@ -263,7 +263,7 @@ mark_error (GMarkupParseContext *context, static void set_error (GMarkupParseContext *context, GError **error, - GMarkupErrorType code, + GMarkupError code, const gchar *format, ...) { @@ -336,7 +336,7 @@ set_unescape_error (GMarkupParseContext *context, GError **error, const gchar *remaining_text, const gchar *remaining_text_end, - GMarkupErrorType code, + GMarkupError code, const gchar *format, ...) { diff --git a/gmarkup.h b/gmarkup.h index 00a16b0d6..487678d12 100644 --- a/gmarkup.h +++ b/gmarkup.h @@ -39,7 +39,7 @@ typedef enum G_MARKUP_ERROR_UNKNOWN_ELEMENT, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, G_MARKUP_ERROR_INVALID_CONTENT -} GMarkupErrorType; +} GMarkupError; #define G_MARKUP_ERROR g_markup_error_quark () diff --git a/gshell.h b/gshell.h index 4f08c2404..c433cbaeb 100644 --- a/gshell.h +++ b/gshell.h @@ -42,8 +42,8 @@ gchar* g_shell_quote (const gchar *unquoted_string); gchar* g_shell_unquote (const gchar *quoted_string, GError **error); gboolean g_shell_parse_argv (const gchar *command_line, - gint *argc, - gchar ***argv, + gint *argcp, + gchar ***argvp, GError **error); G_END_DECLS diff --git a/gutils.c b/gutils.c index fac67375d..8d1ac84c6 100644 --- a/gutils.c +++ b/gutils.c @@ -159,29 +159,29 @@ my_strchrnul (const gchar *str, gchar c) /** * g_find_program_in_path: - * @file: a program name + * @program: a program name * - * Locates the first executable named @file in the user's path, in the + * Locates the first executable named @program in the user's path, in the * same way that execvp() would locate it. Returns an allocated string * with the absolute path name, or NULL if the program is not found in - * the path. If @file is already an absolute path, returns a copy of - * @file if @file exists and is executable, and NULL otherwise. + * the path. If @program is already an absolute path, returns a copy of + * @program if @program exists and is executable, and NULL otherwise. * * Return value: absolute path, or NULL **/ gchar* -g_find_program_in_path (const gchar *file) +g_find_program_in_path (const gchar *program) { gchar *path, *p, *name, *freeme; size_t len; size_t pathlen; - g_return_val_if_fail (file != NULL, NULL); + g_return_val_if_fail (program != NULL, NULL); - if (*file == '/') + if (*program == '/') { - if (g_file_test (file, G_FILE_TEST_IS_EXECUTABLE)) - return g_strdup (file); + if (g_file_test (program, G_FILE_TEST_IS_EXECUTABLE)) + return g_strdup (program); else return NULL; } @@ -190,7 +190,7 @@ g_find_program_in_path (const gchar *file) if (path == NULL) { /* There is no `PATH' in the environment. The default - * search path in libc is the current directory followed by + * search path in GNU libc is the current directory followed by * the path `confstr' returns for `_CS_PATH'. */ @@ -202,12 +202,12 @@ g_find_program_in_path (const gchar *file) path = "/bin:/usr/bin:."; } - len = strlen (file) + 1; + len = strlen (program) + 1; pathlen = strlen (path); freeme = name = g_malloc (pathlen + len + 1); /* Copy the file name at the top, including '\0' */ - memcpy (name + pathlen + 1, file, len); + memcpy (name + pathlen + 1, program, len); name = name + pathlen; /* And add the slash before the filename */ *name = '/';