summaryrefslogtreecommitdiff
path: root/libc/debian/crle.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/debian/crle.c')
-rw-r--r--libc/debian/crle.c70
1 files changed, 36 insertions, 34 deletions
diff --git a/libc/debian/crle.c b/libc/debian/crle.c
index 42aa335..9f1997e 100644
--- a/libc/debian/crle.c
+++ b/libc/debian/crle.c
@@ -40,55 +40,57 @@ as the name is changed.
#include <string.h>
#include <unistd.h>
-const char crle64 [] = DEB_USRLIBDIR_64 "/crle";
-const char crle32 [] = DEB_USRLIBDIR_32 "/crle";
-char* help [] = {"crle", "-h"};
+const char crle64[] = DEB_USRLIBDIR_64 "/crle";
+const char crle32[] = DEB_USRLIBDIR_32 "/crle";
+char *help[] = { "crle", "-h" };
#if DEB_HOST_ARCH_BITS == 64
-# define crle crle64
+#define crle crle64
#elif DEB_HOST_ARCH_BITS == 32
-# define crle crle32
+#define crle crle32
#else
-# error DEB_HOST_ARCH_BITS is not set or has a wrong value
+#error DEB_HOST_ARCH_BITS is not set or has a wrong value
#endif
static void
-myexec(const char *path, char **argv)
+myexec (const char *path, char **argv)
{
- int rc;
- rc = execv(path, argv);
- perror(path);
- exit(rc);
+ int rc;
+ rc = execv (path, argv);
+ perror (path);
+ exit (rc);
}
-int main(int argc, char **argv)
+int
+main (int argc, char **argv)
{
- int i;
- int use_help = 0;
- int use_64 = 0;
- int use_32 = 0;
-
- for (i = 1; i < argc; i++) {
- if (argv[i][0] == '-' && argv[i][1] == 'h')
- use_help++;
- else if (strcmp("-64", argv[i]) == 0)
- use_64++;
- else if (strcmp("-32", argv[i]) == 0)
- use_32++;
+ int i;
+ int use_help = 0;
+ int use_64 = 0;
+ int use_32 = 0;
+
+ for (i = 1; i < argc; i++)
+ {
+ if (argv[i][0] == '-' && argv[i][1] == 'h')
+ use_help++;
+ else if (strcmp ("-64", argv[i]) == 0)
+ use_64++;
+ else if (strcmp ("-32", argv[i]) == 0)
+ use_32++;
}
- if (use_help)
- myexec(crle, help);
+ if (use_help)
+ myexec (crle, help);
- if (!use_64 && !use_32)
- myexec(crle, argv);
+ if (!use_64 && !use_32)
+ myexec (crle, argv);
- if (use_64 && !use_32)
- myexec(crle64, argv);
+ if (use_64 && !use_32)
+ myexec (crle64, argv);
- if (use_32 && !use_64)
- myexec(crle32, argv);
+ if (use_32 && !use_64)
+ myexec (crle32, argv);
- fprintf(stderr, "Options -32 and -64 cannot be used together\n");
- return EXIT_FAILURE;
+ fprintf (stderr, "Options -32 and -64 cannot be used together\n");
+ return EXIT_FAILURE;
}