MCPcopy Create free account
hub / github.com/LibreOffice/core / process

Function process

soltools/cpp/_cpp.c:65–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void process(Tokenrow* trp)
66{
67 int anymacros = 0;
68
69 for (;;)
70 {
71 if (trp->tp >= trp->lp)
72 {
73 trp->tp = trp->lp = trp->bp;
74 outptr = outbuf;
75 // coverity[overrun-buffer-arg: FALSE] - a multiple of trp->max is allocated, not trp->max itself
76 anymacros |= gettokens(trp, 1);
77 trp->tp = trp->bp;
78 }
79 if (trp->tp->type == END)
80 {
81 if (--incdepth >= 0)
82 {
83 if (cursource->ifdepth)
84 error(ERROR, "Unterminated conditional in #include");
85 unsetsource();
86 cursource->line += cursource->lineinc;
87 trp->tp = trp->lp;
88 if (!Pflag)
89 genline();
90 continue;
91 }
92 if (ifdepth)
93 error(ERROR, "Unterminated #if/#ifdef/#ifndef");
94 break;
95 }
96 if (trp->tp->type == SHARP)
97 {
98 trp->tp += 1;
99 control(trp);
100 }
101 else if (!skipping && anymacros)
102 expandrow(trp, NULL);
103 if (skipping)
104 setempty(trp);
105 puttokens(trp);
106 anymacros = 0;
107 cursource->line += cursource->lineinc;
108 if (cursource->lineinc > 1 && !Pflag)
109 genline();
110 }
111}
112
113void control(Tokenrow* trp)
114{

Callers 15

_cpp.cFile · 0.70
executeMethod · 0.50
lcl_endFastElementMethod · 0.50
DispatchUserEventsMethod · 0.50
impDumpToMetaFileMethod · 0.50

Calls 8

gettokensFunction · 0.85
errorFunction · 0.85
unsetsourceFunction · 0.85
genlineFunction · 0.85
controlFunction · 0.85
expandrowFunction · 0.85
setemptyFunction · 0.85
puttokensFunction · 0.85

Tested by 1