linux/scripts/docproc.c
<<
>>
Prefs
   1/*
   2 *      docproc is a simple preprocessor for the template files
   3 *      used as placeholders for the kernel internal documentation.
   4 *      docproc is used for documentation-frontend and
   5 *      dependency-generator.
   6 *      The two usages have in common that they require
   7 *      some knowledge of the .tmpl syntax, therefore they
   8 *      are kept together.
   9 *
  10 *      documentation-frontend
  11 *              Scans the template file and call kernel-doc for
  12 *              all occurrences of ![EIF]file
  13 *              Beforehand each referenced file is scanned for
  14 *              any symbols that are exported via these macros:
  15 *                      EXPORT_SYMBOL(), EXPORT_SYMBOL_GPL(), &
  16 *                      EXPORT_SYMBOL_GPL_FUTURE()
  17 *              This is used to create proper -function and
  18 *              -nofunction arguments in calls to kernel-doc.
  19 *              Usage: docproc doc file.tmpl
  20 *
  21 *      dependency-generator:
  22 *              Scans the template file and list all files
  23 *              referenced in a format recognized by make.
  24 *              Usage:  docproc depend file.tmpl
  25 *              Writes dependency information to stdout
  26 *              in the following format:
  27 *              file.tmpl src.c src2.c
  28 *              The filenames are obtained from the following constructs:
  29 *              !Efilename
  30 *              !Ifilename
  31 *              !Dfilename
  32 *              !Ffilename
  33 *              !Pfilename
  34 *
  35 */
  36
  37#define _GNU_SOURCE
  38#include <stdio.h>
  39#include <stdlib.h>
  40#include <string.h>
  41#include <ctype.h>
  42#include <unistd.h>
  43#include <limits.h>
  44#include <errno.h>
  45#include <sys/types.h>
  46#include <sys/wait.h>
  47
  48/* exitstatus is used to keep track of any failing calls to kernel-doc,
  49 * but execution continues. */
  50int exitstatus = 0;
  51
  52typedef void DFL(char *);
  53DFL *defaultline;
  54
  55typedef void FILEONLY(char * file);
  56FILEONLY *internalfunctions;
  57FILEONLY *externalfunctions;
  58FILEONLY *symbolsonly;
  59FILEONLY *findall;
  60
  61typedef void FILELINE(char * file, char * line);
  62FILELINE * singlefunctions;
  63FILELINE * entity_system;
  64FILELINE * docsection;
  65
  66#define MAXLINESZ     2048
  67#define MAXFILES      250
  68#define KERNELDOCPATH "scripts/"
  69#define KERNELDOC     "kernel-doc"
  70#define DOCBOOK       "-docbook"
  71#define LIST          "-list"
  72#define FUNCTION      "-function"
  73#define NOFUNCTION    "-nofunction"
  74#define NODOCSECTIONS "-no-doc-sections"
  75
  76static char *srctree, *kernsrctree;
  77
  78static char **all_list = NULL;
  79static int all_list_len = 0;
  80
  81static void consume_symbol(const char *sym)
  82{
  83        int i;
  84
  85        for (i = 0; i < all_list_len; i++) {
  86                if (!all_list[i])
  87                        continue;
  88                if (strcmp(sym, all_list[i]))
  89                        continue;
  90                all_list[i] = NULL;
  91                break;
  92        }
  93}
  94
  95static void usage (void)
  96{
  97        fprintf(stderr, "Usage: docproc {doc|depend} file\n");
  98        fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
  99        fprintf(stderr, "doc: frontend when generating kernel documentation\n");
 100        fprintf(stderr, "depend: generate list of files referenced within file\n");
 101        fprintf(stderr, "Environment variable SRCTREE: absolute path to sources.\n");
 102        fprintf(stderr, "                     KBUILD_SRC: absolute path to kernel source tree.\n");
 103}
 104
 105/*
 106 * Execute kernel-doc with parameters given in svec
 107 */
 108static void exec_kernel_doc(char **svec)
 109{
 110        pid_t pid;
 111        int ret;
 112        char real_filename[PATH_MAX + 1];
 113        /* Make sure output generated so far are flushed */
 114        fflush(stdout);
 115        switch (pid=fork()) {
 116                case -1:
 117                        perror("fork");
 118                        exit(1);
 119                case  0:
 120                        memset(real_filename, 0, sizeof(real_filename));
 121                        strncat(real_filename, kernsrctree, PATH_MAX);
 122                        strncat(real_filename, "/" KERNELDOCPATH KERNELDOC,
 123                                        PATH_MAX - strlen(real_filename));
 124                        execvp(real_filename, svec);
 125                        fprintf(stderr, "exec ");
 126                        perror(real_filename);
 127                        exit(1);
 128                default:
 129                        waitpid(pid, &ret ,0);
 130        }
 131        if (WIFEXITED(ret))
 132                exitstatus |= WEXITSTATUS(ret);
 133        else
 134                exitstatus = 0xff;
 135}
 136
 137/* Types used to create list of all exported symbols in a number of files */
 138struct symbols
 139{
 140        char *name;
 141};
 142
 143struct symfile
 144{
 145        char *filename;
 146        struct symbols *symbollist;
 147        int symbolcnt;
 148};
 149
 150struct symfile symfilelist[MAXFILES];
 151int symfilecnt = 0;
 152
 153static void add_new_symbol(struct symfile *sym, char * symname)
 154{
 155        sym->symbollist =
 156          realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
 157        sym->symbollist[sym->symbolcnt++].name = strdup(symname);
 158}
 159
 160/* Add a filename to the list */
 161static struct symfile * add_new_file(char * filename)
 162{
 163        symfilelist[symfilecnt++].filename = strdup(filename);
 164        return &symfilelist[symfilecnt - 1];
 165}
 166
 167/* Check if file already are present in the list */
 168static struct symfile * filename_exist(char * filename)
 169{
 170        int i;
 171        for (i=0; i < symfilecnt; i++)
 172                if (strcmp(symfilelist[i].filename, filename) == 0)
 173                        return &symfilelist[i];
 174        return NULL;
 175}
 176
 177/*
 178 * List all files referenced within the template file.
 179 * Files are separated by tabs.
 180 */
 181static void adddep(char * file)            { printf("\t%s", file); }
 182static void adddep2(char * file, char * line)     { line = line; adddep(file); }
 183static void noaction(char * line)                  { line = line; }
 184static void noaction2(char * file, char * line)   { file = file; line = line; }
 185
 186/* Echo the line without further action */
 187static void printline(char * line)               { printf("%s", line); }
 188
 189/*
 190 * Find all symbols in filename that are exported with EXPORT_SYMBOL &
 191 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
 192 * All symbols located are stored in symfilelist.
 193 */
 194static void find_export_symbols(char * filename)
 195{
 196        FILE * fp;
 197        struct symfile *sym;
 198        char line[MAXLINESZ];
 199        if (filename_exist(filename) == NULL) {
 200                char real_filename[PATH_MAX + 1];
 201                memset(real_filename, 0, sizeof(real_filename));
 202                strncat(real_filename, srctree, PATH_MAX);
 203                strncat(real_filename, "/", PATH_MAX - strlen(real_filename));
 204                strncat(real_filename, filename,
 205                                PATH_MAX - strlen(real_filename));
 206                sym = add_new_file(filename);
 207                fp = fopen(real_filename, "r");
 208                if (fp == NULL) {
 209                        fprintf(stderr, "docproc: ");
 210                        perror(real_filename);
 211                        exit(1);
 212                }
 213                while (fgets(line, MAXLINESZ, fp)) {
 214                        char *p;
 215                        char *e;
 216                        if (((p = strstr(line, "EXPORT_SYMBOL_GPL")) != NULL) ||
 217                            ((p = strstr(line, "EXPORT_SYMBOL")) != NULL)) {
 218                                /* Skip EXPORT_SYMBOL{_GPL} */
 219                                while (isalnum(*p) || *p == '_')
 220                                        p++;
 221                                /* Remove parentheses & additional whitespace */
 222                                while (isspace(*p))
 223                                        p++;
 2/docproc.c#L121" id="L121" claaaaaaaaaif (*p/*
sym;
 2                      /* Skip EXPOyntax >(
 122 2                       122 2                      p++;
 122 2              default:::::::::::::::::a href="+code=isspace" class="sref">isspace(*p))
 122 2                      p++;
 132 23                                     "+code=e" class="sref">e;
p;
 132 23                             isalnum(*e;
e;
'_')
 132 2              e;
 132 23                                     ="+code=p" class="sref">e;
'_')
 132 2              add_new_symbol(struct <"+code=sym" class="sref">sym = p))
 132}23                      132
23                     f="scripts/docproc.c#L213" id="L127" cla2s="line" name="L137"> 132<23             filenamefp)) {
 132s23             f="scripts/docproc.c#L213" id="L219" class="line" name="L139"> 132{2 142 24 href="scripts/docproc.c#L81" id="2L141" cla2s="line" name="L141"> 142}24an class="comment"> * EXPOR>
 142
24an class="comment"> * All symbDtion\n&orted sterespaorhreferespas;

 142s24an class="comment"> */ Crtedoc with parametefollowel drs given i: 142{2 */ oc with par";
<_44">1 );
 142 24an class="comment">/*parateobtae="ile.tmprted witsrceferena  href="scripts/docproc.c#L179" id=2L136" cla2s="line" name="L146"> 142 24an class="comment"> * Execute by ort_symbols(cha
 142 24an class="comment"> */hrefs 142}24an class="comment"> * List all sts 142
24an class="comment"> * Files a
 152s2ruct fp))c#Ls;
filename)
filenametyp=
 152i2t  152
25             ref="+code=i" class="sref">i;
i;
 152s25     int ss="sref">symfilecnt<= 0;
 152{254            ref="+code=i" class=dx"sref">i;
 152 2      svec;
 152 25 href="scripts/docproc.c#L177" id=2L157" cla2s="line" name="L157"> 152 2      i=0; i < symfilecnt; i++)
 152}25             default:"+code=i" class/a>ss="sref">symfilecnt<= 0;
symfilelist[i].symbolcnt;
 152
25     svec;
realloc(symfilecnt<= 0;
 162<26     int svec;
NULL) {
 162s26             perror("fork&quo ");
 162{26             exit(1);
 162 2       162 2      return &"+code=fp" classs="sref">svec;
i;
KERNELDOC,
 162}26     svec;
i;
i;
<
 162
26     svec;
i;
MAXFILESNO
 162<26     i=0; i < symfilecnt; i++)
 162s26             default:a href="+code=symfile" class="sref">symfile * sym = symfilelist[i];
 162{26                     href="+code=i" classj"sref">i;
i;
sym = symbolcnt++].i;
 172 27                     svec;
i;
filenametyp=
 172 27                     add_new_consume class=uct <"+code=sym" class="sref">sym = symbollist[i;
name =  172 2              if (svec;
i;
sym = symbollist[i;
name =  172 2                      f="scripts/docproc.c#L213" id="L174" cla2s="line" name="L174"> 172 2      return  172}27     svec;
i;
filename;
 172
27     svec;
i;
NULL;
 172<27     printf("%s&quref!-- uot;);
filename) == 0)
 172<278    exec_kernel_doc(char **<"+code=FILE" clss="sref">svec;
 172<27     fflush(stdout);
 182<28     srctreesvec;
 182s2atic vf="scripts/docproc.c#L213" id="L182" cla2s="line" name="L182"> 182s2atic void i;
filename)
;
fp))c#Ls;
filename)
MAXFILESNOFUNCTIONa hr 182s2atic void exec_kernefsfilename)
;
fp))c#Ls;
filename)
MAXFILESFUNCTIONa hr 182s2atic v="scripts/docproc.c#L213" id="L;
 182
