src/format.h

changeset 79
2425fa6a4f21
parent 75
bf8c57437231
child 85
264a61e9eba0
equal deleted inserted replaced
78:e6d7e32e6481 79:2425fa6a4f21
115 }; 115 };
116 116
117 string format_args (const list<format_arg>& args); 117 string format_args (const list<format_arg>& args);
118 void print_args (FILE* fp, const list<format_arg>& args); 118 void print_args (FILE* fp, const list<format_arg>& args);
119 void do_fatal (const list<format_arg>& args); 119 void do_fatal (const list<format_arg>& args);
120 void do_error (string msg);
120 121
121 #ifndef IN_IDE_PARSER 122 #ifndef IN_IDE_PARSER
122 # define format(...) format_args({ __VA_ARGS__ }) 123 # define format(...) format_args({ __VA_ARGS__ })
123 # define fprint(A, ...) print_args( A, { __VA_ARGS__ }) 124 # define fprint(A, ...) print_args( A, { __VA_ARGS__ })
124 # define print(...) print_args( stdout, { __VA_ARGS__ }) 125 # define print(...) print_args( stdout, { __VA_ARGS__ })
125 # define error(...) throw script_error (format (__VA_ARGS__)) 126 # define error(...) do_error (format (__VA_ARGS__))
126 #else 127 #else
127 string format (void, ...); 128 string format (void, ...);
128 void fprint (FILE* fp, ...); 129 void fprint (FILE* fp, ...);
129 void print (void, ...); 130 void print (void, ...);
130 void error (void, ...); 131 void error (void, ...);

mercurial