aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-05-16 14:21:09 +0000
committerMatt Kraai <kraai@debian.org>2001-05-16 14:21:09 +0000
commit59df6f73988b103f0dcfffeaec10642527336c5e (patch)
treefab28cbdabe79bb98e1cdc99f1fa2b6da599f709
parentbc604a2f417ea290913fedb6807e390e4fc8833e (diff)
downloadbusybox-w32-59df6f73988b103f0dcfffeaec10642527336c5e.tar.gz
busybox-w32-59df6f73988b103f0dcfffeaec10642527336c5e.tar.bz2
busybox-w32-59df6f73988b103f0dcfffeaec10642527336c5e.zip
Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.c
by Larry Doolittle.
-rw-r--r--ar.c2
-rw-r--r--archival/ar.c2
-rw-r--r--archival/dpkg_deb.c2
-rw-r--r--basename.c2
-rw-r--r--coreutils/basename.c2
-rw-r--r--coreutils/date.c2
-rw-r--r--coreutils/env.c2
-rw-r--r--coreutils/expr.c4
-rw-r--r--coreutils/id.c4
-rw-r--r--date.c2
-rw-r--r--dpkg_deb.c2
-rw-r--r--env.c2
-rw-r--r--expr.c4
-rw-r--r--findutils/grep.c2
-rw-r--r--findutils/which.c2
-rw-r--r--grep.c2
-rw-r--r--hostname.c10
-rw-r--r--id.c4
-rw-r--r--lash.c4
-rw-r--r--networking/hostname.c10
-rw-r--r--shell/lash.c4
-rw-r--r--which.c2
22 files changed, 36 insertions, 36 deletions
diff --git a/ar.c b/ar.c
index 4c3d0bbd5..08cd5c501 100644
--- a/ar.c
+++ b/ar.c
@@ -119,7 +119,7 @@ extern int ar_main(int argc, char **argv)
119 (int) ar_extract_list->size, time_string(ar_extract_list->mtime)); 119 (int) ar_extract_list->size, time_string(ar_extract_list->mtime));
120 } 120 }
121 if ((funct & display) || (funct & verbose)){ 121 if ((funct & display) || (funct & verbose)){
122 printf("%s\n", ar_extract_list->name); 122 puts(ar_extract_list->name);
123 } 123 }
124 ar_extract_list = ar_extract_list->next; 124 ar_extract_list = ar_extract_list->next;
125 } 125 }
diff --git a/archival/ar.c b/archival/ar.c
index 4c3d0bbd5..08cd5c501 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -119,7 +119,7 @@ extern int ar_main(int argc, char **argv)
119 (int) ar_extract_list->size, time_string(ar_extract_list->mtime)); 119 (int) ar_extract_list->size, time_string(ar_extract_list->mtime));
120 } 120 }
121 if ((funct & display) || (funct & verbose)){ 121 if ((funct & display) || (funct & verbose)){
122 printf("%s\n", ar_extract_list->name); 122 puts(ar_extract_list->name);
123 } 123 }
124 ar_extract_list = ar_extract_list->next; 124 ar_extract_list = ar_extract_list->next;
125 } 125 }
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index d08882885..17b5476d0 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -99,7 +99,7 @@ extern int dpkg_deb_main(int argc, char **argv)
99 field_length = strlen(field); 99 field_length = strlen(field);
100 field_start += (field_length + 1); 100 field_start += (field_length + 1);
101 if (strstr(field, argument) == field) { 101 if (strstr(field, argument) == field) {
102 printf("%s\n", field + strlen(argument) + 2); 102 puts(field + strlen(argument) + 2);
103 } 103 }
104 free(field); 104 free(field);
105 } 105 }
diff --git a/basename.c b/basename.c
index e98197dd4..b83f387c2 100644
--- a/basename.c
+++ b/basename.c
@@ -47,6 +47,6 @@ extern int basename_main(int argc, char **argv)
47 if (m>=n && strncmp(s+m-n, *argv, n)==0) 47 if (m>=n && strncmp(s+m-n, *argv, n)==0)
48 s[m-n] = '\0'; 48 s[m-n] = '\0';
49 } 49 }
50 printf("%s\n", s); 50 puts(s);
51 return EXIT_SUCCESS; 51 return EXIT_SUCCESS;
52} 52}
diff --git a/coreutils/basename.c b/coreutils/basename.c
index e98197dd4..b83f387c2 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -47,6 +47,6 @@ extern int basename_main(int argc, char **argv)
47 if (m>=n && strncmp(s+m-n, *argv, n)==0) 47 if (m>=n && strncmp(s+m-n, *argv, n)==0)
48 s[m-n] = '\0'; 48 s[m-n] = '\0';
49 } 49 }
50 printf("%s\n", s); 50 puts(s);
51 return EXIT_SUCCESS; 51 return EXIT_SUCCESS;
52} 52}
diff --git a/coreutils/date.c b/coreutils/date.c
index 22a1304d5..93b078b45 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -241,7 +241,7 @@ int date_main(int argc, char **argv)
241 /* Print OUTPUT (after ALL that!) */ 241 /* Print OUTPUT (after ALL that!) */
242 t_buff = xmalloc(201); 242 t_buff = xmalloc(201);
243 strftime(t_buff, 200, date_fmt, &tm_time); 243 strftime(t_buff, 200, date_fmt, &tm_time);
244 printf("%s\n", t_buff); 244 puts(t_buff);
245 245
246 return EXIT_SUCCESS; 246 return EXIT_SUCCESS;
247} 247}
diff --git a/coreutils/env.c b/coreutils/env.c
index 626fc1952..8bb690b72 100644
--- a/coreutils/env.c
+++ b/coreutils/env.c
@@ -66,7 +66,7 @@ extern int env_main(int argc, char** argv)
66 perror_msg_and_die("%s", *argv); 66 perror_msg_and_die("%s", *argv);
67 } 67 }
68 for (ep = environ; *ep; ep++) 68 for (ep = environ; *ep; ep++)
69 printf("%s\n", *ep); 69 puts(*ep);
70 return 0; 70 return 0;
71} 71}
72 72
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 4a537bf33..d6cc82e3e 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -89,8 +89,8 @@ int expr_main (int argc, char **argv)
89 89
90 if (v->type == integer) 90 if (v->type == integer)
91 printf ("%d\n", v->u.i); 91 printf ("%d\n", v->u.i);
92 else 92 else
93 printf ("%s\n", v->u.s); 93 puts (v->u.s);
94 94
95 exit (null (v)); 95 exit (null (v));
96} 96}
diff --git a/coreutils/id.c b/coreutils/id.c
index 3f90d55f6..85b288c0c 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -79,12 +79,12 @@ extern int id_main(int argc, char **argv)
79 79
80 if (no_group) { 80 if (no_group) {
81 if(name_not_number && user) 81 if(name_not_number && user)
82 printf("%s\n",user); 82 puts(user);
83 else 83 else
84 printf("%ld\n", pwnam); 84 printf("%ld\n", pwnam);
85 } else if (no_user) { 85 } else if (no_user) {
86 if(name_not_number && group) 86 if(name_not_number && group)
87 printf("%s\n", group); 87 puts(group);
88 else 88 else
89 printf("%ld\n", grnam); 89 printf("%ld\n", grnam);
90 } else { 90 } else {
diff --git a/date.c b/date.c
index 22a1304d5..93b078b45 100644
--- a/date.c
+++ b/date.c
@@ -241,7 +241,7 @@ int date_main(int argc, char **argv)
241 /* Print OUTPUT (after ALL that!) */ 241 /* Print OUTPUT (after ALL that!) */
242 t_buff = xmalloc(201); 242 t_buff = xmalloc(201);
243 strftime(t_buff, 200, date_fmt, &tm_time); 243 strftime(t_buff, 200, date_fmt, &tm_time);
244 printf("%s\n", t_buff); 244 puts(t_buff);
245 245
246 return EXIT_SUCCESS; 246 return EXIT_SUCCESS;
247} 247}
diff --git a/dpkg_deb.c b/dpkg_deb.c
index d08882885..17b5476d0 100644
--- a/dpkg_deb.c
+++ b/dpkg_deb.c
@@ -99,7 +99,7 @@ extern int dpkg_deb_main(int argc, char **argv)
99 field_length = strlen(field); 99 field_length = strlen(field);
100 field_start += (field_length + 1); 100 field_start += (field_length + 1);
101 if (strstr(field, argument) == field) { 101 if (strstr(field, argument) == field) {
102 printf("%s\n", field + strlen(argument) + 2); 102 puts(field + strlen(argument) + 2);
103 } 103 }
104 free(field); 104 free(field);
105 } 105 }
diff --git a/env.c b/env.c
index 626fc1952..8bb690b72 100644
--- a/env.c
+++ b/env.c
@@ -66,7 +66,7 @@ extern int env_main(int argc, char** argv)
66 perror_msg_and_die("%s", *argv); 66 perror_msg_and_die("%s", *argv);
67 } 67 }
68 for (ep = environ; *ep; ep++) 68 for (ep = environ; *ep; ep++)
69 printf("%s\n", *ep); 69 puts(*ep);
70 return 0; 70 return 0;
71} 71}
72 72
diff --git a/expr.c b/expr.c
index 4a537bf33..d6cc82e3e 100644
--- a/expr.c
+++ b/expr.c
@@ -89,8 +89,8 @@ int expr_main (int argc, char **argv)
89 89
90 if (v->type == integer) 90 if (v->type == integer)
91 printf ("%d\n", v->u.i); 91 printf ("%d\n", v->u.i);
92 else 92 else
93 printf ("%s\n", v->u.s); 93 puts (v->u.s);
94 94
95 exit (null (v)); 95 exit (null (v));
96} 96}
diff --git a/findutils/grep.c b/findutils/grep.c
index 6d5bd7fd1..a2fff440c 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -170,7 +170,7 @@ static void grep_file(FILE *file)
170 } 170 }
171 /* just grep -l: print just the filename, but only if we grepped the line in the file */ 171 /* just grep -l: print just the filename, but only if we grepped the line in the file */
172 else if (print_files_with_matches && !print_match_counts && nmatches > 0) { 172 else if (print_files_with_matches && !print_match_counts && nmatches > 0) {
173 printf("%s\n", cur_file); 173 puts(cur_file);
174 } 174 }
175 175
176 176
diff --git a/findutils/which.c b/findutils/which.c
index b2acd78de..c460ffdd1 100644
--- a/findutils/which.c
+++ b/findutils/which.c
@@ -58,7 +58,7 @@ extern int which_main(int argc, char **argv)
58 if (stat (buf, &filestat) == 0 58 if (stat (buf, &filestat) == 0
59 && filestat.st_mode & S_IXUSR) 59 && filestat.st_mode & S_IXUSR)
60 { 60 {
61 printf ("%s\n", buf); 61 puts(buf);
62 found = 1; 62 found = 1;
63 break; 63 break;
64 } 64 }
diff --git a/grep.c b/grep.c
index 6d5bd7fd1..a2fff440c 100644
--- a/grep.c
+++ b/grep.c
@@ -170,7 +170,7 @@ static void grep_file(FILE *file)
170 } 170 }
171 /* just grep -l: print just the filename, but only if we grepped the line in the file */ 171 /* just grep -l: print just the filename, but only if we grepped the line in the file */
172 else if (print_files_with_matches && !print_match_counts && nmatches > 0) { 172 else if (print_files_with_matches && !print_match_counts && nmatches > 0) {
173 printf("%s\n", cur_file); 173 puts(cur_file);
174 } 174 }
175 175
176 176
diff --git a/hostname.c b/hostname.c
index a6e001d54..f4118ea36 100644
--- a/hostname.c
+++ b/hostname.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.26 2001/03/09 21:24:12 andersen Exp $ 3 * $Id: hostname.c,v 1.27 2001/05/16 14:21:09 kraai Exp $
4 * Mini hostname implementation for busybox 4 * Mini hostname implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -112,19 +112,19 @@ int hostname_main(int argc, char **argv)
112 if (!s) 112 if (!s)
113 s = buf; 113 s = buf;
114 *s = 0; 114 *s = 0;
115 printf("%s\n", buf); 115 puts(buf);
116 } else if (opt_domain) { 116 } else if (opt_domain) {
117 s = strchr(buf, '.'); 117 s = strchr(buf, '.');
118 printf("%s\n", (s ? s + 1 : "")); 118 puts(s ? s + 1 : "");
119 } else if (opt_ip) { 119 } else if (opt_ip) {
120 h = gethostbyname(buf); 120 h = gethostbyname(buf);
121 if (!h) { 121 if (!h) {
122 printf("Host not found\n"); 122 printf("Host not found\n");
123 exit(1); 123 exit(1);
124 } 124 }
125 printf("%s\n", inet_ntoa(*(struct in_addr *) (h->h_addr))); 125 puts(inet_ntoa(*(struct in_addr *) (h->h_addr)));
126 } else { 126 } else {
127 printf("%s\n", buf); 127 puts(buf);
128 } 128 }
129 } 129 }
130 return(0); 130 return(0);
diff --git a/id.c b/id.c
index 3f90d55f6..85b288c0c 100644
--- a/id.c
+++ b/id.c
@@ -79,12 +79,12 @@ extern int id_main(int argc, char **argv)
79 79
80 if (no_group) { 80 if (no_group) {
81 if(name_not_number && user) 81 if(name_not_number && user)
82 printf("%s\n",user); 82 puts(user);
83 else 83 else
84 printf("%ld\n", pwnam); 84 printf("%ld\n", pwnam);
85 } else if (no_user) { 85 } else if (no_user) {
86 if(name_not_number && group) 86 if(name_not_number && group)
87 printf("%s\n", group); 87 puts(group);
88 else 88 else
89 printf("%ld\n", grnam); 89 printf("%ld\n", grnam);
90 } else { 90 } else {
diff --git a/lash.c b/lash.c
index 89a8fe6a5..cb17e2d75 100644
--- a/lash.c
+++ b/lash.c
@@ -416,7 +416,7 @@ static int builtin_pwd(struct child_prog *dummy)
416 cwd = xgetcwd((char *)cwd); 416 cwd = xgetcwd((char *)cwd);
417 if (!cwd) 417 if (!cwd)
418 cwd = unknown; 418 cwd = unknown;
419 printf( "%s\n", cwd); 419 puts(cwd);
420 return EXIT_SUCCESS; 420 return EXIT_SUCCESS;
421} 421}
422 422
@@ -429,7 +429,7 @@ static int builtin_export(struct child_prog *child)
429 if (v == NULL) { 429 if (v == NULL) {
430 char **e; 430 char **e;
431 for (e = environ; *e; e++) { 431 for (e = environ; *e; e++) {
432 printf( "%s\n", *e); 432 puts(*e);
433 } 433 }
434 return 0; 434 return 0;
435 } 435 }
diff --git a/networking/hostname.c b/networking/hostname.c
index a6e001d54..f4118ea36 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.26 2001/03/09 21:24:12 andersen Exp $ 3 * $Id: hostname.c,v 1.27 2001/05/16 14:21:09 kraai Exp $
4 * Mini hostname implementation for busybox 4 * Mini hostname implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -112,19 +112,19 @@ int hostname_main(int argc, char **argv)
112 if (!s) 112 if (!s)
113 s = buf; 113 s = buf;
114 *s = 0; 114 *s = 0;
115 printf("%s\n", buf); 115 puts(buf);
116 } else if (opt_domain) { 116 } else if (opt_domain) {
117 s = strchr(buf, '.'); 117 s = strchr(buf, '.');
118 printf("%s\n", (s ? s + 1 : "")); 118 puts(s ? s + 1 : "");
119 } else if (opt_ip) { 119 } else if (opt_ip) {
120 h = gethostbyname(buf); 120 h = gethostbyname(buf);
121 if (!h) { 121 if (!h) {
122 printf("Host not found\n"); 122 printf("Host not found\n");
123 exit(1); 123 exit(1);
124 } 124 }
125 printf("%s\n", inet_ntoa(*(struct in_addr *) (h->h_addr))); 125 puts(inet_ntoa(*(struct in_addr *) (h->h_addr)));
126 } else { 126 } else {
127 printf("%s\n", buf); 127 puts(buf);
128 } 128 }
129 } 129 }
130 return(0); 130 return(0);
diff --git a/shell/lash.c b/shell/lash.c
index 89a8fe6a5..cb17e2d75 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -416,7 +416,7 @@ static int builtin_pwd(struct child_prog *dummy)
416 cwd = xgetcwd((char *)cwd); 416 cwd = xgetcwd((char *)cwd);
417 if (!cwd) 417 if (!cwd)
418 cwd = unknown; 418 cwd = unknown;
419 printf( "%s\n", cwd); 419 puts(cwd);
420 return EXIT_SUCCESS; 420 return EXIT_SUCCESS;
421} 421}
422 422
@@ -429,7 +429,7 @@ static int builtin_export(struct child_prog *child)
429 if (v == NULL) { 429 if (v == NULL) {
430 char **e; 430 char **e;
431 for (e = environ; *e; e++) { 431 for (e = environ; *e; e++) {
432 printf( "%s\n", *e); 432 puts(*e);
433 } 433 }
434 return 0; 434 return 0;
435 } 435 }
diff --git a/which.c b/which.c
index b2acd78de..c460ffdd1 100644
--- a/which.c
+++ b/which.c
@@ -58,7 +58,7 @@ extern int which_main(int argc, char **argv)
58 if (stat (buf, &filestat) == 0 58 if (stat (buf, &filestat) == 0
59 && filestat.st_mode & S_IXUSR) 59 && filestat.st_mode & S_IXUSR)
60 { 60 {
61 printf ("%s\n", buf); 61 puts(buf);
62 found = 1; 62 found = 1;
63 break; 63 break;
64 } 64 }