summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3e230fa)
raw | patch | inline | side by side (parent: 3e230fa)
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Wed, 20 May 2009 22:05:22 +0000 (00:05 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 21 May 2009 01:16:25 +0000 (18:16 -0700) |
Suggested by Stephen Boyd: make the callback functions used for option
parsing static.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parsing static.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-grep.c | patch | blob | history |
diff --git a/builtin-grep.c b/builtin-grep.c
index 169a91c17e6a9c5c91648e13b45944bf8602d5ce..5308b346e69a50d7695b26f3b8e00bfdf71e1dd2 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
die("unable to grep from object of type %s", typename(obj->type));
}
-int context_callback(const struct option *opt, const char *arg, int unset)
+static int context_callback(const struct option *opt, const char *arg,
+ int unset)
{
struct grep_opt *grep_opt = opt->value;
int value;
return 0;
}
-int file_callback(const struct option *opt, const char *arg, int unset)
+static int file_callback(const struct option *opt, const char *arg, int unset)
{
struct grep_opt *grep_opt = opt->value;
FILE *patterns;
return 0;
}
-int not_callback(const struct option *opt, const char *arg, int unset)
+static int not_callback(const struct option *opt, const char *arg, int unset)
{
struct grep_opt *grep_opt = opt->value;
append_grep_pattern(grep_opt, "--not", "command line", 0, GREP_NOT);
return 0;
}
-int and_callback(const struct option *opt, const char *arg, int unset)
+static int and_callback(const struct option *opt, const char *arg, int unset)
{
struct grep_opt *grep_opt = opt->value;
append_grep_pattern(grep_opt, "--and", "command line", 0, GREP_AND);
return 0;
}
-int open_callback(const struct option *opt, const char *arg, int unset)
+static int open_callback(const struct option *opt, const char *arg, int unset)
{
struct grep_opt *grep_opt = opt->value;
append_grep_pattern(grep_opt, "(", "command line", 0, GREP_OPEN_PAREN);
return 0;
}
-int close_callback(const struct option *opt, const char *arg, int unset)
+static int close_callback(const struct option *opt, const char *arg, int unset)
{
struct grep_opt *grep_opt = opt->value;
append_grep_pattern(grep_opt, ")", "command line", 0, GREP_CLOSE_PAREN);
return 0;
}
-int pattern_callback(const struct option *opt, const char *arg, int unset)
+static int pattern_callback(const struct option *opt, const char *arg,
+ int unset)
{
struct grep_opt *grep_opt = opt->value;
append_grep_pattern(grep_opt, arg, "-e option", 0, GREP_PATTERN);
return 0;
}
-int help_callback(const struct option *opt, const char *arg, int unset)
+static int help_callback(const struct option *opt, const char *arg, int unset)
{
return -1;
}