diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/mk/main.c | 1 | ||||
-rw-r--r-- | src/cmd/mk/mk.h | 36 | ||||
-rw-r--r-- | src/cmd/mk/shprint.c | 2 | ||||
-rw-r--r-- | src/cmd/mk/unix.c | 1 |
4 files changed, 5 insertions, 35 deletions
diff --git a/src/cmd/mk/main.c b/src/cmd/mk/main.c index 267ed73f..fdd94777 100644 --- a/src/cmd/mk/main.c +++ b/src/cmd/mk/main.c @@ -226,6 +226,7 @@ main(int argc, char **argv) if(uflag) prusage(); exits(0); + return 0; } void diff --git a/src/cmd/mk/mk.h b/src/cmd/mk/mk.h index 9b3f627d..33402de0 100644 --- a/src/cmd/mk/mk.h +++ b/src/cmd/mk/mk.h @@ -1,38 +1,4 @@ -#include <utf.h> -#include <fmt.h> -#include <setjmp.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include <bio.h> -#include <regexp9.h> -#include <time.h> - -#define uchar _mkuchar -#define ushort _mkushort -#define uint _mkuint -#define ulong _mkulong -#define vlong _mkvlong -#define uvlong _mkuvlong - -#define nil ((void*)0) - -typedef unsigned char uchar; -typedef unsigned short ushort; -typedef unsigned int uint; -typedef unsigned long ulong; - -#define nelem(x) (sizeof(x)/sizeof((x)[0])) - -#define OREAD O_RDONLY -#define OWRITE O_WRONLY -#define ORDWR O_RDWR -#define USED(x) if(x);else -#define remove unlink -#define seek lseek -#define exits(s) exit((s) && ((char*)s)[0] ? 1 : 0) -#define create(name, mode, perm) creat(name, perm) -#define ERRMAX 256 +#include "sys.h" #undef assert #define assert mkassert diff --git a/src/cmd/mk/shprint.c b/src/cmd/mk/shprint.c index 9e15bcef..7cfa5f4c 100644 --- a/src/cmd/mk/shprint.c +++ b/src/cmd/mk/shprint.c @@ -2,6 +2,8 @@ static char *vexpand(char*, Envy*, Bufblock*); +#define getfields mkgetfields + static int getfields(char *str, char **args, int max, int mflag, char *set) { diff --git a/src/cmd/mk/unix.c b/src/cmd/mk/unix.c index 60222788..8b7e9cb8 100644 --- a/src/cmd/mk/unix.c +++ b/src/cmd/mk/unix.c @@ -1,3 +1,4 @@ +#define NOPLAN9DEFINES #include "mk.h" #include <sys/wait.h> #include <signal.h> |