28an class="comment">/*
 182<2pan class="comment">/* Echo ymbDtion\n&ospecif;
<(s)mber opan>
 182s28an class="comment"> */hCrtedoc with paramete witfollowel drs given i: 182
28an class="comment"> * List alloc with par";
<1 [i";
<2] 182<2pan class="comment">/* 192<29uct exec_kersel sfilename)
line); }
 192<29  192<29              href="+code=e" classss="sref">svec;
/* Skip EXPEnough hrefspecif;

 192<29     int i;
i;
 192s294            ref="+code=i" classa drtofss="sref">sym = drtofss=;
 192{29     svec;
i;
KERNELDOC,
 192 2      svec;
i;
i;
<
 192 2      ="scripts/docproc.c#L212" id="L188" cla2s="line" name="L198"> 192 2      char /* Skip EXPOplitthout upmberindividualdrs given i in cedbs.
 192 2      if (i=0; line[i];
i++)
 203 3              char isspace(*line[i];
 203 3              line[i];
'_')
 203 3              sym = drtofss=;
 203 3               193 3               203 3                      ref="+code=strcmp" cldrtofss="sref">sym = drtofss=;
 193 3              sym = drtofss=;
 203 3              svec;
i;
MAXFILESFUNCTIONa hrf="scripts/docproc.c#L152" id=3L807" cla3s="line" name="L198"> 193 3              if (svec;
i;
line[i];
 193 3                      f="scripts/docproc.c#L213" id=3L210" cla3s="line" name="L210"> 213 3              f="scripts/docproc.c#L213" id=3L201" cla3s="line" name="L211"> 213 31     for (i=0; i < i;
i++)
 213 3              }
strcmp(svec;
i];
MAXFILESFUNCTIONa hr 213 3              while (<<<<<<<<< 
 213 3                      "+code=exit" clconsume class="sref">add_new_consume class=uct <"+code=sym" class="sref">svec;
i];
 213 3              f="scripts/docproc.c#L213" id=3L605" cla3s="line" name="L216"> 213 31     svec;
i;
filename;
 213 31     svec;
i;
NULL;
 213 318    exec_kernel_doc(char **<"+code=FILE" clss="sref">svec;
 213 31a href="scripts/docproc.c#L213" id=3L220" cla3s="line" name="L220"> 223 32 href="scripts/docproc.c#L81" id="3L221" cla3s="line" name="L221"> 223 32an class="comment"> * EXPOR>
 223 32an class="comment"> * All symbInser&ospecif
 223 32an class="comment"> */ Crtedoc with paramete witfollowel drs given i: 2/3ocpro32a hreass="comment"> */ oc with par");
