+ else if (!strcmp(name, "s"))
+ {
+ char*s = strdup(val);
+ char*c = strchr(s, '=');
+ if(c && *c && c[1]) {
+ *c = 0;
+ c++;
+ pdfswf_setparameter(s,c);
+ }
+ else
+ pdfswf_setparameter(s,"1");
+ return 1;
+ }
+ else if (!strcmp(name, "S"))
+ {
+ pdfswf_setparameter("drawonlyshapes", "1");
+ return 0;
+ }
+ else if (!strcmp(name, "i"))
+ {
+ pdfswf_setparameter("ignoredraworder", "1");
+ return 0;
+ }
+ else if (!strcmp(name, "z"))
+ {
+ pdfswf_setparameter("enablezlib", "1");
+ return 0;
+ }
+ else if (!strcmp(name, "n"))
+ {
+ pdfswf_setparameter("opennewwindow", "1");
+ return 0;
+ }
+ else if (!strcmp(name, "t"))
+ {
+ pdfswf_setparameter("insertstop", "1");
+ return 0;
+ }
+ else if (!strcmp(name, "T"))
+ {
+ if(!strcasecmp(val, "mx"))
+ pdfswf_setparameter("flashversion", "6");
+ else
+ pdfswf_setparameter("flashversion", val);
+
+ return 1;
+ }
+ else if (!strcmp(name, "f"))
+ {
+ pdfswf_setparameter("storeallcharacters", "1");
+ return 0;
+ }
+ else if (!strcmp(name, "F"))
+ {
+ char *s = strdup(val);
+ int l = strlen(s);
+ while(l && s[l-1]=='/') {
+ s[l-1] = 0;
+ l--;
+ }
+ fontpaths[fontpathpos++] = s;
+ return 1;
+ }
+ else if (!strcmp(name, "l"))
+ {
+ char buf[256];
+ sprintf(buf, "%s/default_loader.swf", SWFDIR);
+ preloader = strdup(buf);
+ return 0;
+ }
+ else if (!strcmp(name, "b"))
+ {
+ char buf[256];
+ sprintf(buf, "%s/default_viewer.swf", SWFDIR);
+ viewer = strdup(buf);
+ return 0;
+ }
+ else if (!strcmp(name, "L"))
+ {
+ if(val)
+ {
+ preloader = val;
+ }
+ else
+ {
+ systemf("ls %s/*_loader.swf", SWFDIR);
+ if(!system_quiet)
+ printf("\n");
+ exit(1);
+ }
+ return 1;
+ }
+ else if (!strcmp(name, "B"))
+ {
+ if(val)
+ {
+ viewer = val;
+ }
+ else
+ {
+ systemf("ls %s/*_viewer.swf", SWFDIR);
+ if(!system_quiet)
+ printf("\n");
+ exit(1);
+ }
+ return 1;
+ }
+ else if (!strcmp(name, "j"))
+ {
+ if(name[1]) {
+ pdfswf_setparameter("jpegquality", &name[1]);
+ return 0;
+ } else {
+ pdfswf_setparameter("jpegquality", val);
+ return 1;
+ }
+ }