introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
This commit is contained in:
@@ -92,7 +92,7 @@ void bb_debug_dump_packet(unsigned char *outpack, int pktsize)
|
||||
printf("packet dump:\n");
|
||||
for (i = 0; i < pktsize; ++i) {
|
||||
printf("%2.2x ", outpack[i]);
|
||||
if (i % 20 == 19) puts("");
|
||||
if (i % 20 == 19) bb_putchar('\n');
|
||||
}
|
||||
printf("\n\n");
|
||||
}
|
||||
|
@@ -83,7 +83,7 @@ int hostname_main(int argc, char **argv)
|
||||
while (hp->h_addr_list[0]) {
|
||||
printf("%s ", inet_ntoa(*(struct in_addr *) (*hp->h_addr_list++)));
|
||||
}
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
}
|
||||
}
|
||||
/* Set the hostname */
|
||||
|
@@ -1259,7 +1259,7 @@ int ifupdown_main(int argc, char **argv)
|
||||
iface_list = iface_list->link;
|
||||
}
|
||||
if (VERBOSE) {
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
}
|
||||
|
||||
if (!okay && !FORCE) {
|
||||
|
@@ -937,7 +937,7 @@ static void ife_print(struct interface *ptr)
|
||||
printf("(auto)");
|
||||
}
|
||||
#endif
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
|
||||
if (ptr->has_ip) {
|
||||
printf(" %s addr:%s ", ap->name,
|
||||
@@ -1073,7 +1073,7 @@ static void ife_print(struct interface *ptr)
|
||||
if (ptr->outfill || ptr->keepalive)
|
||||
printf(" Outfill:%d Keepalive:%d", ptr->outfill, ptr->keepalive);
|
||||
#endif
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
|
||||
/* If needed, display the interface statistics. */
|
||||
|
||||
@@ -1122,9 +1122,9 @@ static void ife_print(struct interface *ptr)
|
||||
}
|
||||
if (ptr->map.dma)
|
||||
printf("DMA chan:%x ", ptr->map.dma);
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
}
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
}
|
||||
|
||||
|
||||
|
@@ -482,7 +482,7 @@ static void do_tunnels_list(struct ip_tunnel_parm *p)
|
||||
(p->i_key && p1.i_key != p->i_key))
|
||||
continue;
|
||||
print_tunnel(&p1);
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ static int do_show(int argc, char **argv)
|
||||
return -1;
|
||||
|
||||
print_tunnel(&p);
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -112,7 +112,7 @@ static void server_print(void)
|
||||
print_host(server, "Server:");
|
||||
if (ENABLE_FEATURE_CLEAN_UP)
|
||||
free(server);
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
}
|
||||
|
||||
/* alter the global _res nameserver structure to use
|
||||
|
@@ -1322,7 +1322,7 @@ int traceroute_main(int argc, char **argv)
|
||||
printf(" *");
|
||||
(void)fflush(stdout);
|
||||
}
|
||||
putchar('\n');
|
||||
bb_putchar('\n');
|
||||
if (got_there ||
|
||||
(unreachable > 0 && unreachable >= nprobes - 1))
|
||||
break;
|
||||
|
@@ -142,7 +142,7 @@ static void progressmeter(int flag)
|
||||
/* last call to progressmeter */
|
||||
alarm(0);
|
||||
transferred = 0;
|
||||
putc('\n', stderr);
|
||||
fputc('\n', stderr);
|
||||
} else {
|
||||
if (flag == -1) {
|
||||
/* first call to progressmeter */
|
||||
|
Reference in New Issue
Block a user