Skip to content

Commit 0194c9a

Browse files
committed
Merge branch 'nd/no-extern'
Noiseword "extern" has been removed from function decls in the header files. * nd/no-extern: submodule.h: drop extern from function declaration revision.h: drop extern from function declaration repository.h: drop extern from function declaration rerere.h: drop extern from function declaration line-range.h: drop extern from function declaration diff.h: remove extern from function declaration diffcore.h: drop extern from function declaration convert.h: drop 'extern' from function declaration cache-tree.h: drop extern from function declaration blame.h: drop extern on func declaration attr.h: drop extern from function declaration apply.h: drop extern on func declaration
2 parents 271940c + 4dcd706 commit 0194c9a

File tree

12 files changed

+269
-266
lines changed

12 files changed

+269
-266
lines changed

apply.h

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ struct apply_state {
111111
int applied_after_fixing_ws;
112112
};
113113

114-
extern int apply_parse_options(int argc, const char **argv,
115-
struct apply_state *state,
116-
int *force_apply, int *options,
117-
const char * const *apply_usage);
118-
extern int init_apply_state(struct apply_state *state,
119-
const char *prefix);
120-
extern void clear_apply_state(struct apply_state *state);
121-
extern int check_apply_state(struct apply_state *state, int force_apply);
114+
int apply_parse_options(int argc, const char **argv,
115+
struct apply_state *state,
116+
int *force_apply, int *options,
117+
const char * const *apply_usage);
118+
int init_apply_state(struct apply_state *state,
119+
const char *prefix);
120+
void clear_apply_state(struct apply_state *state);
121+
int check_apply_state(struct apply_state *state, int force_apply);
122122

123123
/*
124124
* Some aspects of the apply behavior are controlled by the following
@@ -127,9 +127,8 @@ extern int check_apply_state(struct apply_state *state, int force_apply);
127127
#define APPLY_OPT_INACCURATE_EOF (1<<0) /* accept inaccurate eof */
128128
#define APPLY_OPT_RECOUNT (1<<1) /* accept inaccurate line count */
129129

130-
extern int apply_all_patches(struct apply_state *state,
131-
int argc,
132-
const char **argv,
133-
int options);
130+
int apply_all_patches(struct apply_state *state,
131+
int argc, const char **argv,
132+
int options);
134133

135134
#endif

attr.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,31 @@ struct attr_check {
4242
struct attr_stack *stack;
4343
};
4444

45-
extern struct attr_check *attr_check_alloc(void);
46-
extern struct attr_check *attr_check_initl(const char *, ...);
47-
extern struct attr_check *attr_check_dup(const struct attr_check *check);
45+
struct attr_check *attr_check_alloc(void);
46+
struct attr_check *attr_check_initl(const char *, ...);
47+
struct attr_check *attr_check_dup(const struct attr_check *check);
4848

49-
extern struct attr_check_item *attr_check_append(struct attr_check *check,
50-
const struct git_attr *attr);
49+
struct attr_check_item *attr_check_append(struct attr_check *check,
50+
const struct git_attr *attr);
5151

52-
extern void attr_check_reset(struct attr_check *check);
53-
extern void attr_check_clear(struct attr_check *check);
54-
extern void attr_check_free(struct attr_check *check);
52+
void attr_check_reset(struct attr_check *check);
53+
void attr_check_clear(struct attr_check *check);
54+
void attr_check_free(struct attr_check *check);
5555

5656
/*
5757
* Return the name of the attribute represented by the argument. The
5858
* return value is a pointer to a null-delimited string that is part
5959
* of the internal data structure; it should not be modified or freed.
6060
*/
61-
extern const char *git_attr_name(const struct git_attr *);
61+
const char *git_attr_name(const struct git_attr *);
6262

63-
extern int git_check_attr(const char *path, struct attr_check *check);
63+
int git_check_attr(const char *path, struct attr_check *check);
6464

6565
/*
6666
* Retrieve all attributes that apply to the specified path.
6767
* check holds the attributes and their values.
6868
*/
69-
extern void git_all_attrs(const char *path, struct attr_check *check);
69+
void git_all_attrs(const char *path, struct attr_check *check);
7070

