From 6d3f67dae837e931b07767fdbffcfa1fa4b08999 Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 17 Feb 2012 15:34:26 +0000 Subject: [PATCH 1/2] docs: Improve g_fopen description for Win32 Tweaked by Philip Withnall. Closes: #198 --- glib/gstdio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glib/gstdio.c b/glib/gstdio.c index a554b421c..ab281ac3f 100644 --- a/glib/gstdio.c +++ b/glib/gstdio.c @@ -1540,6 +1540,11 @@ g_rmdir (const gchar *filename) * * See your C library manual for more details about fopen(). * + * As close() and fclose() are part of the C library, this implies that it is + * currently impossible to close a file if the application C library and the C library + * used by GLib are different. Convenience functions like g_file_set_contents() + * avoid this problem. + * * Returns: A FILE* if the file was successfully opened, or %NULL if * an error occurred * From 78be7f5022e578b3cba2e0a60527d347bae3c919 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 17 Dec 2019 11:37:09 +0000 Subject: [PATCH 2/2] docs: Improve documentation formatting for g_fopen() Signed-off-by: Philip Withnall Helps: #198 --- glib/gstdio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/glib/gstdio.c b/glib/gstdio.c index ab281ac3f..d4ae9c964 100644 --- a/glib/gstdio.c +++ b/glib/gstdio.c @@ -1528,24 +1528,24 @@ g_rmdir (const gchar *filename) * (UTF-8 on Windows) * @mode: a string describing the mode in which the file should be opened * - * A wrapper for the stdio fopen() function. The fopen() function + * A wrapper for the stdio `fopen()` function. The `fopen()` function * opens a file and associates a new stream with it. * * Because file descriptors are specific to the C library on Windows, - * and a file descriptor is part of the FILE struct, the FILE* returned + * and a file descriptor is part of the `FILE` struct, the `FILE*` returned * by this function makes sense only to functions in the same C library. * Thus if the GLib-using code uses a different C library than GLib does, * the FILE* returned by this function cannot be passed to C library - * functions like fprintf() or fread(). + * functions like `fprintf()` or `fread()`. * - * See your C library manual for more details about fopen(). + * See your C library manual for more details about `fopen()`. * - * As close() and fclose() are part of the C library, this implies that it is + * As `close()` and `fclose()` are part of the C library, this implies that it is * currently impossible to close a file if the application C library and the C library * used by GLib are different. Convenience functions like g_file_set_contents() * avoid this problem. * - * Returns: A FILE* if the file was successfully opened, or %NULL if + * Returns: A `FILE*` if the file was successfully opened, or %NULL if * an error occurred * * Since: 2.6