fixed small typo in error message
[swftools.git] / src / pdf2swf.c
index c4df439..975aa6c 100644 (file)
@@ -32,7 +32,7 @@
 #include "../lib/os.h"
 #include "../lib/rfxswf.h"
 #include "../lib/devices/swf.h"
-#include "../lib/devices/arts.h"
+#include "../lib/devices/polyops.h"
 #include "../lib/devices/record.h"
 #include "../lib/pdf/pdf.h"
 #include "../lib/log.h"
@@ -154,7 +154,7 @@ int args_callback_option(char*name,char*val) {
        char*x2 = strtok(0, ":");
        char*y2 = strtok(0, ":");
        if(!(x1 && y1 && x2 && y2)) {
-           fprintf(stderr, "-m option requires four arguments, <x1>:<y1>:<x2>:<y2>\n");
+           fprintf(stderr, "-c option requires four arguments, <x1>:<y1>:<x2>:<y2>\n");
            exit(1);
        }
        custom_clip = 1;
@@ -203,6 +203,14 @@ int args_callback_option(char*name,char*val) {
        driver->set_parameter(driver, "ignoredraworder", "1");
        return 0;
     }
+#ifndef WIN32
+    else if (!strcmp(name, "Q"))
+    {
+       int seconds = atoi(val);
+       alarm(seconds);
+       return 1;
+    }
+#endif
     else if (!strcmp(name, "z"))
     {
        driver->set_parameter(driver, "enablezlib", "1");
@@ -258,12 +266,11 @@ int args_callback_option(char*name,char*val) {
            driver->set_parameter(driver, "bitmapfonts", "1");
        if(level>=3)
            driver->set_parameter(driver, "ignoredraworder", "1");
-
-       flatten = 1;
        return ret;
     }
     else if (!strcmp(name, "G"))
     {
+       driver->set_parameter(driver, "optimize_polygons", "1");
        flatten = 1;
        return 0;
     }
@@ -371,6 +378,7 @@ struct options_t options[] =
  {"z","zlib"},
  {"s","set"},
  {"S","shapes"},
+ {"Q","maxtime"},
  {"j","jpegquality"},
  {"p","pages"},
  {"w","samewindow"},