make all functions static - surf-adblock - Surf adblock web extension | |
git clone git://git.codemadness.org/surf-adblock | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit c6ad19fedcfc3ae813187e47b90b1008edf047ea | |
parent 141791dac93c6f5c7bc5a7525806897b3c3a4255 | |
Author: Quentin Rameau <[email protected]> | |
Date: Sun, 17 Jul 2016 19:08:37 +0200 | |
make all functions static | |
Diffstat: | |
M surf-adblock.c | 20 ++++++++++---------- | |
1 file changed, 10 insertions(+), 10 deletions(-) | |
--- | |
diff --git a/surf-adblock.c b/surf-adblock.c | |
@@ -162,7 +162,7 @@ string_append(String *s, const char *data, size_t len) | |
return len; | |
} | |
-void * | |
+static void * | |
wecalloc(size_t nmemb, size_t size) | |
{ | |
void *p; | |
@@ -173,7 +173,7 @@ wecalloc(size_t nmemb, size_t size) | |
return p; | |
} | |
-char * | |
+static char * | |
westrndup(const char *s, size_t n) | |
{ | |
char *p; | |
@@ -183,7 +183,7 @@ westrndup(const char *s, size_t n) | |
return p; | |
} | |
-char * | |
+static char * | |
westrdup(const char *s) | |
{ | |
char *p; | |
@@ -265,7 +265,7 @@ casefold(int k) | |
/* match() based on musl-libc fnmatch: | |
https://git.musl-libc.org/cgit/musl/tree/src/regex/fnmatch.c */ | |
-int | |
+static int | |
match(const char *pat, const char *str, int fcase) | |
{ | |
size_t m = -1, n = -1; | |
@@ -469,7 +469,7 @@ parsedomainsoption(struct filterrule *f, char *s) | |
return (d != NULL); | |
} | |
-int | |
+static int | |
filtertype_cmp(const void *a, const void *b) | |
{ | |
return strcmp(((struct filtertype *)a)->name, | |
@@ -477,7 +477,7 @@ filtertype_cmp(const void *a, const void *b) | |
} | |
/* check if domain is the same domain or a subdomain of `s` */ | |
-int | |
+static int | |
matchdomain(const char *s, const char *domain) | |
{ | |
size_t l1, l2; | |
@@ -495,7 +495,7 @@ matchdomain(const char *s, const char *domain) | |
return !strcmp(s, domain); | |
} | |
-int | |
+static int | |
matchrule(struct filterrule *f, const char *uri, const char *type, | |
const char *domain) | |
{ | |
@@ -563,7 +563,7 @@ matchrule(struct filterrule *f, const char *uri, const char… | |
return 0; | |
} | |
-int | |
+static int | |
parserule(struct filterrule *f, char *s) | |
{ | |
struct filtertype key, *ft; | |
@@ -676,7 +676,7 @@ end: | |
return 1; | |
} | |
-void | |
+static void | |
debugrule(struct filterrule *r) | |
{ | |
printf("\turi: %s\n\tcss: %s\n\tisexception: %d\n\tblockmask: " | |
@@ -716,7 +716,7 @@ loadrules(FILE *fp) | |
return (rules != NULL); | |
} | |
-Page * | |
+static Page * | |
newpage(WebKitWebPage *page) | |
{ | |
Page *p; |