/*
- * $Id: printcap.c,v 1.8 2002-08-20 20:25:54 srittau Exp $
+ * $Id: printcap.c,v 1.10 2005-04-28 20:49:49 bfernhomberg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include "config.h"
#endif /* HAVE_CONFIG_H */
-#ifndef lint
-static char sccsid[] = "@(#)printcap.c 5.7 (Berkeley) 3/4/91";
-#endif /* not lint */
-
#include <ctype.h>
#include <stdio.h>
#include <string.h>
for (;;) {
switch (c = getc(pfp)) {
case EOF:
+ if (bp != tbuf) {
+ *bp = '\0';
+ return(1);
+ }
fclose(pfp);
pfp = NULL;
return(0);
while (*bp && *bp != ':')
bp++;
- if (*bp == ':')
+ while (*bp && *bp == ':')
bp++;
return (bp);
}