#ifndef FUNCTIONS_H_INCLUDED #define FUNCTIONS_H_INCLUDED #include #include #include #include #include #include #include #include #include #include #include // getstdin() return codes #define OK 0 #define NO_INPUT 1 #define TOO_LONG 2 // Print a debugging message, if debugging enabled void debug(char *string); // Get stdin line with buffer overrun protection int getstdin(char *prompt, char *buff, size_t sz); // Append CR-LF to the end of a string (after cleaning up any existing trailing CR or LF) void appendcrlf(char *string); #endif