/* This sets the string that #GIOChannel uses to determine where in the file a line break occurs.  */
void g_io_channel_set_line_term(GIOChannel *channel, const gchar *line_term, gint length)
/* This sets the string that #GIOChannel uses to determine where in the file a line break occurs.  */
void g_io_channel_set_line_term(GIOChannel *channel, const gchar *line_term, gint length)
{
  g_return_if_fail (channel != NULL);
  g_return_if_fail (line_term == NULL || length != 0);
  if (line_term == NULL)
    length = 0;
  else if (length < 0)
    length = strlen (line_term);
  g_free (channel->line_term);
  channel->line_term = line_term ? g_memdup (line_term, length) : NULL;
  channel->line_term_len = length;
}