* events you are interested in on the #GIOChannel, and provide a
* function to be called whenever these events occur.
*
- * #GIOChannel instances are created with an initial reference count of
- * 1. g_io_channel_ref() and g_io_channel_unref() can be used to
+ * #GIOChannel instances are created with an initial reference count of 1.
+ * g_io_channel_ref() and g_io_channel_unref() can be used to
* increment or decrement the reference count respectively. When the
* reference count falls to 0, the #GIOChannel is freed. (Though it
* isn't closed automatically, unless it was created using
*
* Reads data from a #GIOChannel.
*
- * Return value: %G_IO_ERROR_NONE if the operation was successful.
+ * Returns: %G_IO_ERROR_NONE if the operation was successful.
*
* Deprecated:2.2: Use g_io_channel_read_chars() instead.
**/
*
* Writes data to a #GIOChannel.
*
- * Return value: %G_IO_ERROR_NONE if the operation was successful.
+ * Returns: %G_IO_ERROR_NONE if the operation was successful.
*
* Deprecated:2.2: Use g_io_channel_write_chars() instead.
**/
* Sets the current position in the #GIOChannel, similar to the standard
* library function fseek().
*
- * Return value: %G_IO_ERROR_NONE if the operation was successful.
+ * Returns: %G_IO_ERROR_NONE if the operation was successful.
*
* Deprecated:2.2: Use g_io_channel_seek_position() instead.
**/
* so will not cause problems, as long as no attempt is made to
* access the channel after it is closed).
*
- * Return value: A #GIOChannel on success, %NULL on failure.
+ * Returns: A #GIOChannel on success, %NULL on failure.
**/
/**
* flushed if @flush is %TRUE. The channel will not be freed until the
* last reference is dropped using g_io_channel_unref().
*
- * Return value: the status of the operation.
+ * Returns: the status of the operation.
**/
GIOStatus
g_io_channel_shutdown (GIOChannel *channel,
* is data to be read/space to write data in the internal buffers in
* the #GIOChannel. Only the flags %G_IO_IN and %G_IO_OUT may be set.
*
- * Return value: A #GIOCondition
+ * Returns: A #GIOCondition
**/
GIOCondition
g_io_channel_get_buffer_condition (GIOChannel *channel)
*
* Converts an `errno` error number to a #GIOChannelError.
*
- * Return value: a #GIOChannelError error number, e.g.
+ * Returns: a #GIOChannelError error number, e.g.
* %G_IO_CHANNEL_ERROR_INVAL.
**/
GIOChannelError
*
* Gets the buffer size.
*
- * Return value: the size of the buffer.
+ * Returns: the size of the buffer.
**/
gsize
g_io_channel_get_buffer_size (GIOChannel *channel)
* where in the file a line break occurs. A value of %NULL
* indicates autodetection.
*
- * Return value: The line termination string. This value
+ * Returns: The line termination string. This value
* is owned by GLib and must not be freed.
**/
const gchar *
*
* Sets the (writeable) flags in @channel to (@flags & %G_IO_FLAG_SET_MASK).
*
- * Return value: the status of the operation.
+ * Returns: the status of the operation.
**/
/**
* GIOFlags:
* This flag cannot be changed.
* @G_IO_FLAG_IS_WRITABLE: indicates that the io channel is writable.
* This flag cannot be changed.
- * G_IO_FLAG_IS_WRITEABLE: a misspelled version of @G_IO_FLAG_IS_WRITABLE
+ * @G_IO_FLAG_IS_WRITEABLE: a misspelled version of @G_IO_FLAG_IS_WRITABLE
* that existed before the spelling was fixed in GLib 2.30. It is kept
* here for compatibility reasons. Deprecated since 2.30
* @G_IO_FLAG_IS_SEEKABLE: indicates that the io channel is seekable,
* should immediately call g_io_channel_get_flags() to update
* the internal values of these flags.
*
- * Return value: the flags which are set on the channel
+ * Returns: the flags which are set on the channel
**/
GIOFlags
g_io_channel_get_flags (GIOChannel *channel)
* destroyed. The default value of this is %TRUE for channels created
* by g_io_channel_new_file (), and %FALSE for all other channels.
*
- * Return value: Whether the channel will be closed on the final unref of
+ * Returns: Whether the channel will be closed on the final unref of
* the GIOChannel data structure.
**/
gboolean
*
* Replacement for g_io_channel_seek() with the new API.
*
- * Return value: the status of the operation.
+ * Returns: the status of the operation.
**/
/**
* GSeekType:
*
* Flushes the write buffer for the GIOChannel.
*
- * Return value: the status of the operation: One of
+ * Returns: the status of the operation: One of
* #G_IO_STATUS_NORMAL, #G_IO_STATUS_AGAIN, or
* #G_IO_STATUS_ERROR.
**/
* The internal encoding is always UTF-8. The encoding %NULL
* makes the channel safe for binary data.
*
- * Return value: A string containing the encoding, this string is
+ * Returns: A string containing the encoding, this string is
* owned by GLib and must not be freed.
**/
const gchar *
* @str_return will contain allocated memory if the return
* is %G_IO_STATUS_NORMAL.
*
- * Return value: the status of the operation.
+ * Returns: the status of the operation.
**/
GIOStatus
g_io_channel_read_line (GIOChannel *channel,
status = g_io_channel_read_line_backend (channel, &got_length, terminator_pos, error);
- if (length)
+ if (length && status != G_IO_STATUS_ERROR)
*length = got_length;
if (status == G_IO_STATUS_NORMAL)
*
* Reads a line from a #GIOChannel, using a #GString as a buffer.
*
- * Return value: the status of the operation.
+ * Returns: the status of the operation.
**/
GIOStatus
g_io_channel_read_line_string (GIOChannel *channel,
*
* Reads all the remaining data from the file.
*
- * Return value: %G_IO_STATUS_NORMAL on success.
+ * Returns: %G_IO_STATUS_NORMAL on success.
* This function never returns %G_IO_STATUS_EOF.
**/
GIOStatus
*
* Replacement for g_io_channel_read() with the new API.
*
- * Return value: the status of the operation.
+ * Returns: the status of the operation.
*/
GIOStatus
g_io_channel_read_chars (GIOChannel *channel,
* Reads a Unicode character from @channel.
* This function cannot be called on a channel with %NULL encoding.
*
- * Return value: a #GIOStatus
+ * Returns: a #GIOStatus
**/
GIOStatus
g_io_channel_read_unichar (GIOChannel *channel,
* may only be made on a channel from which data has been read in the
* cases described in the documentation for g_io_channel_set_encoding ().
*
- * Return value: the status of the operation.
+ * Returns: the status of the operation.
**/
GIOStatus
g_io_channel_write_chars (GIOChannel *channel,
* Writes a Unicode character to @channel.
* This function cannot be called on a channel with %NULL encoding.
*
- * Return value: a #GIOStatus
+ * Returns: a #GIOStatus
**/
GIOStatus
g_io_channel_write_unichar (GIOChannel *channel,
}
/**
- * g_io_channel_error_quark:
- *
- * Return value: the quark used as %G_IO_CHANNEL_ERROR
- **/
-/**
* G_IO_CHANNEL_ERROR:
*
* Error domain for #GIOChannel operations. Errors in this domain will