8 typedef unsigned int uint;
10 #define NONRET __attribute__((noreturn))
11 #define UNUSED __attribute__((unused))
20 AT_TYPE_MASK = 0xffff,
21 AT_MANDATORY = 0x10000,
22 AT_POSITIONAL = 0x20000,
32 virtual bool given() { return false; }
33 explicit virtual operator double() { abort(); }
34 explicit virtual operator string() { abort(); }
35 double double_default(double def) { return given() ? (double) *this : def; }
36 const string string_default(const string def) { return given() ? (string) *this : def; }
37 virtual string dump() { return "<undef>"; }
46 virtual void render(page_out *out UNUSED, pdf_matrix xform UNUSED) { abort(); }
47 page(double _w, double _h) : width(_w), height(_h) { }
51 virtual vector<page *> process(vector <page *> pages UNUSED) { abort(); }
56 const arg_def *arg_defs;
58 cmd_exec *(*constructor)(cmd *cmd);
63 vector<arg_val *> args;
68 struct pipeline_selector {
73 struct pipeline_branch {
74 vector<pipeline_selector> selectors;
79 vector<pipeline_branch *> branches;
84 void parse(const char *in, list<cmd *> *cmds);
88 extern const cmd_def cmd_table[];