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/ex_getln.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/ex_getln.h')
-rw-r--r-- | src/ex_getln.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/ex_getln.h b/src/ex_getln.h new file mode 100644 index 0000000000..bf04476e2f --- /dev/null +++ b/src/ex_getln.h @@ -0,0 +1,69 @@ +#ifndef NEOVIM_EX_GETLN_H +#define NEOVIM_EX_GETLN_H +/* ex_getln.c */ +char_u *getcmdline __ARGS((int firstc, long count, int indent)); +char_u *getcmdline_prompt __ARGS((int firstc, char_u *prompt, int attr, + int xp_context, + char_u *xp_arg)); +int text_locked __ARGS((void)); +void text_locked_msg __ARGS((void)); +int curbuf_locked __ARGS((void)); +int allbuf_locked __ARGS((void)); +char_u *getexline __ARGS((int c, void *cookie, int indent)); +char_u *getexmodeline __ARGS((int promptc, void *cookie, int indent)); +int cmdline_overstrike __ARGS((void)); +int cmdline_at_end __ARGS((void)); +colnr_T cmdline_getvcol_cursor __ARGS((void)); +void free_cmdline_buf __ARGS((void)); +void putcmdline __ARGS((int c, int shift)); +void unputcmdline __ARGS((void)); +int put_on_cmdline __ARGS((char_u *str, int len, int redraw)); +char_u *save_cmdline_alloc __ARGS((void)); +void restore_cmdline_alloc __ARGS((char_u *p)); +void cmdline_paste_str __ARGS((char_u *s, int literally)); +void redrawcmdline __ARGS((void)); +void redrawcmd __ARGS((void)); +void compute_cmdrow __ARGS((void)); +void gotocmdline __ARGS((int clr)); +char_u *ExpandOne __ARGS((expand_T *xp, char_u *str, char_u *orig, int options, + int mode)); +void ExpandInit __ARGS((expand_T *xp)); +void ExpandCleanup __ARGS((expand_T *xp)); +void ExpandEscape __ARGS((expand_T *xp, char_u *str, int numfiles, char_u * + *files, + int options)); +char_u *vim_strsave_fnameescape __ARGS((char_u *fname, int shell)); +void tilde_replace __ARGS((char_u *orig_pat, int num_files, char_u **files)); +char_u *sm_gettail __ARGS((char_u *s)); +char_u *addstar __ARGS((char_u *fname, int len, int context)); +void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); +int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, + char_u ***matches)); +int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, + char_u ***file, char_u *((*func)(expand_T *, int)), + int escaped)); +char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); +void init_history __ARGS((void)); +int get_histtype __ARGS((char_u *name)); +void add_to_history __ARGS((int histype, char_u *new_entry, int in_map, int sep)); +int get_history_idx __ARGS((int histype)); +char_u *get_cmdline_str __ARGS((void)); +int get_cmdline_pos __ARGS((void)); +int set_cmdline_pos __ARGS((int pos)); +int get_cmdline_type __ARGS((void)); +char_u *get_history_entry __ARGS((int histype, int idx)); +int clr_history __ARGS((int histype)); +int del_history_entry __ARGS((int histype, char_u *str)); +int del_history_idx __ARGS((int histype, int idx)); +void remove_key_from_history __ARGS((void)); +int get_list_range __ARGS((char_u **str, int *num1, int *num2)); +void ex_history __ARGS((exarg_T *eap)); +void prepare_viminfo_history __ARGS((int asklen, int writing)); +int read_viminfo_history __ARGS((vir_T *virp, int writing)); +void finish_viminfo_history __ARGS((void)); +void write_viminfo_history __ARGS((FILE *fp, int merge)); +void cmd_pchar __ARGS((int c, int offset)); +int cmd_gchar __ARGS((int offset)); +char_u *script_get __ARGS((exarg_T *eap, char_u *cmd)); +/* vim: set ft=c : */ +#endif /* NEOVIM_EX_GETLN_H */ |