diff options
author | H. Peter Anvin <hpa@zytor.com> | 2005-01-15 22:15:51 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2005-01-15 22:15:51 +0000 |
commit | e2c80181b6a6338f0381fc9c44fae32d8b8a20fc (patch) | |
tree | f9919ba3c0489d886c9a79e73257ef6a4584aafc /lcc | |
parent | 5180bc8a598aa5bff7bfb3726771e5bf348e61a2 (diff) | |
download | nasm-e2c80181b6a6338f0381fc9c44fae32d8b8a20fc.tar.gz nasm-e2c80181b6a6338f0381fc9c44fae32d8b8a20fc.tar.bz2 nasm-e2c80181b6a6338f0381fc9c44fae32d8b8a20fc.zip |
Apply Nindent to all .c and .h files
Diffstat (limited to 'lcc')
-rw-r--r-- | lcc/bind.c | 38 | ||||
-rw-r--r-- | lcc/lin-aout.c | 50 | ||||
-rw-r--r-- | lcc/lin-elf.c | 52 |
3 files changed, 74 insertions, 66 deletions
@@ -1,23 +1,23 @@ #include "c.h" -extern Interface nullIR, symbolicIR; +extern Interface nullIR, symbolicIR; extern Interface mipsebIR, mipselIR; -extern Interface sparcIR, solarisIR; -extern Interface x86IR, x86nasmIR; +extern Interface sparcIR, solarisIR; +extern Interface x86IR, x86nasmIR; Binding bindings[] = { - "symbolic", &symbolicIR, - "mips-irix", &mipsebIR, - "mips-ultrix", &mipselIR, - "sparc-sun", &sparcIR, - "sparc-solaris", &solarisIR, - "x86-dos", &x86IR, - "x86-nasm", &x86nasmIR, - "symbolic/irix", &symbolicIR, /* omit */ - "mips/irix", &mipsebIR, /* omit */ - "mips/ultrix", &mipselIR, /* omit */ - "sparc/sun", &sparcIR, /* omit */ - "sparc/solaris", &solarisIR, /* omit */ - "x86/dos", &x86IR, /* omit */ - "x86/nasm", &x86nasmIR, /* omit */ - "null", &nullIR, - NULL, NULL + "symbolic", &symbolicIR, + "mips-irix", &mipsebIR, + "mips-ultrix", &mipselIR, + "sparc-sun", &sparcIR, + "sparc-solaris", &solarisIR, + "x86-dos", &x86IR, + "x86-nasm", &x86nasmIR, + "symbolic/irix", &symbolicIR, /* omit */ + "mips/irix", &mipsebIR, /* omit */ + "mips/ultrix", &mipselIR, /* omit */ + "sparc/sun", &sparcIR, /* omit */ + "sparc/solaris", &solarisIR, /* omit */ + "x86/dos", &x86IR, /* omit */ + "x86/nasm", &x86nasmIR, /* omit */ + "null", &nullIR, + NULL, NULL }; diff --git a/lcc/lin-aout.c b/lcc/lin-aout.c index e3f2a58..e4ac48f 100644 --- a/lcc/lin-aout.c +++ b/lcc/lin-aout.c @@ -9,36 +9,40 @@ #define NASMPATH "/usr/local/bin/nasm" char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1", - "-Di386", "-D__i386", "-D__i386__", - "-Dlinux", "-D__linux", "-D__linux__", - "-Dunix", "-D__unix", "-D__unix__", - "$1", "$2", "$3", 0 }; + "-Di386", "-D__i386", "-D__i386__", + "-Dlinux", "-D__linux", "-D__linux__", + "-Dunix", "-D__unix", "-D__unix__", + "$1", "$2", "$3", 0 +}; char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include", - "-I/usr/include", 0 }; + "-I/usr/include", 0 +}; char *com[] = { LCCDIR "rcc", "-target=x86/nasm", - "$1", "$2", "$3", 0 }; + "$1", "$2", "$3", 0 +}; char *as[] = { NASMPATH, "-a", "-faout", "-o", "$3", "$1", "$2", 0 }; char *ld[] = { "/usr/bin/ld", "-m", "i386linux", - "-L/usr/i486-linuxaout/lib", - "-o", "$3", "$1", - "/usr/i486-linuxaout/lib/crt0.o", - "$2", "", "-lc", 0 }; + "-L/usr/i486-linuxaout/lib", + "-o", "$3", "$1", + "/usr/i486-linuxaout/lib/crt0.o", + "$2", "", "-lc", 0 +}; static char *bbexit = LCCDIR "bbexit.o"; extern char *concat(char *, char *); extern int access(const char *, int); -int option(char *arg) { - if (strncmp(arg, "-lccdir=", 8) == 0) { - cpp[0] = concat(&arg[8], "/cpp"); - include[0] = concat("-I", concat(&arg[8], "/include")); - com[0] = concat(&arg[8], "/rcc"); - bbexit = concat(&arg[8], "/bbexit.o"); - } else if (strcmp(arg, "-g") == 0) - ; - else if (strcmp(arg, "-b") == 0 && access(bbexit, 4) == 0) - ld[9] = bbexit; - else - return 0; - return 1; +int option(char *arg) +{ + if (strncmp(arg, "-lccdir=", 8) == 0) { + cpp[0] = concat(&arg[8], "/cpp"); + include[0] = concat("-I", concat(&arg[8], "/include")); + com[0] = concat(&arg[8], "/rcc"); + bbexit = concat(&arg[8], "/bbexit.o"); + } else if (strcmp(arg, "-g") == 0) ; + else if (strcmp(arg, "-b") == 0 && access(bbexit, 4) == 0) + ld[9] = bbexit; + else + return 0; + return 1; } diff --git a/lcc/lin-elf.c b/lcc/lin-elf.c index 3af9fe8..693309f 100644 --- a/lcc/lin-elf.c +++ b/lcc/lin-elf.c @@ -9,37 +9,41 @@ #define NASMPATH "/usr/local/bin/nasm" char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1", - "-D__ELF__", "-Di386", "-D__i386", "-D__i386__", - "-Dlinux", "-D__linux", "-D__linux__", - "$1", "$2", "$3", 0 }; + "-D__ELF__", "-Di386", "-D__i386", "-D__i386__", + "-Dlinux", "-D__linux", "-D__linux__", + "$1", "$2", "$3", 0 +}; char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include", - "-I/usr/include", 0 }; + "-I/usr/include", 0 +}; char *com[] = { LCCDIR "rcc", "-target=x86/nasm", - "$1", "$2", "$3", 0 }; + "$1", "$2", "$3", 0 +}; char *as[] = { NASMPATH, "-a", "-felf", "-o", "$3", "$1", "$2", 0 }; char *ld[] = { "/usr/bin/ld", "-m", "elf_i386", - "-dynamic-linker", "/lib/ld-linux.so.1", - "-L/usr/i486-linux/lib", - "-o", "$3", "$1", - "/usr/lib/crt1.o", "/usr/lib/crti.o", "/usr/lib/crtbegin.o", - "$2", "", - "-lc", "", "/usr/lib/crtend.o", "/usr/lib/crtn.o", 0 }; + "-dynamic-linker", "/lib/ld-linux.so.1", + "-L/usr/i486-linux/lib", + "-o", "$3", "$1", + "/usr/lib/crt1.o", "/usr/lib/crti.o", "/usr/lib/crtbegin.o", + "$2", "", + "-lc", "", "/usr/lib/crtend.o", "/usr/lib/crtn.o", 0 +}; static char *bbexit = LCCDIR "bbexit.o"; extern char *concat(char *, char *); extern int access(const char *, int); -int option(char *arg) { - if (strncmp(arg, "-lccdir=", 8) == 0) { - cpp[0] = concat(&arg[8], "/cpp"); - include[0] = concat("-I", concat(&arg[8], "/include")); - com[0] = concat(&arg[8], "/rcc"); - bbexit = concat(&arg[8], "/bbexit.o"); - } else if (strcmp(arg, "-g") == 0) - ; - else if (strcmp(arg, "-b") == 0 && access(bbexit, 4) == 0) - ld[13] = bbexit; - else - return 0; - return 1; +int option(char *arg) +{ + if (strncmp(arg, "-lccdir=", 8) == 0) { + cpp[0] = concat(&arg[8], "/cpp"); + include[0] = concat("-I", concat(&arg[8], "/include")); + com[0] = concat(&arg[8], "/rcc"); + bbexit = concat(&arg[8], "/bbexit.o"); + } else if (strcmp(arg, "-g") == 0) ; + else if (strcmp(arg, "-b") == 0 && access(bbexit, 4) == 0) + ld[13] = bbexit; + else + return 0; + return 1; } |