diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index d9f3a75ef..c07a45fdf 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,9 @@ +2001-05-19 Havoc Pennington + + * glib/Makefile.am (IGNORE_HFILES): add glibintl.h + + * glib/tmpl/*.sgml: fix various missing docs + 2001-05-18 Sebastian Wilhelmi * glib/glib-overrides.txt, glib/glib-sections.txt, diff --git a/docs/reference/glib/Makefile.am b/docs/reference/glib/Makefile.am index 92262203f..5b8778862 100644 --- a/docs/reference/glib/Makefile.am +++ b/docs/reference/glib/Makefile.am @@ -26,6 +26,7 @@ CFILE_GLOB=$(top_srcdir)/*.c $(top_srcdir)/gmodule/*.c IGNORE_HFILES= \ gobject \ config.h \ + glibintl.h \ gmoduleconf.h \ gunibreak.h \ gunidecomp.h \ diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index a84291150..a92b4add8 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -589,6 +589,7 @@ GIOChannel g_io_channel_unix_new g_io_channel_unix_get_fd + g_io_channel_init @@ -617,6 +618,7 @@ GIOFuncs g_io_channel_win32_new_fd g_io_channel_win32_new_messages +g_io_channel_win32_new_socket g_io_channel_win32_poll g_io_channel_win32_make_pollfd g_io_channel_win32_get_fd @@ -949,6 +951,7 @@ GHookFunc GHookCheckFunc GHookMarshaller GHookCheckMarshaller +GHookFinalizeFunc g_hook_list_init @@ -1160,6 +1163,8 @@ closedir g_win32_error_message g_win32_getlocale +g_win32_get_package_installation_directory +g_win32_get_package_installation_subdirectory g_win32_ftruncate @@ -1373,6 +1378,8 @@ g_string_sized_new g_string_assign g_string_sprintf g_string_sprintfa +g_string_printf +g_string_printfa g_string_append g_string_append_c g_string_append_len @@ -1713,6 +1720,7 @@ gunichar2 g_get_charset +g_unichar_validate g_unichar_isalnum g_unichar_isalpha g_unichar_iscntrl diff --git a/docs/reference/glib/tmpl/conversions.sgml b/docs/reference/glib/tmpl/conversions.sgml index e8a2c87e0..80c86c22e 100644 --- a/docs/reference/glib/tmpl/conversions.sgml +++ b/docs/reference/glib/tmpl/conversions.sgml @@ -47,7 +47,9 @@ Character Set Conversion - +Error domain for character set conversions. Errors in this domain will +be from the #GConvertError enumeration. See #GError for information on +error domains. diff --git a/docs/reference/glib/tmpl/datalist.sgml b/docs/reference/glib/tmpl/datalist.sgml index 835ea4615..025c5f469 100644 --- a/docs/reference/glib/tmpl/datalist.sgml +++ b/docs/reference/glib/tmpl/datalist.sgml @@ -168,11 +168,11 @@ The data element's destroy function is called if it has been set. - +Removes an element, without calling its destroy notifier. -@dl: -@k: +@dl: a datalist. +@k: the string identifying the data element. diff --git a/docs/reference/glib/tmpl/datasets.sgml b/docs/reference/glib/tmpl/datasets.sgml index 5631f91cc..b6329b2a0 100644 --- a/docs/reference/glib/tmpl/datasets.sgml +++ b/docs/reference/glib/tmpl/datasets.sgml @@ -165,11 +165,11 @@ Its destroy function is called if it has been set. - +Removes an element, without calling its destroy notifier. -@l: -@k: +@l: the location identifying the dataset. +@k: the string identifying the data element. diff --git a/docs/reference/glib/tmpl/fileutils.sgml b/docs/reference/glib/tmpl/fileutils.sgml index a5e903735..c13bbfcbe 100644 --- a/docs/reference/glib/tmpl/fileutils.sgml +++ b/docs/reference/glib/tmpl/fileutils.sgml @@ -16,51 +16,107 @@ File Utilities - +Values corresponding to "errno" codes returned from file operations on +UNIX. Unlike errno codes, #GFileError values are available on all +systems, even Windows. The exact meaning of each code depends on what +sort of file operation you were performing; the UNIX documentation +gives more details. The following error code descriptions come +from the GNU C Library manual, and are under the copyright +of that manual. -@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: + +It's not very portable to make detailed assumptions about exactly +which errors will be returned from a given operation. Some errors +don't occur on some systems, etc., sometimes there are subtle +differences in when a system will report a given error, etc. + + +@G_FILE_ERROR_EXIST: Operation not permitted; only the owner of the + file (or other resource) or processes with special privileges can + perform the operation. +@G_FILE_ERROR_ISDIR: File is a directory; you cannot open a directory + for writing, or create or remove hard links to it. +@G_FILE_ERROR_ACCES: Permission denied; the file permissions do not + allow the attempted operation. +@G_FILE_ERROR_NAMETOOLONG: Filename too long. +@G_FILE_ERROR_NOENT: No such file or directory. This is a "file + doesn't exist" error for ordinary files that are referenced in + contexts where they are expected to already exist. +@G_FILE_ERROR_NOTDIR: A file that isn't a directory was specified when + a directory is required. +@G_FILE_ERROR_NXIO: No such device or address. The system tried to + use the device represented by a file you specified, and it + couldn't find the device. This can mean that the device file was + installed incorrectly, or that the physical device is missing or + not correctly attached to the computer. +@G_FILE_ERROR_NODEV: This file is of a type that doesn't support + mapping. +@G_FILE_ERROR_ROFS: The directory containing the new link can't be + modified because it's on a read-only file system. +@G_FILE_ERROR_TXTBSY: Text file busy. +@G_FILE_ERROR_FAULT: You passed in a pointer to bad memory. + (GLib won't reliably return this, don't pass in pointers to bad + memory.) +@G_FILE_ERROR_LOOP: Too many levels of symbolic links were encountered + in looking up a file name. This often indicates a cycle of symbolic + links. +@G_FILE_ERROR_NOSPC: No space left on device; write operation on a + file failed because the disk is full. +@G_FILE_ERROR_NOMEM: No memory available. The system cannot allocate + more virtual memory because its capacity is full. +@G_FILE_ERROR_MFILE: The current process has too many files open and + can't open any more. Duplicate descriptors do count toward this + limit. +@G_FILE_ERROR_NFILE: There are too many distinct file openings in the + entire system. +@G_FILE_ERROR_BADF: Bad file descriptor; for example, I/O on a + descriptor that has been closed or reading from a descriptor open + only for writing (or vice versa). +@G_FILE_ERROR_INVAL: Invalid argument. This is used to indicate + various kinds of problems with passing the wrong argument to a + library function. +@G_FILE_ERROR_PIPE: Broken pipe; there is no process reading from the + other end of a pipe. Every library function that returns this + error code also generates a `SIGPIPE' signal; this signal + terminates the program if not handled or blocked. Thus, your + program will never actually see this code unless it has handled or + blocked `SIGPIPE'. +@G_FILE_ERROR_AGAIN: Resource temporarily unavailable; the call might + work if you try again later. +@G_FILE_ERROR_INTR: Interrupted function call; an asynchronous signal + occurred and prevented completion of the call. When this + happens, you should try the call again. +@G_FILE_ERROR_IO: Input/output error; usually used for physical read + or write errors. i.e. the disk or other physical device hardware + is returning errors. +@G_FILE_ERROR_PERM: Operation not permitted; only the owner of the + file (or other resource) or processes with special privileges can + perform the operation. +@G_FILE_ERROR_FAILED: Does not correspond to a UNIX error code; this + is the standard "failed for unspecified reason" error code present in + all #GError error code enumerations. Returned if no specific + code applies. - +Error domain for file operations. Errors in this domain will +be from the #GFileError enumeration. See #GError for information on +error domains. - +A test to perform an a file using g_file_test(). -@G_FILE_TEST_IS_REGULAR: -@G_FILE_TEST_IS_SYMLINK: -@G_FILE_TEST_IS_DIR: -@G_FILE_TEST_IS_EXECUTABLE: -@G_FILE_TEST_EXISTS: +@G_FILE_TEST_IS_REGULAR: %TRUE if the file is a regular file (not a symlink or directory) +@G_FILE_TEST_IS_SYMLINK: %TRUE if the file is a symlink. +@G_FILE_TEST_IS_DIR: %TRUE if the file is a directory. +@G_FILE_TEST_IS_EXECUTABLE: %TRUE if the file is executable. +@G_FILE_TEST_EXISTS: %TRUE if the file exists. It may or may not be a regular file. diff --git a/docs/reference/glib/tmpl/hooks.sgml b/docs/reference/glib/tmpl/hooks.sgml index 4ebf12d0b..1c9f5ca15 100644 --- a/docs/reference/glib/tmpl/hooks.sgml +++ b/docs/reference/glib/tmpl/hooks.sgml @@ -169,6 +169,15 @@ and the list of hook functions can be invoked. @data: + + + + + +@hook_list: +@hook: + + Initializes a #GHookList. diff --git a/docs/reference/glib/tmpl/linked_lists_double.sgml b/docs/reference/glib/tmpl/linked_lists_double.sgml index 2b17c6e5b..6cbd4bc3f 100644 --- a/docs/reference/glib/tmpl/linked_lists_double.sgml +++ b/docs/reference/glib/tmpl/linked_lists_double.sgml @@ -191,12 +191,14 @@ Deletes the node @link from @list. - +Removes all list nodes with data equal to @data. Returns the new +head of the list. Contrast with g_list_remove() which removes only +the first node matching the given data. -@list: -@data: -@Returns: +@list: a #GList +@data: data to remove +@Returns: new head of @list diff --git a/docs/reference/glib/tmpl/linked_lists_single.sgml b/docs/reference/glib/tmpl/linked_lists_single.sgml index 3015d7c93..cd7c3654f 100644 --- a/docs/reference/glib/tmpl/linked_lists_single.sgml +++ b/docs/reference/glib/tmpl/linked_lists_single.sgml @@ -211,12 +211,14 @@ Deletes a node of @list. Returns the new list head. - +Removes all list nodes with data equal to @data. Returns the new +head of the list. Contrast with g_slist_remove() which removes only +the first node matching the given data. -@list: -@data: -@Returns: +@list: a #GSList +@data: data to remove +@Returns: new head of @list diff --git a/docs/reference/glib/tmpl/macros.sgml b/docs/reference/glib/tmpl/macros.sgml index 9c016c0d1..59cd352b5 100644 --- a/docs/reference/glib/tmpl/macros.sgml +++ b/docs/reference/glib/tmpl/macros.sgml @@ -37,21 +37,24 @@ The micro version number of the GLib library. - +This macro is defined only on Windows. So you can bracket +Windows-specific code in "#ifdef G_OS_WIN32". - +This macro is defined only on BeOS. So you can bracket +BeOS-specific code in "#ifdef G_OS_BEOS". - +This macro is defined only on UNIX. So you can bracket +UNIX-specific code in "#ifdef G_OS_UNIX". @@ -110,21 +113,21 @@ This is ":" on Unix machines and ";" under Windows. -Defines the TRUE value for the #gboolean type. +Defines the %TRUE value for the #gboolean type. -Defines the FALSE value for the #gboolean type. +Defines the %FALSE value for the #gboolean type. -Defines the standard NULL pointer. +Defines the standard %NULL pointer. @@ -228,14 +231,21 @@ Returns the offset, in bytes, of a member of a struct. - +Indicates the number of bytes to which memory will be aligned on the +current platform. - +If %G_DISABLE_CONST_RETURNS is defined, this macro expands to nothing. +By default, the macro expands to "const". The macro should be used +in place of "const" for functions that return a value that should not +be modified. The purpose of this macro is to allow us to turn on +"const" for returned constant strings by default, while allowing programmers +who find that annoying to turn it off. This macro should only be used +for return values, it doesn't make sense for function arguments. diff --git a/docs/reference/glib/tmpl/macros_misc.sgml b/docs/reference/glib/tmpl/macros_misc.sgml index 994ffb730..cd71ee73b 100644 --- a/docs/reference/glib/tmpl/macros_misc.sgml +++ b/docs/reference/glib/tmpl/macros_misc.sgml @@ -41,24 +41,29 @@ only one statement is expected by the compiler. - +Used (along with #G_END_DECLS) to bracket header files. If the +compiler in use is a C++ compiler, adds 'extern "C"' around the header. - +Used (along with #G_BEGIN_DECLS) to bracket header files. If the +compiler in use is a C++ compiler, adds 'extern "C"' around the header. - +Determines the number of elements in an array. The array must be +declared so the compiler knows its size at compile-time; this +macro will not work on an array allocated on the heap, only static +arrays or arrays on the stack. -@arr: +@arr: the array diff --git a/docs/reference/glib/tmpl/markup.sgml b/docs/reference/glib/tmpl/markup.sgml index 69680e31b..5184adaea 100644 --- a/docs/reference/glib/tmpl/markup.sgml +++ b/docs/reference/glib/tmpl/markup.sgml @@ -89,7 +89,7 @@ Character references - +Error codes returned by markup parsing. @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8 @@ -101,21 +101,26 @@ Character references - +Error domain for markup parsing. Errors in this domain will +be from the #GMarkupError enumeration. See #GError for information on +error domains. -There are no flags right now +There are no flags right now. Pass "0" for the flags argument to all +functions. -@G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: +@G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use. - +A parse context is used to parse a stream of bytes that you expect to +contain marked-up text. See g_markup_parse_context_new(), +#GMarkupParser, and so on for more details. diff --git a/docs/reference/glib/tmpl/messages.sgml b/docs/reference/glib/tmpl/messages.sgml index 2b19d61e6..f88fb80b3 100644 --- a/docs/reference/glib/tmpl/messages.sgml +++ b/docs/reference/glib/tmpl/messages.sgml @@ -130,19 +130,19 @@ documentation. A convenience function/macro to log a warning message. -@...: - -@format: the message format. See the printf() -documentation. -@args...: the parameters to insert into the format string. +@...: format string, followed by parameters to insert into the format string (as with printf()) - +Logs a "critical warning" (#G_LOG_LEVEL_CRITICAL). It's more or less +application-defined what constitutes a critical vs. a regular +warning. You could call g_log_set_always_fatal() to make critical +warnings exit the program, then use g_critical() for fatal errors, for +example. -@...: +@...: format string, followed by parameters to insert into the format string (as with printf()) @@ -150,6 +150,9 @@ documentation. A convenience function/macro to log an error message. Error messages are always fatal, resulting in a call to abort() to terminate the application. +This function will result in a core dump; don't use it for errors you +expect. Using this function indicates a bug in your program, i.e. an +assertion failure. @...: diff --git a/docs/reference/glib/tmpl/numerical.sgml b/docs/reference/glib/tmpl/numerical.sgml index aa902d3d9..d23bbb9c8 100644 --- a/docs/reference/glib/tmpl/numerical.sgml +++ b/docs/reference/glib/tmpl/numerical.sgml @@ -3,95 +3,114 @@ Numerical Definitions +Mathematical constants, and floating point decomposition. +GLib offers mathematical constants such as #G_PI for the value of pi; +many platforms have these in the C library, but some don't, the GLib +versions always exist. + + +The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the + sign, mantissa and exponent of IEEE floats and doubles. These + unions are defined as appropriate for a given platform. + IEEE floats and doubles are supported (used for + storage) by at least intel, ppc and sparc, for reference: http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html - +http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html - +See http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html - +See http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html - +The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the + sign, mantissa and exponent of IEEE floats and doubles. These + unions are defined as appropriate for a given platform. + IEEE floats and doubles are supported (used for + storage) by at least intel, ppc and sparc, for reference: http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html - +The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the + sign, mantissa and exponent of IEEE floats and doubles. These + unions are defined as appropriate for a given platform. + IEEE floats and doubles are supported (used for + storage) by at least intel, ppc and sparc, for reference: http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html - +The base of natural logarithms. - +The natural logarithm of 2. - +The natural logarithm of 10. - +The value of pi (ratio of circle's circumference to its diameter). - +Pi divided by 2. - +Pi divided by 4. - +The square root of two. - +Used for fooling around with float formats, see http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html diff --git a/docs/reference/glib/tmpl/strings.sgml b/docs/reference/glib/tmpl/strings.sgml index f6be0043a..c9db44fa4 100644 --- a/docs/reference/glib/tmpl/strings.sgml +++ b/docs/reference/glib/tmpl/strings.sgml @@ -105,6 +105,26 @@ documentation. @Varargs: the parameters to insert into the format string. + + + + + +@string: +@format: +@Varargs: + + + + + + + +@string: +@format: +@Varargs: + + Adds a string onto the end of a #GString, expanding it if necessary. diff --git a/docs/reference/glib/tmpl/type_conversion.sgml b/docs/reference/glib/tmpl/type_conversion.sgml index dd4adec70..18e0600c1 100644 --- a/docs/reference/glib/tmpl/type_conversion.sgml +++ b/docs/reference/glib/tmpl/type_conversion.sgml @@ -3,10 +3,51 @@ Type Conversion Macros +Portably storing integers in pointer variables. - +Many times GLib, GTK+, and other libraries allow you to pass "user +data" to a callback, in the form of a void pointer. From time to time +you want to pass an integer instead of a pointer. You could allocate +an integer, with something like: + + int *ip = g_new (int, 1); + *ip = 42; + +But this is inconvenient, and it's annoying to have to free the +memory at some later time. + + +Pointers are always at least 32 bits in size (on all platforms GLib +intends to support). Thus you can store at least 32-bit integer values +in a pointer value. Naively, you might try this, but it's incorrect: + + gpointer p; + int i; + p = (void*) 42; + i = (int) p; + +Again, that example was NOT correct, don't copy it. The problem is +that on some systems you need to do this: + + gpointer p; + int i; + p = (void*) (long) 42; + i = (int) (long) p; + +So GPOINTER_TO_INT(), GINT_TO_POINTER(), etc. do the right thing +on the current platform. + + + + +YOU MAY NOT STORE POINTERS IN INTEGERS. THIS IS NOT PORTABLE IN ANY +WAY SHAPE OR FORM. These macros ONLY allow +storing integers in pointers, and only preserve 32 bits of the +integer; values outside the range of a 32-bit integer will be mangled. + + @@ -16,33 +57,46 @@ Type Conversion Macros - +Stuffs an integer into a pointer type. + + +Remember, YOU MAY NOT STORE POINTERS IN INTEGERS. THIS IS NOT PORTABLE +IN ANY WAY SHAPE OR FORM. These macros ONLY allow +storing integers in pointers, and only preserve 32 bits of the +integer; values outside the range of a 32-bit integer will be mangled. -@i: +@i: integer to stuff into a pointer - +Extracts an integer from a pointer. The integer must have +been stored in the pointer with GINT_TO_POINTER(). + + +Remember, YOU MAY NOT STORE POINTERS IN INTEGERS. THIS IS NOT PORTABLE +IN ANY WAY SHAPE OR FORM. These macros ONLY allow +storing integers in pointers, and only preserve 32 bits of the +integer; values outside the range of a 32-bit integer will be mangled. -@p: +@p: pointer containing an integer. - +Same as GINT_TO_POINTER(), but for unsigned integers. -@u: +@u: integer to stuff into the pointer - +Same as GPOINTER_TO_INT(), but for unsigned integers. -@p: +@p: pointer to extract an integer from diff --git a/docs/reference/glib/tmpl/unicode.sgml b/docs/reference/glib/tmpl/unicode.sgml index 9b99884f0..20d64a696 100644 --- a/docs/reference/glib/tmpl/unicode.sgml +++ b/docs/reference/glib/tmpl/unicode.sgml @@ -35,6 +35,15 @@ Unicode Manipulation @Returns: + + + + + +@ch: +@Returns: + + @@ -316,10 +325,15 @@ Unicode Manipulation - +Skips to the next character in a UTF-8 string. The string must be +valid; this macro is as fast as possible, and has zero error-checking. +You would use this macro to iterate over a string character by +character. The macro returns the start of the next UTF-8 character. +Before using this macro, use g_utf8_validate() to validate strings +that may contain invalid UTF-8. -@p: +@p: Pointer to the start of a valid UTF-8 character. diff --git a/docs/reference/glib/tmpl/windows.sgml b/docs/reference/glib/tmpl/windows.sgml index e07c6a839..04100c162 100644 --- a/docs/reference/glib/tmpl/windows.sgml +++ b/docs/reference/glib/tmpl/windows.sgml @@ -16,27 +16,32 @@ Windows Compatability Functions - +Provided for UNIX emulation on Windows; equivalent to UNIX +macro MAXPATHLEN, which is the maximum length of a filename +(including full path). - +Provided for UNIX emulation on Windows; equivalent to UNIX macro +NAME_MAX, which is the maximum length of a single path component. +i.e. just the "foo" in "/usr/bin/foo". - +Provided for UNIX emulation on Windows; process ID type. - +Provided for UNIX emulation on Windows; see documentation for pipe() +in any UNIX manual. @phandles: @@ -44,7 +49,8 @@ Windows Compatability Functions - +Provided for UNIX emulation on Windows; see documentation for ftruncate() +in any UNIX manual. @fd: @@ -53,28 +59,32 @@ Windows Compatability Functions - +Provided for UNIX emulation on Windows; see documentation for opendir() +in any UNIX manual. - +Provided for UNIX emulation on Windows; see documentation for readdir() +in any UNIX manual. - +Provided for UNIX emulation on Windows; see documentation for rewinddir() +in any UNIX manual. - +Provided for UNIX emulation on Windows; see documentation for closedir() +in any UNIX manual. @@ -96,3 +106,24 @@ Windows Compatability Functions @Returns: + + + + + +@package: +@dll_name: +@Returns: + + + + + + + +@package: +@dll_name: +@subdir: +@Returns: + + diff --git a/glib/gutf8.c b/glib/gutf8.c index a375316cc..b335ca6a2 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -172,7 +172,7 @@ g_utf8_find_next_char (const gchar *p, * g_utf8_prev_char: * @p: a pointer to a position within a UTF-8 encoded string * - * Find the previous UTF-8 character in the string before @p + * Find the previous UTF-8 character in the string before @p. * * @p does not have to be at the beginning of a UTF-8 character. No check * is made to see if the character found is actually valid other than @@ -202,7 +202,8 @@ g_utf8_prev_char (const gchar *p) * Return value: the length of the string in characters **/ gint -g_utf8_strlen (const gchar *p, gint max) +g_utf8_strlen (const gchar *p, + gint max) { int len = 0; const gchar *start = p; diff --git a/gutf8.c b/gutf8.c index a375316cc..b335ca6a2 100644 --- a/gutf8.c +++ b/gutf8.c @@ -172,7 +172,7 @@ g_utf8_find_next_char (const gchar *p, * g_utf8_prev_char: * @p: a pointer to a position within a UTF-8 encoded string * - * Find the previous UTF-8 character in the string before @p + * Find the previous UTF-8 character in the string before @p. * * @p does not have to be at the beginning of a UTF-8 character. No check * is made to see if the character found is actually valid other than @@ -202,7 +202,8 @@ g_utf8_prev_char (const gchar *p) * Return value: the length of the string in characters **/ gint -g_utf8_strlen (const gchar *p, gint max) +g_utf8_strlen (const gchar *p, + gint max) { int len = 0; const gchar *start = p;