mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 08:28:34 +00:00
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. */
This commit is contained in:

committed by
Thiago de Arruda

parent
82e0636e78
commit
0ef90c13b7
49
src/edit.h
Normal file
49
src/edit.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef NEOVIM_EDIT_H
|
||||
#define NEOVIM_EDIT_H
|
||||
/* edit.c */
|
||||
int edit __ARGS((int cmdchar, int startln, long count));
|
||||
void edit_putchar __ARGS((int c, int highlight));
|
||||
void edit_unputchar __ARGS((void));
|
||||
void display_dollar __ARGS((colnr_T col));
|
||||
void change_indent __ARGS((int type, int amount, int round, int replaced,
|
||||
int call_changed_bytes));
|
||||
void truncate_spaces __ARGS((char_u *line));
|
||||
void backspace_until_column __ARGS((int col));
|
||||
int vim_is_ctrl_x_key __ARGS((int c));
|
||||
int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *
|
||||
fname, int dir,
|
||||
int flags));
|
||||
void set_completion __ARGS((colnr_T startcol, list_T *list));
|
||||
void ins_compl_show_pum __ARGS((void));
|
||||
char_u *find_word_start __ARGS((char_u *ptr));
|
||||
char_u *find_word_end __ARGS((char_u *ptr));
|
||||
int ins_compl_active __ARGS((void));
|
||||
int ins_compl_add_tv __ARGS((typval_T *tv, int dir));
|
||||
void ins_compl_check_keys __ARGS((int frequency));
|
||||
int get_literal __ARGS((void));
|
||||
void insertchar __ARGS((int c, int flags, int second_indent));
|
||||
void auto_format __ARGS((int trailblank, int prev_line));
|
||||
int comp_textwidth __ARGS((int ff));
|
||||
int stop_arrow __ARGS((void));
|
||||
void set_last_insert __ARGS((int c));
|
||||
void free_last_insert __ARGS((void));
|
||||
char_u *add_char2buf __ARGS((int c, char_u *s));
|
||||
void beginline __ARGS((int flags));
|
||||
int oneright __ARGS((void));
|
||||
int oneleft __ARGS((void));
|
||||
int cursor_up __ARGS((long n, int upd_topline));
|
||||
int cursor_down __ARGS((long n, int upd_topline));
|
||||
int stuff_inserted __ARGS((int c, long count, int no_esc));
|
||||
char_u *get_last_insert __ARGS((void));
|
||||
char_u *get_last_insert_save __ARGS((void));
|
||||
void replace_push __ARGS((int c));
|
||||
int replace_push_mb __ARGS((char_u *p));
|
||||
void fixthisline __ARGS((int (*get_the_indent)(void)));
|
||||
void fix_indent __ARGS((void));
|
||||
int in_cinkeys __ARGS((int keytyped, int when, int line_is_empty));
|
||||
int hkmap __ARGS((int c));
|
||||
void ins_scroll __ARGS((void));
|
||||
void ins_horscroll __ARGS((void));
|
||||
int ins_copychar __ARGS((linenr_T lnum));
|
||||
/* vim: set ft=c : */
|
||||
#endif /* NEOVIM_EDIT_H */
|
Reference in New Issue
Block a user