diff options
author | Mark Whitley <markw@lineo.com> | 2000-12-07 19:56:48 +0000 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2000-12-07 19:56:48 +0000 |
commit | f57c944e09417edcbcd69f2b01b937cadef39db2 (patch) | |
tree | a55822621d54bd82c54e272fa986e45698fea0f1 /coreutils/cut.c | |
parent | 7b5c16ebe5f1b057603cf1c0b0187be418725c42 (diff) | |
download | busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.gz busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.bz2 busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.zip |
Changed names of functions in utility.c and all affected files, to make
compliant with the style guide. Everybody rebuild your tags file!
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r-- | coreutils/cut.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c index b281fa234..6e0fe83fc 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -54,12 +54,12 @@ static void decompose_list(const char *list) | |||
54 | /* the list must contain only digits and no more than one minus sign */ | 54 | /* the list must contain only digits and no more than one minus sign */ |
55 | for (ptr = (char *)list; *ptr; ptr++) { | 55 | for (ptr = (char *)list; *ptr; ptr++) { |
56 | if (!isdigit(*ptr) && *ptr != '-') { | 56 | if (!isdigit(*ptr) && *ptr != '-') { |
57 | fatalError("invalid byte or field list\n"); | 57 | error_msg_and_die("invalid byte or field list\n"); |
58 | } | 58 | } |
59 | if (*ptr == '-') { | 59 | if (*ptr == '-') { |
60 | nminus++; | 60 | nminus++; |
61 | if (nminus > 1) { | 61 | if (nminus > 1) { |
62 | fatalError("invalid byte or field list\n"); | 62 | error_msg_and_die("invalid byte or field list\n"); |
63 | } | 63 | } |
64 | } | 64 | } |
65 | } | 65 | } |
@@ -68,7 +68,7 @@ static void decompose_list(const char *list) | |||
68 | if (nminus == 0) { | 68 | if (nminus == 0) { |
69 | startpos = strtol(list, &ptr, 10); | 69 | startpos = strtol(list, &ptr, 10); |
70 | if (startpos == 0) { | 70 | if (startpos == 0) { |
71 | fatalError("missing list of fields\n"); | 71 | error_msg_and_die("missing list of fields\n"); |
72 | } | 72 | } |
73 | endpos = startpos; | 73 | endpos = startpos; |
74 | } | 74 | } |
@@ -188,14 +188,14 @@ extern int cut_main(int argc, char **argv) | |||
188 | case 'f': | 188 | case 'f': |
189 | /* make sure they didn't ask for two types of lists */ | 189 | /* make sure they didn't ask for two types of lists */ |
190 | if (part != 0) { | 190 | if (part != 0) { |
191 | fatalError("only one type of list may be specified"); | 191 | error_msg_and_die("only one type of list may be specified"); |
192 | } | 192 | } |
193 | part = (char)opt; | 193 | part = (char)opt; |
194 | decompose_list(optarg); | 194 | decompose_list(optarg); |
195 | break; | 195 | break; |
196 | case 'd': | 196 | case 'd': |
197 | if (strlen(optarg) > 1) { | 197 | if (strlen(optarg) > 1) { |
198 | fatalError("the delimiter must be a single character\n"); | 198 | error_msg_and_die("the delimiter must be a single character\n"); |
199 | } | 199 | } |
200 | delim = optarg[0]; | 200 | delim = optarg[0]; |
201 | break; | 201 | break; |
@@ -209,16 +209,16 @@ extern int cut_main(int argc, char **argv) | |||
209 | } | 209 | } |
210 | 210 | ||
211 | if (part == 0) { | 211 | if (part == 0) { |
212 | fatalError("you must specify a list of bytes, characters, or fields\n"); | 212 | error_msg_and_die("you must specify a list of bytes, characters, or fields\n"); |
213 | } | 213 | } |
214 | 214 | ||
215 | if (supress_non_delimited_lines && part != 'f') { | 215 | if (supress_non_delimited_lines && part != 'f') { |
216 | fatalError("suppressing non-delimited lines makes sense | 216 | error_msg_and_die("suppressing non-delimited lines makes sense |
217 | only when operating on fields\n"); | 217 | only when operating on fields\n"); |
218 | } | 218 | } |
219 | 219 | ||
220 | if (delim != '\t' && part != 'f') { | 220 | if (delim != '\t' && part != 'f') { |
221 | fatalError("a delimiter may be specified only when operating on fields\n"); | 221 | error_msg_and_die("a delimiter may be specified only when operating on fields\n"); |
222 | } | 222 | } |
223 | 223 | ||
224 | /* argv[(optind)..(argc-1)] should be names of file to process. If no | 224 | /* argv[(optind)..(argc-1)] should be names of file to process. If no |
@@ -233,7 +233,7 @@ extern int cut_main(int argc, char **argv) | |||
233 | for (i = optind; i < argc; i++) { | 233 | for (i = optind; i < argc; i++) { |
234 | file = fopen(argv[i], "r"); | 234 | file = fopen(argv[i], "r"); |
235 | if (file == NULL) { | 235 | if (file == NULL) { |
236 | errorMsg("%s: %s\n", argv[i], strerror(errno)); | 236 | error_msg("%s: %s\n", argv[i], strerror(errno)); |
237 | } else { | 237 | } else { |
238 | cut_file(file); | 238 | cut_file(file); |
239 | fclose(file); | 239 | fclose(file); |