@@ -60,39 +60,39 @@ typedef char *string;
60
60
* equivalent char; if text is not a single char, user is prompted
61
61
* to retry. If line can't be read, returns CHAR_MAX.
62
62
*/
63
- char get_char (const string format , ...) __attribute__((format (printf , 1 , 2 )));
63
+ char get_char (const char * format , ...) __attribute__((format (printf , 1 , 2 )));
64
64
65
65
/**
66
66
* Prompts user for a line of text from standard input and returns the
67
67
* equivalent double as precisely as possible; if text does not represent
68
68
* a double or if value would cause underflow or overflow, user is
69
69
* prompted to retry. If line can't be read, returns DBL_MAX.
70
70
*/
71
- double get_double (const string format , ...) __attribute__((format (printf , 1 , 2 )));
71
+ double get_double (const char * format , ...) __attribute__((format (printf , 1 , 2 )));
72
72
73
73
/**
74
74
* Prompts user for a line of text from standard input and returns the
75
75
* equivalent float as precisely as possible; if text does not represent
76
76
* a float or if value would cause underflow or overflow, user is prompted
77
77
* to retry. If line can't be read, returns FLT_MAX.
78
78
*/
79
- float get_float (const string format , ...) __attribute__((format (printf , 1 , 2 )));
79
+ float get_float (const char * format , ...) __attribute__((format (printf , 1 , 2 )));
80
80
81
81
/**
82
82
* Prompts user for a line of text from standard input and returns the
83
83
* equivalent int; if text does not represent an int in [-2^31, 2^31 - 1)
84
84
* or would cause underflow or overflow, user is prompted to retry. If line
85
85
* can't be read, returns INT_MAX.
86
86
*/
87
- int get_int (const string format , ...) __attribute__((format (printf , 1 , 2 )));
87
+ int get_int (const char * format , ...) __attribute__((format (printf , 1 , 2 )));
88
88
89
89
/**
90
90
* Prompts user for a line of text from standard input and returns the
91
91
* equivalent long; if text does not represent a long in
92
92
* [-2^63, 2^63 - 1) or would cause underflow or overflow, user is
93
93
* prompted to retry. If line can't be read, returns LONG_MAX.
94
94
*/
95
- long get_long (const string format , ...) __attribute__((format (printf , 1 , 2 )));
95
+ long get_long (const char * format , ...) __attribute__((format (printf , 1 , 2 )));
96
96
97
97
/**
98
98
* Prompts user for a line of text from standard input and returns
@@ -102,7 +102,7 @@ long get_long(const string format, ...) __attribute__((format(printf, 1, 2)));
102
102
* upon error or no input whatsoever (i.e., just EOF). Stores string
103
103
* on heap, but library's destructor frees memory on program's exit.
104
104
*/
105
- string get_string (va_list * args , const string format , ...) __attribute__((format (printf , 2 , 3 )));
105
+ string get_string (va_list * args , const char * format , ...) __attribute__((format (printf , 2 , 3 )));
106
106
#define get_string (...) get_string(NULL, __VA_ARGS__)
107
107
108
108
#endif
0 commit comments