+int parse_export_to(string const & type, string const & output_file, string & batch)
+{
+ if (type.empty()) {
+ lyxerr << to_utf8(_("Missing file type [eg latex, ps...] after "
+ "--export-to switch")) << endl;
+ exit(1);
+ }
+ if (output_file.empty()) {
+ lyxerr << to_utf8(_("Missing destination filename after "
+ "--export-to switch")) << endl;
+ exit(1);
+ }
+ batch = "buffer-export " + type + " " + output_file;
+ use_gui = false;
+ return 2;
+}
+
+