diff options
author | Akira TAGOH <akira@tagoh.org> | 2006-10-15 08:58:57 +0000 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2006-10-15 08:58:57 +0000 |
commit | 78a52d970553803a00cbda13a1b417abb04f3757 (patch) | |
tree | 516022585135f22f80c072dfedbcf29e93175930 /src | |
parent | 5985b791d04f2ae7e699f719d29c7594540bb2dd (diff) |
* src/hgs.c (main): add --sync option.
Diffstat (limited to 'src')
-rw-r--r-- | src/hgs.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -23,6 +23,7 @@ */ #include <hieroglyph/hgdevice.h> #include <hieroglyph/hgdict.h> +#include <hieroglyph/hgfile.h> #include <hieroglyph/hgmem.h> #include <hieroglyph/hgvaluenode.h> #include <hieroglyph/vm.h> @@ -76,6 +77,7 @@ main(int argc, char **argv) { gchar *device_name = NULL; + gboolean opt_io_sync = FALSE; HgVM *vm; HgDevice *device = NULL; GOptionContext *ctxt = g_option_context_new("<PostScript file>"); @@ -83,6 +85,7 @@ main(int argc, GOptionEntry entries[] = { {"define", 'd', 0, G_OPTION_ARG_CALLBACK, _hgs_arg_define_cb, "Define a variable in systemdict.", "SYMBOL"}, {"load-plugin", 'l', 0, G_OPTION_ARG_CALLBACK, _hgs_arg_load_plugin_cb, "Load a plugin", "NAME"}, + {"sync", 0, 0, G_OPTION_ARG_NONE, &opt_io_sync, "Make I/O calls synchronous", NULL}, {"device", 0, 0, G_OPTION_ARG_STRING, &device_name, "Output device that the rendering goes to", "DEVICE"}, {NULL} }; @@ -104,6 +107,8 @@ main(int argc, return 1; } + if (opt_io_sync) + hg_file_io_synchronous(TRUE); if (device_name) { device = hg_device_new(device_name); if (device == NULL) { |