aboutsummaryrefslogtreecommitdiff
path: root/coreutils/tr.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/tr.c')
-rw-r--r--coreutils/tr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/coreutils/tr.c b/coreutils/tr.c
index e2a4ef6c5..a00e36134 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -54,7 +54,7 @@ static void convert(void)
54 if (in_index == read_chars) { 54 if (in_index == read_chars) {
55 if ((read_chars = read(0, (char *) pinput, BUFSIZ)) <= 0) { 55 if ((read_chars = read(0, (char *) pinput, BUFSIZ)) <= 0) {
56 if (write(1, (char *) poutput, out_index) != out_index) 56 if (write(1, (char *) poutput, out_index) != out_index)
57 error_msg("%s", write_error); 57 bb_error_msg(bb_msg_write_error);
58 exit(0); 58 exit(0);
59 } 59 }
60 in_index = 0; 60 in_index = 0;
@@ -68,7 +68,7 @@ static void convert(void)
68 poutput[out_index++] = last = coded; 68 poutput[out_index++] = last = coded;
69 if (out_index == BUFSIZ) { 69 if (out_index == BUFSIZ) {
70 if (write(1, (char *) poutput, out_index) != out_index) 70 if (write(1, (char *) poutput, out_index) != out_index)
71 error_msg_and_die("%s", write_error); 71 bb_error_msg_and_die(bb_msg_write_error);
72 out_index = 0; 72 out_index = 0;
73 } 73 }
74 } 74 }
@@ -102,7 +102,7 @@ static unsigned int expand(const char *arg, register unsigned char *buffer)
102 while (*arg) { 102 while (*arg) {
103 if (*arg == '\\') { 103 if (*arg == '\\') {
104 arg++; 104 arg++;
105 *buffer++ = process_escape_sequence(&arg); 105 *buffer++ = bb_process_escape_sequence(&arg);
106 } else if (*(arg+1) == '-') { 106 } else if (*(arg+1) == '-') {
107 ac = *(arg+2); 107 ac = *(arg+2);
108 if(ac == 0) { 108 if(ac == 0) {
@@ -181,7 +181,7 @@ extern int tr_main(int argc, char **argv)
181 sq_fl = TRUE; 181 sq_fl = TRUE;
182 break; 182 break;
183 default: 183 default:
184 show_usage(); 184 bb_show_usage();
185 } 185 }
186 } 186 }
187 idx++; 187 idx++;
@@ -197,7 +197,7 @@ extern int tr_main(int argc, char **argv)
197 input_length = complement(input, input_length); 197 input_length = complement(input, input_length);
198 if (argv[idx] != NULL) { 198 if (argv[idx] != NULL) {
199 if (*argv[idx] == '\0') 199 if (*argv[idx] == '\0')
200 error_msg_and_die("STRING2 cannot be empty"); 200 bb_error_msg_and_die("STRING2 cannot be empty");
201 output_length = expand(argv[idx], output); 201 output_length = expand(argv[idx], output);
202 map(input, input_length, output, output_length); 202 map(input, input_length, output, output_length);
203 } 203 }