/*
- * $Id: printcap.c,v 1.9 2003-02-17 01:33:01 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.
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);
}