aboutsummaryrefslogtreecommitdiff
path: root/src/mbyte.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/mbyte.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/mbyte.h')
-rw-r--r--src/mbyte.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/src/mbyte.h b/src/mbyte.h
new file mode 100644
index 0000000000..b9b5aa05d7
--- /dev/null
+++ b/src/mbyte.h
@@ -0,0 +1,103 @@
+#ifndef NEOVIM_MBYTE_H
+#define NEOVIM_MBYTE_H
+/* mbyte.c */
+int enc_canon_props __ARGS((char_u *name));
+char_u *mb_init __ARGS((void));
+int bomb_size __ARGS((void));
+void remove_bom __ARGS((char_u *s));
+int mb_get_class __ARGS((char_u *p));
+int mb_get_class_buf __ARGS((char_u *p, buf_T *buf));
+int dbcs_class __ARGS((unsigned lead, unsigned trail));
+int latin_char2len __ARGS((int c));
+int latin_char2bytes __ARGS((int c, char_u *buf));
+int latin_ptr2len __ARGS((char_u *p));
+int latin_ptr2len_len __ARGS((char_u *p, int size));
+int utf_char2cells __ARGS((int c));
+int latin_ptr2cells __ARGS((char_u *p));
+int utf_ptr2cells __ARGS((char_u *p));
+int dbcs_ptr2cells __ARGS((char_u *p));
+int latin_ptr2cells_len __ARGS((char_u *p, int size));
+int latin_char2cells __ARGS((int c));
+int mb_string2cells __ARGS((char_u *p, int len));
+int latin_off2cells __ARGS((unsigned off, unsigned max_off));
+int dbcs_off2cells __ARGS((unsigned off, unsigned max_off));
+int utf_off2cells __ARGS((unsigned off, unsigned max_off));
+int latin_ptr2char __ARGS((char_u *p));
+int utf_ptr2char __ARGS((char_u *p));
+int mb_ptr2char_adv __ARGS((char_u **pp));
+int mb_cptr2char_adv __ARGS((char_u **pp));
+int arabic_combine __ARGS((int one, int two));
+int arabic_maycombine __ARGS((int two));
+int utf_composinglike __ARGS((char_u *p1, char_u *p2));
+int utfc_ptr2char __ARGS((char_u *p, int *pcc));
+int utfc_ptr2char_len __ARGS((char_u *p, int *pcc, int maxlen));
+int utfc_char2bytes __ARGS((int off, char_u *buf));
+int utf_ptr2len __ARGS((char_u *p));
+int utf_byte2len __ARGS((int b));
+int utf_ptr2len_len __ARGS((char_u *p, int size));
+int utfc_ptr2len __ARGS((char_u *p));
+int utfc_ptr2len_len __ARGS((char_u *p, int size));
+int utf_char2len __ARGS((int c));
+int utf_char2bytes __ARGS((int c, char_u *buf));
+int utf_iscomposing __ARGS((int c));
+int utf_printable __ARGS((int c));
+int utf_class __ARGS((int c));
+int utf_fold __ARGS((int a));
+int utf_toupper __ARGS((int a));
+int utf_islower __ARGS((int a));
+int utf_tolower __ARGS((int a));
+int utf_isupper __ARGS((int a));
+int mb_strnicmp __ARGS((char_u *s1, char_u *s2, size_t nn));
+void show_utf8 __ARGS((void));
+int latin_head_off __ARGS((char_u *base, char_u *p));
+int dbcs_head_off __ARGS((char_u *base, char_u *p));
+int dbcs_screen_head_off __ARGS((char_u *base, char_u *p));
+int utf_head_off __ARGS((char_u *base, char_u *p));
+void mb_copy_char __ARGS((char_u **fp, char_u **tp));
+int mb_off_next __ARGS((char_u *base, char_u *p));
+int mb_tail_off __ARGS((char_u *base, char_u *p));
+void utf_find_illegal __ARGS((void));
+int utf_valid_string __ARGS((char_u *s, char_u *end));
+int dbcs_screen_tail_off __ARGS((char_u *base, char_u *p));
+void mb_adjust_cursor __ARGS((void));
+void mb_adjustpos __ARGS((buf_T *buf, pos_T *lp));
+char_u *mb_prevptr __ARGS((char_u *line, char_u *p));
+int mb_charlen __ARGS((char_u *str));
+int mb_charlen_len __ARGS((char_u *str, int len));
+char_u *mb_unescape __ARGS((char_u **pp));
+int mb_lefthalve __ARGS((int row, int col));
+int mb_fix_col __ARGS((int col, int row));
+char_u *enc_skip __ARGS((char_u *p));
+char_u *enc_canonize __ARGS((char_u *enc));
+char_u *enc_locale __ARGS((void));
+int encname2codepage __ARGS((char_u *name));
+void *my_iconv_open __ARGS((char_u *to, char_u *from));
+int iconv_enabled __ARGS((int verbose));
+void iconv_end __ARGS((void));
+void im_set_active __ARGS((int active));
+void xim_set_focus __ARGS((int focus));
+void im_set_position __ARGS((int row, int col));
+void xim_set_preedit __ARGS((void));
+int im_get_feedback_attr __ARGS((int col));
+void xim_init __ARGS((void));
+void im_shutdown __ARGS((void));
+int im_xim_isvalid_imactivate __ARGS((void));
+void xim_reset __ARGS((void));
+int xim_queue_key_press_event __ARGS((GdkEventKey *event, int down));
+int im_get_status __ARGS((void));
+int preedit_get_status __ARGS((void));
+int im_is_preediting __ARGS((void));
+void xim_set_status_area __ARGS((void));
+int xim_get_status_area_height __ARGS((void));
+int convert_setup __ARGS((vimconv_T *vcp, char_u *from, char_u *to));
+int convert_setup_ext __ARGS((vimconv_T *vcp, char_u *from,
+ int from_unicode_is_utf8, char_u *to,
+ int to_unicode_is_utf8));
+int convert_input __ARGS((char_u *ptr, int len, int maxlen));
+int convert_input_safe __ARGS((char_u *ptr, int len, int maxlen, char_u **restp,
+ int *restlenp));
+char_u *string_convert __ARGS((vimconv_T *vcp, char_u *ptr, int *lenp));
+char_u *string_convert_ext __ARGS((vimconv_T *vcp, char_u *ptr, int *lenp,
+ int *unconvlenp));
+/* vim: set ft=c : */
+#endif /* NEOVIM_MBYTE_H */