[hackers] [sbase] keep usage definition above main || dwts
commit 575b38391c9e329645559ed245456e46ba6a41c6
Author: dwts <mr.dwts_AT_gmail.com>
Date: Tue Apr 22 15:13:51 2014 +0300
keep usage definition above main
diff --git a/chroot.c b/chroot.c
index 0cef1db..2b88937 100644
--- a/chroot.c
+++ b/chroot.c
_AT_@ -4,7 +4,11 @@
#include <unistd.h>
#include "util.h"
-static void usage(void);
+static void
+usage(void)
+{
+ eprintf("usage: chroot dir [command [arg...]]
");
+}
int
main(int argc, char *argv[])
_AT_@ -43,8 +47,3 @@ main(int argc, char *argv[])
return EXIT_FAILURE;
}
-void
-usage(void)
-{
- eprintf("usage: chroot dir [command [arg...]]
");
-}
diff --git a/nice.c b/nice.c
index c09bc82..b9fc3ea 100644
--- a/nice.c
+++ b/nice.c
_AT_@ -8,7 +8,11 @@
#include <unistd.h>
#include "util.h"
-static void usage(void);
+static void
+usage(void)
+{
+ eprintf("usage: nice [-n inc] command [options ...]
");
+}
int
main(int argc, char *argv[])
_AT_@ -43,8 +47,3 @@ main(int argc, char *argv[])
return (savederrno == ENOENT)? 127 : 126;
}
-static void
-usage(void)
-{
- eprintf("usage: nice [-n inc] command [options ...]
");
-}
diff --git a/renice.c b/renice.c
index e7908e3..9ced567 100644
--- a/renice.c
+++ b/renice.c
_AT_@ -11,7 +11,12 @@
static int strtop(const char *);
static bool renice(int, int, long);
-static void usage(void);
+
+static void
+usage(void)
+{
+ eprintf("renice -n inc [-g | -p | -u] ID ...
");
+}
int
main(int argc, char *argv[])
_AT_@ -110,8 +115,3 @@ renice(int which, int who, long adj)
return true;
}
-static void
-usage(void)
-{
- eprintf("renice -n inc [-g | -p | -u] ID ...
");
-}
diff --git a/split.c b/split.c
index 07370d9..c91865e 100644
--- a/split.c
+++ b/split.c
_AT_@ -9,7 +9,12 @@
static int itostr(char *, int, int);
static FILE *nextfile(FILE *, char *, int, int);
-static void usage(void);
+
+static void
+usage(void)
+{
+ eprintf("usage: split [-d] [-a len] [-b [bytes[k|m|g]]] [-l [lines]] [input [prefix]]
");
+}
static int base = 26, start = 'a';
_AT_@ -103,12 +108,6 @@ Nextfile:
return EXIT_SUCCESS;
}
-void
-usage(void)
-{
- eprintf("usage: split [-d] [-a len] [-b [bytes[k|m|g]]] [-l [lines]] [input [prefix]]
");
-}
-
int
itostr(char *str, int x, int n)
{
Received on Tue Apr 22 2014 - 14:46:37 CEST
This archive was generated by hypermail 2.3.0
: Tue Apr 22 2014 - 14:48:09 CEST