;
 32an class="comment">/* 123 3      a d fp))c#Lseothref=a href"+code=filename" class="sref">filename)
line); }
 123 3      f="scripts/docproc.c#L209" id=3L218" cla3s="line" name="L128"> 123 3               href="+code=e" classss="sref">svec;
/* Skip EXPoc wit par" ;
 123 3               href="+code=e" classa"sref">fp))s href="scripts/docproc.c#L175" id=3L130" cla3s="line" name="L130"> 133 33 href="scripts/docproc.c#L81" id="3L131" cla3s="line" name="L131"> 133 33     for (fp))s hreef="+code=line" class="sref">line; }
fp))s href="+code=FILE" cla"sref">fp))s hreref="scripts/docproc.c#L172" id=3L132" cla3s="line" name="L132"> 133 3              fp))s hreefflass="string">'_')
 133 33                             ="+code=p" classa"sref">fp))s hreeflass="string">'_')
 133 33tic v="scripts/docproc.c#L213" id=3L;
 133}33             ref="+code=strcmp" asclass="sref">printffp))s hreclass="string">"EXPORT_SDOC:tra2s="line" name="L161"> 162<148"> 142}24an classfeefflass="string">'_')
"fork&quo ");
 132<23             filename 132s23             f="3cript3/docproc.c#L213" id="L219" class="line" name3"L139"> 132{2fflush(_new_consume class=uct <"+code=sym" class="sref">sym = "EXP12" id="L163" cla2s="line" name3"L140"> 132 24 href="scripts/d3cproc34t" cfss="sref">srctreesvec;
"EXP12" id="L163" cla2s="line" name3"L131"> 132}24an class="commen3"> * 3XPOR>
" id="L163" cla2s="line" name3"L132"> 132
24an class="commen3"> * 342" cfss="sref">srctree/* Ski0ass="sref">KERNELDOC,
 132s24an class="commen3"> */343" cfss="sref">srctree/* Ski1OK"sref">i;
