|
@@ -71,7 +71,7 @@ FILELINE * docsection;
|
|
|
|
|
|
static char *srctree, *kernsrctree;
|
|
static char *srctree, *kernsrctree;
|
|
|
|
|
|
-void usage (void)
|
|
|
|
|
|
+static void usage (void)
|
|
{
|
|
{
|
|
fprintf(stderr, "Usage: docproc {doc|depend} file\n");
|
|
fprintf(stderr, "Usage: docproc {doc|depend} file\n");
|
|
fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
|
|
fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
|
|
@@ -84,7 +84,7 @@ void usage (void)
|
|
/*
|
|
/*
|
|
* Execute kernel-doc with parameters given in svec
|
|
* Execute kernel-doc with parameters given in svec
|
|
*/
|
|
*/
|
|
-void exec_kernel_doc(char **svec)
|
|
|
|
|
|
+static void exec_kernel_doc(char **svec)
|
|
{
|
|
{
|
|
pid_t pid;
|
|
pid_t pid;
|
|
int ret;
|
|
int ret;
|
|
@@ -129,7 +129,7 @@ struct symfile
|
|
struct symfile symfilelist[MAXFILES];
|
|
struct symfile symfilelist[MAXFILES];
|
|
int symfilecnt = 0;
|
|
int symfilecnt = 0;
|
|
|
|
|
|
-void add_new_symbol(struct symfile *sym, char * symname)
|
|
|
|
|
|
+static void add_new_symbol(struct symfile *sym, char * symname)
|
|
{
|
|
{
|
|
sym->symbollist =
|
|
sym->symbollist =
|
|
realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
|
|
realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
|
|
@@ -137,14 +137,14 @@ void add_new_symbol(struct symfile *sym, char * symname)
|
|
}
|
|
}
|
|
|
|
|
|
/* Add a filename to the list */
|
|
/* Add a filename to the list */
|
|
-struct symfile * add_new_file(char * filename)
|
|
|
|
|
|
+static struct symfile * add_new_file(char * filename)
|
|
{
|
|
{
|
|
symfilelist[symfilecnt++].filename = strdup(filename);
|
|
symfilelist[symfilecnt++].filename = strdup(filename);
|
|
return &symfilelist[symfilecnt - 1];
|
|
return &symfilelist[symfilecnt - 1];
|
|
}
|
|
}
|
|
|
|
|
|
/* Check if file already are present in the list */
|
|
/* Check if file already are present in the list */
|
|
-struct symfile * filename_exist(char * filename)
|
|
|
|
|
|
+static struct symfile * filename_exist(char * filename)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
for (i=0; i < symfilecnt; i++)
|
|
for (i=0; i < symfilecnt; i++)
|
|
@@ -157,20 +157,20 @@ struct symfile * filename_exist(char * filename)
|
|
* List all files referenced within the template file.
|
|
* List all files referenced within the template file.
|
|
* Files are separated by tabs.
|
|
* Files are separated by tabs.
|
|
*/
|
|
*/
|
|
-void adddep(char * file) { printf("\t%s", file); }
|
|
|
|
-void adddep2(char * file, char * line) { line = line; adddep(file); }
|
|
|
|
-void noaction(char * line) { line = line; }
|
|
|
|
-void noaction2(char * file, char * line) { file = file; line = line; }
|
|
|
|
|
|
+static void adddep(char * file) { printf("\t%s", file); }
|
|
|
|
+static void adddep2(char * file, char * line) { line = line; adddep(file); }
|
|
|
|
+static void noaction(char * line) { line = line; }
|
|
|
|
+static void noaction2(char * file, char * line) { file = file; line = line; }
|
|
|
|
|
|
/* Echo the line without further action */
|
|
/* Echo the line without further action */
|
|
-void printline(char * line) { printf("%s", line); }
|
|
|
|
|
|
+static void printline(char * line) { printf("%s", line); }
|
|
|
|
|
|
/*
|
|
/*
|
|
* Find all symbols in filename that are exported with EXPORT_SYMBOL &
|
|
* Find all symbols in filename that are exported with EXPORT_SYMBOL &
|
|
* EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
|
|
* EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
|
|
* All symbols located are stored in symfilelist.
|
|
* All symbols located are stored in symfilelist.
|
|
*/
|
|
*/
|
|
-void find_export_symbols(char * filename)
|
|
|
|
|
|
+static void find_export_symbols(char * filename)
|
|
{
|
|
{
|
|
FILE * fp;
|
|
FILE * fp;
|
|
struct symfile *sym;
|
|
struct symfile *sym;
|
|
@@ -227,7 +227,7 @@ void find_export_symbols(char * filename)
|
|
* intfunc uses -nofunction
|
|
* intfunc uses -nofunction
|
|
* extfunc uses -function
|
|
* extfunc uses -function
|
|
*/
|
|
*/
|
|
-void docfunctions(char * filename, char * type)
|
|
|
|
|
|
+static void docfunctions(char * filename, char * type)
|
|
{
|
|
{
|
|
int i,j;
|
|
int i,j;
|
|
int symcnt = 0;
|
|
int symcnt = 0;
|
|
@@ -258,15 +258,15 @@ void docfunctions(char * filename, char * type)
|
|
fflush(stdout);
|
|
fflush(stdout);
|
|
free(vec);
|
|
free(vec);
|
|
}
|
|
}
|
|
-void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }
|
|
|
|
-void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
|
|
|
|
|
|
+static void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }
|
|
|
|
+static void extfunc(char * filename) { docfunctions(filename, FUNCTION); }
|
|
|
|
|
|
/*
|
|
/*
|
|
* Document specific function(s) in a file.
|
|
* Document specific function(s) in a file.
|
|
* Call kernel-doc with the following parameters:
|
|
* Call kernel-doc with the following parameters:
|
|
* kernel-doc -docbook -function function1 [-function function2]
|
|
* kernel-doc -docbook -function function1 [-function function2]
|
|
*/
|
|
*/
|
|
-void singfunc(char * filename, char * line)
|
|
|
|
|
|
+static void singfunc(char * filename, char * line)
|
|
{
|
|
{
|
|
char *vec[200]; /* Enough for specific functions */
|
|
char *vec[200]; /* Enough for specific functions */
|
|
int i, idx = 0;
|
|
int i, idx = 0;
|
|
@@ -297,7 +297,7 @@ void singfunc(char * filename, char * line)
|
|
* Call kernel-doc with the following parameters:
|
|
* Call kernel-doc with the following parameters:
|
|
* kernel-doc -docbook -function "doc section" filename
|
|
* kernel-doc -docbook -function "doc section" filename
|
|
*/
|
|
*/
|
|
-void docsect(char *filename, char *line)
|
|
|
|
|
|
+static void docsect(char *filename, char *line)
|
|
{
|
|
{
|
|
char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */
|
|
char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */
|
|
char *s;
|
|
char *s;
|
|
@@ -324,7 +324,7 @@ void docsect(char *filename, char *line)
|
|
* 5) Lines containing !P
|
|
* 5) Lines containing !P
|
|
* 6) Default lines - lines not matching the above
|
|
* 6) Default lines - lines not matching the above
|
|
*/
|
|
*/
|
|
-void parse_file(FILE *infile)
|
|
|
|
|
|
+static void parse_file(FILE *infile)
|
|
{
|
|
{
|
|
char line[MAXLINESZ];
|
|
char line[MAXLINESZ];
|
|
char * s;
|
|
char * s;
|