File: oldoptions.cc

package info (click to toggle)
stealth 4.04.00-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,540 kB
  • sloc: cpp: 2,759; sh: 151; makefile: 111; ansic: 52
file content (72 lines) | stat: -rw-r--r-- 1,694 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include "options.ih"

void Options::oldOptions() const
{
    ostringstream msg;

    int nOld = 0;

    if (d_arg.option('e'))
    {
        ++nOld;
        msg << "    `--echo-commands' was discontinued. "
                                                    "Use --verbosity 2.\n";
    }

    bool usedKeepAlive = d_arg.option(0, "keep-alive");
    if (usedKeepAlive)
    {
        ++nOld;
        msg << "    `--keep-alive' was discontinued. Use --daemon.\n";
    }

    if (d_arg.option('n'))
    {
        ++nOld;
        msg << "    `--no-child-process' was discontinued.\n";
    }

    if (d_arg.option(0, "only-stdout"))
    {
        ++nOld;
        msg << "    `--only-stdout' was discontinued. "
                                            "Consider using --stdout.\n";
    }

    if (d_arg.option('c'))
    {
        ++nOld;
        msg << "    `--parse-config-file' was discontinued. "
                                                "Use --parse-policy-file.\n";
    }

    if (d_arg.option('q'))
    {
        ++nOld;
        msg << "    `--quiet' was discontinued. Use --verbosity 0.\n";
    }

    bool usedSuppress = d_arg.option(0, "suppress");
    if (usedSuppress)
    {
        ++nOld;
        msg << "    `--suppress' was discontinued. Use --suspend.\n";
    }

    if (nOld != 0)
    {
        wmsg << "\n" <<
            basename() << " V" << Icmbuild::version << "\n"
            "Obsoleted option(s):\n" <<
            msg.str();

        if (usedKeepAlive or usedSuppress)
            fmsg << basename() << " V. " << Icmbuild::version << 
                                                    " terminated" << noidl;
        else
            wmsg << flush;
    }
}