*** arc.c.orig Wed Jan 13 14:21:30 1999 --- arc.c Wed Jan 13 14:21:30 1999 *************** *** 53,56 **** --- 53,57 ---- #include "msg.e" #include "obj.e" + #include "page.e" #include "pattern.e" #include "poly.e" *************** *** 2051,2055 **** s = ParseStr(tmp_buf, seperator, buf, sizeof(buf)); ! if (*s != '\0' && (*radius = atoi(buf)) <= 0) *s = '\0'; if (*s == '\0') { strcpy(error_str, "radius"); --- 2052,2059 ---- s = ParseStr(tmp_buf, seperator, buf, sizeof(buf)); ! if (*s != '\0') { ! UtilTrimBlanks(buf); ! if (!GetDimension(buf, TRUE, radius)) *s = '\0'; ! } if (*s == '\0') { strcpy(error_str, "radius"); *************** *** 2057,2060 **** --- 2061,2065 ---- } s = ParseStr(s, seperator, buf, sizeof(buf)); + UtilTrimBlanks(buf); switch (*buf) { case '+': *dir = ARC_CW; break; *************** *** 2071,2074 **** --- 2076,2081 ---- return FALSE; } + UtilTrimBlanks(buf); + UtilTrimBlanks(s); *theta1 = atoi(buf); *theta2 = atoi(s); *** choose.c.orig Wed Jan 13 14:21:32 1999 --- choose.c Wed Jan 13 14:21:32 1999 *************** *** 541,544 **** --- 541,547 ---- XDrawString(mainDisplay, pni->base_win, nameGC, tmp_start, base_line, gszMsgBox, len); + if (pni->title_str != NULL && *pni->title_str != '\0') { + SetStringStatus(pni->title_str); + } } if (boldMsgFontPtr != NULL) { *************** *** 1977,1982 **** if (pni->dsp_ptr != NULL && pni->marked_index != INVALID) { SetStringStatus(pni->dsp_ptr[pni->marked_index].pathstr); - } else { - SetStringStatus(""); } XSync(mainDisplay, False); --- 1980,1983 ---- *** cutpaste.c.orig Wed Jan 13 14:21:33 1999 --- cutpaste.c Wed Jan 13 14:21:33 1999 *************** *** 332,338 **** RecalcTextMetrics(text_ptr, grid_x, text_ptr->baseline_y); UpdTextBBox(obj_ptr); PlaceTopObj(obj_ptr); - AddObj(NULL, topObj, obj_ptr); SelectTopObj(); RecordNewObjCmd(); --- 332,338 ---- RecalcTextMetrics(text_ptr, grid_x, text_ptr->baseline_y); UpdTextBBox(obj_ptr); + AddObj(NULL, topObj, obj_ptr); PlaceTopObj(obj_ptr); SelectTopObj(); RecordNewObjCmd(); *** edit.c.orig Wed Jan 13 14:21:35 1999 --- edit.c Wed Jan 13 14:21:35 1999 *************** *** 3880,3884 **** } *spec = '\0'; ! sprintf(gszMsgBox, "Please specify a width:"); if (Dialog(gszMsgBox, NULL, spec) == INVALID) return; UtilTrimBlanks(spec); --- 3880,3884 ---- } *spec = '\0'; ! sprintf(gszMsgBox, "Please specify a width and a height [WxH]:"); if (Dialog(gszMsgBox, NULL, spec) == INVALID) return; UtilTrimBlanks(spec); *************** *** 3918,3922 **** if (*spec == '\0') return; ! if (!GetDimension(spec, &abs_w)) { sprintf(gszMsgBox, "Invalid value '%s' specified.", spec); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); --- 3918,3922 ---- if (*spec == '\0') return; ! if (!GetDimension(spec, FALSE, &abs_w)) { sprintf(gszMsgBox, "Invalid value '%s' specified.", spec); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); *************** *** 3946,3950 **** if (*spec == '\0') return; ! if (!GetDimension(spec, &abs_h)) { sprintf(gszMsgBox, "Invalid value '%s' specified.", spec); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); --- 3946,3950 ---- if (*spec == '\0') return; ! if (!GetDimension(spec, FALSE, &abs_h)) { sprintf(gszMsgBox, "Invalid value '%s' specified.", spec); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); *************** *** 3956,3960 **** return; } ! SizeAllSelToGivenWidth(abs_h); } --- 3956,3960 ---- return; } ! SizeAllSelToGivenHeight(abs_h); } *** file.c.orig Wed Jan 13 14:21:37 1999 --- file.c Wed Jan 13 14:21:38 1999 *************** *** 2293,2296 **** --- 2293,2297 ---- if (fileVersion <= 28) readingPageNum++; if (fileVersion <= 29) { + VerifyCompatibleFontIndex(&curFont); font_sz = GetCompatibleSize(compat_dpi, font_sz); curSzUnit = FontSizeToSzUnit(font_sz); *************** *** 2317,2322 **** if ((psz=strchr(font_str, '%')) != NULL) { *psz++ = '\0'; ! strcpy(sb_font_str, font_str); ! strcpy(font_str, psz); } curFont = GetFontIndex(font_str, curStyle, TRUE); --- 2318,2326 ---- if ((psz=strchr(font_str, '%')) != NULL) { *psz++ = '\0'; ! /* Ex., ignore last '%' if font_str eq "Courier%". */ ! if (*psz != '\0') { ! strcpy(sb_font_str, font_str); ! strcpy(font_str, psz); ! } } curFont = GetFontIndex(font_str, curStyle, TRUE); *************** *** 4341,4347 **** } else { if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "TiffEPSI")) != NULL) { ! fprintf(stderr, "Obsoleted %s*%s used. Ignored.\n\t%s %s %s.\n", ! TOOL_NAME, "TiffEPSI", "TiffEPSI export is now supported by", ! TOOL_NAME, "directly as an export format"); } if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "XbmToTiff")) != NULL) { --- 4345,4354 ---- } else { if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "TiffEPSI")) != NULL) { ! if (UtilStrICmp(c_ptr, "true") == 0) { ! fprintf(stderr, "Obsoleted %s*%s used. Ignored.\n\t%s %s %s.\n", ! TOOL_NAME, "TiffEPSI", ! "TiffEPSI export is now supported by", TOOL_NAME, ! "directly as an export format"); ! } } if ((c_ptr=XGetDefault(mainDisplay, TOOL_NAME, "XbmToTiff")) != NULL) { *** font.c.orig Wed Jan 13 14:21:40 1999 --- font.c Wed Jan 13 14:21:40 1999 *************** *** 155,159 **** static char *initSizeMenuStr[] = { ! " 8", "10", "11", "12", "14", "17", "18", "20", "24", "25", "34" }; char **fontMenuStr=NULL; --- 155,159 ---- static char *initSizeMenuStr[] = { ! "8", "10", "11", "12", "14", "17", "18", "20", "24", "25", "34" }; char **fontMenuStr=NULL; *************** *** 1576,1582 **** } ! static int gnCurFontMsgNoDisplay=FALSE; ! ! void CurFontMsg() { char style[20]; --- 1576,1582 ---- } ! static ! void GetCurFontMsg(buf) ! char *buf; { char style[20]; *************** *** 1589,1602 **** } if (showFontSizeInPoints) { ! sprintf(gszMsgBox, "%s-%s-%1dpt", fontMenuStr[curFont], style, SzUnitToPointSize(curSzUnit)); } else { ! sprintf(gszMsgBox, "%s-%s-%1d", fontMenuStr[curFont], style, SzUnitToFontSize(curSzUnit)); } - if (gnCurFontMsgNoDisplay) return; - Msg(gszMsgBox); } void DumpEightBitFontInfo(FP) FILE *FP; --- 1589,1611 ---- } if (showFontSizeInPoints) { ! sprintf(buf, "%s-%s-%1dpt", fontMenuStr[curFont], style, SzUnitToPointSize(curSzUnit)); } else { ! sprintf(buf, "%s-%s-%1d", fontMenuStr[curFont], style, SzUnitToFontSize(curSzUnit)); } } + void CurFontMsg(nShowInMsgWindow, nShowInStatusWindow) + int nShowInMsgWindow, nShowInStatusWindow; + { + char buf[MAXSTRING]; + + GetCurFontMsg(buf); + + if (nShowInMsgWindow) Msg(buf); + if (nShowInStatusWindow) SetStringStatus(buf); + } + void DumpEightBitFontInfo(FP) FILE *FP; *************** *** 1672,1681 **** } if (fs_ptr == NULL) { ! gnCurFontMsgNoDisplay = TRUE; ! CurFontMsg(); ! gnCurFontMsgNoDisplay = FALSE; fprintf(stderr, "Severe error: Cannot find the %s font,\n\tuse '%s' instead.\n", ! gszMsgBox, defaultFontName); canvasFontPtr = defaultFontPtr; canvasFontSize = INVALID; --- 1681,1690 ---- } if (fs_ptr == NULL) { ! char buf[MAXSTRING]; ! ! GetCurFontMsg(buf); fprintf(stderr, "Severe error: Cannot find the %s font,\n\tuse '%s' instead.\n", ! buf, defaultFontName); canvasFontPtr = defaultFontPtr; canvasFontSize = INVALID; *************** *** 2308,2312 **** if (sizeMenuStr[i] == NULL) FailAllocMessage(); if (showFontSizeInPoints) { ! sprintf(sizeMenuStr[numFontSizes], "%3d pts", SzUnitToPointSize(FontSizeToSzUnit(atoi(psz)))); } else { --- 2317,2321 ---- if (sizeMenuStr[i] == NULL) FailAllocMessage(); if (showFontSizeInPoints) { ! sprintf(sizeMenuStr[i], "%3d pts", SzUnitToPointSize(FontSizeToSzUnit(atoi(psz)))); } else { *************** *** 3940,3943 **** --- 3949,4017 ---- } + void VerifyCompatibleFontIndex(font_index) + int *font_index; + /* should only call this function if fileVersion <= 29 */ + { + if (*font_index >= MAXFONTS) *font_index = defaultCurFont; + } + + static + void GetFontStr(FontIndex, StyleIndex, FontStr) + int FontIndex, StyleIndex; + char *FontStr; + { + char font_str[MAXSTRING]; + + *font_str = '\0'; + GetPSFontStr(FontIndex, StyleIndex, font_str); + /* font_str[0] is '/' now */ + strcpy(FontStr, &font_str[1]); + } + + void GetCompatibleFontName(old_font_index, style, font_str) + int old_font_index, style; + char *font_str; + { + int num_fonts=(PRTGIF? MAXFONTS+numFakedFonts: numFonts+numFakedFonts); + int cSingle=0; + int cDouble=0; + int cpSingle=INVALID; + int cpDouble=INVALID; + int old_font_single=(old_font_index % 1000); + int old_font_double=((old_font_index / 1000) - 1); + int i; + + for (i=0; i < num_fonts; i++) { + if (!IsFontDoubleByte(i)) { + if (cSingle == old_font_single) cpSingle = i; + cSingle++; + } else { + if (cDouble == old_font_double) cpDouble = i; + cDouble++; + } + } + if (cpSingle != INVALID) { + GetFontStr(cpSingle, style, font_str); + } else { + GetFontStr(defaultCurFont, style, font_str); + if (!PRTGIF) { + sprintf(gszMsgBox, "%s substituted for font number (`%d').\n\n%s", + font_str, old_font_single, + "There is no such font. Use default."); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + } + } + if (cpDouble != INVALID) { + strcat(font_str, "%"); + GetFontStr(cpDouble, style, font_str+strlen(font_str)); + } else if (old_font_double >=0) { + if (!PRTGIF) { + sprintf(gszMsgBox, "There is not kanji-font number (`%d').", + old_font_double); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + } + } + } + /* The following procedure is used to generate pdrawFontAsc[] and */ /* pDrawFontDes[], to be used in ``prtgif.c''. It is supposed */ *** grid.c.orig Wed Jan 13 14:21:42 1999 --- grid.c Wed Jan 13 14:21:42 1999 *************** *** 1486,1490 **** X = OrigX - ((dx + dy)>>1); Y = OrigY - ((dx + dy)>>1); ! } else if ( (p1 ^ p2) > 0) { X = OrigX; } else { --- 1486,1490 ---- X = OrigX - ((dx + dy)>>1); Y = OrigY - ((dx + dy)>>1); ! } else if ( (p1 ^ p2) >= 0) { X = OrigX; } else { *** imgproc.c.orig Wed Jan 13 14:21:44 1999 --- imgproc.c Wed Jan 13 14:21:44 1999 *************** *** 2729,2738 **** void ReduceToPixmapColors() { ! int i, ok=TRUE, rc, short_name; ! char file_name[MAXPATHLENGTH+1], *rest; XEvent ev; ! int ncolors=0, chars_per_pixel=0, first_pixel_is_bg=0; char *color_char=NULL, **color_str=NULL, *xpm_data=NULL; ! struct XPmRec *xpm_ptr; if (!CheckSelectionForImageProc( --- 2729,2738 ---- void ReduceToPixmapColors() { ! int i, ok=TRUE, rc, short_name=FALSE; ! char xpm_fname[MAXPATHLENGTH+1], *rest=NULL, tmp_fname[MAXPATHLENGTH+1]; XEvent ev; ! int ncolors=0, chars_per_pixel=0, first_pixel_is_bg=0, remote_file=FALSE; char *color_char=NULL, **color_str=NULL, *xpm_data=NULL; ! struct XPmRec *xpm_ptr=NULL; if (!CheckSelectionForImageProc( *************** *** 2741,2744 **** --- 2741,2745 ---- } importingFile = TRUE; + *xpm_fname = *tmp_fname = '\0'; if (importFromLibrary) { char name[MAXSTRING+1], path[MAXSTRING+1]; *************** *** 2748,2764 **** ok = FALSE; } else { ! sprintf(file_name, "%s/%s", path, name); } } else if (SelectFileNameToImport( "Please select an XPixmap file for colors...", XPM_FILE_EXT, ! file_name) == INVALID) { ok = FALSE; ! } else if (FileIsRemote(file_name)) { ! MsgBox("Importing remote XPixmap file not supported.", ! TOOL_NAME, INFO_MB); ! ok = FALSE; } importingFile = FALSE; if (!ok) { return; } --- 2749,2771 ---- ok = FALSE; } else { ! sprintf(xpm_fname, "%s/%s", path, name); } } else if (SelectFileNameToImport( "Please select an XPixmap file for colors...", XPM_FILE_EXT, ! xpm_fname) == INVALID) { ok = FALSE; ! } else if (FileIsRemote(xpm_fname)) { ! int is_html=FALSE; ! ! if (!DownloadRemoteFile(xpm_fname, NULL, NULL, &is_html, tmp_fname, NULL, ! 0) || *tmp_fname == '\0') { ! ok = FALSE; ! } else { ! remote_file = TRUE; ! } } importingFile = FALSE; if (!ok) { + if (remote_file) unlink(tmp_fname); return; } *************** *** 2772,2775 **** --- 2779,2783 ---- if (gnObjectColorsToTargetColorMapping == NULL) { FailAllocMessage(); + if (remote_file) unlink(tmp_fname); return; } *************** *** 2778,2783 **** SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); ! rc = MyReadPixmapFile(file_name, NULL, NULL, NULL, NULL, NULL, ! NULL, NULL, NULL, &ncolors, &chars_per_pixel, &first_pixel_is_bg, &color_char, &color_str, NULL, &xpm_data); SetDefaultCursor(mainWindow); --- 2786,2791 ---- SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); ! rc = MyReadPixmapFile(remote_file ? tmp_fname : xpm_fname, NULL, NULL, NULL, ! NULL, NULL, NULL, NULL, NULL, &ncolors, &chars_per_pixel, &first_pixel_is_bg, &color_char, &color_str, NULL, &xpm_data); SetDefaultCursor(mainWindow); *************** *** 2784,2788 **** ShowCursor(); ! if ((short_name=IsPrefix(bootDir, file_name, &rest))) ++rest; if (rc != BitmapSuccess) { if (short_name) { --- 2792,2800 ---- ShowCursor(); ! if (remote_file) { ! short_name = FALSE; ! } else { ! if ((short_name=IsPrefix(bootDir, xpm_fname, &rest))) ++rest; ! } if (rc != BitmapSuccess) { if (short_name) { *************** *** 2789,2793 **** sprintf(gszMsgBox, "Inavlid XPixmap file '%s'.", rest); } else { ! sprintf(gszMsgBox, "Inavlid XPixmap file '%s'.", file_name); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); --- 2801,2805 ---- sprintf(gszMsgBox, "Inavlid XPixmap file '%s'.", rest); } else { ! sprintf(gszMsgBox, "Inavlid XPixmap file '%s'.", xpm_fname); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); *************** *** 2794,2797 **** --- 2806,2810 ---- free(gnObjectColorsToTargetColorMapping); gnObjectColorsToTargetColorMapping = NULL; + if (remote_file) unlink(tmp_fname); return; } *************** *** 2807,2811 **** sprintf(gszMsgBox, "No colors in XPixmap file '%s'.", rest); } else { ! sprintf(gszMsgBox, "No colors in XPixmap file '%s'.", file_name); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); --- 2820,2824 ---- sprintf(gszMsgBox, "No colors in XPixmap file '%s'.", rest); } else { ! sprintf(gszMsgBox, "No colors in XPixmap file '%s'.", xpm_fname); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); *************** *** 2873,2876 **** --- 2886,2890 ---- gnTgifColorsToObjectColorMapping = NULL; } + if (remote_file) unlink(tmp_fname); } *** import.c.orig Wed Jan 13 14:21:47 1999 --- import.c Wed Jan 13 14:21:47 1999 *************** *** 324,331 **** void ImportXBitmapFile() { ! char file_name[MAXPATHLENGTH+1], s[MAXPATHLENGTH+1], * rest; char mag_spec[MAXSTRING+1], msg[MAXSTRING+1]; unsigned int tmp_w, tmp_h; ! int rc, x_hot, y_hot, x, y, w, h, short_name, orig_w, orig_h; float mag; Pixmap orig_bitmap, bitmap; --- 324,332 ---- void ImportXBitmapFile() { ! char xbm_fname[MAXPATHLENGTH+1], *rest=NULL, tmp_fname[MAXPATHLENGTH+1]; char mag_spec[MAXSTRING+1], msg[MAXSTRING+1]; unsigned int tmp_w, tmp_h; ! int rc, x_hot, y_hot, x, y, w, h, short_name=FALSE, orig_w, orig_h; ! int remote_file=FALSE; float mag; Pixmap orig_bitmap, bitmap; *************** *** 332,336 **** XImage *image=NULL; XEvent ev; ! struct ObjRec *obj_ptr; MakeQuiescent(); --- 333,337 ---- XImage *image=NULL; XEvent ev; ! struct ObjRec *obj_ptr=NULL; MakeQuiescent(); *************** *** 337,340 **** --- 338,342 ---- importingFile = TRUE; + *xbm_fname = *tmp_fname = '\0'; if (importFromLibrary) { char name[MAXSTRING+1], path[MAXSTRING+1]; *************** *** 345,359 **** return; } ! sprintf(s, "%s/%s", path, name); } else if (SelectFileNameToImport( "Please select an XBitmap file to IMPORT...", ! XBM_FILE_EXT, s) == INVALID) { importingFile = FALSE; return; ! } else if (FileIsRemote(s)) { ! MsgBox("Importing remote XBitmap file is not supported.", TOOL_NAME, ! INFO_MB); ! importingFile = FALSE; ! return; } XSync(mainDisplay, False); --- 347,365 ---- return; } ! sprintf(xbm_fname, "%s/%s", path, name); } else if (SelectFileNameToImport( "Please select an XBitmap file to IMPORT...", ! XBM_FILE_EXT, xbm_fname) == INVALID) { importingFile = FALSE; return; ! } else if (FileIsRemote(xbm_fname)) { ! int is_html=FALSE; ! ! if (!DownloadRemoteFile(xbm_fname, NULL, NULL, &is_html, tmp_fname, NULL, ! 0) || *tmp_fname == '\0') { ! importingFile = FALSE; ! return; ! } ! remote_file = TRUE; } XSync(mainDisplay, False); *************** *** 361,369 **** ExposeEventHandler(&ev, TRUE); } - strcpy(file_name, s); - SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); ! rc = XReadBitmapFile(mainDisplay, mainWindow, file_name, &tmp_w, &tmp_h, &orig_bitmap, &x_hot, &y_hot); orig_w = tmp_w; orig_h = tmp_h; --- 367,374 ---- ExposeEventHandler(&ev, TRUE); } SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); ! rc = XReadBitmapFile(mainDisplay, mainWindow, ! (remote_file ? tmp_fname : xbm_fname), &tmp_w, &tmp_h, &orig_bitmap, &x_hot, &y_hot); orig_w = tmp_w; orig_h = tmp_h; *************** *** 371,375 **** ShowCursor(); ! if ((short_name=IsPrefix(bootDir, file_name, &rest))) ++rest; if (rc != BitmapSuccess) { if (short_name) { --- 376,384 ---- ShowCursor(); ! if (remote_file) { ! short_name = FALSE; ! } else { ! if ((short_name=IsPrefix(bootDir, xbm_fname, &rest))) ++rest; ! } if (rc != BitmapSuccess) { if (short_name) { *************** *** 376,386 **** sprintf(gszMsgBox, "Cannot import XBitmap file '%s'.", rest); } else { ! sprintf(gszMsgBox, "Cannot import XBitmap file '%s'.", file_name); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); importingFile = FALSE; return; } - x = 0; y = 0; --- 385,395 ---- sprintf(gszMsgBox, "Cannot import XBitmap file '%s'.", rest); } else { ! sprintf(gszMsgBox, "Cannot import XBitmap file '%s'.", xbm_fname); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + if (remote_file) unlink(tmp_fname); importingFile = FALSE; return; } x = 0; y = 0; *************** *** 401,405 **** orig_h = h; if (!ExtractBitmap(orig_bitmap, NULL, x, y, w, h, &bitmap, &image)) { ! Msg("Cannot allocate extracted bitmap."); importingFile = FALSE; XFreePixmap(mainDisplay, orig_bitmap); --- 410,415 ---- orig_h = h; if (!ExtractBitmap(orig_bitmap, NULL, x, y, w, h, &bitmap, &image)) { ! MsgBox("Cannot allocate extracted bitmap.", TOOL_NAME, INFO_MB); ! if (remote_file) unlink(tmp_fname); importingFile = FALSE; XFreePixmap(mainDisplay, orig_bitmap); *************** *** 413,420 **** bitmap = orig_bitmap; } - obj_ptr = CreateXBmObj(orig_w, orig_h, w, h, bitmap, image); - PlaceTopObj(obj_ptr); AddObj(NULL, topObj, obj_ptr); SelectTopObj(); --- 423,429 ---- bitmap = orig_bitmap; } obj_ptr = CreateXBmObj(orig_w, orig_h, w, h, bitmap, image); AddObj(NULL, topObj, obj_ptr); + PlaceTopObj(obj_ptr); SelectTopObj(); *************** *** 423,436 **** justDupped = FALSE; ! if (!importFromLibrary) SetCurImportDir(file_name); ! if (short_name) { ! sprintf(s, "XBitmap file (%1dx%1d) '%s' imported.", orig_w, orig_h, ! rest); ! } else { ! sprintf(s, "XBitmap file (%1dx%1d) '%s' imported.", orig_w, orig_h, ! file_name); ! } ! Msg(s); importingFile = FALSE; } --- 432,441 ---- justDupped = FALSE; ! if (!importFromLibrary && !remote_file) SetCurImportDir(xbm_fname); ! sprintf(gszMsgBox, "XBitmap file (%1dx%1d) '%s' imported.", orig_w, orig_h, ! short_name ? rest : xbm_fname); ! Msg(gszMsgBox); ! if (remote_file) unlink(tmp_fname); importingFile = FALSE; } *************** *** 438,449 **** void ImportXPixmapFile() { ! char file_name[MAXPATHLENGTH+1], s[MAXPATHLENGTH+1], * rest; ! int rc, ncolors, chars_per_pixel, * pixels, short_name; ! int first_pixel_is_bg, image_w, image_h, w, h; Pixmap pixmap=None, bitmap=None; XImage *image=NULL, *bitmap_image=NULL; ! char *color_char, **color_str, *xpm_data=NULL; XEvent ev; ! struct ObjRec *obj_ptr; MakeQuiescent(); --- 443,454 ---- void ImportXPixmapFile() { ! char xpm_fname[MAXPATHLENGTH+1], *rest=NULL, tmp_fname[MAXPATHLENGTH+1]; ! int rc, ncolors, chars_per_pixel, *pixels=NULL, short_name=FALSE; ! int first_pixel_is_bg, image_w, image_h, w, h, remote_file=FALSE; Pixmap pixmap=None, bitmap=None; XImage *image=NULL, *bitmap_image=NULL; ! char *color_char, **color_str=NULL, *xpm_data=NULL; XEvent ev; ! struct ObjRec *obj_ptr=NULL; MakeQuiescent(); *************** *** 450,453 **** --- 455,459 ---- importingFile = TRUE; + *xpm_fname = *tmp_fname = '\0'; if (importFromLibrary) { char name[MAXSTRING+1], path[MAXSTRING+1]; *************** *** 458,474 **** return; } ! sprintf(s, "%s/%s", path, name); } else if (SelectFileNameToImport( "Please select an XPixmap file to IMPORT...", ! XPM_FILE_EXT, s) == INVALID) { importingFile = FALSE; return; ! } else if (FileIsRemote(s)) { ! MsgBox("Importing remote XPixmap file is not supported.", ! TOOL_NAME, INFO_MB); ! importingFile = FALSE; ! return; ! } XSync(mainDisplay, False); if (XCheckMaskEvent(mainDisplay, ExposureMask, &ev)) { --- 464,483 ---- return; } ! sprintf(xpm_fname, "%s/%s", path, name); } else if (SelectFileNameToImport( "Please select an XPixmap file to IMPORT...", ! XPM_FILE_EXT, xpm_fname) == INVALID) { importingFile = FALSE; return; ! } else if (FileIsRemote(xpm_fname)) { ! int is_html=FALSE; + if (!DownloadRemoteFile(xpm_fname, NULL, NULL, &is_html, tmp_fname, NULL, + 0) || *tmp_fname == '\0') { + importingFile = FALSE; + return; + } + remote_file = TRUE; + } XSync(mainDisplay, False); if (XCheckMaskEvent(mainDisplay, ExposureMask, &ev)) { *************** *** 475,489 **** ExposeEventHandler (&ev, TRUE); } - strcpy(file_name, s); - SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); ! rc = MyReadPixmapFile(file_name, &image_w, &image_h, &w, &h, &pixmap, ! &image, &bitmap, &bitmap_image, &ncolors, &chars_per_pixel, ! &first_pixel_is_bg, &color_char, &color_str, &pixels, &xpm_data); SetDefaultCursor(mainWindow); ShowCursor(); ! if ((short_name=IsPrefix(bootDir, file_name, &rest))) ++rest; if (rc != BitmapSuccess) { if (short_name) { --- 484,501 ---- ExposeEventHandler (&ev, TRUE); } SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); ! rc = MyReadPixmapFile(remote_file ? tmp_fname : xpm_fname, ! &image_w, &image_h, &w, &h, &pixmap, &image, &bitmap, &bitmap_image, ! &ncolors, &chars_per_pixel, &first_pixel_is_bg, &color_char, ! &color_str, &pixels, &xpm_data); SetDefaultCursor(mainWindow); ShowCursor(); ! if (remote_file) { ! short_name = FALSE; ! } else { ! if ((short_name=IsPrefix(bootDir, xpm_fname, &rest))) ++rest; ! } if (rc != BitmapSuccess) { if (short_name) { *************** *** 490,500 **** sprintf(gszMsgBox, "Cannot import XPixmap file '%s'.", rest); } else { ! sprintf(gszMsgBox, "Cannot import XPixmap file '%s'.", file_name); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); importingFile = FALSE; return; } - obj_ptr = CreateXPmObj(image_w, image_h, w, h, pixmap, image, bitmap, bitmap_image, ncolors, chars_per_pixel, first_pixel_is_bg, color_char, --- 502,512 ---- sprintf(gszMsgBox, "Cannot import XPixmap file '%s'.", rest); } else { ! sprintf(gszMsgBox, "Cannot import XPixmap file '%s'.", xpm_fname); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + if (remote_file) unlink(tmp_fname); importingFile = FALSE; return; } obj_ptr = CreateXPmObj(image_w, image_h, w, h, pixmap, image, bitmap, bitmap_image, ncolors, chars_per_pixel, first_pixel_is_bg, color_char, *************** *** 510,523 **** RedrawColorWindow(); } ! if (!importFromLibrary) SetCurImportDir(file_name); ! if (short_name) { ! sprintf(s, "XPixmap file (%1dx%1d) '%s' imported.", image_w, image_h, ! rest); ! } else { ! sprintf(s, "XPixmap file (%1dx%1d) '%s' imported.", image_w, image_h, ! file_name); ! } ! Msg(s); importingFile = FALSE; } --- 522,531 ---- RedrawColorWindow(); } ! if (!importFromLibrary && !remote_file) SetCurImportDir(xpm_fname); ! sprintf(gszMsgBox, "XPixmap file (%1dx%1d) '%s' imported.", image_w, image_h, ! short_name ? rest : xpm_fname); ! Msg(gszMsgBox); ! if (remote_file) unlink(tmp_fname); importingFile = FALSE; } *************** *** 526,537 **** int Embed; { ! char file_name[MAXPATHLENGTH+1], s[MAXPATHLENGTH+1], *rest; char **lines=NULL, write_date[32]; int rc, short_name, num_lines, epsf_level, image_w, image_h; float llx, lly, urx, ury; ! Pixmap bitmap; XImage *image=NULL; XEvent ev; ! struct ObjRec *obj_ptr; MakeQuiescent(); --- 534,546 ---- int Embed; { ! char eps_fname[MAXPATHLENGTH+1], *rest=NULL, tmp_fname[MAXPATHLENGTH+1]; char **lines=NULL, write_date[32]; int rc, short_name, num_lines, epsf_level, image_w, image_h; + int remote_file=FALSE; float llx, lly, urx, ury; ! Pixmap bitmap=None; XImage *image=NULL; XEvent ev; ! struct ObjRec *obj_ptr=NULL; MakeQuiescent(); *************** *** 538,541 **** --- 547,551 ---- importingFile = TRUE; + *eps_fname = *tmp_fname = '\0'; if (importFromLibrary) { char name[MAXSTRING+1], path[MAXSTRING+1]; *************** *** 546,560 **** return; } ! sprintf(s, "%s/%s", path, name); } else if (SelectFileNameToImport("Please select an EPS file to IMPORT...", ! EPSF_FILE_EXT, s) == INVALID) { importingFile = FALSE; return; ! } else if (FileIsRemote(s)) { ! MsgBox("Importing remote EPS file is not supported.", TOOL_NAME, INFO_MB); ! importingFile = FALSE; ! return; ! } XSync(mainDisplay, False); if (XCheckMaskEvent(mainDisplay, ExposureMask, &ev)) { --- 556,584 ---- return; } ! sprintf(eps_fname, "%s/%s", path, name); } else if (SelectFileNameToImport("Please select an EPS file to IMPORT...", ! EPSF_FILE_EXT, eps_fname) == INVALID) { importingFile = FALSE; return; ! } else if (FileIsRemote(eps_fname)) { ! int is_html=FALSE; + if (!Embed) { + sprintf(gszMsgBox, "%s. %s?", + "Importing (linking to) a remote EPS file is not supported", + "Would you like to embed the EPS file instead"); + if (MsgBox(gszMsgBox, TOOL_NAME, YNC_MB) != MB_ID_YES) { + importingFile = FALSE; + return; + } + Embed = TRUE; + } + if (!DownloadRemoteFile(eps_fname, NULL, NULL, &is_html, tmp_fname, + NULL, 0) || *tmp_fname == '\0') { + importingFile = FALSE; + return; + } + remote_file = TRUE; + } XSync(mainDisplay, False); if (XCheckMaskEvent(mainDisplay, ExposureMask, &ev)) { *************** *** 561,572 **** ExposeEventHandler (&ev, TRUE); } - strcpy(file_name, s); - SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); ! rc = MyReadEPSFile(file_name, &image_w, &image_h, &bitmap, &image, ! &num_lines, &lines, &epsf_level, &llx, &lly, &urx, &ury, write_date); ! if ((short_name=IsPrefix(bootDir, file_name, &rest))) ++rest; if (rc != BitmapSuccess) { SetDefaultCursor(mainWindow); --- 585,599 ---- ExposeEventHandler (&ev, TRUE); } SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); ! rc = MyReadEPSFile(remote_file ? tmp_fname : eps_fname, &image_w, &image_h, ! &bitmap, &image, &num_lines, &lines, &epsf_level, ! &llx, &lly, &urx, &ury, write_date); ! if (remote_file) { ! short_name = FALSE; ! } else { ! if ((short_name=IsPrefix(bootDir, eps_fname, &rest))) ++rest; ! } if (rc != BitmapSuccess) { SetDefaultCursor(mainWindow); *************** *** 575,581 **** sprintf(gszMsgBox, "Cannot import EPS file '%s'.", rest); } else { ! sprintf(gszMsgBox, "Cannot import EPS file '%s'.", file_name); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); importingFile = FALSE; return; --- 602,609 ---- sprintf(gszMsgBox, "Cannot import EPS file '%s'.", rest); } else { ! sprintf(gszMsgBox, "Cannot import EPS file '%s'.", eps_fname); } MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + if (remote_file) unlink(tmp_fname); importingFile = FALSE; return; *************** *** 587,592 **** num_lines, lines, epsf_level, &llx, &lly, &urx, &ury, write_date); } else { ! obj_ptr = CreateEPSObj(file_name, image_w, image_h, bitmap, image, ! num_lines, lines, epsf_level, &llx, &lly, &urx, &ury, write_date); } saveEPSLines = FALSE; --- 615,621 ---- num_lines, lines, epsf_level, &llx, &lly, &urx, &ury, write_date); } else { ! obj_ptr = CreateEPSObj(remote_file ? tmp_fname : eps_fname, ! image_w, image_h, bitmap, image, num_lines, lines, epsf_level, ! &llx, &lly, &urx, &ury, write_date); } saveEPSLines = FALSE; *************** *** 598,603 **** ShowCursor(); - PlaceTopObj(obj_ptr); AddObj(NULL, topObj, obj_ptr); SelectTopObj(); --- 627,632 ---- ShowCursor(); AddObj(NULL, topObj, obj_ptr); + PlaceTopObj(obj_ptr); SelectTopObj(); *************** *** 606,617 **** justDupped = FALSE; ! if (!importFromLibrary) SetCurImportDir(file_name); ! if (short_name) { ! sprintf(s, "EPS file '%s' imported.", rest); ! } else { ! sprintf(s, "EPS file '%s' imported.", file_name); ! } ! Msg(s); importingFile = FALSE; } --- 635,643 ---- justDupped = FALSE; ! if (!importFromLibrary && !remote_file) SetCurImportDir(eps_fname); ! sprintf(gszMsgBox, "EPS file '%s' imported.", short_name ? rest : eps_fname); ! Msg(gszMsgBox); ! if (remote_file) unlink(tmp_fname); importingFile = FALSE; } *************** *** 726,738 **** void ImportGIFFile() { ! char file_name[MAXPATHLENGTH+1], *rest; char szGifPath[MAXPATHLENGTH+1]; ! int rc, ncolors, chars_per_pixel, *pixels, short_name; ! int first_pixel_is_bg, image_w, image_h, w, h; Pixmap pixmap=None, bitmap=None; XImage *image=NULL, *bitmap_image=NULL; ! char *color_char, **color_str, *xpm_data=NULL; XEvent ev; ! struct ObjRec *obj_ptr; MakeQuiescent(); --- 752,764 ---- void ImportGIFFile() { ! char file_name[MAXPATHLENGTH+1], *rest=NULL, tmp_fname[MAXPATHLENGTH+1]; char szGifPath[MAXPATHLENGTH+1]; ! int rc, ncolors, chars_per_pixel, *pixels=NULL, short_name; ! int first_pixel_is_bg, image_w, image_h, w, h, remote_file=FALSE; Pixmap pixmap=None, bitmap=None; XImage *image=NULL, *bitmap_image=NULL; ! char *color_char=NULL, **color_str=NULL, *xpm_data=NULL; XEvent ev; ! struct ObjRec *obj_ptr=NULL; MakeQuiescent(); *************** *** 739,742 **** --- 765,769 ---- importingFile = TRUE; + *szGifPath = *tmp_fname = '\0'; if (importFromLibrary) { char name[MAXSTRING+1], path[MAXSTRING+1]; *************** *** 753,759 **** return; } else if (FileIsRemote(szGifPath)) { ! MsgBox("Importing remote GIF file is not supported.", TOOL_NAME, INFO_MB); ! importingFile = FALSE; ! return; } XSync(mainDisplay, False); --- 780,791 ---- return; } else if (FileIsRemote(szGifPath)) { ! int is_html=FALSE; ! ! if (!DownloadRemoteFile(szGifPath, NULL, NULL, &is_html, tmp_fname, NULL, ! 0) || *tmp_fname == '\0') { ! importingFile = FALSE; ! return; ! } ! remote_file = TRUE; } XSync(mainDisplay, False); *************** *** 764,773 **** SetWatchCursor(mainWindow); SaveStatusStrings(); ! rc = ConvertGifToXpm(szGifPath, file_name); RestoreStatusStrings(); SetDefaultCursor(mainWindow); ShowCursor(); ! if (!rc) return; ! SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); --- 796,808 ---- SetWatchCursor(mainWindow); SaveStatusStrings(); ! rc = ConvertGifToXpm(remote_file ? tmp_fname : szGifPath, file_name); RestoreStatusStrings(); SetDefaultCursor(mainWindow); ShowCursor(); ! if (!rc) { ! if (remote_file) unlink(tmp_fname); ! importingFile = FALSE; ! return; ! } SetWatchCursor(drawWindow); SetWatchCursor(mainWindow); *************** *** 778,782 **** ShowCursor(); ! if ((short_name=IsPrefix(bootDir, szGifPath, &rest))) ++rest; if (rc != BitmapSuccess) { sprintf(gszMsgBox, "Cannot import GIFs file '%s'.", --- 813,821 ---- ShowCursor(); ! if (remote_file) { ! short_name = FALSE; ! } else { ! if ((short_name=IsPrefix(bootDir, szGifPath, &rest))) ++rest; ! } if (rc != BitmapSuccess) { sprintf(gszMsgBox, "Cannot import GIFs file '%s'.", *************** *** 783,786 **** --- 822,826 ---- (short_name ? rest : szGifPath)); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + if (remote_file) unlink(tmp_fname); importingFile = FALSE; unlink(file_name); *************** *** 801,805 **** RedrawColorWindow(); } ! if (!importFromLibrary) SetCurImportDir(szGifPath); if (short_name) { --- 841,845 ---- RedrawColorWindow(); } ! if (!importFromLibrary && !remote_file) SetCurImportDir(szGifPath); if (short_name) { *************** *** 811,814 **** --- 851,855 ---- } Msg(gszMsgBox); + if (remote_file) unlink(tmp_fname); importingFile = FALSE; } *************** *** 963,978 **** char *psz_path; { ! char szTop[MAXSTRING+1]; char szOtherPath[MAXPATHLENGTH+1], szXpmPath[MAXPATHLENGTH+1]; ! int rc, ncolors, chars_per_pixel, *pixels, short_name; ! int first_pixel_is_bg, image_w, image_h, w, h; Pixmap pixmap=None, bitmap=None; XImage *image=NULL, *bitmap_image=NULL; ! char *color_char, **color_str, *xpm_data=NULL, *rest; ! struct ObjRec *obj_ptr; XEvent ev; importingFile = TRUE; ! if (psz_path != NULL) { UtilStrCpyN(szOtherPath, sizeof(szOtherPath), psz_path); --- 1004,1019 ---- char *psz_path; { ! char szTop[MAXSTRING+1], tmp_fname[MAXPATHLENGTH+1]; char szOtherPath[MAXPATHLENGTH+1], szXpmPath[MAXPATHLENGTH+1]; ! int rc, ncolors, chars_per_pixel, *pixels=NULL, short_name=FALSE; ! int first_pixel_is_bg, image_w, image_h, w, h, remote_file=FALSE; Pixmap pixmap=None, bitmap=None; XImage *image=NULL, *bitmap_image=NULL; ! char *color_char=NULL, **color_str=NULL, *xpm_data=NULL, *rest=NULL; ! struct ObjRec *obj_ptr=NULL; XEvent ev; importingFile = TRUE; ! *szOtherPath = *tmp_fname = '\0'; if (psz_path != NULL) { UtilStrCpyN(szOtherPath, sizeof(szOtherPath), psz_path); *************** *** 994,1002 **** return FALSE; } else if (FileIsRemote(szOtherPath)) { ! sprintf(gszMsgBox, "Importing remote %s file is not supported.", ! pii->name); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! importingFile = FALSE; ! return FALSE; } XSync(mainDisplay, False); --- 1035,1046 ---- return FALSE; } else if (FileIsRemote(szOtherPath)) { ! int is_html=FALSE; ! ! if (!DownloadRemoteFile(szOtherPath, NULL, NULL, &is_html, tmp_fname, ! NULL, 0) || *tmp_fname == '\0') { ! importingFile = FALSE; ! return FALSE; ! } ! remote_file = TRUE; } XSync(mainDisplay, False); *************** *** 1008,1012 **** SetWatchCursor(mainWindow); SaveStatusStrings(); ! rc = ConvertAnyToXpm(pii, szOtherPath, szXpmPath); RestoreStatusStrings(); SetDefaultCursor(mainWindow); --- 1052,1056 ---- SetWatchCursor(mainWindow); SaveStatusStrings(); ! rc = ConvertAnyToXpm(pii, remote_file ? tmp_fname : szOtherPath, szXpmPath); RestoreStatusStrings(); SetDefaultCursor(mainWindow); *************** *** 1022,1026 **** ShowCursor(); ! if ((short_name=IsPrefix(bootDir, szOtherPath, &rest))) ++rest; if (rc != BitmapSuccess) { sprintf(gszMsgBox, "Cannot import %s file '%s'.", --- 1066,1074 ---- ShowCursor(); ! if (remote_file) { ! short_name = FALSE; ! } else { ! if ((short_name=IsPrefix(bootDir, szOtherPath, &rest))) ++rest; ! } if (rc != BitmapSuccess) { sprintf(gszMsgBox, "Cannot import %s file '%s'.", *************** *** 1027,1030 **** --- 1075,1079 ---- pii->name, (short_name ? rest : szOtherPath)); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + if (remote_file) unlink(tmp_fname); importingFile = FALSE; unlink(szXpmPath); *************** *** 1044,1048 **** SetFileModified(TRUE); justDupped = FALSE; ! if (!importFromLibrary) SetCurImportDir(szOtherPath); sprintf(gszMsgBox, "%s file (%1dx%1d) '%s' imported.", pii->name, --- 1093,1097 ---- SetFileModified(TRUE); justDupped = FALSE; ! if (!importFromLibrary && !remote_file) SetCurImportDir(szOtherPath); sprintf(gszMsgBox, "%s file (%1dx%1d) '%s' imported.", pii->name, *************** *** 1053,1056 **** --- 1102,1106 ---- RedrawColorWindow(); } + if (remote_file) unlink(tmp_fname); importingFile = FALSE; *************** *** 1147,1153 **** { char szTop[MAXSTRING+1], cmd[MAXSTRING<<1], *psz=NULL; ! char gif_fname[MAXPATHLENGTH+1], name[MAXSTRING]; int i=0, import_other_index=0, rc=0, placed=FALSE; ! int ltx=0, lty=0, rbx=0, rby=0; XEvent ev; struct ImportInfoRec ii; --- 1197,1203 ---- { char szTop[MAXSTRING+1], cmd[MAXSTRING<<1], *psz=NULL; ! char gif_fname[MAXPATHLENGTH+1], name[MAXSTRING], tmp_fname[MAXPATHLENGTH+1]; int i=0, import_other_index=0, rc=0, placed=FALSE; ! int ltx=0, lty=0, rbx=0, rby=0, remote_file=FALSE; XEvent ev; struct ImportInfoRec ii; *************** *** 1162,1165 **** --- 1212,1216 ---- sprintf(szTop, "Please select an animated GIF file to IMPORT..."); importingFile = TRUE; + *gif_fname = *tmp_fname = '\0'; if (importFromLibrary) { char name[MAXSTRING+1], dir_name[MAXSTRING+1]; *************** *** 1174,1182 **** return; } else if (FileIsRemote(gif_fname)) { ! sprintf(gszMsgBox, ! "Importing remote animated GIF file is not supported."); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! importingFile = FALSE; ! return; } XSync(mainDisplay, False); --- 1225,1236 ---- return; } else if (FileIsRemote(gif_fname)) { ! int is_html=FALSE; ! ! if (!DownloadRemoteFile(gif_fname, NULL, NULL, &is_html, tmp_fname, NULL, ! 0) || *tmp_fname == '\0') { ! importingFile = FALSE; ! return; ! } ! remote_file = TRUE; } XSync(mainDisplay, False); *************** *** 1186,1190 **** /* explode the animated GIF file into parts */ InitGifToXpm(); ! sprintf(cmd, "%s %s", gifAnimExplodeCmd, gif_fname); if (!ExecuteCmd(cmd)) { sprintf(gszMsgBox, "Fail to execute '%s'.\n\nAnimated GIF not imported!", --- 1240,1245 ---- /* explode the animated GIF file into parts */ InitGifToXpm(); ! sprintf(cmd, "%s %s", gifAnimExplodeCmd, ! remote_file ? tmp_fname : gif_fname); if (!ExecuteCmd(cmd)) { sprintf(gszMsgBox, "Fail to execute '%s'.\n\nAnimated GIF not imported!", *************** *** 1191,1194 **** --- 1246,1250 ---- cmd); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + if (remote_file) unlink(tmp_fname); importingFile = FALSE; return; *************** *** 1196,1203 **** /* determine how many to import */ *name = '\0'; ! if ((psz=UtilStrRChr(gif_fname, '/')) != NULL) { strcpy(name, ++psz); } else { ! strcpy(name, gif_fname); } /* pick a GIF import filter */ --- 1252,1259 ---- /* determine how many to import */ *name = '\0'; ! if ((psz=UtilStrRChr(remote_file ? tmp_fname : gif_fname, '/')) != NULL) { strcpy(name, ++psz); } else { ! strcpy(name, remote_file ? tmp_fname : gif_fname); } /* pick a GIF import filter */ *************** *** 1211,1214 **** --- 1267,1271 ---- case MB_ID_YES: if ((import_other_index=SelectAnImportFilter(NULL)) == INVALID) { + if (remote_file) unlink(tmp_fname); importingFile = FALSE; return; *************** *** 1218,1221 **** --- 1275,1279 ---- } if (pii == NULL) { + if (remote_file) unlink(tmp_fname); importingFile = FALSE; return; *************** *** 1235,1238 **** --- 1293,1297 ---- break; case MB_ID_CANCEL: + if (remote_file) unlink(tmp_fname); importingFile = FALSE; return; *************** *** 1261,1264 **** --- 1320,1330 ---- if (!UtilPathExists(part_fname)) { /* got all the GIF parts */ + if (i == 0) { + sprintf(gszMsgBox, "Cannot import GIF file '%s'. %s '%s' %s.", + part_fname, "Please make sure that you can write to the", + bootDir, "directory"); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + break; + } break; } *************** *** 1318,1321 **** --- 1384,1388 ---- if (topSel == NULL) { RestoreStatusStrings(); + if (remote_file) unlink(tmp_fname); return; } *************** *** 1353,1357 **** SetFileModified(TRUE); HighLightForward(); ! if (!importFromLibrary) SetCurImportDir(gif_fname); if (colorLayers && needToRedrawColorWindow) { RedrawColorWindow(); --- 1420,1424 ---- SetFileModified(TRUE); HighLightForward(); ! if (!importFromLibrary && !remote_file) SetCurImportDir(gif_fname); if (colorLayers && needToRedrawColorWindow) { RedrawColorWindow(); *************** *** 1365,1368 **** --- 1432,1436 ---- } RestoreStatusStrings(); + if (remote_file) unlink(tmp_fname); } *** mainloop.c.orig Wed Jan 13 14:21:49 1999 --- mainloop.c Wed Jan 13 14:21:49 1999 *************** *** 416,423 **** } } ! ! if (recursive && (XCheckMaskEvent(mainDisplay, ExposureMask, &ev) || ! XCheckMaskEvent(mainDisplay, VisibilityChangeMask, &ev))) { ! ExposeEventHandler(&ev, recursive); } } --- 416,424 ---- } } ! if (recursive) { ! while (XCheckMaskEvent(mainDisplay, ExposureMask, &ev) || ! XCheckMaskEvent(mainDisplay, VisibilityChangeMask, &ev)) { ! ExposeEventHandler(&ev, FALSE); ! } } } *** navigate.c.orig Wed Jan 13 14:21:50 1999 --- navigate.c Wed Jan 13 14:21:50 1999 *************** *** 132,135 **** --- 132,150 ---- } + static + int ParseWHSpecError(spec, psz_dup_spec, rc) + char *spec; + char *psz_dup_spec; + int rc; + { + if (!rc) { + sprintf(gszMsgBox, "Error in parsing '%s' for 2 values.", spec); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + } + UtilFree(psz_dup_spec); + + return rc; + } + int ParseWHSpec(spec, pnw, pnh) char *spec; *************** *** 136,140 **** int *pnw, *pnh; { ! char *psz_w=NULL, *psz_h=NULL, *psz_dup_spec=NULL; int w=0, h=0; --- 151,155 ---- int *pnw, *pnh; { ! char *psz_h=NULL, *psz_dup_spec=NULL; int w=0, h=0; *************** *** 143,165 **** if ((psz_dup_spec=UtilStrDup(spec)) == NULL) return FailAllocMessage(); ! if ((psz_w=strtok(psz_dup_spec, " xX,\t\n\r")) == NULL || ! sscanf(psz_w, "%d", &w) != 1) { ! sprintf(gszMsgBox, "Error in parsing '%s' for 2 values.", spec); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! free(psz_dup_spec); ! return FALSE; } ! psz_h = strtok(NULL, " xX,\t\n\r"); ! if (psz_h == NULL) { ! sprintf(gszMsgBox, "Error in parsing '%s' for 2 values.", spec); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! free(psz_dup_spec); ! return FALSE; } ! if (sscanf(psz_h, "%d", &h) != 1) { ! sprintf(gszMsgBox, "Error in parsing '%s' for 2 values.", spec); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! free(psz_dup_spec); ! return FALSE; } if (pnw != NULL) *pnw = w; --- 158,177 ---- if ((psz_dup_spec=UtilStrDup(spec)) == NULL) return FailAllocMessage(); ! UtilStrLower(psz_dup_spec); ! if ((psz_h=strchr(psz_dup_spec, 'x')) == NULL) { ! if ((psz_h=strchr(psz_dup_spec, ' ')) == NULL) { ! return ParseWHSpecError(spec, psz_dup_spec, FALSE); ! } ! *psz_h++ = '\0'; ! } else { ! *psz_h++ = '\0'; } ! UtilTrimBlanks(psz_dup_spec); ! UtilTrimBlanks(psz_h); ! if (!GetDimension(psz_dup_spec, FALSE, &w)) { ! return ParseWHSpecError(spec, psz_dup_spec, FALSE); } ! if (!GetDimension(psz_h, FALSE, &h)) { ! return ParseWHSpecError(spec, psz_dup_spec, FALSE); } if (pnw != NULL) *pnw = w; *** page.c.orig Wed Jan 13 14:21:51 1999 --- page.c Wed Jan 13 14:21:51 1999 *************** *** 927,933 **** } ! int GetDimension(Spec, NumPixels) char *Spec; ! int *NumPixels; { char *c_ptr; --- 927,933 ---- } ! int GetDimension(Spec, nNonPosReturnOK, pnNumPixels) char *Spec; ! int nNonPosReturnOK, *pnNumPixels; { char *c_ptr; *************** *** 939,944 **** *c_ptr = '\0'; val = atof(Spec) * ((double)PIX_PER_INCH); ! *NumPixels = round(val); ! if (*NumPixels <= 0) return FALSE; } else if ((c_ptr=strstr(Spec, "cm")) != NULL || (c_ptr=strstr(Spec, "Cm")) != NULL || --- 939,944 ---- *c_ptr = '\0'; val = atof(Spec) * ((double)PIX_PER_INCH); ! *pnNumPixels = round(val); ! if (!nNonPosReturnOK && *pnNumPixels <= 0) return FALSE; } else if ((c_ptr=strstr(Spec, "cm")) != NULL || (c_ptr=strstr(Spec, "Cm")) != NULL || *************** *** 946,953 **** *c_ptr = '\0'; val = atof(Spec) * ((double)ONE_CM); ! *NumPixels = round(val); ! if (*NumPixels <= 0) return FALSE; ! } else if (sscanf(Spec, "%d", NumPixels) != 1) { return FALSE; } return TRUE; --- 946,955 ---- *c_ptr = '\0'; val = atof(Spec) * ((double)ONE_CM); ! *pnNumPixels = round(val); ! if (!nNonPosReturnOK && *pnNumPixels <= 0) return FALSE; ! } else if (sscanf(Spec, "%d", pnNumPixels) != 1) { return FALSE; + } else { + if (!nNonPosReturnOK && *pnNumPixels <= 0) return FALSE; } return TRUE; *************** *** 981,986 **** *c_ptr = '\0'; UtilTrimBlanks(&c_ptr[3]); ! if (GetDimension(Spec, &w_in_pixel) && ! GetDimension(&c_ptr[3], &h_in_pixel)) { onePageWidth = w_in_pixel; onePageHeight = h_in_pixel; --- 983,988 ---- *c_ptr = '\0'; UtilTrimBlanks(&c_ptr[3]); ! if (GetDimension(Spec, FALSE, &w_in_pixel) && ! GetDimension(&c_ptr[3], FALSE, &h_in_pixel)) { onePageWidth = w_in_pixel; onePageHeight = h_in_pixel; *** setup.c.orig Wed Jan 13 14:21:53 1999 --- setup.c Wed Jan 13 14:21:53 1999 *************** *** 272,279 **** char *psz=XGetAtomName(mainDisplay, pXEvent->xclient.message_type); ! if (strcmp("WM_PROTOCOLS", psz) == 0 && pXEvent->xclient.data.l[0] == protocolAtom) { return TRUE; } } return FALSE; --- 272,283 ---- char *psz=XGetAtomName(mainDisplay, pXEvent->xclient.message_type); ! if (psz == NULL) { ! /* this should not happen, but just in case */ ! } else if (strcmp("WM_PROTOCOLS", psz) == 0 && pXEvent->xclient.data.l[0] == protocolAtom) { + XFree((void*)psz); return TRUE; } + if (psz != NULL) XFree((void*)psz); } return FALSE; *************** *** 616,620 **** register int i; int configure=FALSE; - char *c_ptr, msg[MAXSTRING]; if (inSlideShow && input->type == KeyPress) { --- 620,623 ---- *************** *** 660,666 **** (int)(input->xclient.data.s[2])); } else { c_ptr = XGetAtomName(mainDisplay, input->xclient.message_type); ! if (strcmp("WM_MOVED", c_ptr) == 0) { configure = TRUE; } else if (strcmp("WM_PROTOCOLS", c_ptr) == 0 && --- 663,673 ---- (int)(input->xclient.data.s[2])); } else { + char *c_ptr=NULL; + c_ptr = XGetAtomName(mainDisplay, input->xclient.message_type); ! if (c_ptr == NULL) { ! /* this should not happen, but just in case */ ! } else if (strcmp("WM_MOVED", c_ptr) == 0) { configure = TRUE; } else if (strcmp("WM_PROTOCOLS", c_ptr) == 0 && *************** *** 696,704 **** } } else { ! sprintf(msg, "mainWindow ClientMessage: '%s'.", c_ptr); ! Msg(msg); } } - XFree((void*)c_ptr); } --- 703,711 ---- } } else { ! sprintf(gszMsgBox, "mainWindow ClientMessage: '%s'.", c_ptr); ! Msg(gszMsgBox); } + if (c_ptr != NULL) XFree((void*)c_ptr); } } *** special.c.orig Wed Jan 13 14:21:54 1999 --- special.c Wed Jan 13 14:21:54 1999 *************** *** 516,523 **** UpdTextBBox(name_attr->obj); } - PlaceTopObj(obj_ptr); AssignNewObjIds(obj_ptr); AddObj(NULL, topObj, obj_ptr); AdjObjBBox(obj_ptr); SelectTopObj(); --- 516,523 ---- UpdTextBBox(name_attr->obj); } AssignNewObjIds(obj_ptr); AddObj(NULL, topObj, obj_ptr); AdjObjBBox(obj_ptr); + PlaceTopObj(obj_ptr); SelectTopObj(); *************** *** 1449,1455 **** ClearAndRedrawDrawWindow(); } else { ! struct AttrRec *attr_ptr; int saved_history_depth=historyDepth; if (user_placement) { if ((attr_ptr=FindAttrWithName(obj_ptr, "name=", --- 1449,1457 ---- ClearAndRedrawDrawWindow(); } else { ! struct AttrRec *attr_ptr=NULL; int saved_history_depth=historyDepth; + AdjObjBBox(obj_ptr); + AddObj(NULL, topObj, obj_ptr); if (user_placement) { if ((attr_ptr=FindAttrWithName(obj_ptr, "name=", *************** *** 1466,1471 **** AssignNewObjIds(obj_ptr); } - AdjObjBBox(obj_ptr); - AddObj(NULL, topObj, obj_ptr); numRedrawBBox = 0; obj_ptr->tmp_parent = NULL; --- 1468,1471 ---- *** stream.c.orig Wed Jan 13 14:21:56 1999 --- stream.c Wed Jan 13 14:21:56 1999 *************** *** 165,168 **** --- 165,169 ---- static char *gppszValidImageContentType[] = { "image/jpeg", "JPEG-dither", /* only knows about JPEG movie */ + "image/jpg", "JPEG-dither", /* only knows about JPEG movie */ NULL }; *** text.c.orig Wed Jan 13 14:21:57 1999 --- text.c Wed Jan 13 14:21:57 1999 *************** *** 540,543 **** --- 540,544 ---- ShowTextSize(); ShowCurFont(); + if (!textHighlight) CurFontMsg(FALSE, TRUE); } if (pStrSeg->underline_on != curUnderlineOn) { *************** *** 1152,1156 **** colorIndex = obj_ptr->color; ShowTextRelatedInfo(); ! CurFontMsg(); ResetOnCursorKey(FALSE); --- 1153,1157 ---- colorIndex = obj_ptr->color; ShowTextRelatedInfo(); ! CurFontMsg(FALSE, TRUE); ResetOnCursorKey(FALSE); *************** *** 1371,1375 **** NewCurText(); RedrawCurText(); ! CurFontMsg(); PrepareToReplaceAnObj(curTextObj); } --- 1372,1376 ---- NewCurText(); RedrawCurText(); ! CurFontMsg(FALSE, TRUE); PrepareToReplaceAnObj(curTextObj); } *************** *** 3315,3322 **** static ! void ReadTextSetFontStyleSzUnit(font_str, sb_font_str, font, style, sz_unit, size, dpi, pn_double_byte, pn_cur_sb_font, pn_cur_db_font) char *font_str, *sb_font_str; ! int font, style, sz_unit, size, dpi; int *pn_double_byte, *pn_cur_sb_font, *pn_cur_db_font; /* --- 3316,3323 ---- static ! void ReadTextSetFontStyleSzUnit(font_str, sb_font_str, style, sz_unit, size, dpi, pn_double_byte, pn_cur_sb_font, pn_cur_db_font) char *font_str, *sb_font_str; ! int style, sz_unit, size, dpi; int *pn_double_byte, *pn_cur_sb_font, *pn_cur_db_font; /* *************** *** 3352,3395 **** */ if (PRTGIF) { ! if (fileVersion <= 29) { ! curFont = *pn_cur_sb_font = font; ! } else { ! curFont = GetFontIndex(font_str, style, FALSE); if (*pn_double_byte) { ! *pn_cur_db_font = curFont; ! *pn_cur_sb_font = GetFontIndex(sb_font_str, style, FALSE); } } ! } else { ! if (fileVersion <= 29) { ! curFont = *pn_cur_sb_font = font; ! } else { ! curFont = GetFontIndex(font_str, style, TRUE); ! if (curFont == INVALID) { ! sprintf(gszMsgBox, ! "Cannot find screen font for '%s'.", font_str); TwoLineMsg(gszMsgBox, " Use Times instead."); SetFileModified(TRUE); ! curFont = FONT_TIM; ! if (*pn_double_byte) { ! /* ! * curFont would have been the double-byte font. ! * But since it can't be found and Times is used, it should ! * not be double-byte any more. ! */ ! *pn_double_byte = FALSE; ! } } - if (*pn_double_byte) { - *pn_cur_db_font = curFont; - *pn_cur_sb_font = GetFontIndex(sb_font_str, style, TRUE); - if (*pn_cur_sb_font == INVALID) { - sprintf(gszMsgBox, "Cannot find screen font for '%s'.", - sb_font_str); - TwoLineMsg(gszMsgBox, " Use Times instead."); - SetFileModified(TRUE); - *pn_cur_sb_font = FONT_TIM; - } - } } } --- 3353,3388 ---- */ if (PRTGIF) { ! curFont = GetFontIndex(font_str, style, FALSE); ! if (*pn_double_byte) { ! *pn_cur_db_font = curFont; ! *pn_cur_sb_font = GetFontIndex(sb_font_str, style, FALSE); ! } ! } else { ! curFont = GetFontIndex(font_str, style, TRUE); ! if (curFont == INVALID) { ! sprintf(gszMsgBox, ! "Cannot find screen font for '%s'.", font_str); ! TwoLineMsg(gszMsgBox, " Use Times instead."); ! SetFileModified(TRUE); ! curFont = FONT_TIM; if (*pn_double_byte) { ! /* ! * curFont would have been the double-byte font. ! * But since it can't be found and Times is used, it should ! * not be double-byte any more. ! */ ! *pn_double_byte = FALSE; } } ! if (*pn_double_byte) { ! *pn_cur_db_font = curFont; ! *pn_cur_sb_font = GetFontIndex(sb_font_str, style, TRUE); ! if (*pn_cur_sb_font == INVALID) { ! sprintf(gszMsgBox, "Cannot find screen font for '%s'.", ! sb_font_str); TwoLineMsg(gszMsgBox, " Use Times instead."); SetFileModified(TRUE); ! *pn_cur_sb_font = FONT_TIM; } } } *************** *** 3952,3955 **** --- 3945,3950 ---- pStrSeg->underline_on = curUnderlineOn; strcpy(pStrSeg->color_str, color_str); + pStrSeg->asc = canvasFontAsc; + pStrSeg->des = canvasFontDes; } FreeStrList(pStr); *************** *** 3980,3986 **** pStrSeg->underline_on = curUnderlineOn; strcpy(pStrSeg->color_str, color_str); } - pStrSeg->asc = canvasFontAsc; - pStrSeg->des = canvasFontDes; if (!PRTGIF) { RecalcMetricsInfo rmi; --- 3975,3981 ---- pStrSeg->underline_on = curUnderlineOn; strcpy(pStrSeg->color_str, color_str); + pStrSeg->asc = canvasFontAsc; + pStrSeg->des = canvasFontDes; } if (!PRTGIF) { RecalcMetricsInfo rmi; *************** *** 4591,4595 **** if (fileVersion <= 36) { /* set curFont, curStyle, and curSzUnit */ ! ReadTextSetFontStyleSzUnit(font_str, sb_font_str, font, style, sz_unit, size, dpi, &double_byte, &cur_sb_font, &cur_db_font); } else { --- 4586,4593 ---- if (fileVersion <= 36) { /* set curFont, curStyle, and curSzUnit */ ! if (fileVersion <= 29) { ! GetCompatibleFontName(font, style, font_str); ! } ! ReadTextSetFontStyleSzUnit(font_str, sb_font_str, style, sz_unit, size, dpi, &double_byte, &cur_sb_font, &cur_db_font); } else { *************** *** 5817,5821 **** --- 5815,5829 ---- changed = FALSE; } else { + int saved_double_byte=INVALID; + + if (lWhich == PROP_MASK_TEXT_FONT && + curStrBlock->seg->double_byte != IsFontDoubleByte(nValue)) { + saved_double_byte = curStrBlock->seg->double_byte; + curStrBlock->seg->double_byte = IsFontDoubleByte(nValue); + } changed = SetStrSegProperty(lWhich, nValue, curStrBlock->seg); + if (!changed && saved_double_byte != INVALID) { + curStrBlock->seg->double_byte = saved_double_byte; + } } } else { *************** *** 5827,5831 **** --- 5835,5849 ---- changed = FALSE; } else if (textCurIndex == 0 && curStrBlock->seg->dyn_str.sz == 1) { + int saved_double_byte=INVALID; + + if (lWhich == PROP_MASK_TEXT_FONT && + curStrBlock->seg->double_byte != IsFontDoubleByte(nValue)) { + saved_double_byte = curStrBlock->seg->double_byte; + curStrBlock->seg->double_byte = IsFontDoubleByte(nValue); + } changed = SetStrSegProperty(lWhich, nValue, curStrBlock->seg); + if (!changed && saved_double_byte != INVALID) { + curStrBlock->seg->double_byte = saved_double_byte; + } } else { changed = ChangeEditTextPropertyAtCursor(lWhich, nValue); *************** *** 5841,5844 **** --- 5859,5863 ---- if (changed) { EndChangeCurText(); + CurFontMsg(TRUE, TRUE); SetFileModified(TRUE); } *** xprtfltr.c.orig Wed Jan 13 14:22:00 1999 --- xprtfltr.c Wed Jan 13 14:22:00 1999 *************** *** 323,326 **** --- 323,327 ---- } } else { + UtilTrimBlanks(psz); nOK = LoadSharedLib(psz); } *** font.e.orig Wed Jan 13 14:22:01 1999 --- font.e Wed Jan 13 14:22:01 1999 *************** *** 139,143 **** int MustFind)); extern void PrTgifInitBaseFonts ARGS_DECL((void)); ! extern void CurFontMsg ARGS_DECL((void)); extern void DumpEightBitFontInfo ARGS_DECL((FILE *)); --- 139,144 ---- int MustFind)); extern void PrTgifInitBaseFonts ARGS_DECL((void)); ! extern void CurFontMsg ARGS_DECL((int nShowInMsgWindow, ! int nShowInStatusWindow)); extern void DumpEightBitFontInfo ARGS_DECL((FILE *)); *************** *** 181,184 **** --- 182,189 ---- extern void CleanUpFonts ARGS_DECL((void)); + extern void VerifyCompatibleFontIndex ARGS_DECL((int*)); + extern void GetCompatibleFontName ARGS_DECL((int old_font_index, int style, + char *font_str)); + #ifdef _INCLUDE_FROM_FONT_C_ #undef extern *** page.e.orig Wed Jan 13 14:22:02 1999 --- page.e Wed Jan 13 14:22:02 1999 *************** *** 62,66 **** extern void SpecifyDrawingSize ARGS_DECL((void)); extern void PrintOnePage ARGS_DECL((void)); ! extern int GetDimension ARGS_DECL((char*, int*)); extern int SetPaperSize ARGS_DECL((char *)); extern void SpecifyPaperSize ARGS_DECL((void)); --- 62,66 ---- extern void SpecifyDrawingSize ARGS_DECL((void)); extern void PrintOnePage ARGS_DECL((void)); ! extern int GetDimension ARGS_DECL((char*, int, int*)); extern int SetPaperSize ARGS_DECL((char *)); extern void SpecifyPaperSize ARGS_DECL((void)); *** patchlvl.h.orig Wed Jan 13 14:22:03 1999 --- patchlvl.h Wed Jan 13 14:22:03 1999 *************** *** 35,39 **** #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 3 #endif /*_TGIF_PATCHLEVEL_H_*/ --- 35,39 ---- #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 4 #endif /*_TGIF_PATCHLEVEL_H_*/ *** tgifdefs.h.orig Wed Jan 13 14:22:04 1999 --- tgifdefs.h Wed Jan 13 14:22:04 1999 *************** *** 94,98 **** #ifdef __NetBSD__ ! /* Do we need anything here? */ #endif /* __NetBSD__ */ --- 94,104 ---- #ifdef __NetBSD__ ! #if !defined(__ELF__) && !defined(mips) ! #define _DL_EXPORT_UNDERSCORE ! #else /* ~(!defined(__ELF__) && !defined(mips)) */ ! #ifdef _DL_EXPORT_UNDERSCORE ! #undef _DL_EXPORT_UNDERSCORE ! #endif /* _DL_EXPORT_UNDERSCORE */ ! #endif /* !defined(__ELF__) && !defined(mips) */ #endif /* __NetBSD__ */ *** Imakefile.orig Wed Jan 13 14:22:05 1999 --- Imakefile Wed Jan 13 14:22:05 1999 *************** *** 53,57 **** $(MOREDEFINES) ! TGIFVERSION = 4.0.3 XCOMM Things to try to add to the DEFINES line above: --- 53,57 ---- $(MOREDEFINES) ! TGIFVERSION = 4.0.4 XCOMM Things to try to add to the DEFINES line above: *** HISTORY.orig Wed Jan 13 14:22:06 1999 --- HISTORY Wed Jan 13 14:22:06 1999 *************** *** 1,2 **** --- 1,18 ---- + -----------------------> tgif-4.0.3 => tgif-4.0.4 <----------------------- + Here's a short list of added features/bug fixes. + + 1) Fix a seg fault bug when Tgif.ShowFontSizeInPoints is used. Thanks to + Levente NOVAK for pointing out this problem + (and a few other problems). + 2) Allow URL's while importing XPM/XBM/GIF and other files (to specify an + URL, type '/' in the file dialogbox before typing the URL). + 3) Fix problems reading files generated by tgif-2.13J and tgif-2.16J. + Thanks to TSUKADA Satoru for the patch. + 4) Use auto _DL_EXPORT_UNDERSCORE determination on NetBSD. + Thanks to Dan McMahill for the patch. + 5) Accept "cm" and "in" specifications in SpecifyAnArc() and + SizeToGivenWidthHeight(). Thanks to Levente NOVAK + for pointing out the problems. + -----------------------> tgif-4.0.2 => tgif-4.0.3 <----------------------- Here's a short list of added features/bug fixes. *** make.comdep.orig Wed Jan 13 14:22:06 1999 --- make.comdep Wed Jan 13 14:22:07 1999 *************** *** 17,23 **** arc$(O) : tgifdefs.h const.h tgif_dbg.h types.h arc.e attr.e auxtext.e \ choice.e cmd.e color.e cursor.e cutpaste.e dialog.e drawing.e \ ! dup.e file.e grid.e mainloop.e mark.e msg.e obj.e pattern.e \ ! poly.e ps.e raster.e rect.e ruler.e select.e setup.e \ ! special.e spline.e util.e xpixmap.e attr$(O) : tgifdefs.h const.h tgif_dbg.h types.h attr.e auxtext.e \ button.e choice.e choose.e cmd.e color.e cursor.e dialog.e \ --- 17,23 ---- arc$(O) : tgifdefs.h const.h tgif_dbg.h types.h arc.e attr.e auxtext.e \ choice.e cmd.e color.e cursor.e cutpaste.e dialog.e drawing.e \ ! dup.e file.e grid.e mainloop.e mark.e msg.e obj.e page.e \ ! pattern.e poly.e ps.e raster.e rect.e ruler.e select.e \ ! setup.e special.e spline.e util.e xpixmap.e attr$(O) : tgifdefs.h const.h tgif_dbg.h types.h attr.e auxtext.e \ button.e choice.e choose.e cmd.e color.e cursor.e dialog.e \ *** Tgif.tmpl-netbsd.orig Wed Jan 13 14:22:07 1999 --- Tgif.tmpl-netbsd Wed Jan 13 14:22:08 1999 *************** *** 57,61 **** -DTEXT_FILE_EXT=\"txt\" -DPIN_FILE_EXT=\"pin\" MISCDEFINES = -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT ! MOREDEFINES = -D_DL_EXPORT_UNDERSCORE XCOMM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --- 57,61 ---- -DTEXT_FILE_EXT=\"txt\" -DPIN_FILE_EXT=\"pin\" MISCDEFINES = -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT ! MOREDEFINES = XCOMM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^