summaryrefslogtreecommitdiff
path: root/cut.c
diff options
context:
space:
mode:
authorMark Whitley2000-12-07 19:56:48 +0000
committerMark Whitley2000-12-07 19:56:48 +0000
commitf57c944e09417edcbcd69f2b01b937cadef39db2 (patch)
treea55822621d54bd82c54e272fa986e45698fea0f1 /cut.c
parent7b5c16ebe5f1b057603cf1c0b0187be418725c42 (diff)
downloadbusybox-f57c944e09417edcbcd69f2b01b937cadef39db2.zip
busybox-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.gz
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 'cut.c')
-rw-r--r--cut.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/cut.c b/cut.c
index b281fa2..6e0fe83 100644
--- a/cut.c
+++ b/cut.c
@@ -54,12 +54,12 @@ static void decompose_list(const char *list)
/* the list must contain only digits and no more than one minus sign */
for (ptr = (char *)list; *ptr; ptr++) {
if (!isdigit(*ptr) && *ptr != '-') {
- fatalError("invalid byte or field list\n");
+ error_msg_and_die("invalid byte or field list\n");
}
if (*ptr == '-') {
nminus++;
if (nminus > 1) {
- fatalError("invalid byte or field list\n");
+ error_msg_and_die("invalid byte or field list\n");
}
}
}
@@ -68,7 +68,7 @@ static void decompose_list(const char *list)
if (nminus == 0) {
startpos = strtol(list, &ptr, 10);
if (startpos == 0) {
- fatalError("missing list of fields\n");
+ error_msg_and_die("missing list of fields\n");
}
endpos = startpos;
}
@@ -188,14 +188,14 @@ extern int cut_main(int argc, char **argv)
case 'f':
/* make sure they didn't ask for two types of lists */
if (part != 0) {
- fatalError("only one type of list may be specified");
+ error_msg_and_die("only one type of list may be specified");
}
part = (char)opt;
decompose_list(optarg);
break;
case 'd':
if (strlen(optarg) > 1) {
- fatalError("the delimiter must be a single character\n");
+ error_msg_and_die("the delimiter must be a single character\n");
}
delim = optarg[0];
break;
@@ -209,16 +209,16 @@ extern int cut_main(int argc, char **argv)
}
if (part == 0) {
- fatalError("you must specify a list of bytes, characters, or fields\n");
+ error_msg_and_die("you must specify a list of bytes, characters, or fields\n");
}
if (supress_non_delimited_lines && part != 'f') {
- fatalError("suppressing non-delimited lines makes sense
+ error_msg_and_die("suppressing non-delimited lines makes sense
only when operating on fields\n");
}
if (delim != '\t' && part != 'f') {
- fatalError("a delimiter may be specified only when operating on fields\n");
+ error_msg_and_die("a delimiter may be specified only when operating on fields\n");
}
/* 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)
for (i = optind; i < argc; i++) {
file = fopen(argv[i], "r");
if (file == NULL) {
- errorMsg("%s: %s\n", argv[i], strerror(errno));
+ error_msg("%s: %s\n", argv[i], strerror(errno));
} else {
cut_file(file);
fclose(file);