aboutsummaryrefslogtreecommitdiff
path: root/src/message.h
diff options
context:
space:
mode:
authorscott-linder <scott.b.linder@wmich.edu>2014-02-25 15:41:16 -0500
committerThiago de Arruda <tpadilha84@gmail.com>2014-02-26 04:17:27 -0300
commit0ef90c13b72b74928bfb3c183c7a5bd7240b51ad (patch)
treeb342ba525a153962f928e01fde7518398a4859c3 /src/message.h
parent82e0636e788f131d46451805f6c46e2d4f8496a9 (diff)
downloadrneovim-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/message.h')
-rw-r--r--src/message.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/src/message.h b/src/message.h
new file mode 100644
index 0000000000..bd1ef4242c
--- /dev/null
+++ b/src/message.h
@@ -0,0 +1,83 @@
+#ifndef NEOVIM_MESSAGE_H
+#define NEOVIM_MESSAGE_H
+/* message.c */
+int msg __ARGS((char_u *s));
+int verb_msg __ARGS((char_u *s));
+int msg_attr __ARGS((char_u *s, int attr));
+int msg_attr_keep __ARGS((char_u *s, int attr, int keep));
+char_u *msg_strtrunc __ARGS((char_u *s, int force));
+void trunc_string __ARGS((char_u *s, char_u *buf, int room, int buflen));
+void reset_last_sourcing __ARGS((void));
+void msg_source __ARGS((int attr));
+int emsg_not_now __ARGS((void));
+int emsg __ARGS((char_u *s));
+int emsg2 __ARGS((char_u *s, char_u *a1));
+void emsg_invreg __ARGS((int name));
+char_u *msg_trunc_attr __ARGS((char_u *s, int force, int attr));
+char_u *msg_may_trunc __ARGS((int force, char_u *s));
+int delete_first_msg __ARGS((void));
+void ex_messages __ARGS((exarg_T *eap));
+void msg_end_prompt __ARGS((void));
+void wait_return __ARGS((int redraw));
+void set_keep_msg __ARGS((char_u *s, int attr));
+void set_keep_msg_from_hist __ARGS((void));
+void msg_start __ARGS((void));
+void msg_starthere __ARGS((void));
+void msg_putchar __ARGS((int c));
+void msg_putchar_attr __ARGS((int c, int attr));
+void msg_outnum __ARGS((long n));
+void msg_home_replace __ARGS((char_u *fname));
+void msg_home_replace_hl __ARGS((char_u *fname));
+int msg_outtrans __ARGS((char_u *str));
+int msg_outtrans_attr __ARGS((char_u *str, int attr));
+int msg_outtrans_len __ARGS((char_u *str, int len));
+char_u *msg_outtrans_one __ARGS((char_u *p, int attr));
+int msg_outtrans_len_attr __ARGS((char_u *msgstr, int len, int attr));
+void msg_make __ARGS((char_u *arg));
+int msg_outtrans_special __ARGS((char_u *strstart, int from));
+char_u *str2special_save __ARGS((char_u *str, int is_lhs));
+char_u *str2special __ARGS((char_u **sp, int from));
+void str2specialbuf __ARGS((char_u *sp, char_u *buf, int len));
+void msg_prt_line __ARGS((char_u *s, int list));
+void msg_puts __ARGS((char_u *s));
+void msg_puts_title __ARGS((char_u *s));
+void msg_puts_long_attr __ARGS((char_u *longstr, int attr));
+void msg_puts_long_len_attr __ARGS((char_u *longstr, int len, int attr));
+void msg_puts_attr __ARGS((char_u *s, int attr));
+void may_clear_sb_text __ARGS((void));
+void clear_sb_text __ARGS((void));
+void show_sb_text __ARGS((void));
+void msg_sb_eol __ARGS((void));
+int msg_use_printf __ARGS((void));
+void mch_errmsg __ARGS((char *str));
+void mch_msg __ARGS((char *str));
+void msg_moremsg __ARGS((int full));
+void repeat_message __ARGS((void));
+void msg_clr_eos __ARGS((void));
+void msg_clr_eos_force __ARGS((void));
+void msg_clr_cmdline __ARGS((void));
+int msg_end __ARGS((void));
+void msg_check __ARGS((void));
+int redirecting __ARGS((void));
+void verbose_enter __ARGS((void));
+void verbose_leave __ARGS((void));
+void verbose_enter_scroll __ARGS((void));
+void verbose_leave_scroll __ARGS((void));
+void verbose_stop __ARGS((void));
+int verbose_open __ARGS((void));
+void give_warning __ARGS((char_u *message, int hl));
+void msg_advance __ARGS((int col));
+int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons,
+ int dfltbutton, char_u *textfield,
+ int ex_cmd));
+void display_confirm_msg __ARGS((void));
+int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt));
+int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message,
+ int dflt));
+int vim_dialog_yesnoallcancel __ARGS((int type, char_u *title, char_u *message,
+ int dflt));
+char_u *do_browse __ARGS((int flags, char_u *title, char_u *dflt, char_u *ext,
+ char_u *initdir, char_u *filter,
+ buf_T *buf));
+/* vim: set ft=c : */
+#endif /* NEOVIM_MESSAGE_H */