<
 132{2 */34classs="sref">svec;
MAXFILESFUNCTIONa hrf="scripts/docproc.c#L152" id=3L807" cla3s="line" name="L145"> 132 24an class="commen3">/*<34 class="sref">svec;
MAXFILESFa hre="+code=e" classa"sref"" id=3L807" cla3s="line" name="filename<2 24an class="commen3"> * 34" clss="sref">svec;
filename;
 132 24an class="commen3"> */34 class="sref">svec;
NULL;
 132}24an class="commen3"> * 34 clanel_doc" class="sref">exec_kernel_doc(char **<"+code=FILE" clss="sref">svec;
 132
24an class="commen3"> * 34c#L213" id=3L220" cla3s="line" name="L150"> 132s2ruct  132i2t adddep(ref="allrt_symbols(char * filename)
 132
25             ref3"+cod3=i" clref="scripts/docproc.c2222=real"L153"> 132s25     int ss"sref">svec;
/* Ski4 EXPoc wit par" 132{254            ref3"+cod35classs="sref">svec;
 132 2      symrref="+code=real_frame" cf">i;
i;
i;
ss"sref="sref">symrrilename[PATH_MAX + 1];
 132 2      sympipefdref="scripts/dopipefdsref"2I1" id="L201" class="line" name3"L148"> 132}25             def3ult:"35e=e" classss="sref">svec;
))s hreeflaref="+code=line" cla#L175" id=3L218" cla3s="line" name="L149"> 132
25     svec;
" id=3L218" cla3s="line" name="L160"> 132<26     int  132s26             srctree/* Ski0ass="sref">KERNELDOC,
 132{26             srctree/* Ski1OK"sref">i;
<
 132 2      srctree/* Ski2ION"sref">MAXFILESF/a>;
 132 2      return &"+c3de=fp3 classs="sref">svec;
MAXFILESFhref="scripts/docproc.c#L175" id=3L218" cla3s="line" name="L165"> 132}26      132
26     printfsvec;
 132<26     filename"fork&quo ");
 132s26             def3ult:a3href="+code=symfile" cef">filename 132{26                3    h3ef="+code=i" c3" id=3L220" cla3s="line" name="L170"> 132 27                3    <37#L81" id="3L131" cla3s="line" name="L171"> 132 27                3    <3 href="+code=eswitch="sref">printfMAXFILESF/orkhref="scripts/doorkc.c#LL218" id=3L201" cla3s="line" name="L172"> 132 2              if 3 132 2                 3    f3"scripts/docproc.c#L21clos="sref">filename"fork&quo ");
 132 2      return filename 132}27      132
27     syms=href="+code=filenae"="sref">fp)) {
 132<27     svec;
fp)) {
 132<278    svec;
real_filename, 0, sizeof(real_filename));
 132<27     svec;
(real_filename, filename, filename);
 132<28     svec;
(real_filename, "/", KERNELDOC,
 132s2atic vf="scripts/3ocpro38     svec;
 - strlen(real_filename));
 132s2atic void symde=Fvef="+code=symfilde=Fvee" class="sref">real_filename, filename 132s2atic void filename(stderr, "docproc: ");
 132s2atic v="scripts/d3cproc38ode=exit" clconsume cmfile" cef">filenamereal_filename);
 132
28an class="commen3">/*<38href=f="scripts/docproc.c#L21ef">filename 132<2pan class="commen3">/* 38href="+code=FILE" cladefault:" id=3L201" cla3s="line" name="L187"> 132s28an class="commen3"> */38href="+code=FILE" clss="sref">svec;
fp)) {
 132
28an class="commen3"> * 38href="+code=FILE" clss="sref">svec;
realloc( 132<2pan class="commen3">/*<38scripts/docproc.c#L21s="sref"do18" id=3L201" cla3s="line" name="L190"> 132<29uct elass="slass="sref">real_fef="+code=real_frame" c"sref">realloc(iptdref="scripts/doiptdref">fp)) {
 132<29 svec;
svec;
 132<29              hr3f="+c39                     "+code=e" class="sref">eeeeeeeeeeee40967) ode= 132<29     int svec;
symfil_fef="+code=real_frame" c5" id=3L215" cla3s="line" name="L194"> 132s294            ref3"+cod39ode=exit" clconsume cmfile" csref"clss="sref">svec;
realloc(ipt href=(2 + 2ef="+coipt hreref">fp)) {
svec;
 132{29      132 2      isalnumisalnum 132 2      ="scripts/d3cproc39href="+code=FILE" clss="sref"ss="sref">printf 132 2      char svec;
"fork&quo ");
 132 2      if (svec;
 243 3              cha4  243 3              line[fp)) {
line[ 243<29              hr4ref=<4 href="+code=F3" id=3L220" cla3s="line" name4"3201"> 243<29     int printfreal_fef="+code=real_frame" c22" id=3L213" cla3s="line" name4"L194"> 143 3              svec;
(char * <realloc(WEXITSTATUTION= href="scriWEXITSTATUTe" class="sref">real_fef="+code=real_frame" c22" id="L163" cla2s="line" name4"5194"> 143{29      143 3              svec;
(char * < 143 2      ="scripts/d4ref=<40#L212" id="L188" cla2s="line" name4"L198"> 143 3              if 4excou]." id=3L218" cla3s="line" name4"L199"> 143 3                 4    f4"scripts/docprPoc wit par" 243 3              f="4cript4/docproc.c#L21ef">i=0; i < i;
i++)
 243 31     for (printf];
'_Ə)
 243 3              }
<4 hrer4f="+code=strcmp" classel_doc" class="sref">excou]. 243 3              whi4e (<<4<<<<<< 
printf];
'_')
 243 3                 4    "4code=exit" clconsume c3" id=3L220" cla3s="line" name4"L215"> 243 3              f="4cript4/docproc.c#L213" id=3L605" cla3s="line" name4"L216"> 243 31     svec;
realloc(allrj"sr_href="+code=real_fallrj"sr_hree" c5" id=3L215" cla3s="line" name4"L217"> 243 31     svec;
symfilcou]. 143 318    exallrj"srf="+code=real_fallrj"srproc"sref">realloc(ipt href=(2 + 2ef="+coipt hreref">fp)) {
line); }
allrj"sr_href="+code=real_fallrj"sr_hree" c22" id="L163" cla2s="line" name4"L219"> 243 31a href="scripts/4ocpro41ntf"ss="sref">svec;
realloc(dataef=a href"+code=ataproc2" id="L163" cla2s="line" name4"L220"> 243 32 href="scripts/d4cproc42docproc.c#L21ef">i=0; i < i;
svec;
realloc(allrj"sr_href="+code=real_fallrj"sr_hree" c5i++)
 243 32an class="commen4"> * 42href="+code=FILE" class="sref">printf];
'_Ə)
 243 32an class="commen4"> * 42="+code=strcmp" classel_doc" class="sref">exallrj"srf="+code=real_fallrj"srproci];
sym =  243 32an class="commen4"> */42<<<<< 
printfrealloc(dataef=a href"+code=ataproc"+s>svec;
 243ocpro32a hreass="commen4"> */42ode=exit" clconsume cmfile" cef">filename 32an class="commen4">/*<42href=f="scripts/docpr3" id=3L605" cla3s="line" name4"L126"> 143 3      a d  243 3      f="scripts/4ocpro4.c#L203" id=3L605" cla3s="line" name4"L198"> 143 3               hr4f="+c4de=e" " id=3L605" cla3s="line" name4"L219"> 243 3               hr4f="+c42pan a
 143 33 href="scripts/d4cproc4c#L81" oc with par"href="scripts/docpref"c.c#L179" id=3L224" cla3s="line" name4"L131"> 143 33     for ( 243 3               243 33                4     43span> Crtedoc with paramete wi3) L fosroc.cainscri!D.c#L179" id=3L224" cla3s="line" name4"L214"> 243 33tic v="scripts/d4cproc43span> oc with par"}33             ref4"+cod43panal
 14/a>,  242<23             ;
 142s23             f="4cript43st alloc with par" 142{2adddep(parse_ fp)) {
 142 24 href="scripts/d4cproc44t" cf9" id=3L212" cla3s="line" name4"L131"> 142}24an class="commen4"> * 44href="+code=F"sref="sref">syma hre="+code=e" classa"srefi];
 142
24an class="commen4"> * 44e=e" classss="sref"fp))s hreref="scripts/docproc.c#L4" id="L223" class="line" name4"L223"> 242s24an class="commen4"> */443" cfss="sreflass="sref">isalnum(char * fp)) {
svec;
i;
 142{2 */44ode=exit" clconsume css="sref">printf)
 142 24an class="commen4">/*<44href=f="scripts/docproc.c#L21ef">filenameline; }
 142 24an class="commen4"> * 44href="+code=FILE" cla drtofssswitch="sref">printf 242 24an class="commen4"> */44href="+code=FILE" clss="sref"classss="ase )
 142}24an class="commen4"> * 44href="+code=FILE" clss="sref"s="sref"ss="sreflass="sfp))s hreeflass="string">'_"sref"sref"!>i;
'_Èp))s hreeflass="string">'_à" id="L223" class="line" name4"L149"> 142
24an class="commen4"> * 44scripts/docproc.c#L21s="sref"s="sref"""""""""fp))s hreeflass="string">'_')
 142s2ruct eeeeeeeee>svec;
;
;ref">fp)) {
 142i2t  142
25             ref4"+cod45                     "+code=e" class="ase )
 142s25     int '_"sref"sref"!>i;
