*** ./source/file.c.old Tue Feb 8 12:07:20 2005 --- ./source/file.c Tue Feb 8 12:08:50 2005 *************** *** 354,359 **** --- 354,360 ---- mext = ext = GV_XtNewString(e); while (*ext) { *ext = tolower(*ext); ext++; } if (!strncmp(mext,".gz",3)) ext = ""; + else if (!strncmp(mext,".bz2",4)) ext = ""; else if (!strncmp(mext,".z",2)) ext = ""; else if (!strncmp(mext,".ps",3)) ext = ".ps"; else if (!strncmp(mext,".pdf",4)) ext = ".pdf"; *** ./source/ps.c.old Tue Feb 8 12:07:29 2005 --- ./source/ps.c Tue Feb 8 12:08:50 2005 *************** *** 402,414 **** int ignore_dsc; /* Derived from scanstyle. If set the document structure will be ignored. */ BEGINMESSAGE(psscan) if (cmd_uncompress) { ! char b[2]; ! if (!(fread(b, sizeof(char),2, *fileP) == 2) ! || b[0] != '\037' || (b[1] != '\235' && b[1] != '\213')) { rewind(*fileP); cmd_uncompress=NULL; } --- 402,416 ---- int ignore_dsc; /* Derived from scanstyle. If set the document structure will be ignored. */ + unsigned char b[3]; /* The first 3 bytes of the input file */ BEGINMESSAGE(psscan) if (cmd_uncompress) { ! if ( fread(b, sizeof(char), 3, *fileP) != 3 || /* If ((read error) OR */ ! ( memcmp(b, "\037\235", 2) != 0 && /* (not compress AND */ ! memcmp(b, "\037\213", 2) != 0 && /* not gzip AND */ ! memcmp(b, "BZh", 3) != 0 ) ) { /* not bzip2)) { */ rewind(*fileP); cmd_uncompress=NULL; } *************** *** 420,426 **** char cmd[512]; char s[512]; filename_unc=file_getTmpFilename(NULL,filename_raw); ! sprintf(cmd,cmd_uncompress,filename,filename_unc); INFMESSAGE(is compressed) INFSMESSAGE(uncompress command,cmd) if (ps_system(cmd) || file_fileIsNotUseful(filename_unc)) { --- 422,432 ---- char cmd[512]; char s[512]; filename_unc=file_getTmpFilename(NULL,filename_raw); ! if (memcmp(b, "BZh", 3) == 0) { ! sprintf(cmd, "bzip2 -dc %s >%s", filename, filename_unc); ! } else { ! sprintf(cmd, "gzip -dc %s >%s", filename, filename_unc); ! } INFMESSAGE(is compressed) INFSMESSAGE(uncompress command,cmd) if (ps_system(cmd) || file_fileIsNotUseful(filename_unc)) { *** ./source/options_setup.c.old Tue Feb 8 12:07:34 2005 --- ./source/options_setup.c Tue Feb 8 12:08:50 2005 *************** *** 71,77 **** static Widget eyeGuideToggle,reverseScrollingToggle,confirmPrintToggle,autoCenterToggle; static Widget pixmapToggle,miscLabel; static Widget confirmLabel,confirmButton,confirmMenu,showTitleToggle; ! static Widget print_command,scales,uncompress,screenSize,medias,magmenu,miscmenu; static String confirm_quit_styles[4] = { "Never","When processing","Always", NULL }; --- 71,77 ---- static Widget eyeGuideToggle,reverseScrollingToggle,confirmPrintToggle,autoCenterToggle; static Widget pixmapToggle,miscLabel; static Widget confirmLabel,confirmButton,confirmMenu,showTitleToggle; ! static Widget print_command,scales,screenSize,medias,magmenu,miscmenu; static String confirm_quit_styles[4] = { "Never","When processing","Always", NULL }; *************** *** 115,122 **** SMESSAGE(gv_print_command) widgets_setText(print_command, gv_print_command); - SMESSAGE(gv_uncompress_command) - widgets_setText(uncompress,gv_uncompress_command); SMESSAGE(gv_scales_res) s = options_squeezeMultiline(gv_scales_res); widgets_setText(scales,s); --- 115,120 ---- *************** *** 177,183 **** cb_showTitle(NULL,(XtPointer)1,NULL); } - options_textApply(uncompress,NULL,&gv_uncompress_command); options_textApply(print_command,NULL,&gv_print_command); options_textApply(magmenu,NULL,&gv_magmenu_entries_res); magmenu_freeMagMenuEntries(gv_magmenu_entries); --- 175,180 ---- *************** *** 310,317 **** ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_printCommand ,gv_class,widgets_getText(print_command)); ++argn; - options_setArg(&(argi[argn]),&(argv[argn]),s_uncompressCommand ,gv_class,widgets_getText(uncompress)); - ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_confirmPrint ,gv_class ,SwitchIsSet(confirmPrintToggle) ? t : f); ++argn; options_setArg(&(argi[argn]),&(argv[argn]),s_reverseScrolling ,gv_class ,SwitchIsSet(reverseScrollingToggle) ? t : f); --- 307,312 ---- *************** *** 404,410 **** miscmenu = widgets_createLabeledTextField("miscmenu", optionControl); magmenu = widgets_createLabeledTextField("magmenu", optionControl); medias = widgets_createLabeledTextField("medias", optionControl); - uncompress = widgets_createLabeledLineTextField("uncompress", optionControl); print_command = widgets_createLabeledLineTextField("printCommand", optionControl); scales = widgets_createLabeledTextField("scales", optionControl); screenSize = widgets_createLabeledLineTextField("screenSize", optionControl); --- 399,404 ---- *** ./source/gv_layout_res.dat.old Tue Feb 8 12:07:48 2005 --- ./source/gv_layout_res.dat Tue Feb 8 12:08:50 2005 *************** *** 281,296 **** screenSizeLabel<+[1]*>\ $bs\ printCommandLabel<+[1]*>\ - $bs\ - uncompressLabel<+[1]*>\ }\ $s\ |v{\ screenSizeFrame<+[2]-100%*>\ $s\ printCommandFrame<+[2]-100%*>\ - $s\ - uncompressFrame<+[2]-100%*>\ }\ }\ }\ --- 281,292 ---- *** ./source/paths.h.old Tue Feb 8 12:08:02 2005 --- ./source/paths.h Tue Feb 8 12:17:07 2005 *************** *** 34,42 **** # define INC_XMU(aaa) # define INC_XAW(aaa) #else ! # define INC_X11(aaa) ! # define INC_XMU(aaa) ! # define INC_XAW(aaa) #endif #endif /* _PATHS_H_ */ --- 34,42 ---- # define INC_XMU(aaa) # define INC_XAW(aaa) #else ! # define INC_X11(aaa) ! # define INC_XMU(aaa) ! # define INC_XAW(aaa) #endif #endif /* _PATHS_H_ */