ppd_parse_line(const char *line,	/* I - Line */
               char       *option,	/* O - Option name */
	       int        olen,		/* I - Size of option name */
               char       *choice,	/* O - Choice name */
	       int        clen)		/* I - Size of choice name */
{
 /*
  * Verify this is a default option line...
  */

  if (strncmp(line, "*Default", 8))
    return (-1);

 /*
  * Read the option name...
  */

  for (line += 8, olen --;
       *line > ' ' && *line < 0x7f && *line != ':' && *line != '/';
       line ++)
    if (olen > 0)
    {
      *option++ = *line;
      olen --;
    }

  *option = '\0';

 /*
  * Skip everything else up to the colon (:)...
  */

  while (*line && *line != ':')
    line ++;

  if (!*line)
    return (-1);

  line ++;

 /*
  * Now grab the option choice, skipping leading whitespace...
  */

  while (isspace(*line & 255))
    line ++;

  for (clen --;
       *line > ' ' && *line < 0x7f && *line != ':' && *line != '/';
       line ++)
    if (clen > 0)
    {
      *choice++ = *line;
      clen --;
    }

  *choice = '\0';

 /*
  * Return with no errors...
  */

  return (0);
}
ppd_parse_line(const char *line,	 
               char       *option,	 
	       int        olen,		 
               char       *choice,	 
	       int        clen)		 
{
  

  if (strncmp(line, "*Default", 8))
    return (-1);

  

  for (line += 8, olen --;
       *line > ' ' && *line < 0x7f && *line != ':' && *line != '/';
       line ++)
    if (olen > 0)
    {
      *option++ = *line;
      olen --;
    }

  *option = '\0';

  

  while (*line && *line != ':')
    line ++;

  if (!*line)
    return (-1);

  line ++;

  

  while (isspace(*line & 255))
    line ++;

  for (clen --;
       *line > ' ' && *line < 0x7f && *line != ':' && *line != '/';
       line ++)
    if (clen > 0)
    {
      *choice++ = *line;
      clen --;
    }

  *choice = '\0';

  

  return (0);
}