/*
- * "$Id: lpc.c,v 1.2 1999/06/09 20:03:47 mike Exp $"
+ * "$Id: lpc.c,v 1.3 1999/06/21 19:10:07 mike Exp $"
*
* "lpc" command for the Common UNIX Printing System (CUPS).
*
*/
printf("lpc> ");
- while (gets(line) != NULL)
+ while (fgets(line, sizeof(line), stdin) != NULL)
{
+ /*
+ * Strip the trailing newline...
+ */
+
+ line[strlen(line) - 1] = '\0';
+
/*
* Find any options in the string...
*/
/*
- * End of "$Id: lpc.c,v 1.2 1999/06/09 20:03:47 mike Exp $".
+ * End of "$Id: lpc.c,v 1.3 1999/06/21 19:10:07 mike Exp $".
*/