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:
scott-linder
2014-02-25 15:41:16 -05:00
committed by Thiago de Arruda
parent 82e0636e78
commit 0ef90c13b7
119 changed files with 4197 additions and 3181 deletions

69
src/screen.h Normal file
View File

@@ -0,0 +1,69 @@
#ifndef NEOVIM_SCREEN_H
#define NEOVIM_SCREEN_H
/* screen.c */
void redraw_later __ARGS((int type));
void redraw_win_later __ARGS((win_T *wp, int type));
void redraw_later_clear __ARGS((void));
void redraw_all_later __ARGS((int type));
void redraw_curbuf_later __ARGS((int type));
void redraw_buf_later __ARGS((buf_T *buf, int type));
int redraw_asap __ARGS((int type));
void redrawWinline __ARGS((linenr_T lnum, int invalid));
void update_curbuf __ARGS((int type));
void update_screen __ARGS((int type));
int conceal_cursor_line __ARGS((win_T *wp));
void conceal_check_cursur_line __ARGS((void));
void update_single_line __ARGS((win_T *wp, linenr_T lnum));
void update_debug_sign __ARGS((buf_T *buf, linenr_T lnum));
void updateWindow __ARGS((win_T *wp));
void rl_mirror __ARGS((char_u *str));
void status_redraw_all __ARGS((void));
void status_redraw_curbuf __ARGS((void));
void redraw_statuslines __ARGS((void));
void win_redraw_last_status __ARGS((frame_T *frp));
void win_redr_status_matches __ARGS((expand_T *xp, int num_matches, char_u *
*matches, int match,
int showtail));
void win_redr_status __ARGS((win_T *wp));
int stl_connected __ARGS((win_T *wp));
int get_keymap_str __ARGS((win_T *wp, char_u *buf, int len));
void screen_putchar __ARGS((int c, int row, int col, int attr));
void screen_getbytes __ARGS((int row, int col, char_u *bytes, int *attrp));
void screen_puts __ARGS((char_u *text, int row, int col, int attr));
void screen_puts_len __ARGS((char_u *text, int len, int row, int col, int attr));
void screen_stop_highlight __ARGS((void));
void reset_cterm_colors __ARGS((void));
void screen_draw_rectangle __ARGS((int row, int col, int height, int width,
int invert));
void screen_fill __ARGS((int start_row, int end_row, int start_col, int end_col,
int c1, int c2,
int attr));
void check_for_delay __ARGS((int check_msg_scroll));
int screen_valid __ARGS((int doclear));
void screenalloc __ARGS((int doclear));
void free_screenlines __ARGS((void));
void screenclear __ARGS((void));
int can_clear __ARGS((char_u *p));
void screen_start __ARGS((void));
void windgoto __ARGS((int row, int col));
void setcursor __ARGS((void));
int win_ins_lines __ARGS((win_T *wp, int row, int line_count, int invalid,
int mayclear));
int win_del_lines __ARGS((win_T *wp, int row, int line_count, int invalid,
int mayclear));
int screen_ins_lines __ARGS((int off, int row, int line_count, int end,
win_T *wp));
int screen_del_lines __ARGS((int off, int row, int line_count, int end,
int force,
win_T *wp));
int showmode __ARGS((void));
void unshowmode __ARGS((int force));
void get_trans_bufname __ARGS((buf_T *buf));
int redrawing __ARGS((void));
int messaging __ARGS((void));
void showruler __ARGS((int always));
int number_width __ARGS((win_T *wp));
int screen_screencol __ARGS((void));
int screen_screenrow __ARGS((void));
/* vim: set ft=c : */
#endif /* NEOVIM_SCREEN_H */