diff options
author | scott-linder <scott.b.linder@wmich.edu> | 2014-02-25 15:41:16 -0500 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-02-26 04:17:27 -0300 |
commit | 0ef90c13b72b74928bfb3c183c7a5bd7240b51ad (patch) | |
tree | b342ba525a153962f928e01fde7518398a4859c3 /src/charset.h | |
parent | 82e0636e788f131d46451805f6c46e2d4f8496a9 (diff) | |
download | rneovim-0ef90c13b72b74928bfb3c183c7a5bd7240b51ad.tar.gz rneovim-0ef90c13b72b74928bfb3c183c7a5bd7240b51ad.tar.bz2 rneovim-0ef90c13b72b74928bfb3c183c7a5bd7240b51ad.zip |
Removes 'proto' dir
See #137 for the issue.
Every header in the proto directory was:
* Given include guards in the form
#ifndef NEOVIM_FILENAME_H
#define NEOVIM_FILENAME_H
...
#endif /* NEOVIM_FILENAM_H */
* Renamed from *.pro -> *.h
* Moved from src/proto/ to src/
This would have caused conficts with some existing headers in src/;
rather than merge these conflicts now (which is a whole other can of
worms involving multiple and conditional inclusion), any header in src/
with a conflicting name was renamed from *.h -> *_defs.h (which may or
may not actually describe its purpose, the change is purely a
namespacing issue).
Once all of these changes were made a script was developed to determine
what #includes needed to be added to each source file to describe its
dependencies and allow it to compile; because the script is so short
and I'll just list it here:
#! /bin/bash
cd $(dirname $0)
# Scrapes `make` output for provided error messages and outputs #includes
# needed to resolve them.
# $1 : part of the clang error message between filename and identifier
list_missing_includes() {
for file_missing_pair in $(CC=clang make 2>&1 >/dev/null | sed -n "s/\/\(.*\.[hc]\).*$1.*'\(.*\)'.*/\1:\2/p"); do
fields=(${file_missing_pair//:/ })
source_file=${fields[0]}
missing_func=${fields[1]}
# Try to find the declaration of the missing function.
echo $(basename $source_file) \
\#include \"$(grep -r "\b$missing_func __ARGS" | sed -n "s/.*\/\(.*\)\:.*/\1/p")\"
# Remove duplicates
done | sort | uniq
}
echo "Finding missing function prototypes..."
list_missing_includes "implicit declaration of function"
echo "Finding missing identifier declarations..."
list_missing_includes "use of undeclared identifier"
Each list of required headers was added by hand in the following format:
#include "vim.h"
#include "*_defs.h"
#include "filename.h"
/* All other includes in same module here, in alphabetical order. */
/* All includes from other modules (e.g. "os/*.h") here in alphabetical
* order. */
Diffstat (limited to 'src/charset.h')
-rw-r--r-- | src/charset.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/charset.h b/src/charset.h new file mode 100644 index 0000000000..d680522880 --- /dev/null +++ b/src/charset.h @@ -0,0 +1,67 @@ +#ifndef NEOVIM_CHARSET_H +#define NEOVIM_CHARSET_H +/* charset.c */ +int init_chartab __ARGS((void)); +int buf_init_chartab __ARGS((buf_T *buf, int global)); +void trans_characters __ARGS((char_u *buf, int bufsize)); +char_u *transstr __ARGS((char_u *s)); +char_u *str_foldcase __ARGS((char_u *str, int orglen, char_u *buf, int buflen)); +char_u *transchar __ARGS((int c)); +char_u *transchar_byte __ARGS((int c)); +void transchar_nonprint __ARGS((char_u *buf, int c)); +void transchar_hex __ARGS((char_u *buf, int c)); +int byte2cells __ARGS((int b)); +int char2cells __ARGS((int c)); +int ptr2cells __ARGS((char_u *p)); +int vim_strsize __ARGS((char_u *s)); +int vim_strnsize __ARGS((char_u *s, int len)); +int chartabsize __ARGS((char_u *p, colnr_T col)); +int linetabsize __ARGS((char_u *s)); +int linetabsize_col __ARGS((int startcol, char_u *s)); +int win_linetabsize __ARGS((win_T *wp, char_u *p, colnr_T len)); +int vim_isIDc __ARGS((int c)); +int vim_iswordc __ARGS((int c)); +int vim_iswordc_buf __ARGS((int c, buf_T *buf)); +int vim_iswordp __ARGS((char_u *p)); +int vim_iswordp_buf __ARGS((char_u *p, buf_T *buf)); +int vim_isfilec __ARGS((int c)); +int vim_isfilec_or_wc __ARGS((int c)); +int vim_isprintc __ARGS((int c)); +int vim_isprintc_strict __ARGS((int c)); +int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col)); +int lbr_chartabsize_adv __ARGS((char_u **s, colnr_T col)); +int win_lbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp)); +int in_win_border __ARGS((win_T *wp, colnr_T vcol)); +void getvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, + colnr_T *end)); +colnr_T getvcol_nolist __ARGS((pos_T *posp)); +void getvvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, + colnr_T *end)); +void getvcols __ARGS((win_T *wp, pos_T *pos1, pos_T *pos2, colnr_T *left, + colnr_T *right)); +char_u *skipwhite __ARGS((char_u *q)); +char_u *skipdigits __ARGS((char_u *q)); +char_u *skiphex __ARGS((char_u *q)); +char_u *skiptodigit __ARGS((char_u *q)); +char_u *skiptohex __ARGS((char_u *q)); +int vim_isdigit __ARGS((int c)); +int vim_isxdigit __ARGS((int c)); +int vim_islower __ARGS((int c)); +int vim_isupper __ARGS((int c)); +int vim_toupper __ARGS((int c)); +int vim_tolower __ARGS((int c)); +char_u *skiptowhite __ARGS((char_u *p)); +char_u *skiptowhite_esc __ARGS((char_u *p)); +long getdigits __ARGS((char_u **pp)); +int vim_isblankline __ARGS((char_u *lbuf)); +void vim_str2nr __ARGS((char_u *start, int *hexp, int *len, int dooct, + int dohex, long *nptr, + unsigned long *unptr)); +int hex2nr __ARGS((int c)); +int hexhex2nr __ARGS((char_u *p)); +int rem_backslash __ARGS((char_u *str)); +void backslash_halve __ARGS((char_u *p)); +char_u *backslash_halve_save __ARGS((char_u *p)); +void ebcdic2ascii __ARGS((char_u *buffer, int len)); +/* vim: set ft=c : */ +#endif /* NEOVIM_CHARSET_H */ |