/*- * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * %sccs.include.proprietary.c% */ #ifndef lint static char sccsid[] = "@(#)getnum.c 8.1 (Berkeley) 06/06/93"; #endif /* not lint */ #include getnum() { int c, n; n = 0; while ((c=getchar()) >= '0' && c <= '9') n = n*10 + c - '0'; if (c == EOF) return(-1); return(n); }