'_Èp))s hreeflass="string">'_à" id="L223" class="line" name4"L154"> 142{254            ref4"+cod45ode=exit" clconsume cmfile" csref"clss="sref"fp))s hreeflass="string">'_')
 142 2      i;
;
;ref">fp)) {
 142 25 href="scripts/d4cproc45href="+code=FILE" cla drtofssssssssssssssssssbreak2" id="L163" cla2s="line" name4"L217"> 242 2       142}25             def4ult:"45href="+code=FILE" clss="sref"s="sref"ss="sreflass="sfp))s hreeflass="string">'_"sref"sref"!>i;
'_Èp))s hreeflass="string">'_à" id="L223" class="line" namf4uL149"> 142
25     ))s hreeflass="string">'_')
 142<26     int eeeeeeeee>svec;
'_symboonlyref">fp)) {
 142s26              142{26              142 2      oc wit par" 142 2      return &"+c4de=fp46ode=exit" clconsume cmfile" csref"clss="sref"lass="sfp))s hreeflass="string">'_"sref"sref"!>i;
'_Èp))s hreeflass="string">'_à" id="L223" class="line" namf4"L165"> 142}26     ))s hreeflass="string">'_&#++39;)
 142
26     oc wit par"ref=proc.c#L138" id=2L193" cla2s="line" name4"L167"> 142<26     '_" id=2L193" cla2s="line" name4"L148"> 142s26             def4ult:a4href="+code=symfile" cILE" cla drtofssssssssssssssssss>))s hreeflass="string">'_à" id="L223" class="line" namf4"L149"> 142{26                4    h46scripts/docproc.c#L21s="sref"s="sref""""""""">))s hreeflaf="lec#Ls;
;ref">fp)) {
i;
'_" id="L223" class="line" namf4"L170"> 142 27                4    <47             "+code=e" class="sref">eeeeeeeeebreak2" id="L163" cla2s="line" name4"L171"> 142 27                4    <47     )
 142 2              if 4oc wit par" 142 2                 4    f4"scripts/docproc.c#L21clos="srrrrrrrrrrrrrrrrrlass="sfp))s hreeflass="string">'_"sref"sref"!>i;
