00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00018 #ifndef LIBCWD_CONTROL_FLAG_H
00019 #define LIBCWD_CONTROL_FLAG_H
00020
00021 #ifndef LIBCWD_CONFIG_H
00022 #include <libcwd/config.h>
00023 #endif
00024
00025 namespace libcwd {
00026
00031 typedef unsigned int control_flag_t;
00032
00033
00035 control_flag_t const nonewline_cf = 0x0001;
00036
00038 control_flag_t const noprefix_cf = 0x0002;
00039
00041 control_flag_t const nolabel_cf = 0x0004;
00042
00044 control_flag_t const blank_margin_cf = 0x0008;
00045
00047 control_flag_t const blank_label_cf = 0x0010;
00048
00050 control_flag_t const blank_marker_cf = 0x0020;
00051
00053 control_flag_t const cerr_cf = 0x0040;
00054
00056 control_flag_t const flush_cf = 0x0080;
00057
00059 control_flag_t const wait_cf = 0x0100;
00060
00062 control_flag_t const error_cf = 0x0200;
00063
00064
00065 control_flag_t const continued_cf_maskbit = 0x0400;
00066 control_flag_t const continued_expected_maskbit = 0x0800;
00067
00068
00069 control_flag_t const fatal_maskbit = 0x1000;
00070 control_flag_t const coredump_maskbit = 0x2000;
00071 control_flag_t const continued_maskbit = 0x4000;
00072 control_flag_t const finish_maskbit = 0x8000;
00073
00075 enum continued_cf_nt {
00076 continued_cf
00077 };
00078
00080 inline control_flag_t const cond_nonewline_cf(bool cond) { return cond ? nonewline_cf : 0; }
00082 inline control_flag_t const cond_noprefix_cf(bool cond) { return cond ? noprefix_cf : 0; }
00084 inline control_flag_t const cond_nolabel_cf(bool cond) { return cond ? nolabel_cf : 0; }
00086 inline control_flag_t const cond_error_cf(bool err) { return err ? error_cf : 0; }
00087
00090 }
00091
00092 #endif // LIBCWD_CONTROL_FLAG_H
00093