summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2006-10-15 08:58:57 +0000
committerAkira TAGOH <akira@tagoh.org>2006-10-15 08:58:57 +0000
commit78a52d970553803a00cbda13a1b417abb04f3757 (patch)
tree516022585135f22f80c072dfedbcf29e93175930 /src
parent5985b791d04f2ae7e699f719d29c7594540bb2dd (diff)
* src/hgs.c (main): add --sync option.
Diffstat (limited to 'src')
-rw-r--r--src/hgs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hgs.c b/src/hgs.c
index ce6f9c6..0031cb8 100644
--- a/src/hgs.c
+++ b/src/hgs.c
@@ -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) {