Main Page | Class List | File List | Class Members | File Members

input.h

Go to the documentation of this file.
00001 /* INPUT.H */
00002 
00003 #ifndef _INPUT_H_
00004 #define _INPUT_H_
00005 
00006 int exist(char *fn);
00007 /*
00008  * Returns 1 if file exists (i.e. can be read from).  Returns 0 if it doesn't.
00009  */
00010 
00011 void banner(char *message);
00012 /*
00013  * Take a message and displays it in a nice format
00014  */
00015 
00016 void hdr(char *msg);
00017 /*
00018  * a way to print a nice header
00019  */
00020 
00021 void hdr2(char *msg);
00022 /*
00023  * another way to do the same thing
00024  */
00025 
00026 void prompt(char *s);
00027 /*
00028  * This is a way to create an imput box
00029  */
00030 
00031 static void read_line1(char *s);
00032 /*
00033  * Reads at most one line from the file.
00034  */
00035 
00036 static int strip_comments(char *s);
00037 /*
00038  * Strips anything including and after a '#' or ';'.
00039  */
00040 
00041 static void strip_ending_whitespace(char *s);
00042 /*
00043  * skips over white space at the end of a line
00044  */
00045 
00046 static void read_line(char *s);
00047 /*
00048  * Read a line, but ignore lines that start with '#' or ';'
00049  *
00050  *  s[0] will end up being == '\0' when we reach EOF.
00051  */
00052 
00053 char upper(char c);
00054 /*
00055  * Return the uppercase version of the input character,
00056  *   or just return c if c is not in 'a'..'z'.
00057  */
00058 
00059 int equals(char *s1, char *s2);
00060 /*
00061  * Returns 1 if strings are equal, 0 if they are not.
00062  */
00063 
00064 int get_int(void);
00065 /*
00066  * Returns an integer read from input
00067  */
00068 
00069 double get_real(void);
00070 /*
00071  * Read a floating point number from input.
00072  */
00073 
00074 void get_str(char *s);
00075 /*
00076  * Reads a string from input
00077  */
00078 
00079 char *text(int x);
00080 /*
00081  * returns a string corresponding a text description of the integer x
00082  */
00083 
00084 void open_input_file(char *fn);
00085 /*
00086  * Opens config file
00087  */
00088 
00089 int eof_input_file();
00090 /*
00091  * returns the end of the config file
00092  */ 
00093 
00094 void close_input_file(void);
00095 /*
00096  * closes the config file
00097  */
00098 
00099 
00100 #endif

Generated on Sun Jul 16 16:27:45 2006 by  doxygen 1.3.9.1