diff options
Diffstat (limited to 'date.c')
-rw-r--r-- | date.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -56,7 +56,7 @@ struct tm *date_conv_time(struct tm *tm_time, const char *t_string) | |||
56 | &(tm_time->tm_min), &(tm_time->tm_year)); | 56 | &(tm_time->tm_min), &(tm_time->tm_year)); |
57 | 57 | ||
58 | if (nr < 4 || nr > 5) { | 58 | if (nr < 4 || nr > 5) { |
59 | fatalError(invalid_date, t_string); | 59 | error_msg_and_die(invalid_date, t_string); |
60 | } | 60 | } |
61 | 61 | ||
62 | /* correct for century - minor Y2K problem here? */ | 62 | /* correct for century - minor Y2K problem here? */ |
@@ -121,7 +121,7 @@ struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string) | |||
121 | t.tm_mon -= 1; /* Adjust dates from 1-12 to 0-11 */ | 121 | t.tm_mon -= 1; /* Adjust dates from 1-12 to 0-11 */ |
122 | 122 | ||
123 | } else { | 123 | } else { |
124 | fatalError(invalid_date, t_string); | 124 | error_msg_and_die(invalid_date, t_string); |
125 | } | 125 | } |
126 | *tm_time = t; | 126 | *tm_time = t; |
127 | return (tm_time); | 127 | return (tm_time); |
@@ -156,7 +156,7 @@ int date_main(int argc, char **argv) | |||
156 | case 'u': | 156 | case 'u': |
157 | utc = 1; | 157 | utc = 1; |
158 | if (putenv("TZ=UTC0") != 0) | 158 | if (putenv("TZ=UTC0") != 0) |
159 | fatalError(memory_exhausted); | 159 | error_msg_and_die(memory_exhausted); |
160 | break; | 160 | break; |
161 | case 'd': | 161 | case 'd': |
162 | use_arg = 1; | 162 | use_arg = 1; |
@@ -176,7 +176,7 @@ int date_main(int argc, char **argv) | |||
176 | } | 176 | } |
177 | #if 0 | 177 | #if 0 |
178 | else { | 178 | else { |
179 | errorMsg("date_str='%s' date_fmt='%s'\n", date_str, date_fmt); | 179 | error_msg("date_str='%s' date_fmt='%s'\n", date_str, date_fmt); |
180 | usage(date_usage); | 180 | usage(date_usage); |
181 | } | 181 | } |
182 | #endif | 182 | #endif |
@@ -205,16 +205,16 @@ int date_main(int argc, char **argv) | |||
205 | /* Correct any day of week and day of year etc fields */ | 205 | /* Correct any day of week and day of year etc fields */ |
206 | tm = mktime(&tm_time); | 206 | tm = mktime(&tm_time); |
207 | if (tm < 0) | 207 | if (tm < 0) |
208 | fatalError(invalid_date, date_str); | 208 | error_msg_and_die(invalid_date, date_str); |
209 | if ( utc ) { | 209 | if ( utc ) { |
210 | if (putenv("TZ=UTC0") != 0) | 210 | if (putenv("TZ=UTC0") != 0) |
211 | fatalError(memory_exhausted); | 211 | error_msg_and_die(memory_exhausted); |
212 | } | 212 | } |
213 | 213 | ||
214 | /* if setting time, set it */ | 214 | /* if setting time, set it */ |
215 | if (set_time) { | 215 | if (set_time) { |
216 | if (stime(&tm) < 0) { | 216 | if (stime(&tm) < 0) { |
217 | perrorMsg("cannot set date"); | 217 | perror_msg("cannot set date"); |
218 | } | 218 | } |
219 | } | 219 | } |
220 | } | 220 | } |