Skip to content

Commit

Permalink
Merge branch 'dl/no-extern-in-func-decl'
Browse files Browse the repository at this point in the history
Mechanically and systematically drop "extern" from function
declarlation.

* dl/no-extern-in-func-decl:
  *.[ch]: manually align parameter lists
  *.[ch]: remove extern from function declarations using sed
  *.[ch]: remove extern from function declarations using spatch
  • Loading branch information
gitster committed May 13, 2019
2 parents 2bfb182 + ad6dad0 commit 4aeeef3
Show file tree
Hide file tree
Showing 70 changed files with 1,082 additions and 1,082 deletions.
2 changes: 1 addition & 1 deletion advice.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int git_default_advice_config(const char *var, const char *value);
__attribute__((format (printf, 1, 2)))
void advise(const char *advice, ...);
int error_resolve_conflict(const char *me);
extern void NORETURN die_resolve_conflict(const char *me);
void NORETURN die_resolve_conflict(const char *me);
void NORETURN die_conclude_merge(void);
void detach_advice(const char *new_name);

Expand Down
24 changes: 12 additions & 12 deletions archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ struct archiver_args {

/* main api */

extern int write_archive(int argc, const char **argv, const char *prefix,
struct repository *repo,
const char *name_hint, int remote);
int write_archive(int argc, const char **argv, const char *prefix,
struct repository *repo,
const char *name_hint, int remote);

const char *archive_format_from_filename(const char *filename);

Expand All @@ -39,21 +39,21 @@ struct archiver {
unsigned flags;
void *data;
};
extern void register_archiver(struct archiver *);
void register_archiver(struct archiver *);

extern void init_tar_archiver(void);
extern void init_zip_archiver(void);
extern void init_archivers(void);
void init_tar_archiver(void);
void init_zip_archiver(void);
void init_archivers(void);

typedef int (*write_archive_entry_fn_t)(struct archiver_args *args,
const struct object_id *oid,
const char *path, size_t pathlen,
unsigned int mode);

extern int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
extern void *object_file_to_archive(const struct archiver_args *args,
const char *path, const struct object_id *oid,
unsigned int mode, enum object_type *type,
unsigned long *sizep);
int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
void *object_file_to_archive(const struct archiver_args *args,
const char *path, const struct object_id *oid,
unsigned int mode, enum object_type *type,
unsigned long *sizep);

#endif /* ARCHIVE_H */
26 changes: 13 additions & 13 deletions bisect.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ struct repository;
* Otherwise, it will be either all non-SAMETREE commits or the single
* best commit, as chosen by `find_all`.
*/
extern void find_bisection(struct commit_list **list, int *reaches, int *all,
int find_all);
void find_bisection(struct commit_list **list, int *reaches, int *all,
int find_all);

extern struct commit_list *filter_skipped(struct commit_list *list,
struct commit_list **tried,
int show_all,
int *count,
int *skipped_first);
struct commit_list *filter_skipped(struct commit_list *list,
struct commit_list **tried,
int show_all,
int *count,
int *skipped_first);

#define BISECT_SHOW_ALL (1<<0)
#define REV_LIST_QUIET (1<<1)
Expand All @@ -31,14 +31,14 @@ struct rev_list_info {
const char *header_prefix;
};

extern int bisect_next_all(struct repository *r,
const char *prefix,
int no_checkout);
int bisect_next_all(struct repository *r,
const char *prefix,
int no_checkout);

extern int estimate_bisect_steps(int all);
int estimate_bisect_steps(int all);

extern void read_bisect_terms(const char **bad, const char **good);
void read_bisect_terms(const char **bad, const char **good);

extern int bisect_clean_state(void);
int bisect_clean_state(void);

#endif
2 changes: 1 addition & 1 deletion blame.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,6 @@ struct blame_entry *blame_entry_prepend(struct blame_entry *head,
long start, long end,
struct blame_origin *o);

extern struct blame_origin *get_blame_suspects(struct commit *commit);
struct blame_origin *get_blame_suspects(struct commit *commit);

#endif /* BLAME_H */
14 changes: 7 additions & 7 deletions branch.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ void create_branch(struct repository *r,
* Return 1 if the named branch already exists; return 0 otherwise.
* Fill ref with the full refname for the branch.
*/
extern int validate_branchname(const char *name, struct strbuf *ref);
int validate_branchname(const char *name, struct strbuf *ref);

/*
* Check if a branch 'name' can be created as a new branch; die otherwise.
* 'force' can be used when it is OK for the named branch already exists.
* Return 1 if the named branch already exists; return 0 otherwise.
* Fill ref with the full refname for the branch.
*/
extern int validate_new_branchname(const char *name, struct strbuf *ref, int force);
int validate_new_branchname(const char *name, struct strbuf *ref, int force);

/*
* Remove information about the state of working on the current
Expand All @@ -72,26 +72,26 @@ void remove_branch_state(struct repository *r);
* Returns 0 on success.
*/
#define BRANCH_CONFIG_VERBOSE 01
extern int install_branch_config(int flag, const char *local, const char *origin, const char *remote);
int install_branch_config(int flag, const char *local, const char *origin, const char *remote);

/*
* Read branch description
*/
extern int read_branch_desc(struct strbuf *, const char *branch_name);
int read_branch_desc(struct strbuf *, const char *branch_name);

/*
* Check if a branch is checked out in the main worktree or any linked
* worktree and die (with a message describing its checkout location) if
* it is.
*/
extern void die_if_checked_out(const char *branch, int ignore_current_worktree);
void die_if_checked_out(const char *branch, int ignore_current_worktree);

/*
* Update all per-worktree HEADs pointing at the old ref to point the new ref.
* This will be used when renaming a branch. Returns 0 if successful, non-zero
* otherwise.
*/
extern int replace_each_worktree_head_symref(const char *oldref, const char *newref,
const char *logmsg);
int replace_each_worktree_head_symref(const char *oldref, const char *newref,
const char *logmsg);

#endif
Loading

0 comments on commit 4aeeef3

Please sign in to comment.