diff options
author | scott-linder <scott.b.linder@wmich.edu> | 2014-02-23 15:34:45 -0500 |
---|---|---|
committer | scott-linder <scott.b.linder@wmich.edu> | 2014-02-24 09:48:18 -0500 |
commit | b76c358f3de9106a4bdbf853b4c4371f6f7a62c2 (patch) | |
tree | fef0339611c6e76afc3dc8da4b6bd2ab227e3066 /src/os_unix.h | |
parent | 1bcbc42330d651f06b8a842e16fe36475afde05d (diff) | |
download | rneovim-b76c358f3de9106a4bdbf853b4c4371f6f7a62c2.tar.gz rneovim-b76c358f3de9106a4bdbf853b4c4371f6f7a62c2.tar.bz2 rneovim-b76c358f3de9106a4bdbf853b4c4371f6f7a62c2.zip |
Convert function declarations from K&R to ANSI style.
cproto (http://invisible-island.net/cproto/) was used to do the bulk of
the work in batch; even the most recent version had some issues with
typedef'd parameters; a quick "patch" was to modify `lex.l` to
explicitly include all vim typedefs as known types. One example from
`vim.h` is
typedef unsigned char char_u;
which was added in `lex.l` as
<INITIAL>char_u { save_text_offset(); return T_CHAR; }
Even with these changes there were some problems:
* Two files (`mbyte.c` and `os_unix.c`) were not cleanly converted.
* Any function with the `UNUSED` macro in its parameter list was not converted.
Rather than spend more time fixing the automated approach, the two files
`mbyte.c` and `os_unix.c` were converted by hand.
The `UNUSED` macros were compiler specific, and the alternative, generic
version would require a different syntax, so in order to simplify the
conversion all uses of `UNUSED` were stripped, and then the sources were
run back through cproto. It is planned to reconsider each use of
`UNUSED` manually using a new macro definition.
Diffstat (limited to 'src/os_unix.h')
-rw-r--r-- | src/os_unix.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.h b/src/os_unix.h index f0fc3d5f9a..692bb3442b 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -81,7 +81,7 @@ # define SIGDUMMYARG 0, 0, (struct sigcontext *)0 # else # define SIGPROTOARG (int) -# define SIGDEFARG(s) (s) int s UNUSED; +# define SIGDEFARG(s) (s) int s; # define SIGDUMMYARG 0 # endif #else |