*** arc.c.orig Thu Jan 30 19:17:52 1997 --- arc.c Thu Jan 30 19:17:53 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/arc.c,v 3.9 1996/10/28 00:02:56 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/arc.c,v 3.10 1997/01/30 19:24:51 william Exp $"; #endif *************** *** 1921,1924 **** --- 1921,1927 ---- s = FindChar ((int)'[', aux); s++; + if (!bufferAsFileForWhiteBoard) { + fgets(inbuf, MAXSTRING, FP); + } #else /* ~_TGIF_WB */ *** box.c.orig Thu Jan 30 19:17:54 1997 --- box.c Thu Jan 30 19:17:54 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/box.c,v 3.5 1996/10/30 18:23:47 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/box.c,v 3.6 1997/01/30 19:24:51 william Exp $"; #endif *************** *** 811,814 **** --- 811,817 ---- s = FindChar ((int)'[', aux); s++; + if (!bufferAsFileForWhiteBoard) { + fgets(inbuf, MAXSTRING, FP); + } #else /* ~_TGIF_WB */ *** choice.c.orig Thu Jan 30 19:17:55 1997 --- choice.c Thu Jan 30 19:17:55 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/choice.c,v 3.7 1997/01/29 16:06:15 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/choice.c,v 3.8 1997/01/30 05:52:48 william Exp $"; #endif *************** *** 37,40 **** --- 37,41 ---- #include #include + #include #include "const.h" #include "types.h" *** drawing.c.orig Thu Jan 30 19:17:56 1997 --- drawing.c Thu Jan 30 19:17:57 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/drawing.c,v 3.16 1996/12/26 05:29:30 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/drawing.c,v 3.17 1997/01/30 03:59:40 william Exp $"; #endif *************** *** 1764,1767 **** --- 1764,1769 ---- } else if (strcmp(name, "FindAgain()") == 0) { FindAgain(); + } else if (strcmp(name, "CurrentVersionInfo()") == 0) { + CurrentVersionInfo(); } } *** edit.c.orig Thu Jan 30 19:17:58 1997 --- edit.c Thu Jan 30 19:17:58 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/edit.c,v 3.17 1996/12/26 06:06:14 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/edit.c,v 3.18 1997/01/31 00:09:54 william Exp $"; #endif *************** *** 3316,3320 **** { int wrapped=FALSE; - struct PageRec *page_ptr=NULL; struct ObjRec *obj_ptr=NULL; struct ObjRec *found_obj=NULL; --- 3316,3319 ---- *** eps.c.orig Thu Jan 30 19:17:59 1997 --- eps.c Thu Jan 30 19:17:59 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/eps.c,v 3.6 1996/11/03 20:07:41 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/eps.c,v 3.8 1997/01/30 04:33:44 william Exp $"; #endif *************** *** 493,512 **** tiff_sz = ReadDoubleWord(&buf[0x18]); ! *pnPreviewOK = ConvertTiffToXbm(fp, tiff_offset, tiff_sz, xbm_fname); ! ! if (fseek(fp, 0x1e, SEEK_SET) != 0) { ! return ErrorInGetTiffEPSIInfo(fp, NULL, NULL); ! } ! sprintf(pszEPS, "%sTgifXXXXXX", TMP_DIR); ! mktemp(pszEPS); ! unlink(pszEPS); ! if ((eps_fp=fopen(pszEPS, "w")) == NULL) { ! return ErrorInGetTiffEPSIInfo(fp, NULL, NULL); ! } ! if (*pnPreviewOK && !XbmToPreviewBitmap(eps_fp, xbm_fname)) { ! *pnPreviewOK = FALSE; } - unlink(xbm_fname); - *xbm_fname = '\0'; /* copy the EPS content from the original file to the new EPS file */ --- 493,515 ---- tiff_sz = ReadDoubleWord(&buf[0x18]); ! if (cmdLineDosEpsFilter) { ! *pnPreviewOK = TRUE; ! } else { ! *pnPreviewOK = ConvertTiffToXbm(fp, tiff_offset, tiff_sz, xbm_fname); ! if (fseek(fp, 0x1e, SEEK_SET) != 0) { ! return ErrorInGetTiffEPSIInfo(fp, NULL, NULL); ! } ! sprintf(pszEPS, "%sTgifXXXXXX", TMP_DIR); ! mktemp(pszEPS); ! unlink(pszEPS); ! if ((eps_fp=fopen(pszEPS, "w")) == NULL) { ! return ErrorInGetTiffEPSIInfo(fp, NULL, NULL); ! } ! if (*pnPreviewOK && !XbmToPreviewBitmap(eps_fp, xbm_fname)) { ! *pnPreviewOK = FALSE; ! } ! unlink(xbm_fname); ! *xbm_fname = '\0'; } /* copy the EPS content from the original file to the new EPS file */ *************** *** 526,582 **** } } ! if ((int)fwrite(gszMsgBox, sizeof(char), bytes_to_read, eps_fp) <= 0) { ! writeFileFailed = TRUE; ! return ErrorInGetTiffEPSIInfo(fp, eps_fp, pszEPS); } eps_sz -= bytes_to_read; } ! fclose(fp); ! fclose(eps_fp); return fopen(pszEPS, "r"); } static ! int DoMyReadEPSFile (file_name, image_w, image_h, bitmap, image, num_lines, ! epsflines, epsf_level, llx, lly, urx, ury, write_date) ! char * file_name; ! int * image_w, * image_h, * num_lines, * epsf_level; ! Pixmap * bitmap; ! XImage * * image; ! char * * * epsflines, * write_date; ! float * llx, * lly, * urx, * ury; { ! register struct LineRec * line_ptr, * next_line; ! register int i; ! char * line=NULL, * c_ptr, loc_time[MAXSTRING+1]; ! char tiff_eps_fname[MAXPATHLENGTH+1]; ! int first_line=TRUE; ! int boundingbox_found=FALSE, preview_found=FALSE, found; ! int boundingbox_atend=FALSE, tiff_preview_ok=FALSE; ! FILE * fp; ! struct stat stat_buf; ! ! *image_w = *image_h = *num_lines = *epsf_level = 0; ! *bitmap = None; ! *image = NULL; ! *epsflines = NULL; ! ! if ((fp = fopen (file_name, "r")) == NULL) return (BitmapOpenFailed); ! CleanUpLines (); *tiff_eps_fname = '\0'; ! while ((line=UtilGetALine(fp)) != NULL) ! { int need_to_free_line=TRUE; ! if (first_line) ! { if (line[0] == ((char)0xc5) && line[1] == ((char)0xd0) && line[2] == ((char)0xd3) && line[3] == ((char)0xc6) && line[4] == ((char)0x1e) && line[5] == '\0') { free(line); ! if ((fp=GetTiffEPSIInfo(fp, tiff_eps_fname, &tiff_preview_ok)) == ! NULL || (line=UtilGetALine(fp)) == NULL) { sprintf(gszMsgBox, "Fail to parse Windows EPS file '%s'.", file_name); --- 529,620 ---- } } ! if (cmdLineDosEpsFilter) { ! if ((int)fwrite(gszMsgBox, sizeof(char), bytes_to_read, stdout) <= 0) { ! writeFileFailed = TRUE; ! return ErrorInGetTiffEPSIInfo(fp, eps_fp, pszEPS); ! } ! } else { ! if ((int)fwrite(gszMsgBox, sizeof(char), bytes_to_read, eps_fp) <= 0) { ! writeFileFailed = TRUE; ! return ErrorInGetTiffEPSIInfo(fp, eps_fp, pszEPS); ! } } eps_sz -= bytes_to_read; } ! if (fp != NULL) fclose(fp); ! if (eps_fp != NULL) fclose(eps_fp); ! if (cmdLineDosEpsFilter) { ! return ((FILE*)TRUE); ! } return fopen(pszEPS, "r"); } static ! int DoMyReadEPSFile(file_name, pn_image_w, pn_image_h, p_bitmap, p_image, ! pn_num_lines, ppsz_epsflines, pn_epsf_level, pf_llx, pf_lly, ! pf_urx, pf_ury, psz_write_date) ! char *file_name; ! int *pn_image_w, *pn_image_h, *pn_num_lines, *pn_epsf_level; ! Pixmap *p_bitmap; ! XImage **p_image; ! char ***ppsz_epsflines, *psz_write_date; ! float *pf_llx, *pf_lly, *pf_urx, *pf_ury; { ! register struct LineRec *line_ptr, *next_line; ! register int i; ! char *line=NULL, *c_ptr, loc_time[MAXSTRING+1]; ! char tiff_eps_fname[MAXPATHLENGTH+1]; ! int first_line=TRUE, image_w=0, image_h=0, epsf_level=0; ! int boundingbox_found=FALSE, preview_found=FALSE, found; ! int boundingbox_atend=FALSE, tiff_preview_ok=FALSE; ! FILE *fp=NULL; ! struct stat stat_buf; ! Pixmap bitmap=None; ! XImage *image=NULL; ! float llx=0.0, lly=0.0, urx=0.0, ury=0.0; ! ! if (!cmdLineDosEpsFilter) { ! *pn_image_w = *pn_image_h = *pn_num_lines = *pn_epsf_level = 0; ! *p_bitmap = None; ! *p_image = NULL; ! *pn_num_lines = 0; ! *ppsz_epsflines = NULL; ! *pn_epsf_level = 0; ! *pf_llx = llx; *pf_lly = lly; *pf_urx = urx; *pf_ury = ury; ! *psz_write_date = '\0'; ! } ! if ((fp=fopen(file_name, "r")) == NULL) return BitmapOpenFailed; ! CleanUpLines(); *tiff_eps_fname = '\0'; ! while ((line=UtilGetALine(fp)) != NULL) { int need_to_free_line=TRUE; ! if (first_line) { if (line[0] == ((char)0xc5) && line[1] == ((char)0xd0) && line[2] == ((char)0xd3) && line[3] == ((char)0xc6) && line[4] == ((char)0x1e) && line[5] == '\0') { free(line); ! if (cmdLineDosEpsFilter) { ! if ((fp=GetTiffEPSIInfo(fp, tiff_eps_fname, ! &tiff_preview_ok)) == NULL) { ! sprintf(gszMsgBox, "Fail to parse Windows EPS file '%s'.", ! file_name); ! if (PRTGIF || mainWindow==None) { ! fprintf(stderr, "%s\n", gszMsgBox); ! } else { ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! } ! if (fp != NULL) fclose(fp); ! if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines(); ! return BitmapFileInvalid; ! } ! fp = NULL; ! return BitmapSuccess; ! } else if ((fp=GetTiffEPSIInfo(fp, tiff_eps_fname, ! &tiff_preview_ok)) == NULL || ! (line=UtilGetALine(fp)) == NULL) { sprintf(gszMsgBox, "Fail to parse Windows EPS file '%s'.", file_name); *************** *** 593,659 **** } first_line = FALSE; ! if (line[0] != '%' || line[1] != '!') ! { free(line); ! fclose (fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines (); ! return (BitmapFileInvalid); } - AddLine (line); need_to_free_line = FALSE; ! } ! else if ((!boundingbox_found || boundingbox_atend) && ! strncmp (line, "%%BoundingBox:", 14) == 0) ! { ! if (sscanf (&(line[14]), "%f %f %f %f", llx, lly, urx, ury) == 4) boundingbox_found = TRUE; ! else if (!boundingbox_found) ! { ! c_ptr = FindChar ((int)'(', &(line[14])); ! if (strncmp (c_ptr, "atend)", 6) == 0) boundingbox_atend = TRUE; } ! } ! else if (!preview_found && strncmp (line, "%%BeginPreview:", 15) == 0) ! { ! int bps; ! char *preview_line; ! if (sscanf (&(line[15]), "%d %d %d", image_w, image_h, &bps) != 3) ! { MsgBox("Invalid preview box in EPS file.", TOOL_NAME, INFO_MB); if (need_to_free_line) free(line); ! fclose (fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines (); ! return (BitmapFileInvalid); ! } ! else if (bps != 1) ! { sprintf(gszMsgBox, "%1d bits per sample preview not supported.", bps); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); if (need_to_free_line) free(line); ! fclose (fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines (); ! return (BitmapFileInvalid); } preview_found = TRUE; ! if (!ReadPreviewBitmap (fp, *image_w, *image_h, bps, bitmap, image)) ! { MsgBox("Invalid preview box in EPS file.", TOOL_NAME, INFO_MB); if (need_to_free_line) free(line); ! fclose (fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines (); ! return (BitmapFileInvalid); } found = FALSE; ! while ((preview_line=UtilGetALine(fp)) != NULL) ! { ! if (strncmp (preview_line, "%%EndPreview", 12) == 0) ! { found = TRUE; free(preview_line); --- 631,691 ---- } first_line = FALSE; ! if (line[0] != '%' || line[1] != '!') { free(line); ! fclose(fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines(); ! return BitmapFileInvalid; ! } ! if (cmdLineDosEpsFilter) { ! printf("%s\n", line); ! } else { ! AddLine(line); } need_to_free_line = FALSE; ! } else if (!cmdLineDosEpsFilter && (!boundingbox_found || ! boundingbox_atend) && strncmp(line, "%%BoundingBox:", 14) == 0) { ! if (sscanf(&(line[14]), "%f %f %f %f", &llx, &lly, &urx, &ury) == 4) { boundingbox_found = TRUE; ! } else if (!boundingbox_found) { ! c_ptr = FindChar((int)'(', &(line[14])); ! if (strncmp(c_ptr, "atend)", 6) == 0) { boundingbox_atend = TRUE; + } } ! } else if (!cmdLineDosEpsFilter && !preview_found && ! strncmp(line, "%%BeginPreview:", 15) == 0) { ! int bps=1; ! char *preview_line; ! if (sscanf(&(line[15]), "%d %d %d", &image_w, &image_h, &bps) != 3) { MsgBox("Invalid preview box in EPS file.", TOOL_NAME, INFO_MB); if (need_to_free_line) free(line); ! fclose(fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines(); ! return BitmapFileInvalid; ! } else if (bps != 1) { sprintf(gszMsgBox, "%1d bits per sample preview not supported.", bps); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); if (need_to_free_line) free(line); ! fclose(fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines(); ! return BitmapFileInvalid; } preview_found = TRUE; ! if (!ReadPreviewBitmap(fp, image_w, image_h, bps, &bitmap, &image)) { MsgBox("Invalid preview box in EPS file.", TOOL_NAME, INFO_MB); if (need_to_free_line) free(line); ! fclose(fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines(); ! return BitmapFileInvalid; } found = FALSE; ! while ((preview_line=UtilGetALine(fp)) != NULL) { ! if (strncmp(preview_line, "%%EndPreview", 12) == 0) { found = TRUE; free(preview_line); *************** *** 662,690 **** free(preview_line); } ! if (!found) ! { MsgBox("Invalid preview box in EPS file.", TOOL_NAME, INFO_MB); if (need_to_free_line) free(line); ! if (*bitmap != None) ! { ! XFreePixmap (mainDisplay, *bitmap); ! *bitmap = None; } ! if (*image != NULL) ! { ! XDestroyImage (*image); ! *image = NULL; } ! fclose (fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines (); ! return (BitmapFileInvalid); } ! } ! else ! { ! if (line[0] == '%' && line[1] == '!') (*epsf_level)++; if (!stripEPSComments || line[0] != '%') { ! AddLine (line); need_to_free_line = FALSE; } --- 694,721 ---- free(preview_line); } ! if (!found) { MsgBox("Invalid preview box in EPS file.", TOOL_NAME, INFO_MB); if (need_to_free_line) free(line); ! if (bitmap != None) { ! XFreePixmap(mainDisplay, bitmap); ! bitmap = None; } ! if (image != NULL) { ! XDestroyImage(image); ! image = NULL; } ! fclose(fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! CleanUpLines(); ! return BitmapFileInvalid; } ! } else { ! if (line[0] == '%' && line[1] == '!') epsf_level++; if (!stripEPSComments || line[0] != '%') { ! if (cmdLineDosEpsFilter) { ! printf("%s\n", line); ! } else { ! AddLine(line); ! } need_to_free_line = FALSE; } *************** *** 692,748 **** if (need_to_free_line) free(line); } ! fclose (fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! if (!boundingbox_found) { ! sprintf(gszMsgBox, "%s '%s'.", ! "Can not find bounding box information in", file_name); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! if (*bitmap != None) { ! XFreePixmap(mainDisplay, *bitmap); ! *bitmap = None; ! } ! if (*image != NULL) { ! XDestroyImage(*image); ! *image = NULL; } ! CleanUpLines(); ! return BitmapFileInvalid; ! } ! if (*tiff_eps_fname != '\0' && !tiff_preview_ok) { ! sprintf(gszMsgBox, "%s '%s'.", ! "Unable to convert Windows EPS preview bitmap in", file_name); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! } ! if (stat(file_name, &stat_buf) == 0) { ! strcpy(loc_time, ctime (&(stat_buf.st_mtime))); ! loc_time[24] = '\0'; } else { ! strcpy(loc_time, "(unknown)"); ! } ! strcpy(write_date, loc_time); ! ! *epsflines = (char**)malloc(numLines*sizeof(char*)); ! if (*epsflines == NULL) FailAllocMessage(); ! *num_lines = numLines; ! ! for (i=0, line_ptr=topLine; line_ptr != NULL; line_ptr = next_line, i++) { ! next_line = line_ptr->next; ! (*epsflines)[i] = UtilStrDup(line_ptr->s); ! free(line_ptr->s); ! free(line_ptr); } topLine = botLine = NULL; numLines = 0; ! return (BitmapSuccess); } ! int MyReadEPSFile (file_name, image_w, image_h, bitmap, image, num_lines, epsflines, epsf_level, llx, lly, urx, ury, write_date) ! char * file_name; ! int * image_w, * image_h, * num_lines, * epsf_level; ! Pixmap * bitmap; ! XImage * * image; ! char * * * epsflines, * write_date; ! float * llx, * lly, * urx, * ury; { int rc; --- 723,792 ---- if (need_to_free_line) free(line); } ! if (fp != NULL) fclose(fp); if (*tiff_eps_fname != '\0') unlink(tiff_eps_fname); ! if (!cmdLineDosEpsFilter) { ! if (!boundingbox_found) { ! sprintf(gszMsgBox, "%s '%s'.", ! "Can not find bounding box information in", file_name); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! if (bitmap != None) { ! XFreePixmap(mainDisplay, bitmap); ! bitmap = None; ! } ! if (image != NULL) { ! XDestroyImage(image); ! image = NULL; ! } ! CleanUpLines(); ! return BitmapFileInvalid; ! } ! if (*tiff_eps_fname != '\0' && !tiff_preview_ok) { ! sprintf(gszMsgBox, "%s '%s'.", ! "Unable to convert Windows EPS preview bitmap in", file_name); ! MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); } ! if (stat(file_name, &stat_buf) == 0) { ! strcpy(loc_time, ctime (&(stat_buf.st_mtime))); ! loc_time[24] = '\0'; ! } else { ! strcpy(loc_time, "(unknown)"); ! } ! *pn_image_w = image_w; ! *pn_image_h = image_h; ! *p_bitmap = bitmap; ! *p_image = image; ! *pn_num_lines = numLines; ! *ppsz_epsflines = (char**)malloc(numLines*sizeof(char*)); ! if (*ppsz_epsflines == NULL) FailAllocMessage(); ! ! for (i=0, line_ptr=topLine; line_ptr != NULL; line_ptr = next_line, i++) { ! next_line = line_ptr->next; ! (*ppsz_epsflines)[i] = UtilStrDup(line_ptr->s); ! free(line_ptr->s); ! free(line_ptr); ! } ! *pn_epsf_level = epsf_level; ! *pf_llx = llx; *pf_lly = lly; *pf_urx = urx; *pf_ury = ury; ! strcpy(psz_write_date, loc_time); } else { ! for (i=0, line_ptr=topLine; line_ptr != NULL; line_ptr = next_line, i++) { ! next_line = line_ptr->next; ! free(line_ptr->s); ! free(line_ptr); ! } } topLine = botLine = NULL; numLines = 0; ! return BitmapSuccess; } ! int MyReadEPSFile(file_name, image_w, image_h, bitmap, image, num_lines, epsflines, epsf_level, llx, lly, urx, ury, write_date) ! char *file_name; ! int *image_w, *image_h, *num_lines, *epsf_level; ! Pixmap *bitmap; ! XImage **image; ! char ***epsflines, *write_date; ! float *llx, *lly, *urx, *ury; { int rc; *************** *** 1077,1082 **** int dx, dy, ltx, rby, x, y, tmp_x, tmp_y; ! tmp_dx = dx_psu / mtrx.dump_h_scale; /* tmp_dx = llx_psu */ ! tmp_dy = dy_psu / mtrx.dump_v_scale; /* tmp_dy = lly_psu */ dx = round(tmp_dx); dy = round(tmp_dy); --- 1121,1131 ---- int dx, dy, ltx, rby, x, y, tmp_x, tmp_y; ! if (llx_psu == 0 && lly_psu == 0) { ! tmp_dx = dx_psu / scale; ! tmp_dy = dy_psu / scale; ! } else { ! tmp_dx = dx_psu / mtrx.dump_h_scale; /* tmp_dx = llx_psu */ ! tmp_dy = dy_psu / mtrx.dump_v_scale; /* tmp_dy = lly_psu */ ! } dx = round(tmp_dx); dy = round(tmp_dy); *************** *** 1089,1095 **** tmp_x += ObjPtr->x; tmp_y += ObjPtr->y; ! x_psu = (float)(((float)tmp_x) * mtrx.dump_h_scale); ! y_psu = (float)(((float)psDotsPerInch)*psYOff[pageStyle] - ! (((float)tmp_y) * mtrx.dump_v_scale)); } --- 1138,1150 ---- tmp_x += ObjPtr->x; tmp_y += ObjPtr->y; ! if (llx_psu == 0 && lly_psu == 0) { ! x_psu = (float)(((float)tmp_x) * scale); ! y_psu = (float)(((float)psDotsPerInch)*psYOff[pageStyle] - ! (((float)tmp_y) * scale)); ! } else { ! x_psu = (float)(((float)tmp_x) * mtrx.dump_h_scale); ! y_psu = (float)(((float)psDotsPerInch)*psYOff[pageStyle] - ! (((float)tmp_y) * mtrx.dump_v_scale)); ! } } *** exec.c.orig Thu Jan 30 19:18:01 1997 --- exec.c Thu Jan 30 19:18:01 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/exec.c,v 3.11 1996/11/03 20:03:56 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/exec.c,v 3.12 1997/01/31 00:10:38 william Exp $"; #endif *************** *** 4720,4724 **** struct AttrRec *attr_ptr=NULL; struct ObjRec *attr_owner_obj=NULL; - struct stat stat_buf; FILE *fp; --- 4720,4723 ---- *** file.c.orig Thu Jan 30 19:18:03 1997 --- file.c Thu Jan 30 19:18:03 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/file.c,v 3.17 1996/12/17 21:25:41 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/file.c,v 3.21 1997/01/30 19:12:47 william Exp $"; #endif *************** *** 201,204 **** --- 201,207 ---- int cmdLineDumpURL=FALSE; int cmdLineDumpURLWithHeader=FALSE; + int cmdLineDumpURLShowStatus=FALSE; + + int cmdLineDosEpsFilter=FALSE; int showPageInEPS=FALSE; *************** *** 213,216 **** --- 216,221 ---- int dumpOneFilePerPage=FALSE; + int bufferAsFileForWhiteBoard=FALSE; + static int importingPageNum=(-1); static char importingPageName[MAXSTRING+1]; *************** *** 296,321 **** static ! int ExecuteCmd (cmd) ! char * cmd; { char tmp_str[MAXSTRING+1]; ! FILE * fp; sprintf(gszMsgBox, "Executing '%s'...", cmd); SetStringStatus(gszMsgBox); ! XSync(mainDisplay, False); ! if ((fp=(FILE*)popen(cmd, "r")) == NULL) return (FALSE); ! while (fgets (tmp_str, MAXSTRING, fp) != NULL) ! { ! if (PRTGIF) ! fprintf (stderr, "%s", tmp_str); ! else ! Msg (tmp_str); ! sleep (5); } ! pclose (fp); SetStringStatus("...Done"); ! return (TRUE); } --- 301,326 ---- static ! int ExecuteCmd(cmd) ! char *cmd; { char tmp_str[MAXSTRING+1]; ! FILE *fp; sprintf(gszMsgBox, "Executing '%s'...", cmd); SetStringStatus(gszMsgBox); ! if (!PRTGIF) XSync(mainDisplay, False); ! if ((fp=(FILE*)popen(cmd, "r")) == NULL) return FALSE; ! while (fgets(tmp_str, MAXSTRING, fp) != NULL) { ! if (PRTGIF) { ! fprintf(stderr, "%s", tmp_str); ! } else { ! Msg(tmp_str); ! } ! sleep(5); } ! pclose(fp); SetStringStatus("...Done"); ! return TRUE; } *************** *** 3173,3235 **** static ! void DumpAttrs (FP, AttrPtr) ! FILE * FP; ! register struct AttrRec * AttrPtr; { ! for ( ; AttrPtr != NULL; AttrPtr = AttrPtr->prev) ! { ! if (AttrPtr->shown) ! { if (!AttrPtr->nameshown && *AttrPtr->attr_name.s == '!' && ! strcmp(AttrPtr->attr_name.s, "!PAGE_NUM=") == 0) ! { ! if (pageLayoutMode == PAGE_STACK) ! { ! struct StrRec * s_ptr=AttrPtr->obj->detail.t->first; ! char * c_ptr; ! ! if (s_ptr != NULL && (c_ptr=strstr(s_ptr->dyn_str.s, ! "!(STACKED_PAGE_NUM)")) != NULL) ! { ! char saved_str[MAXSTRING+1], * c_ptr1; ! int len; ! ! strcpy (saved_str, s_ptr->dyn_str.s); ! sprintf (c_ptr, "%1d", printingPageNum); ! len = s_ptr->dyn_str.sz-1; ! c_ptr1 = &c_ptr[19]; ! c_ptr = &s_ptr->dyn_str.s[len]; ! while (*c_ptr1 != '\0') *c_ptr++ = *c_ptr1++; ! *c_ptr = '\0'; ! DumpTextObj (FP, AttrPtr->obj); ! DynStrSet (&s_ptr->dyn_str, saved_str); } ! else ! DumpTextObj (FP, AttrPtr->obj); ! } ! else ! { ! struct StrRec * s_ptr=AttrPtr->obj->detail.t->first; ! char * c_ptr; ! ! if (s_ptr != NULL) ! { ! char saved_str[MAXSTRING+1], * c_ptr1, * c_ptr2; ! int len; - strcpy (saved_str, s_ptr->dyn_str.s); - for (c_ptr=s_ptr->dyn_str.s; *c_ptr != '\0'; c_ptr++) - { if (*c_ptr == '!' && ! (strncmp (c_ptr, "!(TILED_PAGE_ROW)", 17) == 0 || ! strncmp (c_ptr, "!(TILED_PAGE_COL)", 17) == 0)) ! { ! if (strncmp (c_ptr, "!(TILED_PAGE_ROW)", 17) == 0) ! sprintf (c_ptr, "%1d", printingPageRow); ! else ! sprintf (c_ptr, "%1d", printingPageCol); ! len = strlen(c_ptr); ! c_ptr1 = &c_ptr[17]; ! c_ptr = c_ptr2 = &c_ptr[len]; while (*c_ptr1 != '\0') *c_ptr2++ = *c_ptr1++; *c_ptr2 = '\0'; --- 3178,3247 ---- static ! void DumpAttrs(FP, AttrPtr) ! FILE *FP; ! register struct AttrRec *AttrPtr; { ! for ( ; AttrPtr != NULL; AttrPtr=AttrPtr->prev) { ! if (AttrPtr->shown) { if (!AttrPtr->nameshown && *AttrPtr->attr_name.s == '!' && ! strcmp(AttrPtr->attr_name.s, "!PAGE_NUM=") == 0) { ! if (pageLayoutMode == PAGE_STACK) { ! struct StrRec *s_ptr=AttrPtr->obj->detail.t->first; ! char *c_ptr; ! ! if (s_ptr != NULL && (strstr(s_ptr->dyn_str.s, ! "!(STACKED_PAGE_NUM)") != NULL || ! strstr(s_ptr->dyn_str.s, ! "!(STACKED_NUM_PAGES)") != NULL)) { ! char *saved_str=UtilStrDup(s_ptr->dyn_str.s), *c_ptr1; ! int page_num_str_len=strlen("!(STACKED_PAGE_NUM)"); ! int num_pages_str_len=strlen("!(STACKED_NUM_PAGES)"); ! ! if (saved_str == NULL) FailAllocMessage(); ! while ((c_ptr=strstr(s_ptr->dyn_str.s, ! "!(STACKED_PAGE_NUM)")) != NULL) { ! c_ptr1 = &c_ptr[page_num_str_len]; ! sprintf(c_ptr, "%1d", printingPageNum); ! c_ptr = &c_ptr[strlen(c_ptr)]; ! while (*c_ptr1 != '\0') *c_ptr++ = *c_ptr1++; ! *c_ptr = '\0'; ! } ! while ((c_ptr=strstr(s_ptr->dyn_str.s, ! "!(STACKED_NUM_PAGES)")) != NULL) { ! c_ptr1 = &c_ptr[num_pages_str_len]; ! sprintf(c_ptr, "%1d", lastPageNum); ! c_ptr = &c_ptr[strlen(c_ptr)]; ! while (*c_ptr1 != '\0') *c_ptr++ = *c_ptr1++; ! *c_ptr = '\0'; ! } ! DumpTextObj(FP, AttrPtr->obj); ! DynStrSet(&s_ptr->dyn_str, saved_str); ! UtilFree(saved_str); ! } else { ! DumpTextObj(FP, AttrPtr->obj); } ! } else { ! /* pageLayoutMode == PAGE_TILE */ ! struct StrRec *s_ptr=AttrPtr->obj->detail.t->first; ! char *c_ptr; ! ! if (s_ptr != NULL) { ! char *saved_str, *c_ptr1, *c_ptr2; ! ! saved_str = UtilStrDup(s_ptr->dyn_str.s); ! if (saved_str == NULL) FailAllocMessage(); ! for (c_ptr=s_ptr->dyn_str.s; *c_ptr != '\0'; c_ptr++) { ! int len=strlen("!(TILED_PAGE_ROW)"); if (*c_ptr == '!' && ! (strncmp(c_ptr, "!(TILED_PAGE_ROW)", len) == 0 || ! strncmp(c_ptr, "!(TILED_PAGE_COL)", len) == 0)) { ! if (strncmp(c_ptr, "!(TILED_PAGE_ROW)", len) == 0) { ! sprintf(c_ptr, "%1d", printingPageRow); ! } else { ! sprintf(c_ptr, "%1d", printingPageCol); ! } ! c_ptr1 = &c_ptr[len]; ! c_ptr = c_ptr2 = &c_ptr[strlen(c_ptr)]; while (*c_ptr1 != '\0') *c_ptr2++ = *c_ptr1++; *c_ptr2 = '\0'; *************** *** 3237,3249 **** } } ! DumpTextObj (FP, AttrPtr->obj); ! DynStrSet (&s_ptr->dyn_str, saved_str); } - else - DumpTextObj (FP, AttrPtr->obj); } } - else - DumpTextObj (FP, AttrPtr->obj); } } --- 3249,3262 ---- } } ! DumpTextObj(FP, AttrPtr->obj); ! DynStrSet(&s_ptr->dyn_str, saved_str); ! UtilFree(saved_str); ! } else { ! DumpTextObj(FP, AttrPtr->obj); } } + } else { + DumpTextObj(FP, AttrPtr->obj); } } } *************** *** 3495,3557 **** static ! void DumpAttrsInAscii (FP, AttrPtr) ! FILE * FP; ! register struct AttrRec * AttrPtr; { ! for ( ; AttrPtr != NULL; AttrPtr = AttrPtr->prev) ! { ! if (AttrPtr->shown) ! { if (!AttrPtr->nameshown && *AttrPtr->attr_name.s == '!' && ! strcmp(AttrPtr->attr_name.s, "!PAGE_NUM=") == 0) ! { ! if (pageLayoutMode == PAGE_STACK) ! { ! struct StrRec * s_ptr=AttrPtr->obj->detail.t->first; ! char * c_ptr; ! ! if (s_ptr != NULL && (c_ptr=strstr(s_ptr->dyn_str.s, ! "!(STACKED_PAGE_NUM)")) != NULL) ! { ! char saved_str[MAXSTRING+1], * c_ptr1; ! int len; ! ! strcpy (saved_str, s_ptr->dyn_str.s); ! sprintf (c_ptr, "%1d", printingPageNum); ! len = s_ptr->dyn_str.sz-1; ! c_ptr1 = &c_ptr[19]; ! c_ptr = &s_ptr->dyn_str.s[len]; ! while (*c_ptr1 != '\0') *c_ptr++ = *c_ptr1++; ! *c_ptr = '\0'; ! DumpTextObjInAscii (FP, AttrPtr->obj); ! DynStrSet (&s_ptr->dyn_str, saved_str); } ! else ! DumpTextObjInAscii (FP, AttrPtr->obj); ! } ! else ! { ! struct StrRec * s_ptr=AttrPtr->obj->detail.t->first; ! char * c_ptr; ! if (s_ptr != NULL) ! { ! char saved_str[MAXSTRING+1], * c_ptr1, * c_ptr2; ! int len; - strcpy(saved_str, s_ptr->dyn_str.s); - for (c_ptr=s_ptr->dyn_str.s; *c_ptr != '\0'; c_ptr++) - { if (*c_ptr == '!' && ! (strncmp(c_ptr, "!(TILED_PAGE_ROW)", 17) == 0 || ! strncmp(c_ptr, "!(TILED_PAGE_COL)", 17) == 0)) ! { ! if (strncmp(c_ptr, "!(TILED_PAGE_ROW)", 17) == 0) sprintf(c_ptr, "%1d", printingPageRow); ! else sprintf(c_ptr, "%1d", printingPageCol); ! len = strlen(c_ptr); ! c_ptr1 = &c_ptr[17]; ! c_ptr = c_ptr2 = &c_ptr[len]; while (*c_ptr1 != '\0') *c_ptr2++ = *c_ptr1++; *c_ptr2 = '\0'; --- 3508,3576 ---- static ! void DumpAttrsInAscii(FP, AttrPtr) ! FILE *FP; ! register struct AttrRec *AttrPtr; { ! for ( ; AttrPtr != NULL; AttrPtr=AttrPtr->prev) { ! if (AttrPtr->shown) { if (!AttrPtr->nameshown && *AttrPtr->attr_name.s == '!' && ! strcmp(AttrPtr->attr_name.s, "!PAGE_NUM=") == 0) { ! if (pageLayoutMode == PAGE_STACK) { ! struct StrRec *s_ptr=AttrPtr->obj->detail.t->first; ! char *c_ptr; ! ! if (s_ptr != NULL && (strstr(s_ptr->dyn_str.s, ! "!(STACKED_PAGE_NUM)") != NULL || ! strstr(s_ptr->dyn_str.s, ! "!(STACKED_NUM_PAGES)") != NULL)) { ! char *saved_str=UtilStrDup(s_ptr->dyn_str.s), *c_ptr1; ! int page_num_str_len=strlen("!(STACKED_PAGE_NUM)"); ! int num_pages_str_len=strlen("!(STACKED_NUM_PAGES)"); ! ! if (saved_str == NULL) FailAllocMessage(); ! while ((c_ptr=strstr(s_ptr->dyn_str.s, ! "!(STACKED_PAGE_NUM)")) != NULL) { ! c_ptr1 = &c_ptr[page_num_str_len]; ! sprintf(c_ptr, "%1d", printingPageNum); ! c_ptr = &c_ptr[strlen(c_ptr)]; ! while (*c_ptr1 != '\0') *c_ptr++ = *c_ptr1++; ! *c_ptr = '\0'; ! } ! while ((c_ptr=strstr(s_ptr->dyn_str.s, ! "!(STACKED_NUM_PAGES)")) != NULL) { ! c_ptr1 = &c_ptr[num_pages_str_len]; ! sprintf(c_ptr, "%1d", lastPageNum); ! c_ptr = &c_ptr[strlen(c_ptr)]; ! while (*c_ptr1 != '\0') *c_ptr++ = *c_ptr1++; ! *c_ptr = '\0'; ! } ! DumpTextObjInAscii(FP, AttrPtr->obj); ! DynStrSet(&s_ptr->dyn_str, saved_str); ! UtilFree(saved_str); ! } else { ! DumpTextObjInAscii(FP, AttrPtr->obj); } ! } else { ! struct StrRec *s_ptr=AttrPtr->obj->detail.t->first; ! char *c_ptr; ! if (s_ptr != NULL) { ! char *saved_str, *c_ptr1, *c_ptr2; ! ! saved_str = UtilStrDup(s_ptr->dyn_str.s); ! if (saved_str == NULL) FailAllocMessage(); ! for (c_ptr=s_ptr->dyn_str.s; *c_ptr != '\0'; c_ptr++) { ! int len=strlen("!(TILED_PAGE_ROW)"); if (*c_ptr == '!' && ! (strncmp(c_ptr, "!(TILED_PAGE_ROW)", len) == 0 || ! strncmp(c_ptr, "!(TILED_PAGE_COL)", len) == 0)) { ! if (strncmp(c_ptr, "!(TILED_PAGE_ROW)", len) == 0) { sprintf(c_ptr, "%1d", printingPageRow); ! } else { sprintf(c_ptr, "%1d", printingPageCol); ! } ! c_ptr1 = &c_ptr[len]; ! c_ptr = c_ptr2 = &c_ptr[strlen(c_ptr)]; while (*c_ptr1 != '\0') *c_ptr2++ = *c_ptr1++; *c_ptr2 = '\0'; *************** *** 3559,3571 **** } } ! DumpTextObjInAscii (FP, AttrPtr->obj); ! DynStrSet (&s_ptr->dyn_str, saved_str); } - else - DumpTextObjInAscii (FP, AttrPtr->obj); } } - else - DumpTextObjInAscii (FP, AttrPtr->obj); } } --- 3578,3591 ---- } } ! DumpTextObjInAscii(FP, AttrPtr->obj); ! DynStrSet(&s_ptr->dyn_str, saved_str); ! UtilFree(saved_str); ! } else { ! DumpTextObjInAscii(FP, AttrPtr->obj); } } + } else { + DumpTextObjInAscii(FP, AttrPtr->obj); } } } *** ftp.c.orig Thu Jan 30 19:18:05 1997 --- ftp.c Thu Jan 30 19:18:05 1997 *************** *** 34,38 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/ftp.c,v 3.1 1996/11/29 23:54:19 william Exp $"; #endif --- 34,38 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/ftp.c,v 3.3 1997/01/30 05:55:03 william Exp $"; #endif *************** *** 50,56 **** --- 50,59 ---- #include #endif + #include #include "const.h" + #include "types.h" + #include "file.e" #ifndef _NO_EXTERN #include "ftp.e" *************** *** 209,212 **** --- 212,219 ---- if ((buf=(char*)realloc(buf, buf_sz)) == NULL) { fprintf(stderr, "Memory allocation failed.\n"); + if (PRTGIF && cmdLineDumpURL && cmdLineDumpURLShowStatus && + pn_buf_sz != NULL) { + fprintf(stderr, "\n"); + } return TG_REMOTE_STATUS_MEM; } *************** *** 219,226 **** --- 226,241 ---- free(buf); fprintf(stderr, "Network read error.\n"); + if (PRTGIF && cmdLineDumpURL && cmdLineDumpURLShowStatus && + pn_buf_sz != NULL) { + fprintf(stderr, "\n"); + } return TG_REMOTE_STATUS_READ; } else if (bytes_read < 0) { free(buf); fprintf(stderr, "Network error.\n"); + if (PRTGIF && cmdLineDumpURL && cmdLineDumpURLShowStatus && + pn_buf_sz != NULL) { + fprintf(stderr, "\n"); + } return TG_REMOTE_STATUS_NET; } *************** *** 232,235 **** --- 247,254 ---- if (buf != NULL) free(buf); ShowRemoteStatus("FTP: aborted by the user."); + if (PRTGIF && cmdLineDumpURL && cmdLineDumpURLShowStatus && + pn_buf_sz != NULL) { + fprintf(stderr, "\n"); + } return TG_REMOTE_STATUS_INTR; } else { *************** *** 239,242 **** --- 258,265 ---- sprintf(msg, "FTP: %1d bytes...", len); ShowRemoteStatus(msg); + if (PRTGIF && cmdLineDumpURL && cmdLineDumpURLShowStatus && + pn_buf_sz != NULL) { + fprintf(stderr, "FTP: %1d bytes...\r", len); + } buf[len] = '\0'; if (!ftpReadData) { *************** *** 264,267 **** --- 287,294 ---- } } while (!end_of_file); + if (PRTGIF && cmdLineDumpURL && cmdLineDumpURLShowStatus && + pn_buf_sz != NULL) { + fprintf(stderr, "\n"); + } if (debugFtp >= 2) fprintf(stderr, " rc = %1d in FtpDoRead().\n", rc); if (rc == 421) { *** grid.c.orig Thu Jan 30 19:18:06 1997 --- grid.c Thu Jan 30 19:18:06 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/grid.c,v 3.6 1996/11/02 23:35:06 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/grid.c,v 3.7 1997/01/29 22:41:56 william Exp $"; #endif *************** *** 587,590 **** --- 587,591 ---- if (*spec == '\0') return; if (SetUnit(spec)) { + RedrawRulers(); ShowUnitMsg(); SetFileModified(TRUE); *** help.c.orig Thu Jan 30 19:18:07 1997 --- help.c Thu Jan 30 19:18:07 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/help.c,v 3.1 1996/11/29 22:17:46 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/help.c,v 3.2 1997/01/30 03:59:40 william Exp $"; #endif *************** *** 45,48 **** --- 45,49 ---- #include "color.e" #include "dialog.e" + #include "file.e" #ifndef _NO_EXTERN #include "help.e" *************** *** 56,67 **** #define HELP_ABOUT 0 #define HELP_COPYRIGHT 1 ! #define MAXHELPS 2 int numHelp=MAXHELPS; char *helpMenuStr[] = { ! "About ", ! "Copyright ", NULL }; --- 57,70 ---- #define HELP_ABOUT 0 #define HELP_COPYRIGHT 1 + #define HELP_CURRENT 2 ! #define MAXHELPS 3 int numHelp=MAXHELPS; char *helpMenuStr[] = { ! "About ", ! "Copyright ", ! "CurrentVersionInfo ", NULL }; *************** *** 69,72 **** --- 72,76 ---- "Version information, where to send bug reports, etc.", "Copyright information", + "Find out what is the version number of the most recently released tgif", NULL }; *************** *** 143,146 **** --- 147,219 ---- } + void CurrentVersionInfo() + { + char tmp_fname[MAXPATHLENGTH+1], final_url[MAXPATHLENGTH+1]; + char current_url[MAXPATHLENGTH<<1]; + char *content_type=NULL, *page_spec=NULL; + int is_html=FALSE, rc=FALSE; + + *final_url = '\0'; + strcpy(current_url, currentReleaseURL); + rc = DownloadRemoteFile(current_url, &content_type, &page_spec, + &is_html, tmp_fname, final_url, sizeof(final_url)); + if (content_type != NULL) FreeRemoteBuf(content_type); + if (page_spec != NULL) UtilFree(page_spec); + if (rc) { + FILE *fp=fopen(tmp_fname, "r"); + char version_str[MAXPATHLENGTH<<1]; + + *version_str = '\0'; + if (fp == NULL) { + sprintf(gszMsgBox, "%s '%s' %s.\n\n%s %s %s.", + "Fail to open", tmp_fname, "for reading", + "Please view", currentReleaseURL, "with a web browser"); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + } else { + int len=strlen("The current release of tgif is"), scanning=TRUE; + char *buf; + + while (scanning && (buf=UtilGetALine(fp)) != NULL) { + if (strncmp(buf, "The current release of tgif is", len) == 0) { + char *buf1=UtilGetALine(fp); + + scanning = FALSE; + if (buf1 != NULL) { + char *version_ptr=strstr(buf1, "Version"), *c_ptr=NULL; + + if (version_ptr != NULL && + (c_ptr=strchr(version_ptr, '<')) != NULL) { + *c_ptr = '\0'; + strcpy(version_str, version_ptr); + *c_ptr = '<'; + } + UtilFree(buf1); + } + } + UtilFree(buf); + } + fclose(fp); + } + if (*version_str == '\0') { + sprintf(gszMsgBox, "%s '%s'.\n\n%s %s %s.", + "Fail to find version information in", currentReleaseURL, + "Please view", currentReleaseURL, "with a web browser"); + } else { + sprintf(gszMsgBox, "%s %s %s.\n\n%s %s %s.", + TOOL_NAME, "is currently at", version_str, + "For download information, please visit", + (*final_url=='\0' ? currentReleaseURL : final_url), + "with a web browser"); + } + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + } else { + sprintf(gszMsgBox, "%s '%s' %s.\n\n%s %s %s.", + "Cannot download", currentReleaseURL, "to get version information", + "Please view", currentReleaseURL, "with a web browser"); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + } + if (*tmp_fname != '\0') unlink(tmp_fname); + } + /* ----------------------- Init and Clean Up ----------------------- */ *************** *** 161,164 **** --- 234,238 ---- case HELP_ABOUT: About(); break; case HELP_COPYRIGHT: Copyright(); break; + case HELP_CURRENT: CurrentVersionInfo(); break; } } *** http.c.orig Thu Jan 30 19:18:09 1997 --- http.c Thu Jan 30 19:18:09 1997 *************** *** 34,38 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/http.c,v 3.4 1996/11/29 23:08:26 william Exp $"; #endif --- 34,38 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/http.c,v 3.6 1997/01/30 05:32:52 william Exp $"; #endif *************** *** 1009,1012 **** --- 1009,1080 ---- } + static + int GetContentLength(buf, pn_header_len) + char *buf; + int *pn_header_len; + { + char *c_ptr, *line_ptr=buf; + int content_len=(-1); + + c_ptr = strstr(line_ptr, "\r\n"); + if (c_ptr == NULL) { + for (c_ptr=strchr(line_ptr, '\n'); c_ptr != NULL; + c_ptr=strchr(line_ptr, '\n')) { + char *colon_ptr; + + if (c_ptr == line_ptr) { + *pn_header_len = ((&c_ptr[1]) - buf); + return (content_len==(-1) ? 0 : content_len); + } + *c_ptr = '\0'; + colon_ptr = strchr(line_ptr, ':'); + if (colon_ptr != NULL) { + *colon_ptr = '\0'; + if (UtilStrICmp(line_ptr, "Content-Length") == 0) { + char length_str[MAXSTRING]; + int len; + + UtilStrCpy(length_str, MAXSTRING-1, &colon_ptr[1]); + UtilTrimBlanks(length_str); + if (sscanf(length_str, "%d", &len) == 1) { + content_len = len; + } + } + *colon_ptr = ':'; + } + *c_ptr = '\n'; + line_ptr = (&c_ptr[1]); + } + } else { + for ( ; c_ptr != NULL; c_ptr=strstr(line_ptr, "\r\n")) { + char *colon_ptr; + + if (c_ptr == line_ptr) { + *pn_header_len = ((&c_ptr[2]) - buf); + return (content_len==(-1) ? 0 : content_len); + } + *c_ptr = '\0'; + colon_ptr = strchr(line_ptr, ':'); + if (colon_ptr != NULL) { + *colon_ptr = '\0'; + if (UtilStrICmp(line_ptr, "Content-Length") == 0) { + char length_str[MAXSTRING]; + int len; + + UtilStrCpy(length_str, MAXSTRING-1, &colon_ptr[1]); + UtilTrimBlanks(length_str); + if (sscanf(length_str, "%d", &len) == 1) { + content_len = len; + } + } + *colon_ptr = ':'; + } + *c_ptr = '\r'; + line_ptr = (&c_ptr[2]); + } + } + return (-1); + } + #define MIN_READ_SIZE 0x100 *************** *** 1016,1021 **** { int buf_sz=0x400, len=0, end_of_file=FALSE; ! int status=TG_REMOTE_STATUS_OK; ! char *buf=(char*)malloc(buf_sz*sizeof(char)), msg[40]; if (pn_buf_sz != NULL) *pn_buf_sz = 0; --- 1084,1089 ---- { int buf_sz=0x400, len=0, end_of_file=FALSE; ! int status=TG_REMOTE_STATUS_OK, content_len=(-1), header_len=0; ! char *buf=(char*)malloc(buf_sz*sizeof(char)), msg[MAXSTRING]; if (pn_buf_sz != NULL) *pn_buf_sz = 0; *************** *** 1056,1063 **** if (buf != NULL) free(buf); ShowRemoteStatus("HTTP: aborted by the user."); return TG_REMOTE_STATUS_INTR; } else { ! sprintf(msg, "HTTP: %1d bytes...", len); ShowRemoteStatus(msg); } } while (status == TG_REMOTE_STATUS_OK && !end_of_file); --- 1124,1151 ---- if (buf != NULL) free(buf); ShowRemoteStatus("HTTP: aborted by the user."); + if (PRTGIF && cmdLineDumpURL && cmdLineDumpURLShowStatus) { + fprintf(stderr, "\n"); + } return TG_REMOTE_STATUS_INTR; } else { ! if (status == TG_REMOTE_STATUS_OK && content_len == (-1)) { ! buf[len] = '\0'; ! content_len = GetContentLength(buf, &header_len); ! } ! if (content_len == (-1) || content_len == 0) { ! sprintf(msg, "HTTP: %1d bytes...", len); ! } else { ! sprintf(msg, "HTTP: %1d of %1d bytes...", len-header_len, ! content_len); ! } ShowRemoteStatus(msg); + if (PRTGIF && cmdLineDumpURL && cmdLineDumpURLShowStatus) { + if (content_len == (-1) || content_len == 0) { + fprintf(stderr, "HTTP: %1d bytes...\r", len); + } else { + fprintf(stderr, "HTTP: %1d of %1d bytes...\r", len-header_len, + content_len); + } + } } } while (status == TG_REMOTE_STATUS_OK && !end_of_file); *************** *** 1079,1082 **** --- 1167,1173 ---- } ShowRemoteStatus(msg); + if (PRTGIF && cmdLineDumpURL && cmdLineDumpURLShowStatus) { + fprintf(stderr, "\n"); + } return status; } *** imgproc.c.orig Thu Jan 30 19:18:10 1997 --- imgproc.c Thu Jan 30 19:18:10 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/imgproc.c,v 3.8 1996/10/28 01:38:34 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/imgproc.c,v 3.9 1997/01/30 06:03:16 william Exp $"; #endif *************** *** 3770,3774 **** XColor fg_xcolor, bg_xcolor, xcolor; int inside_flag=INSIDE_NONE, pixel; ! long red, green, blue; if (PointInRect(x, y, &gFgCombineBBox)) inside_flag |= INSIDE_FG; --- 3770,3774 ---- XColor fg_xcolor, bg_xcolor, xcolor; int inside_flag=INSIDE_NONE, pixel; ! long red=0L, green=0L, blue=0L; if (PointInRect(x, y, &gFgCombineBBox)) inside_flag |= INSIDE_FG; *** mainloop.c.orig Thu Jan 30 19:18:12 1997 --- mainloop.c Thu Jan 30 19:18:12 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/mainloop.c,v 3.7 1996/12/25 17:12:45 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/mainloop.c,v 3.8 1997/01/30 04:34:04 william Exp $"; #endif *************** *** 1131,1134 **** --- 1131,1142 ---- debugHttp = saved_http_debug; debugFtp = saved_ftp_debug; + } + + void DosEpsFilter(pszUrl) + char *pszUrl; + { + if (MyReadEPSFile(pszUrl, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL)) { + } } *** menu.c.orig Thu Jan 30 19:18:13 1997 --- menu.c Thu Jan 30 19:18:13 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/menu.c,v 3.3 1996/10/30 18:25:47 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/menu.c,v 3.4 1997/01/30 17:08:30 william Exp $"; #endif *************** *** 1158,1166 **** iconWindowCreated = FALSE; - if (((c_ptr = XGetDefault(mainDisplay,TOOL_NAME,"NoTgifIcon")) != NULL) - && (strcmp(c_ptr,"True") == 0 || strcmp(c_ptr,"true") == 0)) - return; if (((c_ptr = XGetDefault(mainDisplay,TOOL_NAME,"UseWMIconPixmap")) != NULL) ! && (strcmp(c_ptr,"True") == 0 || strcmp(c_ptr,"true") == 0)) return; --- 1158,1166 ---- iconWindowCreated = FALSE; if (((c_ptr = XGetDefault(mainDisplay,TOOL_NAME,"UseWMIconPixmap")) != NULL) ! && UtilStrICmp(c_ptr,"True") == 0) ! return; ! if (((c_ptr = XGetDefault(mainDisplay,TOOL_NAME,"NoTgifIcon")) != NULL) ! && UtilStrICmp(c_ptr,"True") == 0) return; *** msg.c.orig Thu Jan 30 19:18:14 1997 --- msg.c Thu Jan 30 19:18:14 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/msg.c,v 3.6 1996/12/26 06:19:28 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/msg.c,v 3.7 1997/01/30 04:03:48 william Exp $"; #endif *************** *** 926,929 **** --- 926,931 ---- fprintf (stderr, "\t[-text] \\\n"); fprintf (stderr, "\t[-raw[+h]] \\\n"); + fprintf (stderr, "\t[-dosepsfilter] \\\n"); + fprintf (stderr, "\t[-status] \\\n"); fprintf (stderr, "\t[-gray] \\\n"); fprintf (stderr, "\t[-color | -reqcolor] \\\n"); *************** *** 1021,1024 **** --- 1023,1030 ---- cmdLineDumpURL = TRUE; cmdLineDumpURLWithHeader = TRUE; + } else if (strcmp(*argv, "-dosepsfilter") == 0) { + cmdLineDosEpsFilter = TRUE; + } else if (strcmp(*argv, "-status") == 0) { + cmdLineDumpURLShowStatus = TRUE; } else if (strcmp(*argv, "-page") == 0) { argc--; argv++; *** oval.c.orig Thu Jan 30 19:18:16 1997 --- oval.c Thu Jan 30 19:18:16 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/oval.c,v 3.4 1996/10/16 19:15:05 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/oval.c,v 3.7 1997/01/31 00:08:33 william Exp $"; #endif *************** *** 264,288 **** } ! static float ovalXMag1=(float)0.0, ovalYMag1=(float)0.0; ! static float ovalXMag2=(float)0.0, ovalYMag2=(float)0.0; static ! void MakeCachedOval (ObjPtr) ! struct ObjRec * ObjPtr; { register int i; ! int sn, cntrln, cx, cy; int saved_zoomedin, saved_zoomscale, saved_x, saved_y; struct OvalRec * oval_ptr=ObjPtr->detail.o; ! XPoint *sv=NULL, *tmp_sv=NULL; ! IntPoint *pv=NULL, *cntrlv=NULL; struct BBRec obbox; ! float w, h; ! if (ovalXMag1 == (float)0.0) { ! ovalXMag1 = (float)cos((double)(28.6*M_PI/180.0)); ! ovalYMag1 = (float)sin((double)(28.6*M_PI/180.0)); ! ovalXMag2 = (float)cos((double)(61.4*M_PI/180.0)); ! ovalYMag2 = (float)sin((double)(61.4*M_PI/180.0)); } if (ObjPtr->ctm == NULL) return; --- 264,288 ---- } ! static double ovalXMag1=(double)0.0, ovalYMag1=(double)0.0; ! static double ovalXMag2=(double)0.0, ovalYMag2=(double)0.0; static ! void MakeCachedOval(ObjPtr) ! struct ObjRec *ObjPtr; { register int i; ! int sn, cntrln; int saved_zoomedin, saved_zoomscale, saved_x, saved_y; struct OvalRec * oval_ptr=ObjPtr->detail.o; ! XPoint *sv=NULL; ! DoublePoint *tmp_sv=NULL, *pv=NULL, *cntrlv=NULL; struct BBRec obbox; ! double w, h, cx, cy; ! if (ovalXMag1 == (double)0.0) { ! ovalXMag1 = (double)cos((double)(28.6*M_PI/180.0)); ! ovalYMag1 = (double)sin((double)(28.6*M_PI/180.0)); ! ovalXMag2 = (double)cos((double)(61.4*M_PI/180.0)); ! ovalYMag2 = (double)sin((double)(61.4*M_PI/180.0)); } if (ObjPtr->ctm == NULL) return; *************** *** 290,295 **** if (oval_ptr->rotated_vlist != NULL) free(oval_ptr->rotated_vlist); oval_ptr->rotated_n = 0; ! oval_ptr->rotated_vlist = tmp_sv = (XPoint*)malloc((13+1)*sizeof(XPoint)); ! pv = (IntPoint*)malloc((13+1)*sizeof(IntPoint)); if (tmp_sv == NULL || pv == NULL) FailAllocMessage(); --- 290,296 ---- if (oval_ptr->rotated_vlist != NULL) free(oval_ptr->rotated_vlist); oval_ptr->rotated_n = 0; ! oval_ptr->rotated_vlist = NULL; ! tmp_sv = (DoublePoint*)malloc((13+1)*sizeof(DoublePoint)); ! pv = (DoublePoint*)malloc((13+1)*sizeof(DoublePoint)); if (tmp_sv == NULL || pv == NULL) FailAllocMessage(); *************** *** 298,328 **** obbox.rbx = ObjPtr->orig_obbox.rbx - ObjPtr->x; obbox.rby = ObjPtr->orig_obbox.rby - ObjPtr->y; ! cx = ((obbox.ltx+obbox.rbx)>>1); ! cy = ((obbox.lty+obbox.rby)>>1); ! w = (((float)(obbox.rbx-obbox.ltx))/2.0); ! h = (((float)(obbox.rby-obbox.lty))/2.0); ! ! tmp_sv[0].x = obbox.rbx; tmp_sv[0].y = cy; ! tmp_sv[1].x = cx+(int)(w*ovalXMag1); tmp_sv[1].y = cy-(int)(h*ovalYMag1); ! tmp_sv[2].x = cx+(int)(w*ovalXMag2); tmp_sv[2].y = cy-(int)(h*ovalYMag2); ! tmp_sv[3].x = cx; tmp_sv[3].y = obbox.lty; ! tmp_sv[4].x = cx-(int)(w*ovalXMag2); tmp_sv[4].y = cy-(int)(h*ovalYMag2); ! tmp_sv[5].x = cx-(int)(w*ovalXMag1); tmp_sv[5].y = cy-(int)(h*ovalYMag1); ! tmp_sv[6].x = obbox.ltx; tmp_sv[6].y = cy; ! tmp_sv[7].x = cx-(int)(w*ovalXMag1); tmp_sv[7].y = cy+(int)(h*ovalYMag1); ! tmp_sv[8].x = cx-(int)(w*ovalXMag2); tmp_sv[8].y = cy+(int)(h*ovalYMag2); ! tmp_sv[9].x = cx; tmp_sv[9].y = obbox.rby; ! tmp_sv[10].x = cx+(int)(w*ovalXMag2); tmp_sv[10].y = cy+(int)(h*ovalYMag2); ! tmp_sv[11].x = cx+(int)(w*ovalXMag1); tmp_sv[11].y = cy+(int)(h*ovalYMag1); ! tmp_sv[12].x = tmp_sv[0].x; tmp_sv[12].y = tmp_sv[0].y; ! for (i=0; i < 13; i++) ! { ! int x, y; ! ! TransformPointThroughCTM (tmp_sv[i].x, tmp_sv[i].y, ObjPtr->ctm, &x, &y); ! pv[i].x = OFFSET_X(x + ObjPtr->x); ! pv[i].y = OFFSET_Y(y + ObjPtr->y); ! tmp_sv[i].x = (short)pv[i].x; ! tmp_sv[i].y = (short)pv[i].y; } saved_zoomedin = zoomedIn; --- 299,327 ---- obbox.rbx = ObjPtr->orig_obbox.rbx - ObjPtr->x; obbox.rby = ObjPtr->orig_obbox.rby - ObjPtr->y; ! cx = (((double)(obbox.ltx+obbox.rbx))/2.0); ! cy = (((double)(obbox.lty+obbox.rby))/2.0); ! w = (((double)(obbox.rbx-obbox.ltx))/2.0); ! h = (((double)(obbox.rby-obbox.lty))/2.0); ! ! tmp_sv[0].x = (double)obbox.rbx; tmp_sv[0].y = (double)cy; ! tmp_sv[1].x = ((double)cx)+(w*ovalXMag1); tmp_sv[1].y = ((double)cy)-(h*ovalYMag1); ! tmp_sv[2].x = ((double)cx)+(w*ovalXMag2); tmp_sv[2].y = ((double)cy)-(h*ovalYMag2); ! tmp_sv[3].x = (double)cx; tmp_sv[3].y = (double)obbox.lty; ! tmp_sv[4].x = ((double)cx)-(w*ovalXMag2); tmp_sv[4].y = ((double)cy)-(h*ovalYMag2); ! tmp_sv[5].x = ((double)cx)-(w*ovalXMag1); tmp_sv[5].y = ((double)cy)-(h*ovalYMag1); ! tmp_sv[6].x = (double)obbox.ltx; tmp_sv[6].y = (double)cy; ! tmp_sv[7].x = ((double)cx)-(w*ovalXMag1); tmp_sv[7].y = ((double)cy)+(h*ovalYMag1); ! tmp_sv[8].x = ((double)cx)-(w*ovalXMag2); tmp_sv[8].y = ((double)cy)+(h*ovalYMag2); ! tmp_sv[9].x = (double)cx; tmp_sv[9].y = (double)obbox.rby; ! tmp_sv[10].x = ((double)cx)+(w*ovalXMag2); tmp_sv[10].y = ((double)cy)+(h*ovalYMag2); ! tmp_sv[11].x = ((double)cx)+(w*ovalXMag1); tmp_sv[11].y = ((double)cy)+(h*ovalYMag1); ! tmp_sv[12].x = tmp_sv[0].x; tmp_sv[12].y = tmp_sv[0].y; ! for (i=0; i < 13; i++) { ! double x, y; ! ! TransformDoublePointThroughCTM(tmp_sv[i].x, tmp_sv[i].y, ObjPtr->ctm, ! &x, &y); ! tmp_sv[i].x = pv[i].x = OFFSET_DOUBLE_X(x + (double)ObjPtr->x); ! tmp_sv[i].y = pv[i].y = OFFSET_DOUBLE_Y(y + (double)ObjPtr->y); } saved_zoomedin = zoomedIn; *************** *** 333,337 **** zoomScale = 0; drawOrigX = drawOrigY = 0; ! sv = MakeIntSplinePolygonVertex (&sn, &cntrln, &cntrlv, drawOrigX, drawOrigY, 13, pv); zoomedIn = saved_zoomedin; --- 332,336 ---- zoomScale = 0; drawOrigX = drawOrigY = 0; ! sv = MakeDoubleIntSplinePolygonVertex(&sn, &cntrln, &cntrlv, drawOrigX, drawOrigY, 13, pv); zoomedIn = saved_zoomedin; *************** *** 519,523 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); BeginIntervalRulers(grid_x, grid_y, grid_x, grid_y); --- 518,522 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); BeginIntervalRulers(grid_x, grid_y, grid_x, grid_y); *************** *** 541,545 **** PixelToMeasurementUnit(x_buf, ABS_X(bbox.rbx)); PixelToMeasurementUnit(y_buf, ABS_Y(bbox.rby)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (bbox.rbx, bbox.rby, buf, TRUE); done = TRUE; --- 540,544 ---- PixelToMeasurementUnit(x_buf, ABS_X(bbox.rbx)); PixelToMeasurementUnit(y_buf, ABS_Y(bbox.rby)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (bbox.rbx, bbox.rby, buf, TRUE); done = TRUE; *************** *** 578,582 **** PixelToMeasurementUnit(x_buf, ABS_X(bbox.rbx)); PixelToMeasurementUnit(y_buf, ABS_Y(bbox.rby)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (bbox.rbx, bbox.rby, buf, TRUE); MyOval (drawWindow, drawGC, bbox); --- 577,581 ---- PixelToMeasurementUnit(x_buf, ABS_X(bbox.rbx)); PixelToMeasurementUnit(y_buf, ABS_Y(bbox.rby)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (bbox.rbx, bbox.rby, buf, TRUE); MyOval (drawWindow, drawGC, bbox); *************** *** 588,592 **** PixelToMeasurementUnit(x_buf, ABS_X(bbox.rbx)); PixelToMeasurementUnit(y_buf, ABS_Y(bbox.rby)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (bbox.rbx, bbox.rby, buf, TRUE); } --- 587,591 ---- PixelToMeasurementUnit(x_buf, ABS_X(bbox.rbx)); PixelToMeasurementUnit(y_buf, ABS_Y(bbox.rby)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (bbox.rbx, bbox.rby, buf, TRUE); } *************** *** 611,615 **** PixelToMeasurementUnit(x_buf, ABS_X(bbox.rbx)); PixelToMeasurementUnit(y_buf, ABS_Y(bbox.rby)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (bbox.rbx, bbox.rby, buf, TRUE); abort = TRUE; --- 610,614 ---- PixelToMeasurementUnit(x_buf, ABS_X(bbox.rbx)); PixelToMeasurementUnit(y_buf, ABS_Y(bbox.rby)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (bbox.rbx, bbox.rby, buf, TRUE); abort = TRUE; *************** *** 929,932 **** --- 928,934 ---- s = FindChar ((int)'[', aux); s++; + if (!bufferAsFileForWhiteBoard) { + fgets(inbuf, MAXSTRING, FP); + } #else /* ~_TGIF_WB */ *** poly.c.orig Thu Jan 30 19:18:18 1997 --- poly.c Thu Jan 30 19:18:18 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/poly.c,v 3.6 1996/10/30 22:24:51 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/poly.c,v 3.9 1997/01/31 00:11:04 william Exp $"; #endif *************** *** 76,80 **** #define RETREAT (0.8) ! int polyDrawn = FALSE; /* short widthOfLine[] = { 0, 3, 6, 0 }; */ --- 76,80 ---- #define RETREAT (0.8) ! int polyDrawn=FALSE; /* short widthOfLine[] = { 0, 3, 6, 0 }; */ *************** *** 476,480 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); XGrabPointer(mainDisplay, drawWindow, FALSE, --- 476,480 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); XGrabPointer(mainDisplay, drawWindow, FALSE, *************** *** 509,513 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); } ShowMeasureCursor (grid_x, grid_y, buf, TRUE); --- 509,513 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); } ShowMeasureCursor (grid_x, grid_y, buf, TRUE); *************** *** 795,799 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (grid_x, grid_y, buf, TRUE); while (XCheckMaskEvent (mainDisplay, PointerMotionMask, &ev)) ; --- 795,799 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (grid_x, grid_y, buf, TRUE); while (XCheckMaskEvent (mainDisplay, PointerMotionMask, &ev)) ; *************** *** 806,810 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (grid_x, grid_y, buf, TRUE); --- 806,810 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (grid_x, grid_y, buf, TRUE); *************** *** 906,910 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor (grid_x, grid_y, buf, TRUE); break; --- 906,910 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor (grid_x, grid_y, buf, TRUE); break; *************** *** 956,960 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); } --- 956,960 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); } *************** *** 1316,1320 **** { int i, n, n1=poly_ptr1->n, n2=poly_ptr2->n, num_pts, ltx, lty, rbx, rby; ! int min_val, max_val, inc; IntPoint *vs, tmp_p; char *smooth=NULL; --- 1316,1320 ---- { int i, n, n1=poly_ptr1->n, n2=poly_ptr2->n, num_pts, ltx, lty, rbx, rby; ! int min_val=0, max_val=0, inc=0; IntPoint *vs, tmp_p; char *smooth=NULL; *** polygon.c.orig Thu Jan 30 19:18:19 1997 --- polygon.c Thu Jan 30 19:18:19 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/polygon.c,v 3.5 1996/10/30 22:26:33 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/polygon.c,v 3.6 1997/01/30 22:45:54 william Exp $"; #endif *************** *** 581,585 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); XGrabPointer(mainDisplay, drawWindow, FALSE, --- 581,585 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); XGrabPointer(mainDisplay, drawWindow, FALSE, *************** *** 612,616 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (grid_x, grid_y, buf, TRUE); abort = TRUE; --- 612,616 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (grid_x, grid_y, buf, TRUE); abort = TRUE; *************** *** 624,628 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (grid_x, grid_y, buf, TRUE); if (curSpline != LT_STRAIGHT && splineRubberband) --- 624,628 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (grid_x, grid_y, buf, TRUE); if (curSpline != LT_STRAIGHT && splineRubberband) *************** *** 688,692 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (grid_x, grid_y, buf, TRUE); while (XCheckMaskEvent (mainDisplay, PointerMotionMask, &ev)) ; --- 688,692 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (grid_x, grid_y, buf, TRUE); while (XCheckMaskEvent (mainDisplay, PointerMotionMask, &ev)) ; *************** *** 698,702 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (grid_x, grid_y, buf, TRUE); button_ev = &(input.xbutton); --- 698,702 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (grid_x, grid_y, buf, TRUE); button_ev = &(input.xbutton); *************** *** 786,790 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); --- 786,790 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); *** rcbox.c.orig Thu Jan 30 19:18:21 1997 --- rcbox.c Thu Jan 30 19:18:21 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/rcbox.c,v 3.5 1996/10/30 22:49:44 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/rcbox.c,v 3.7 1997/01/30 22:46:09 william Exp $"; #endif *************** *** 604,608 **** PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); BeginIntervalRulers(grid_x, grid_y, grid_x, grid_y); --- 604,608 ---- PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(grid_x, grid_y, buf, TRUE); BeginIntervalRulers(grid_x, grid_y, grid_x, grid_y); *************** *** 627,631 **** PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (saved_x, saved_y, buf, TRUE); done = TRUE; --- 627,631 ---- PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (saved_x, saved_y, buf, TRUE); done = TRUE; *************** *** 664,668 **** PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (saved_x, saved_y, buf, TRUE); MyRCBox (drawWindow,drawGC,OrigX,OrigY,saved_x,saved_y,radius); --- 664,668 ---- PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (saved_x, saved_y, buf, TRUE); MyRCBox (drawWindow,drawGC,OrigX,OrigY,saved_x,saved_y,radius); *************** *** 675,679 **** PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (saved_x, saved_y, buf, TRUE); } --- 675,679 ---- PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (saved_x, saved_y, buf, TRUE); } *************** *** 698,702 **** PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (saved_x, saved_y, buf, TRUE); abort = TRUE; --- 698,702 ---- PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (saved_x, saved_y, buf, TRUE); abort = TRUE; *************** *** 947,950 **** --- 947,953 ---- s = FindChar ((int)'[', aux); s++; + if (!bufferAsFileForWhiteBoard) { + fgets(inbuf, MAXSTRING, FP); + } #else /* ~_TGIF_WB */ *** rect.c.orig Thu Jan 30 19:18:22 1997 --- rect.c Thu Jan 30 19:18:22 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/rect.c,v 3.1 1996/10/30 22:51:48 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/rect.c,v 3.2 1997/01/30 22:59:18 william Exp $"; #endif *************** *** 87,96 **** } ! void TransformPointThroughCTM (X, Y, ctm, NewX, NewY) ! int X, Y, * NewX, * NewY; ! struct XfrmMtrxRec * ctm; { *NewX = round(((float)(X*ctm->m[0] + Y*ctm->m[2]))/1000.0) + ctm->m[CTM_TX]; *NewY = round(((float)(X*ctm->m[1] + Y*ctm->m[3]))/1000.0) + ctm->m[CTM_TY]; } --- 87,106 ---- } ! void TransformPointThroughCTM(X, Y, ctm, NewX, NewY) ! int X, Y, *NewX, *NewY; ! struct XfrmMtrxRec *ctm; { *NewX = round(((float)(X*ctm->m[0] + Y*ctm->m[2]))/1000.0) + ctm->m[CTM_TX]; *NewY = round(((float)(X*ctm->m[1] + Y*ctm->m[3]))/1000.0) + ctm->m[CTM_TY]; + } + + void TransformDoublePointThroughCTM (X, Y, ctm, NewX, NewY) + double X, Y, *NewX, *NewY; + struct XfrmMtrxRec *ctm; + { + *NewX = (X*((double)ctm->m[0]) + Y*((double)ctm->m[2]))/1000.0 + + (double)ctm->m[CTM_TX]; + *NewY = (X*((double)ctm->m[1]) + Y*((double)ctm->m[3]))/1000.0 + + (double)ctm->m[CTM_TY]; } *** select.c.orig Thu Jan 30 19:18:23 1997 --- select.c Thu Jan 30 19:18:23 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/select.c,v 3.4 1996/10/30 22:55:00 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/select.c,v 3.6 1997/01/30 22:46:44 william Exp $"; #endif *************** *** 1127,1131 **** PixelToMeasurementUnit(x_buf, ABS_X(end_x)); PixelToMeasurementUnit(y_buf, ABS_Y(end_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(end_x, end_y, buf, TRUE); XGrabPointer(mainDisplay, drawWindow, False, --- 1127,1131 ---- PixelToMeasurementUnit(x_buf, ABS_X(end_x)); PixelToMeasurementUnit(y_buf, ABS_Y(end_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); StartShowMeasureCursor(end_x, end_y, buf, TRUE); XGrabPointer(mainDisplay, drawWindow, False, *************** *** 1146,1150 **** PixelToMeasurementUnit(x_buf, ABS_X(end_x)); PixelToMeasurementUnit(y_buf, ABS_Y(end_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (end_x, end_y, buf, TRUE); SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); --- 1146,1150 ---- PixelToMeasurementUnit(x_buf, ABS_X(end_x)); PixelToMeasurementUnit(y_buf, ABS_Y(end_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); EndShowMeasureCursor (end_x, end_y, buf, TRUE); SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); *************** *** 1161,1165 **** PixelToMeasurementUnit(x_buf, ABS_X(end_x)); PixelToMeasurementUnit(y_buf, ABS_Y(end_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (end_x, end_y, buf, TRUE); SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); --- 1161,1165 ---- PixelToMeasurementUnit(x_buf, ABS_X(end_x)); PixelToMeasurementUnit(y_buf, ABS_Y(end_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (end_x, end_y, buf, TRUE); SelBox (drawWindow, revDefaultGC, XOff, YOff, end_x, end_y); *************** *** 1170,1174 **** PixelToMeasurementUnit(x_buf, ABS_X(end_x)); PixelToMeasurementUnit(y_buf, ABS_Y(end_y)); ! sprintf(buf, "x=%s\ny=%s\nw=%s\nh=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (end_x, end_y, buf, TRUE); --- 1170,1174 ---- PixelToMeasurementUnit(x_buf, ABS_X(end_x)); PixelToMeasurementUnit(y_buf, ABS_Y(end_y)); ! sprintf(buf, "w=%s\nh=%s\nx=%s\ny=%s", w_buf, h_buf, x_buf, y_buf); ShowMeasureCursor (end_x, end_y, buf, TRUE); *************** *** 1644,1647 **** --- 1644,1648 ---- { char file_name[MAXPATHLENGTH+1], msg[MAXSTRING+1], *page_spec=NULL; + char *dest_ptr=NULL; int do_not_save=FALSE, rc=TRUE, just_goto_page=FALSE; *************** *** 1694,1697 **** --- 1695,1700 ---- return rc; } + dest_ptr = UtilStrDup(teleport_attr->attr_value.s); + if (dest_ptr == NULL) FailAllocMessage(); if (FileIsRemote(file_name)) { char *buf=NULL, *content_type=NULL, final_url[MAXPATHLENGTH+1]; *************** *** 1720,1735 **** } else { if (!LoadFile(file_name, TRUE)) { ! if (do_not_save) SetFileModified(TRUE); ! rc = FALSE; } } if (rc && page_spec != NULL && !just_goto_page) { int new_page_num=(-1); if (!GetPageNumFromPageSpec(page_spec, &new_page_num)) { ! sprintf(msg, "Invalid teleport destination '%s'.", ! teleport_attr->attr_value.s); MsgBox(msg, TOOL_NAME, INFO_MB); - if (do_not_save) SetFileModified(TRUE); rc = FALSE; } else if (new_page_num != curPageNum) { --- 1723,1736 ---- } else { if (!LoadFile(file_name, TRUE)) { ! if (do_not_save) SetFileModified(TRUE); rc = FALSE; } } + /* At this point teleport_attr is no longer valid */ if (rc && page_spec != NULL && !just_goto_page) { int new_page_num=(-1); if (!GetPageNumFromPageSpec(page_spec, &new_page_num)) { ! sprintf(msg, "Invalid teleport destination '%s'.", dest_ptr); MsgBox(msg, TOOL_NAME, INFO_MB); rc = FALSE; } else if (new_page_num != curPageNum) { *************** *** 1742,1748 **** justDupped = FALSE; } - if (page_spec != NULL) free(page_spec); - return rc; } if (page_spec != NULL) free(page_spec); return rc; --- 1743,1748 ---- justDupped = FALSE; } } + if (dest_ptr != NULL) free(dest_ptr); if (page_spec != NULL) free(page_spec); return rc; *** setup.c.orig Thu Jan 30 19:18:25 1997 --- setup.c Thu Jan 30 19:18:25 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/setup.c,v 3.13 1996/12/26 06:20:53 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/setup.c,v 3.15 1997/01/30 17:27:22 william Exp $"; #endif *************** *** 215,219 **** int reverseVideo = FALSE; ! char drawPath[MAXPATHLENGTH]; char bootDir[MAXPATHLENGTH+2]; char homeDir[MAXPATHLENGTH]; --- 215,219 ---- int reverseVideo = FALSE; ! char drawPath[MAXPATHLENGTH]; /* last char is NOT '/' */ char bootDir[MAXPATHLENGTH+2]; char homeDir[MAXPATHLENGTH]; *************** *** 567,571 **** static Window savedMainWindow=None, savedDrawWindow=None; ! static Pixmap wmIconPixmap=None; void Setup () --- 567,622 ---- static Window savedMainWindow=None, savedDrawWindow=None; ! static Pixmap wmIconPixmap=None, wmIconPixmapMask=None; ! ! static ! int GetIconPixmap(pPixmap, pPixmapMask) ! Pixmap *pPixmap, *pPixmapMask; ! { ! Pixmap pixmap=None, bitmap=None; ! XImage *image=NULL, *bitmap_image=NULL; ! int rc=0, image_w=0, image_h=0, w=0, h=0, ncolors=0, chars_per_pixel=0; ! int first_pixel_is_bg=FALSE, *pixels=NULL; ! char fname[MAXPATHLENGTH], *color_char=NULL, **color_str=NULL; ! char *c_ptr=XGetDefault(mainDisplay,TOOL_NAME, "IconPixmap"), *xpm_data=NULL; ! ! *pPixmap = *pPixmapMask = None; ! if (c_ptr == NULL) return FALSE; ! if (*c_ptr == '/') { ! strncpy(fname, c_ptr, sizeof(fname)); ! } else { ! sprintf(fname, "%s/%s", drawPath, c_ptr); ! } ! c_ptr = UtilStrRChr(fname, '.'); ! if (c_ptr != NULL && UtilStrICmp(c_ptr, ".xbm") == 0) { ! int x_hot=0, y_hot=0; ! unsigned int tmp_w=0, tmp_h=0; ! ! rc = XReadBitmapFile(mainDisplay, mainWindow, fname, &tmp_w, &tmp_h, ! &pixmap, &x_hot, &y_hot); ! } else { ! rc = MyReadPixmapFile(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); ! } ! if (rc != BitmapSuccess) { ! fprintf(stderr, "%s: '%s'. %s.\n", ! "Fail to read IconPixmap file", fname, ! "Default icon bitmap is used"); ! return FALSE; ! } ! if (image != NULL) XDestroyImage(image); ! if (bitmap_image != NULL) XDestroyImage(bitmap_image); ! if (color_char != NULL) free(color_char); ! if (color_str != NULL) { ! int i; ! ! for (i=0; i < ncolors; i++) free(color_str[i]); ! free(color_str); ! } ! *pPixmap = pixmap; ! *pPixmapMask = bitmap; ! return TRUE; ! } void Setup () *************** *** 1029,1032 **** --- 1080,1086 ---- strcpy (drawPath, c_ptr); + i = strlen(drawPath); + if (drawPath[i-1] == '/') drawPath[i-1] = '\0'; + if ((c_ptr = getenv ("HOME")) == NULL) strcpy (homeDir, "/"); *************** *** 1568,1577 **** } else { if (((c_ptr=XGetDefault(mainDisplay,TOOL_NAME,"UseWMIconPixmap")) != NULL) ! && (strcmp(c_ptr,"True") == 0 || strcmp(c_ptr,"true") == 0)) { wmhints.initial_state = NormalState; ! wmhints.icon_pixmap = wmIconPixmap = ! XCreateBitmapFromData(mainDisplay, mainWindow, ! (char*)tgificon_bits, tgificon_width, tgificon_height); wmhints.flags |= IconPixmapHint | StateHint; } } --- 1622,1641 ---- } else { if (((c_ptr=XGetDefault(mainDisplay,TOOL_NAME,"UseWMIconPixmap")) != NULL) ! && UtilStrICmp(c_ptr,"True") == 0) { ! wmhints.icon_mask = None; wmhints.initial_state = NormalState; ! if (!GetIconPixmap(&wmIconPixmap, &wmIconPixmapMask)) { ! wmhints.icon_pixmap = wmIconPixmap = ! XCreateBitmapFromData(mainDisplay, mainWindow, ! (char*)tgificon_bits, tgificon_width, tgificon_height); ! } else { ! wmhints.icon_pixmap = wmIconPixmap; ! if (wmIconPixmapMask != None) { ! wmhints.icon_mask = wmIconPixmapMask; ! wmhints.flags |= IconMaskHint; ! } ! } wmhints.flags |= IconPixmapHint | StateHint; + FlushUndoBuffer(); } } *************** *** 1595,1598 **** --- 1659,1666 ---- XFreePixmap(mainDisplay, wmIconPixmap); wmIconPixmap = None; + } + if (wmIconPixmapMask != None) { + XFreePixmap(mainDisplay, wmIconPixmapMask); + wmIconPixmapMask = None; } if (savedMainWindow != None) XDestroyWindow(mainDisplay, savedMainWindow); *** shortcut.c.orig Thu Jan 30 19:18:26 1997 --- shortcut.c Thu Jan 30 19:18:26 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/shortcut.c,v 3.9 1996/12/25 16:57:38 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/shortcut.c,v 3.10 1997/01/30 03:59:40 william Exp $"; #endif *************** *** 294,297 **** --- 294,298 ---- { '\0', 0, "FindNoCase()", 0, }, { '\0', 0, "FindAgain()", 0, }, + { '\0', 0, "CurrentVersionInfo()", 0, }, { '\0', 0, "", 0 } }; *** spline.c.orig Thu Jan 30 19:18:27 1997 --- spline.c Thu Jan 30 19:18:27 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/spline.c,v 3.1 1996/10/30 22:59:52 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/spline.c,v 3.3 1997/01/31 00:00:52 william Exp $"; #endif *************** *** 104,108 **** } ! static XPoint * splineVs; static --- 104,109 ---- } ! static XPoint *splineVs=NULL; ! static DoublePoint *splineDoubleVs=NULL; static *************** *** 127,130 **** --- 128,151 ---- static + int AddDoubleSplinePt(N, MaxN, X, Y) + int *N, *MaxN; + double X, Y; + { + if (*N == *MaxN) { + splineDoubleVs = (DoublePoint*)realloc(splineDoubleVs, + (*MaxN)*2*sizeof(DoublePoint)+1); + if (splineDoubleVs == NULL) { + fprintf(stderr, "Can not realloc() in AddDoubleSplinePt ().\n"); + return FALSE; + } + *MaxN = (*MaxN) << 1; + } + splineDoubleVs[*N].x = X; + splineDoubleVs[*N].y = Y; + (*N)++; + return TRUE; + } + + static void SetSplineVs (N, MaxN, X1, Y1, X2, Y2, X3, Y3, X4, Y4) int * N, * MaxN; *************** *** 149,152 **** --- 170,197 ---- } + static + void SetDoubleSplineVs(N, MaxN, X1, Y1, X2, Y2, X3, Y3, X4, Y4) + int *N, *MaxN; + double X1, Y1, X2, Y2, X3, Y3, X4, Y4; + /* X1, Y1, X2, Y2, X3, Y3, X4, Y4 are screen offsets */ + { + double x, y; + + x = (X2 + X3) / 2.0; + y = (Y2 + Y3) / 2.0; + if (fabs(X1 - x) < splineTol && fabs(Y1 - y) < splineTol) { + AddDoubleSplinePt(N, MaxN, x, y); + } else { + SetDoubleSplineVs(N, MaxN, X1, Y1, ((X1+X2)/2.0), ((Y1+Y2)/2.0), + ((3.0*X2+X3)/4.0), ((3.0*Y2+Y3)/4.0), x, y); + } + if (fabs(x - X4) < splineTol && fabs(y - Y4) < splineTol) { + AddDoubleSplinePt(N, MaxN, X4, Y4); + } else { + SetDoubleSplineVs(N, MaxN, x, y, ((X2+3.0*X3)/4.0), ((Y2+3.0*Y3)/4.0), + ((X3+X4)/2.0), ((Y3+Y4)/2.0), X4, Y4); + } + } + XPoint * MakeSplinePolyVertex (N, XOff, YOff, NumVs, Vs) int * N, XOff, YOff, NumVs; *************** *** 378,381 **** --- 423,506 ---- } + XPoint *MakeDoubleSplinePolygonVertex (N, XOff, YOff, NumVs, Vs) + int *N, XOff, YOff, NumVs; + DoublePoint *Vs; + { + double mx1, my1, mx2, my2, mx3, my3, mx4, my4, x1, y1, x2, y2, x, y; + double dx_off, dy_off; + int i, max_n, x_off, y_off; + + x_off = (zoomedIn ? XOff : (XOff>>zoomScale)<>zoomScale)<x-dx_off); + y1 = ZOOMED_DOUBLE_SIZE((Vs++)->y-dy_off); + x2 = ZOOMED_DOUBLE_SIZE(Vs->x-dx_off); + y2 = ZOOMED_DOUBLE_SIZE((Vs++)->y-dy_off); + mx4 = (x1 + x2) / 2.0; + my4 = (y1 + y2) / 2.0; + + max_n = 100; + splineDoubleVs = (DoublePoint*)malloc((max_n+1)*sizeof(DoublePoint)); + if (splineDoubleVs == NULL) { + FailAllocMessage(); + *N = 0; + return NULL; + } + splineDoubleVs[0].x = mx4; + splineDoubleVs[0].y = my4; + *N = 1; + + for (i=1; i < NumVs; i++, Vs++) { + mx1 = mx4; my1 = my4; + mx2 = (x1+3.0*x2)/4.0; my2 = (y1+3.0*y2)/4.0; + x1 = x2; y1 = y2; + x2 = ZOOMED_DOUBLE_SIZE(Vs->x-dx_off); y2 = ZOOMED_DOUBLE_SIZE(Vs->y-dy_off); + mx3 = (3.0*x1+x2)/4.0; my3 = (3.0*y1+y2)/4.0; + mx4 = (x1+x2)/2.0; my4 = (y1+y2)/2.0; + SetDoubleSplineVs(N, &max_n, mx1, my1, mx2, my2, mx3, my3, mx4, my4); + } + splineVs = (XPoint*)malloc(((*N)+2)*sizeof(XPoint)); + if (splineVs == NULL) { + FailAllocMessage(); + free(splineDoubleVs); + splineDoubleVs = NULL; + *N = 0; + return NULL; + } + for (i=0; i < *N; i++) { + splineVs[i].x = round(splineDoubleVs[i].x); + splineVs[i].y = round(splineDoubleVs[i].y); + } + free(splineDoubleVs); + splineDoubleVs = NULL; + return splineVs; + } + XPoint * MakeMultiSplinePolygonVertex (N, Smooth, XOff, YOff, NumVs, Vs) int * N, XOff, YOff, NumVs; *************** *** 686,689 **** --- 811,868 ---- } + static + void DoubleClosedSetupMatrix (NumPts, Vs) + int NumPts; + DoublePoint *Vs; + { + register int i; + register double val; + + mtxInfo.x = (double*)malloc(NumPts*sizeof(double)); + mtxInfo.y = (double*)malloc(NumPts*sizeof(double)); + mtxInfo.dx = (double*)malloc(NumPts*sizeof(double)); + mtxInfo.dy = (double*)malloc(NumPts*sizeof(double)); + if (mtxInfo.x == NULL || mtxInfo.y == NULL || mtxInfo.dx == NULL || + mtxInfo.dy == NULL) { + FailAllocMessage(); + } + for (i=0; i < NumPts; i++) { + mtxInfo.x[i] = mtxInfo.dx[i] = ((double)(Vs[i].x))*((double)theSum); + mtxInfo.y[i] = mtxInfo.dy[i] = ((double)(Vs[i].y))*((double)theSum); + } + /* the first NumPts-2 rows have an extra column */ + mtxInfo.mtx = (double**)malloc(NumPts*sizeof(double*)); + if (mtxInfo.mtx == NULL) FailAllocMessage(); + for (i=0; i < NumPts; i++) { + mtxInfo.mtx[i] = (double*)malloc(4*sizeof(double)); + if (mtxInfo.mtx[i] == NULL) FailAllocMessage(); + } + mtxInfo.mtx[0][0] = mtxInfo.mtx[NumPts-1][2] = (double)1.0; + mtxInfo.mtx[0][1] = mtxInfo.mtx[NumPts-1][1] = (double)SUM_MINUS_2; + mtxInfo.mtx[0][2] = mtxInfo.mtx[NumPts-1][0] = (double)1.0; + mtxInfo.mtx[0][3] = (double)1.0; + /* use mtx[NumPts-1][3] as mtx[NumPts-1][i] where i is moving to right */ + mtxInfo.mtx[NumPts-1][3] = (double)0.0; + for (i=1; i < NumPts-1; i++) + { + mtxInfo.mtx[i][0] = (double)1.0; + mtxInfo.mtx[i][1] = (double)SUM_MINUS_2; + mtxInfo.mtx[i][2] = (double)1.0; + mtxInfo.mtx[i][3] = (double)0.0; + } + val = (-mtxInfo.mtx[0][1]); + if (NumPts == 3) + mtxInfo.mtx[NumPts-1][0] = + (mtxInfo.mtx[NumPts-1][0]*val+mtxInfo.mtx[0][2])/theSum; + else + mtxInfo.mtx[NumPts-1][0] = mtxInfo.mtx[NumPts-1][0]*val/theSum; + mtxInfo.mtx[NumPts-1][1] = + (mtxInfo.mtx[NumPts-1][1]*val+mtxInfo.mtx[0][3])/theSum; + /* use mtx[NumPts-1][3] as mtx[NumPts-1][i] where i moves to right */ + mtxInfo.mtx[NumPts-1][3] = mtxInfo.mtx[0][2]/theSum; + mtxInfo.x[NumPts-1] = (mtxInfo.x[NumPts-1]*val+mtxInfo.x[0])/theSum; + mtxInfo.y[NumPts-1] = (mtxInfo.y[NumPts-1]*val+mtxInfo.y[0])/theSum; + } + static int gaussIteration=0; *************** *** 828,831 **** --- 1007,1040 ---- } + static + DoublePoint *DoubleClosedControlPts(NumPts, N) + int NumPts, *N; + { + register int i; + int index=0; + double half=theSum/((double)2.0); + double weight=half-((double)1.0); + DoublePoint *v; + + v = (DoublePoint*)malloc(((NumPts<<1)+2)*sizeof(DoublePoint)); + if (v == NULL) FailAllocMessage(); + for (i=0; i>zoomScale)<>zoomScale)< 1) { + fprintf(stderr, "%s in %s mode.\n", + "Cannot process more than one file", "-raw or -raw+h"); + } + break; + } else if (cmdLineDosEpsFilter) { + DosEpsFilter(*argv); + if (argc > 1) { + fprintf(stderr, "%s in %s mode.\n", + "Cannot process more than one file", " -dosepsfilter"); + } + break; } else if (PrTgifLoad(*argv)) { colorDump = cmdLineColor; *** wb1.c.orig Thu Jan 30 19:18:31 1997 --- wb1.c Thu Jan 30 19:18:31 1997 *************** *** 2,6 **** * Author: Renato Santana, in January, 1996. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/wb1.c,v 3.2 1996/10/31 03:42:12 william Exp $ */ --- 2,6 ---- * Author: Renato Santana, in January, 1996. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/wb1.c,v 3.3 1997/01/30 19:24:51 william Exp $ */ *************** *** 460,463 **** --- 460,469 ---- register struct SelRec * botSelRec; + /* + * Added by Bill. This indicates the FILE* passed to the read/write + * functions of OBJ files should be actually (not implemented yet) as char*. + */ + bufferAsFileForWhiteBoard = TRUE; + buff = ParseStr (buff,(int) '#', aux, strlen(buff)); CmdTypeRec = atoi (aux); *************** *** 499,502 **** --- 505,513 ---- /*case 31: RedoCmd(); break; REDO Client->Server*/ } + /* + * Added by Bill. This indicates the FILE* passed to the read/write + * functions of OBJ files should be actually (not implemented yet) as char*. + */ + bufferAsFileForWhiteBoard = FALSE; } *** xbitmap.c.orig Thu Jan 30 19:18:33 1997 --- xbitmap.c Thu Jan 30 19:18:33 1997 *************** *** 30,34 **** #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/xbitmap.c,v 3.13 1996/12/17 22:16:22 william Exp $"; #endif --- 30,34 ---- #ifndef lint static char RCSid[] = ! "@(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/xbitmap.c,v 3.14 1997/01/29 22:45:56 william Exp $"; #endif *************** *** 2815,2819 **** XGCValues values; ! values.foreground = GetDrawingBgPixel(INVALID, INVALID); values.function = GXcopy;; values.fill_style = FillSolid; --- 2815,2819 ---- XGCValues values; ! values.foreground = GetDrawingFgPixel(INVALID, INVALID); values.function = GXcopy;; values.fill_style = FillSolid; *** file.e.orig Thu Jan 30 19:18:34 1997 --- file.e Thu Jan 30 19:18:34 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/file.e,v 3.10 1996/12/17 21:25:41 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/file.e,v 3.12 1997/01/30 19:12:47 william Exp $ */ *************** *** 80,83 **** --- 80,86 ---- extern int cmdLineDumpURL; extern int cmdLineDumpURLWithHeader; + extern int cmdLineDumpURLShowStatus; + + extern int cmdLineDosEpsFilter; extern int showPageInEPS; *************** *** 94,97 **** --- 97,102 ---- extern int dumpOneFilePerPage; + + extern int bufferAsFileForWhiteBoard; extern void UpdateDocumentFonts ARGS_DECL((char*)); *** help.e.orig Thu Jan 30 19:18:35 1997 --- help.e Thu Jan 30 19:18:35 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/help.e,v 3.0 1996/05/06 16:05:30 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/help.e,v 3.1 1997/01/30 03:55:56 william Exp $ */ *************** *** 40,43 **** --- 40,44 ---- extern void About ARGS_DECL((void)); extern void Copyright ARGS_DECL((void)); + extern void CurrentVersionInfo ARGS_DECL((void)); extern void CleanUpHelp ARGS_DECL((void)); *** mainloop.e.orig Thu Jan 30 19:18:36 1997 --- mainloop.e Thu Jan 30 19:18:36 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/mainloop.e,v 3.1 1996/11/29 19:42:21 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/mainloop.e,v 3.2 1997/01/30 04:07:40 william Exp $ */ *************** *** 67,70 **** --- 67,71 ---- char **Str3, char **Menu3)); extern void UrlDump ARGS_DECL((char *FileName)); + extern void DosEpsFilter ARGS_DECL((char *FileName)); extern void Animate ARGS_DECL((char *Type, char *PolyId, char *Speed, char *Color, char **ReturnStr)); *** rect.e.orig Thu Jan 30 19:18:37 1997 --- rect.e Thu Jan 30 19:18:37 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/rect.e,v 3.2 1996/10/30 22:51:12 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/rect.e,v 3.3 1997/01/30 22:59:18 william Exp $ */ *************** *** 44,47 **** --- 44,51 ---- struct XfrmMtrxRec *, int *NewX, int *NewY)); + extern void TransformDoublePointThroughCTM ARGS_DECL((double X, double Y, + struct XfrmMtrxRec *, + double *NewX, + double *NewY)); extern void ReverseTransformPointThroughCTM ARGS_DECL((int X, int Y, struct XfrmMtrxRec *, *** spline.e.orig Thu Jan 30 19:18:38 1997 --- spline.e Thu Jan 30 19:18:38 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/spline.e,v 3.0 1996/05/06 16:11:54 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/spline.e,v 3.1 1997/01/30 23:46:12 william Exp $ */ *************** *** 54,57 **** --- 54,61 ---- int XOff, int YOff, int NumVs, IntPoint *)); + extern XPoint * MakeDoubleSplinePolygonVertex ARGS_DECL((int *N, + int XOff, int YOff, + int NumVs, + DoublePoint *)); extern XPoint * MakeMultiSplinePolygonVertex ARGS_DECL((int *N, char *Smooth, int XOff, int YOff, *************** *** 66,69 **** --- 70,80 ---- int XOff, int YOff, int NumVs, IntPoint*)); + extern XPoint * MakeDoubleIntSplinePolygonVertex ARGS_DECL((int *N, + int *CntrlN, + DoublePoint**CntrlVs, + int XOff, + int YOff, + int NumVs, + DoublePoint*)); extern void DumpCurvedPolyPoints ARGS_DECL((FILE*, int NumPts, IntPoint*, int Indent)); *** const.h.orig Thu Jan 30 19:18:39 1997 --- const.h Thu Jan 30 19:18:39 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/const.h,v 3.7 1996/12/25 16:56:12 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/const.h,v 3.9 1997/01/30 23:24:58 william Exp $ */ *************** *** 92,95 **** --- 92,104 ---- (((AbsY)-drawOrigY)>>zoomScale)) + #define OFFSET_DOUBLE_X(AbsX) \ + ((zoomedIn) ? \ + (((AbsX)-((double)drawOrigX))*((double)(1<>zoomScale)+drawOrigX) : \ (((OffsetX)<>zoomScale)) + + #define ZOOMED_DOUBLE_SIZE(AbsSize) ((zoomedIn) ? \ + ((AbsSize)*((double)(1< tgif-3.0-p12 => tgif-3.0-p13 <----------------------- + Here's a short list of added features/bug fixes. + + 1) Fix a bug in generating PS/EPS files for files containing rotated EPS + object. Thanks to Dietrich Bartel for + pointing out the problem. + 2) Fix a bug in drawing an EPS object that doesn't have a preview bitmap. + Thanks to Kyle Bateman for pointing out the problem. + 3) Fix a bug when printing to the printer in batch mode. Thanks to + Kyle Bateman for pointing out the problem. + 4) Fix a redraw bug in SetMeasureUnit(). Thanks to Joji Maeda + for pointing out the problem. + 5) Fix a bug when the value of a !PAGE_NUM attribute contains characters + after !(STACKED_PAGE_NUM). Thanks to Yuan-Hua Chu + for pointing out the problem. + 6) Supports !(STACKED_NUM_PAGES) in the value part of a !PAGE_NUM attribute. + 7) Supports -dosepsfilter command line option so that tgif can be used as + a filter to remove DOS/Windows EPS header and trailing TIFF image for + a DOS/Windows EPS file. For example, if "windows.eps" is a DOS/Windows + EPS file, the following sequence will produce a regular EPS file: + + mv windows.eps windows.epsi + tgif -print -dosepsfilter windows.epsi > windows.eps + + 8) Add a new X resource, Tgif.IconPixmap, to specify an XBM or XPM file + for tgif's desktop icon. This X resource is only enabled if the + Tgif.UseWMIconPixmap is set to "True". + 9) Try to make rotated ovals look better. + -----------------------> tgif-3.0-p11 => tgif-3.0-p12 <----------------------- Here's a short list of added features/bug fixes. *************** *** 227,230 **** /* ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/HISTORY,v 3.15 1997/01/29 16:06:23 william Exp $ */ --- 256,259 ---- /* ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/HISTORY,v 3.16 1997/01/31 00:13:52 william Exp $ */ *** descrip.mms.orig Thu Jan 30 19:18:51 1997 --- descrip.mms Thu Jan 30 19:18:51 1997 *************** *** 6,10 **** ! $ DEFINE SYS SYS$LIBRARY ! ! ! @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/descrip.mms,v 3.8 1996/12/26 05:31:15 william Exp $ ! --- 6,10 ---- ! $ DEFINE SYS SYS$LIBRARY ! ! ! @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/descrip.mms,v 3.9 1997/01/30 04:45:34 william Exp $ ! *************** *** 254,258 **** raster.e,rect.e,select.e,setup.e,text.e,util.e,xpixmap.e frontend.obj depends_on frontend.c ! ftp.obj depends_on ftp.c,const.h,tgif_dbg.h,ftp.e,remote.e,tcp.e,util.e grid.obj depends_on grid.c,const.h,tgif_dbg.h,types.h,choice.e,color.e,- cursor.e,dialog.e,drawing.e,dup.e,file.e,grid.e,mainmenu.e,- --- 254,259 ---- raster.e,rect.e,select.e,setup.e,text.e,util.e,xpixmap.e frontend.obj depends_on frontend.c ! ftp.obj depends_on ftp.c,const.h,tgif_dbg.h,types.h,file.e,ftp.e,remote.e,- ! tcp.e,util.e grid.obj depends_on grid.c,const.h,tgif_dbg.h,types.h,choice.e,color.e,- cursor.e,dialog.e,drawing.e,dup.e,file.e,grid.e,mainmenu.e,- *************** *** 263,267 **** select.e,setup.e help.obj depends_on help.c,const.h,tgif_dbg.h,types.h,patchlvl.h,color.e,- ! dialog.e,help.e,menu.e,msg.e,setup.e,util.e,version.e http.obj depends_on http.c,const.h,tgif_dbg.h,types.h,patchlvl.h,file.e,http.e,- msg.e,remote.e,tcp.e,util.e,version.e --- 264,268 ---- select.e,setup.e help.obj depends_on help.c,const.h,tgif_dbg.h,types.h,patchlvl.h,color.e,- ! dialog.e,file.e,help.e,menu.e,msg.e,setup.e,util.e,version.e http.obj depends_on http.c,const.h,tgif_dbg.h,types.h,patchlvl.h,file.e,http.e,- msg.e,remote.e,tcp.e,util.e,version.e