diff.h: remove extern from function declaration

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2018-06-30 11:20:26 +02:00 committed by Junio C Hamano
parent 78d70d9b10
commit f758a7f8ac

118
diff.h
View File

@ -258,15 +258,15 @@ const char *diff_line_prefix(struct diff_options *);
extern const char mime_boundary_leader[]; extern const char mime_boundary_leader[];
extern struct combine_diff_path *diff_tree_paths( struct combine_diff_path *diff_tree_paths(
struct combine_diff_path *p, const struct object_id *oid, struct combine_diff_path *p, const struct object_id *oid,
const struct object_id **parents_oid, int nparent, const struct object_id **parents_oid, int nparent,
struct strbuf *base, struct diff_options *opt); struct strbuf *base, struct diff_options *opt);
extern int diff_tree_oid(const struct object_id *old_oid, int diff_tree_oid(const struct object_id *old_oid,
const struct object_id *new_oid, const struct object_id *new_oid,
const char *base, struct diff_options *opt); const char *base, struct diff_options *opt);
extern int diff_root_tree_oid(const struct object_id *new_oid, const char *base, int diff_root_tree_oid(const struct object_id *new_oid, const char *base,
struct diff_options *opt); struct diff_options *opt);
struct combine_diff_path { struct combine_diff_path {
struct combine_diff_path *next; struct combine_diff_path *next;
@ -283,33 +283,33 @@ struct combine_diff_path {
st_add4(sizeof(struct combine_diff_path), (l), 1, \ st_add4(sizeof(struct combine_diff_path), (l), 1, \
st_mult(sizeof(struct combine_diff_parent), (n))) st_mult(sizeof(struct combine_diff_parent), (n)))
extern void show_combined_diff(struct combine_diff_path *elem, int num_parent, void show_combined_diff(struct combine_diff_path *elem, int num_parent,
int dense, struct rev_info *); int dense, struct rev_info *);
extern void diff_tree_combined(const struct object_id *oid, const struct oid_array *parents, int dense, struct rev_info *rev); void diff_tree_combined(const struct object_id *oid, const struct oid_array *parents, int dense, struct rev_info *rev);
extern void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev); void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev);
void diff_set_mnemonic_prefix(struct diff_options *options, const char *a, const char *b); void diff_set_mnemonic_prefix(struct diff_options *options, const char *a, const char *b);
extern int diff_can_quit_early(struct diff_options *); int diff_can_quit_early(struct diff_options *);
extern void diff_addremove(struct diff_options *, void diff_addremove(struct diff_options *,
int addremove, int addremove,
unsigned mode, unsigned mode,
const struct object_id *oid, const struct object_id *oid,
int oid_valid, int oid_valid,
const char *fullpath, unsigned dirty_submodule); const char *fullpath, unsigned dirty_submodule);
extern void diff_change(struct diff_options *, void diff_change(struct diff_options *,
unsigned mode1, unsigned mode2, unsigned mode1, unsigned mode2,
const struct object_id *old_oid, const struct object_id *old_oid,
const struct object_id *new_oid, const struct object_id *new_oid,
int old_oid_valid, int new_oid_valid, int old_oid_valid, int new_oid_valid,
const char *fullpath, const char *fullpath,
unsigned dirty_submodule1, unsigned dirty_submodule2); unsigned dirty_submodule1, unsigned dirty_submodule2);
extern struct diff_filepair *diff_unmerge(struct diff_options *, const char *path); struct diff_filepair *diff_unmerge(struct diff_options *, const char *path);
#define DIFF_SETUP_REVERSE 1 #define DIFF_SETUP_REVERSE 1
#define DIFF_SETUP_USE_CACHE 2 #define DIFF_SETUP_USE_CACHE 2
@ -319,17 +319,17 @@ extern struct diff_filepair *diff_unmerge(struct diff_options *, const char *pat
* Poor man's alternative to parse-option, to allow both stuck form * Poor man's alternative to parse-option, to allow both stuck form
* (--option=value) and separate form (--option value). * (--option=value) and separate form (--option value).
*/ */
extern int parse_long_opt(const char *opt, const char **argv, int parse_long_opt(const char *opt, const char **argv,
const char **optarg); const char **optarg);
extern int git_diff_basic_config(const char *var, const char *value, void *cb); int git_diff_basic_config(const char *var, const char *value, void *cb);
extern int git_diff_heuristic_config(const char *var, const char *value, void *cb); int git_diff_heuristic_config(const char *var, const char *value, void *cb);
extern void init_diff_ui_defaults(void); void init_diff_ui_defaults(void);
extern int git_diff_ui_config(const char *var, const char *value, void *cb); int git_diff_ui_config(const char *var, const char *value, void *cb);
extern void diff_setup(struct diff_options *); void diff_setup(struct diff_options *);
extern int diff_opt_parse(struct diff_options *, const char **, int, const char *); int diff_opt_parse(struct diff_options *, const char **, int, const char *);
extern void diff_setup_done(struct diff_options *); void diff_setup_done(struct diff_options *);
extern int git_config_rename(const char *var, const char *value); int git_config_rename(const char *var, const char *value);
#define DIFF_DETECT_RENAME 1 #define DIFF_DETECT_RENAME 1
#define DIFF_DETECT_COPY 2 #define DIFF_DETECT_COPY 2
@ -347,8 +347,8 @@ extern int git_config_rename(const char *var, const char *value);
#define DIFF_PICKAXE_IGNORE_CASE 32 #define DIFF_PICKAXE_IGNORE_CASE 32
extern void diffcore_std(struct diff_options *); void diffcore_std(struct diff_options *);
extern void diffcore_fix_diff_index(struct diff_options *); void diffcore_fix_diff_index(struct diff_options *);
#define COMMON_DIFF_OPTIONS_HELP \ #define COMMON_DIFF_OPTIONS_HELP \
"\ncommon diff options:\n" \ "\ncommon diff options:\n" \
@ -378,9 +378,9 @@ extern void diffcore_fix_diff_index(struct diff_options *);
" show all files diff when -S is used and hit is found.\n" \ " show all files diff when -S is used and hit is found.\n" \
" -a --text treat all files as text.\n" " -a --text treat all files as text.\n"
extern int diff_queue_is_empty(void); int diff_queue_is_empty(void);
extern void diff_flush(struct diff_options*); void diff_flush(struct diff_options*);
extern void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc); void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc);
/* diff-raw status letters */ /* diff-raw status letters */
#define DIFF_STATUS_ADDED 'A' #define DIFF_STATUS_ADDED 'A'
@ -402,24 +402,24 @@ extern void diff_warn_rename_limit(const char *varname, int needed, int degraded
* This is different from find_unique_abbrev() in that * This is different from find_unique_abbrev() in that
* it stuffs the result with dots for alignment. * it stuffs the result with dots for alignment.
*/ */
extern const char *diff_aligned_abbrev(const struct object_id *sha1, int); const char *diff_aligned_abbrev(const struct object_id *sha1, int);
/* do not report anything on removed paths */ /* do not report anything on removed paths */
#define DIFF_SILENT_ON_REMOVED 01 #define DIFF_SILENT_ON_REMOVED 01
/* report racily-clean paths as modified */ /* report racily-clean paths as modified */
#define DIFF_RACY_IS_MODIFIED 02 #define DIFF_RACY_IS_MODIFIED 02
extern int run_diff_files(struct rev_info *revs, unsigned int option); int run_diff_files(struct rev_info *revs, unsigned int option);
extern int run_diff_index(struct rev_info *revs, int cached); int run_diff_index(struct rev_info *revs, int cached);
extern int do_diff_cache(const struct object_id *, struct diff_options *); int do_diff_cache(const struct object_id *, struct diff_options *);
extern int diff_flush_patch_id(struct diff_options *, struct object_id *, int); int diff_flush_patch_id(struct diff_options *, struct object_id *, int);
extern int diff_result_code(struct diff_options *, int); int diff_result_code(struct diff_options *, int);
extern void diff_no_index(struct rev_info *, int, const char **); void diff_no_index(struct rev_info *, int, const char **);
extern int index_differs_from(const char *def, const struct diff_flags *flags, int index_differs_from(const char *def, const struct diff_flags *flags,
int ita_invisible_in_index); int ita_invisible_in_index);
/* /*
* Fill the contents of the filespec "df", respecting any textconv defined by * Fill the contents of the filespec "df", respecting any textconv defined by
@ -432,30 +432,30 @@ extern int index_differs_from(const char *def, const struct diff_flags *flags,
* struct. If it is non-NULL, then "outbuf" points to a newly allocated buffer * struct. If it is non-NULL, then "outbuf" points to a newly allocated buffer
* that should be freed by the caller. * that should be freed by the caller.
*/ */
extern size_t fill_textconv(struct userdiff_driver *driver, size_t fill_textconv(struct userdiff_driver *driver,
struct diff_filespec *df, struct diff_filespec *df,
char **outbuf); char **outbuf);
/* /*
* Look up the userdiff driver for the given filespec, and return it if * Look up the userdiff driver for the given filespec, and return it if
* and only if it has textconv enabled (otherwise return NULL). The result * and only if it has textconv enabled (otherwise return NULL). The result
* can be passed to fill_textconv(). * can be passed to fill_textconv().
*/ */
extern struct userdiff_driver *get_textconv(struct diff_filespec *one); struct userdiff_driver *get_textconv(struct diff_filespec *one);
/* /*
* Prepare diff_filespec and convert it using diff textconv API * Prepare diff_filespec and convert it using diff textconv API
* if the textconv driver exists. * if the textconv driver exists.
* Return 1 if the conversion succeeds, 0 otherwise. * Return 1 if the conversion succeeds, 0 otherwise.
*/ */
extern int textconv_object(const char *path, unsigned mode, const struct object_id *oid, int oid_valid, char **buf, unsigned long *buf_size); int textconv_object(const char *path, unsigned mode, const struct object_id *oid, int oid_valid, char **buf, unsigned long *buf_size);
extern int parse_rename_score(const char **cp_p); int parse_rename_score(const char **cp_p);
extern long parse_algorithm_value(const char *value); long parse_algorithm_value(const char *value);
extern void print_stat_summary(FILE *fp, int files, void print_stat_summary(FILE *fp, int files,
int insertions, int deletions); int insertions, int deletions);
extern void setup_diff_pager(struct diff_options *); void setup_diff_pager(struct diff_options *);
#endif /* DIFF_H */ #endif /* DIFF_H */