File: processtarget.cc

package info (click to toggle)
yodl 4.04.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 4,720 kB
  • sloc: ansic: 7,803; perl: 683; cpp: 570; sh: 411; xml: 190; makefile: 164
file content (24 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "process.ih"

void Process::processTarget()
{
    while (true)
    {
                                    // find a target or the end of file
        while (not (d_line.next() & (TARGET | ENDFILE)))
            ;

                                    // done at end of file
        if (d_line.type() == ENDFILE)
            return;

        while (not (d_line.next() & (ENDTARGET | ENDFILE)))
            d_out.insert(d_line.line());

        if (d_line.type() == ENDFILE)
            throw string { "end marker for `" } + d_line.target() + 
                    "' not found";
    }
}