#ifndef __MYIO_H__ #define __MYIO_H__ /** * myio.h - Declarations of simple I/O functions. * Based closely on code taken from sections 4.3 and 5.2 of K&R. */ /** * Get the next input character. */ int getch (void); /** * "Unget" a character, making it the next input character to be read. */ void ungetch (int c); /** * Get the next integer from input, storing it into *pn. Returns 1 * if it successfully read an integer. Returns EOF if it failed because * the next input was EOF. Returns 0 if it failed to read the integer * for any other reason (e.g., the next character could not be part of * an integer). */ int getint (int *pn); #endif // __MYIO_H__