'_Èp))s hreeflass="string">'_à" id="L223" class="line" namf4"L174"> 142 2      return ))s hreeflass="string">'_&#++39;)
 142}27     oc wit par"ref="scrroc.&qc.c#L138" id=3L219" cla3s="line" name4"L126"> 142
27     '_" id=2L193" cla2s="line" name4"L177"> 142<27     ))s hreeflass="string">'_à" id="L223" class="line" namf4"L148"> 142<278    ))s hreefldfilena"scef=a href"+code=filena"scref">fp)) {
i;
'_" id="L223" class="line" namf4"L149"> 142<27      142<28     )
 142s2atic vf="scripts/4ocpro48     '_"sref"sref"!>i;
'_Èp))s hreeflass="string">'_à" id="L223" class="line" namf4"L182"> 142s2atic void ))s hreeflass="string">'_')
 142s2atic void printf 142s2atic v="scripts/d4cproc48ode=exit" clconsume cmfile" cccccccccccccccccccccccccsref">printffp)) {
 142
28an class="commen4">/*<48href=f="scripts/docproc.c#L211111111111111111break2" id="L163" cla2s="line" name4"L126"> 142<2pan class="commen4">/* 48href="+code=FILE" claaaaaaaaaaaaaaaaadefault:" id=3L201" cla3s="line" name4"L187"> 142s28an class="commen4"> */48href="+code=FILE" clss="sref"ccccccccccccccccsref">printffp)) {
 142
28an class="commen4"> * 48href="+code=FILE" clss="sref"3" id=3L605" cla3s="line" name4"L179"> 142<2pan class="commen4">/*<48scripts/docproc.c#L21}mL13409" id=3L212" cla3s="line" name4"L190"> 142<29uct printffp)) {
 142<29  142<29              hr4f="+c49href="+code=F3" id=3L220" cla3s="line" name4"L193"> 142<29     int printffp)) {
 142s294            ref4"+cod49ode=e3" id=3L220" cla3s="line" name4"L185"> 142{29      142 2       142 2      ="scripts/d4cproc49href=ofss="sref">symmaicef=a href"+codemaice" c>ofss="sref">symargef=(2 + 2ef="+coarge#L17f""sref">svec;
 142 2      char  142 2      if (svec;
i;
 253 3              cha5 symre 253<29  253<29              hr5ref=<502" cfss="sref">srctree, line; }
fuo ");
 253<29     int ,  153 3              svec;
, line; }
fp)) {
 153{29     )) {
, line; }
fuo ");
 153 2      , svec;
,  153 2      ="scripts/d5ref=<50ode=fp" classclos="sref">filename, line; }
<>,  153 2      char printf 153 3                 5    f50scripts/docproc.c#L21sref">printf10" id="L162" cla2s="line" name5"L210"> 253 3              f="5cript51             "+code=esref">printf 253 31     for ( 253 3              }
<5 hrer5f="+code=strcm>oc wit par" 253 3              whi5e (<<51scripts/docprsref">printfMAXFILESF/opref="+code=real_f/opree" c>fp)) {
 253 3                 5    "5code=exit" clcss="sref">printfMAXFILESFhref="scripts/docproc.c#L17009" id=3L212" cla3s="line" name5"L215"> 253 3              f="5cript51href=f="scripts/docprsref">MAXFILESF/(stderr, "docproc: ");
 253 31     "fork&qp)) {
 153 31     filename 153 318     253 31a href="scripts/5ocpro51ntf"s" id="L219" class="line" name5"L220"> 253 32 href="scripts/d5cproc52docproc.c#L21ss="sref">printffuo ");
 142}24an classfeefflaargvf=(2 + 2ef="+coargvsrefi1]00== 253 32an class="commen5"> * 52href="+code=FILE" cla>oc wit par" 253 32an class="commen5"> * 52l symbInser&ospecif 253 32an class="commen5"> */52span> Crtedoc with paramete \\\\\\\\\\\\\\\\* of the variousriptss;.c#L138" id=3L219" cla3s="line" name5"L214"> 253ocpro32a hreass="commen5"> */52span> oc with par" 253 32an class="commen5">/*<52panal
 253 3      a d  153 3      f="scripts/5ocpro52span>hCrtedoc with paramete \\\\\\\\\\\\\\\\*c.c#L138" id=3L219" cla3s="line" name5"L198"> 153 3               hr5f="+c52ref="+code=symfile" ceoc wit par" 253 3               hr5f="+c52scripts/docproc.c#L21sref">printfMAXFILESFnoana"scef=a href"+codenoana"sclass0" id="L162" cla2s="line" name5"L130"> 153 33 href="scripts/d5cproc53             "+code=esref">printf;
;ref"ON"sref">MAXFILESF/and_cpportrt_symbols(char *  253 33     for (f">filename;
;ref"ON"sref">MAXFILESF/and_cpportrt_symbols(char *  253 3              printf'_symboonlyref"c.c#L21N"sref">MAXFILESF/and_cpportrt_symbols(char *  253 33                5     53scripts/docproc.c#L21sref">printf;
;ref"L21N"sref">MAXFILESFnoana"sc2ref="scripts/donoana"sc2lass0" id="L162" cla2s="line" name5"L214"> 253 33tic v="scripts/d5cproc53scripts/docproc.c#L21>svec;
MAXFILESFnoana"sc2ref="scripts/donoana"sc2lass0" id="L162" cla2s="line" name5"L215"> 253}33             ref5"+cod53href=f="scripts/docprsref">MAXFILESF/ hralclass=uct <"+coda hralce" cripts/docprN"sref">MAXFILESF/and_allrt_symbols(char *  25/a>, fp)) {
 152<23              152s23             f="5cript53ref="+code=symfile" ceoc wit par" 152{2printffp)) {
)) {
 152 24 href="scripts/d5cproc54             "+code=esref">printfMAXFILESF" claa hre="+code=e" cla" claa hrme" 0" id="L162" cla2s="line" name5"L131"> 152}24an class="commen5"> * 54href="+code=FILE" cla>f">filename;
;ref"ON"sref">MAXFILESFclas#Ls
 252
24an class="commen5"> * 54href="+code=FILE" clasref">printf;
;ref"ON"sref">MAXFILESF 252s24an class="commen5"> */54scripts/docproc.c#L21sref">printf'_symboonlyref"c.c#L21N"sref">MAXFILESF" claa hre="+code=e" cla" claa hrme" 0" id="L162" cla2s="line" name5"L214"> 252{2 */54ode=exit" clconsume csref">printf;
;ref"L21N"sref">MAXFILESFaf="s#Ls
 252 24an class="commen5">/*<54href=f="scripts/docpr>svec;
MAXFILESF=filenaef=a href"+code=filename" 0" id="L162" cla2s="line" name5"L216"> 252 24an class="commen5"> * 54href="+code=FILE" clasref">MAXFILESF/ hralclass=uct <"+coda hralce" cripts/docprN"sref">MAXFILESFhref="scripts/docproc.c#L175" id=3L218" cla3s="line" name5"L217"> 252 24an class="commen5"> */54#L212" id="L188" cla2s="line" name5"L148"> 152}24an class="commen5"> * 54href="+code=FILE" clsan classfeefflafp)) {
 152
24an class="commen5"> * 54ntf"s" id="L219" class="line" name5"L150"> 152s2ruct i=0; i < i;
++)
 152i2t i;
];
'_" id=3L219" cla3s="line" name5"L132"> 152
25             ref5"+cod55                     "+code=e" class="o].scue0" id="L162" cla2s="line" name5"L153"> 152s25     int MAXFILESF/(stderr, "docproc: ");
 142}2" id="L162" cla2s="line" name5"L214"> 252{254            ref5"+cod55ode=exit" clconsume cmfile" csref"cls>i;
];
'_" id="L162" cla2s="line" name5"L215"> 252 2       152 25 href="scripts/d5cproc55href="+code=F}mL1340ss="sref">printffuo ");
 142}24an classfeefflaargvf=(2 + 2ef="+coargvsrefi1]00== 252 2       152}25             def5ult:"55st alloc with par" 152
25     MAXFILESF" claref="+code=stder" class="sreuo ");
 142}24an classfeefflaargvf=(2 + 2ef="+coargvsrefi2]10" id="L162" cla2s="line" name5"L160"> 152<26     int printfMAXFILESFnoana"scef=a href"+codenoana"sclass0" id="L162" cla2s="line" name5"L161"> 152s26             f">filename;
;ref"ON"sref">MAXFILESFadd"epf=(2 + 2ef="+coadd"eplass0" id="L162" cla2s="line" name5"L132"> 152{26             printf;
;ref"ON"sref">MAXFILESFadd"epf=(2 + 2ef="+coadd"eplass0" id="L162" cla2s="line" name5"L153"> 152 2      printf'_symboonlyref"c.c#L21N"sref">MAXFILESFadd"epf=(2 + 2ef="+coadd"eplass0" id="L162" cla2s="line" name5"L214"> 252 2      return &"+c5de=fp56ode=exit" clconsume csref">printf;
;ref"L21N"sref">MAXFILESFadd"ep2ref="scripts/doadd"ep2lass0" id="L162" cla2s="line" name5"L215"> 252}26     svec;
MAXFILESFadd"ep2ref="scripts/doadd"ep2lass0" id="L162" cla2s="line" name5"L126"> 152
26     MAXFILESF/ hralclass=uct <"+coda hralce" cripts/docprN"sref">MAXFILESFadd"epf=(2 + 2ef="+coadd"eplass0" id="L162" cla2s="line" name5"L217"> 252<26     fp)) {
 152s26             def5ult:a5href="+code=symfile" csref">MAXFILESF" claref="+code=stder" class="sreuo ");
 142}20" id="L162" cla2s="line" name5"L149"> 152{26                5    h56scripts/docpr}mL13409" id=3L212" cla3s="line" name5"L170"> 152 27                5    <57             "+code=esref">MAXFILESF/(stderr, "docproc: ");
 142}24an classfeefflaargvf=(2 + 2ef="+coargvsrefi1]00" id="L162" cla2s="line" name5"L171"> 152 27                5    <57     filename 152 2              if 5 152 2                 5    f57scripts/docprsref">printffp)) {
 152 2      return printffp)) {
 152}27     filename(char * < 152
27      252<27     
The original LXR software by the  id=3L220http://sourceforge.net/projenas/lxr">LXR quotunity;docprthiscexperit;lxr@  
<27   subfooter">
lxr.  Redpill L fpro AS;docprproviquo ofrL