File: xd.cc

package info (click to toggle)
xd 3.11.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 304 kB
  • ctags: 102
  • sloc: cpp: 703; makefile: 139
file content (38 lines) | stat: -rw-r--r-- 828 bytes parent folder | download
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
/*                              xd.cc

   A C++ main()-frame generated by cpp.im for xd.cc

*/

#include "xd.ih"               // program header file

int main(int argc, char **argv)
try
{
    arguments(argc, argv);

    Alternatives alternatives;
    alternatives.viable();              // select viable alternatives

    Arbiter arbiter(alternatives);
    arbiter.select();                   // make the selection

    return arbiter.decided() ? 0 : 1;   // return 0 to the OS if the arbiter
                                        // did do its work 
}
catch(Errno const &err)     // handle exceptions
{
    cerr << err.what() << endl;
    cout << ".\n";          // to prevent a diretory change
    return err.which();
}
catch(int x)
{
    if (x == 0)
        cerr << "No Solutions\n";
    cout << ".\n";
    return x;
}