aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-27 08:32:57 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-27 08:32:57 +0000
commit90ca2848fdca2788a52daac51432e1077abc24f7 (patch)
treea00ab095af09dc4c078bb782d371915681780dad
parented3ef50c233ffb1b50ea0e7382a8e60b86491009 (diff)
downloadbusybox-w32-90ca2848fdca2788a52daac51432e1077abc24f7.tar.gz
busybox-w32-90ca2848fdca2788a52daac51432e1077abc24f7.tar.bz2
busybox-w32-90ca2848fdca2788a52daac51432e1077abc24f7.zip
Fix some formatting
-rw-r--r--applets/busybox.c11
-rw-r--r--busybox.c11
2 files changed, 10 insertions, 12 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index ab3762eb8..e56d2a4ed 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -2,6 +2,7 @@
2#include "busybox.h" 2#include "busybox.h"
3#include <stdio.h> 3#include <stdio.h>
4#include <string.h> 4#include <string.h>
5#include <unistd.h>
5#include <errno.h> 6#include <errno.h>
6#include <stdlib.h> 7#include <stdlib.h>
7 8
@@ -15,8 +16,6 @@
15#include "messages.c" 16#include "messages.c"
16 17
17static int been_there_done_that = 0; 18static int been_there_done_that = 0;
18
19
20const char *applet_name; 19const char *applet_name;
21 20
22#ifdef BB_FEATURE_INSTALLER 21#ifdef BB_FEATURE_INSTALLER
@@ -70,12 +69,12 @@ static void install_links(const char *busybox, int use_symbolic_links)
70 int i; 69 int i;
71 int rc; 70 int rc;
72 71
73 if (use_symbolic_links) Link = symlink; 72 if (use_symbolic_links)
73 Link = symlink;
74 74
75 for (i = 0; applets[i].name != NULL; i++) { 75 for (i = 0; applets[i].name != NULL; i++) {
76 sprintf ( command, "%s/%s", 76 sprintf ( command, "%s/%s",
77 install_dir[applets[i].location], 77 install_dir[applets[i].location], applets[i].name);
78 applets[i].name);
79 rc = Link(busybox, command); 78 rc = Link(busybox, command);
80 79
81 if (rc) { 80 if (rc) {
@@ -190,7 +189,7 @@ int busybox_main(int argc, char **argv)
190 189
191 /* Fix up the argv pointers */ 190 /* Fix up the argv pointers */
192 len = argv[1] - argv[0]; 191 len = argv[1] - argv[0];
193 memmove(argv, argv+1, sizeof(char *) * (argc + 1)); 192 memmove(argv, argv + 1, sizeof(char *) * (argc + 1));
194 for (i = 0; i < argc; i++) 193 for (i = 0; i < argc; i++)
195 argv[i] -= len; 194 argv[i] -= len;
196 195
diff --git a/busybox.c b/busybox.c
index ab3762eb8..e56d2a4ed 100644
--- a/busybox.c
+++ b/busybox.c
@@ -2,6 +2,7 @@
2#include "busybox.h" 2#include "busybox.h"
3#include <stdio.h> 3#include <stdio.h>
4#include <string.h> 4#include <string.h>
5#include <unistd.h>
5#include <errno.h> 6#include <errno.h>
6#include <stdlib.h> 7#include <stdlib.h>
7 8
@@ -15,8 +16,6 @@
15#include "messages.c" 16#include "messages.c"
16 17
17static int been_there_done_that = 0; 18static int been_there_done_that = 0;
18
19
20const char *applet_name; 19const char *applet_name;
21 20
22#ifdef BB_FEATURE_INSTALLER 21#ifdef BB_FEATURE_INSTALLER
@@ -70,12 +69,12 @@ static void install_links(const char *busybox, int use_symbolic_links)
70 int i; 69 int i;
71 int rc; 70 int rc;
72 71
73 if (use_symbolic_links) Link = symlink; 72 if (use_symbolic_links)
73 Link = symlink;
74 74
75 for (i = 0; applets[i].name != NULL; i++) { 75 for (i = 0; applets[i].name != NULL; i++) {
76 sprintf ( command, "%s/%s", 76 sprintf ( command, "%s/%s",
77 install_dir[applets[i].location], 77 install_dir[applets[i].location], applets[i].name);
78 applets[i].name);
79 rc = Link(busybox, command); 78 rc = Link(busybox, command);
80 79
81 if (rc) { 80 if (rc) {
@@ -190,7 +189,7 @@ int busybox_main(int argc, char **argv)
190 189
191 /* Fix up the argv pointers */ 190 /* Fix up the argv pointers */
192 len = argv[1] - argv[0]; 191 len = argv[1] - argv[0];
193 memmove(argv, argv+1, sizeof(char *) * (argc + 1)); 192 memmove(argv, argv + 1, sizeof(char *) * (argc + 1));
194 for (i = 0; i < argc; i++) 193 for (i = 0; i < argc; i++)
195 argv[i] -= len; 194 argv[i] -= len;
196 195