7171
enum git_attr_direction {
7272
GIT_ATTR_CHECKIN,
@@ -76,6 +76,6 @@ enum git_attr_direction {
7676
void git_attr_set_direction(enum git_attr_direction new_direction,
7777
struct index_state *istate);
7878

79-
extern void attr_start(void);
79+
void attr_start(void);
8080

8181
#endif /* ATTR_H */

blame.h

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,22 @@ static inline struct blame_origin *blame_origin_incref(struct blame_origin *o)
159159
o->refcnt++;
160160
return o;
161161
}
162-
extern void blame_origin_decref(struct blame_origin *o);
163-
164-
extern void blame_coalesce(struct blame_scoreboard *sb);
165-
extern void blame_sort_final(struct blame_scoreboard *sb);
166-
extern unsigned blame_entry_score(struct blame_scoreboard *sb, struct blame_entry *e);
167-
extern void assign_blame(struct blame_scoreboard *sb, int opt);
168-
extern const char *blame_nth_line(struct blame_scoreboard *sb, long lno);
169-
170-
extern void init_scoreboard(struct blame_scoreboard *sb);
171-
extern void setup_scoreboard(struct blame_scoreboard *sb, const char *path, struct blame_origin **orig);
172-
173-
extern struct blame_entry *blame_entry_prepend(struct blame_entry *head, long start, long end, struct blame_origin *o);
162+
void blame_origin_decref(struct blame_origin *o);
163+
164+
void blame_coalesce(struct blame_scoreboard *sb);
165+
void blame_sort_final(struct blame_scoreboard *sb);
166+
unsigned blame_entry_score(struct blame_scoreboard *sb, struct blame_entry *e);
167+
void assign_blame(struct blame_scoreboard *sb, int opt);
168+
const char *blame_nth_line(struct blame_scoreboard *sb, long lno);
169+
170+
void init_scoreboard(struct blame_scoreboard *sb);
171+
void setup_scoreboard(struct blame_scoreboard *sb,
172+
const char *path,
173+
struct blame_origin **orig);
174+
175+
struct blame_entry *blame_entry_prepend(struct blame_entry *head,
176+
long start, long end,
177+
struct blame_origin *o);
174178

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

cache-tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ int write_index_as_tree(struct object_id *oid, struct index_state *index_state,
5151
int write_cache_as_tree(struct object_id *oid, int flags, const char *prefix);
5252
void prime_cache_tree(struct index_state *, struct tree *);
5353

54-
extern int cache_tree_matches_traversal(struct cache_tree *, struct name_entry *ent, struct traverse_info *info);
54+
int cache_tree_matches_traversal(struct cache_tree *, struct name_entry *ent, struct traverse_info *info);
5555

5656
#endif

convert.h

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -57,35 +57,36 @@ struct delayed_checkout {
5757

5858
extern enum eol core_eol;
5959
extern char *check_roundtrip_encoding;
60-
extern const char *get_cached_convert_stats_ascii(const struct index_state *istate,
61-
const char *path);
62-
extern const char *get_wt_convert_stats_ascii(const char *path);
63-
extern const char *get_convert_attr_ascii(const char *path);
60+
const char *get_cached_convert_stats_ascii(const struct index_state *istate,
61+
const char *path);
62+
const char *get_wt_convert_stats_ascii(const char *path);
63+
const char *get_convert_attr_ascii(const char *path);
6464

6565
/* returns 1 if *dst was used */
66-
extern int convert_to_git(const struct index_state *istate,
67-
const char *path, const char *src, size_t len,
68-
struct strbuf *dst, int conv_flags);
69-
extern int convert_to_working_tree(const char *path, const char *src,
70-
size_t len, struct strbuf *dst);
71-
extern int async_convert_to_working_tree(const char *path, const char *src,
72-
size_t len, struct strbuf *dst,
73-
void *dco);
74-
extern int async_query_available_blobs(const char *cmd, struct string_list *available_paths);
75-
extern int renormalize_buffer(const struct index_state *istate,
76-
const char *path, const char *src, size_t len,
77-
struct strbuf *dst);
66+
int convert_to_git(const struct index_state *istate,
67+
const char *path, const char *src, size_t len,
68+
struct strbuf *dst, int conv_flags);
69+
int convert_to_working_tree(const char *path, const char *src,
70+
size_t len, struct strbuf *dst);
71+
int async_convert_to_working_tree(const char *path, const char *src,
72+
size_t len, struct strbuf *dst,
73+
void *dco);
74+
int async_query_available_blobs(const char *cmd,
75+
struct string_list *available_paths);
76+
int renormalize_buffer(const struct index_state *istate,
77+
const char *path, const char *src, size_t len,
78+
struct strbuf *dst);
7879
static inline int would_convert_to_git(const struct index_state *istate,
7980
const char *path)
8081
{
8182
return convert_to_git(istate, path, NULL, 0, NULL, 0);
8283
}
8384
/* Precondition: would_convert_to_git_filter_fd(path) == true */
84-
extern void convert_to_git_filter_fd(const struct index_state *istate,
85-
const char *path, int fd,
86-
struct strbuf *dst,
87-
int conv_flags);
88-
extern int would_convert_to_git_filter_fd(const char *path);
85+
void convert_to_git_filter_fd(const struct index_state *istate,
86+
const char *path, int fd,
87+
struct strbuf *dst,
88+
int conv_flags);
89+
int would_convert_to_git_filter_fd(const char *path);
8990

9091
/*****************************************************************
9192
*
@@ -95,9 +96,10 @@ extern int would_convert_to_git_filter_fd(const char *path);
9596

9697
struct stream_filter; /* opaque */
9798

98-
extern struct stream_filter *get_stream_filter(const char *path, const struct object_id *);
99-
extern void free_stream_filter(struct stream_filter *);
100-
extern int is_null_stream_filter(struct stream_filter *);
99+
struct stream_filter *get_stream_filter(const char *path,
100+
const struct object_id *);
101+
void free_stream_filter(struct stream_filter *);
102+
int is_null_stream_filter(struct stream_filter *);
101103

102104
/*
103105
* Use as much input up to *isize_p and fill output up to *osize_p;
@@ -111,8 +113,8 @@ extern int is_null_stream_filter(struct stream_filter *);
111113
* such filters know there is no more input coming and it is time for
112114
* them to produce the remaining output based on the buffered input.
113115
*/
114-
extern int stream_filter(struct stream_filter *,
115-
const char *input, size_t *isize_p,
116-
char *output, size_t *osize_p);
116+
int stream_filter(struct stream_filter *,
117+
const char *input, size_t *isize_p,
118+
char *output, size_t *osize_p);
117119

118120
#endif /* CONVERT_H */

0 commit comments

Comments
 (0)