while (pango_read_line (file, line_buffer))
while (pangolite_read_line (file, line_buffer))
read_config_file (const char *filename, gboolean enoent_error){  FILE *file;      GString *line_buffer;  GString *tmp_buffer1;  GString *tmp_buffer2;  char *errstring = NULL;  const char *pos;  char *section = NULL;  int line = 0;  file = fopen (filename, "r");  if (!file)    {      if (errno != ENOENT || enoent_error)	fprintf (stderr, "Pango:%s: Error opening config file: %s\n",		 filename, g_strerror (errno));      return;    }    line_buffer = g_string_new (NULL);  tmp_buffer1 = g_string_new (NULL);  tmp_buffer2 = g_string_new (NULL);  while (pango_read_line (file, line_buffer))    {      line++;      pos = line_buffer->str;      if (!pango_skip_space (&pos))	continue;      if (*pos == '[')	/* Section */	{	  pos++;	  if (!pango_skip_space (&pos) ||	      !pango_scan_word (&pos, tmp_buffer1) ||	      !pango_skip_space (&pos) ||	      *(pos++) != ']' ||	      pango_skip_space (&pos))	    {	      errstring = g_strdup ("Error parsing [SECTION] declaration");	      goto error;	    }	  section = g_strdup (tmp_buffer1->str);	}      else			/* Key */	{	  gboolean empty = FALSE;	  gboolean append = FALSE;	  char *k, *v;	  if (!section)	    {	      errstring = g_strdup ("A [SECTION] declaration must occur first");	      goto error;	    }	  if (!pango_scan_word (&pos, tmp_buffer1) ||	      !pango_skip_space (&pos))	    {	      errstring = g_strdup ("Line is not of the form KEY=VALUE or KEY+=VALUE");	      goto error;	    }	  if (*pos == '+')	    {	      append = TRUE;	      pos++;	    }	  if (*(pos++) != '=')	    {	      errstring = g_strdup ("Line is not of the form KEY=VALUE or KEY+=VALUE");	      goto error;	    }	    	  if (!pango_skip_space (&pos))	    {	      empty = TRUE;	    }	  else	    {	      if (!pango_scan_string (&pos, tmp_buffer2))		{		  errstring = g_strdup ("Error parsing value string");		  goto error;		}	      if (pango_skip_space (&pos))		{		  errstring = g_strdup ("Junk after value string");		  goto error;		}	    }	  g_string_prepend_c (tmp_buffer1, '/');	  g_string_prepend (tmp_buffer1, section);	  /* Remove any existing values */	  if (g_hash_table_lookup_extended (config_hash, tmp_buffer1->str,					    (gpointer *)&k, (gpointer *)&v))	    {	      g_free (k);	      if (append)		{		  g_string_prepend (tmp_buffer2, v);		  g_free (v);		}	    }	      	  if (!empty)	    {	      g_hash_table_insert (config_hash,				   g_strdup (tmp_buffer1->str),				   g_strdup (tmp_buffer2->str));	    }	}    }        if (ferror (file))    errstring = g_strdup ("g_strerror(errno)");   error:  if (errstring)    {      fprintf (stderr, "Pango:%s:%d: %s\n", filename, line, errstring);      g_free (errstring);    }        g_free (section);  g_string_free (line_buffer, TRUE);  g_string_free (tmp_buffer1, TRUE);  g_string_free (tmp_buffer2, TRUE);  fclose (file);}