*** arc.c.orig Sun Jan 17 13:36:49 1999 --- arc.c Sun Jan 17 13:36:49 1999 *************** *** 1445,1448 **** --- 1445,1485 ---- } else if (input.type == MotionNotify || input.type == KeyPress || input.type == KeyRelease) { + if (input.type == KeyPress) { + KeySym key_sym; + char s[80]; + int has_ch; + + has_ch = XLookupString(&(input.xkey), s, sizeof(s), &key_sym, + &c_stat); + TranslateKeys(s, &key_sym); + if (CharIsESC(&(input.xkey), s, key_sym, &has_ch)) { + XUngrabPointer(mainDisplay, CurrentTime); + if (drawing_arc) { + XDrawArc(mainDisplay, drawWindow, drawGC, ltx, lty, w, h, + angle1, angle2); + PixelToMeasurementUnit(r_buf, ABS_SIZE(w>>1)); + sprintf(buf, "r=%s\ndegree=%1d", r_buf, abs(angle2>>6)); + } else { + XDrawLine(mainDisplay, drawWindow, drawGC, OrigX, OrigY, + saved_x, saved_y); + dx = saved_x - OrigX; + dy = saved_y - OrigY; + radius = (int)(sqrt((double)(((double)dx)*((double)dx) + + ((double)dy)*((double)dy)))); + w = h = (radius<<1); + PixelToMeasurementUnit(r_buf, ABS_SIZE(radius)); + PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); + PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); + sprintf(buf, "r=%s\nx=%s\ny=%s", r_buf, x_buf, y_buf); + } + EndShowMeasureCursor(saved_x, saved_y, buf, TRUE); + done = TRUE; + angle2 = 0; + Msg(""); + } + } + if (done) { + break; + } if (drawing_arc) { PixelToMeasurementUnit(r_buf, ABS_SIZE(w>>1)); *************** *** 1529,1564 **** MarkRulers(grid_x, grid_y); while (XCheckMaskEvent(mainDisplay, PointerMotionMask, &ev)) ; - } else if (input.type == KeyPress) { - KeySym key_sym; - char s[80]; - int has_ch; - - has_ch = XLookupString(&(input.xkey), s, sizeof(s), &key_sym, &c_stat); - TranslateKeys(s, &key_sym); - if (CharIsESC(&(input.xkey), s, key_sym, &has_ch)) { - XUngrabPointer(mainDisplay, CurrentTime); - if (drawing_arc) { - XDrawArc(mainDisplay, drawWindow, drawGC, ltx, lty, w, h, - angle1, angle2); - PixelToMeasurementUnit(r_buf, ABS_SIZE(w>>1)); - sprintf(buf, "r=%s\ndegree=%1d", r_buf, abs(angle2>>6)); - } else { - XDrawLine(mainDisplay, drawWindow, drawGC, OrigX, OrigY, - saved_x, saved_y); - dx = saved_x - OrigX; - dy = saved_y - OrigY; - radius = (int)(sqrt((double)(((double)dx)*((double)dx) + - ((double)dy)*((double)dy)))); - w = h = (radius<<1); - PixelToMeasurementUnit(r_buf, ABS_SIZE(radius)); - PixelToMeasurementUnit(x_buf, ABS_X(saved_x)); - PixelToMeasurementUnit(y_buf, ABS_Y(saved_y)); - sprintf(buf, "r=%s\nx=%s\ny=%s", r_buf, x_buf, y_buf); - } - EndShowMeasureCursor(saved_x, saved_y, buf, TRUE); - done = TRUE; - angle2 = 0; - Msg(""); - } } } --- 1566,1569 ---- *** choose.c.orig Sun Jan 17 13:36:51 1999 --- choose.c Sun Jan 17 13:36:51 1999 *************** *** 855,859 **** if (pni->name_index > 0) { pni->name[--pni->name_index] = '\0'; ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); if (pni->tabbed_from_root && pni->name_index != 0) { --- 855,859 ---- if (pni->name_index > 0) { pni->name[--pni->name_index] = '\0'; ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); if (pni->tabbed_from_root && pni->name_index != 0) { *************** *** 875,879 **** pni->tabbed_from_root = TRUE; pni->change_to_root = FALSE; ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); *pn_changing = FALSE; --- 875,879 ---- pni->tabbed_from_root = TRUE; pni->change_to_root = FALSE; ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); *pn_changing = FALSE; *************** *** 928,932 **** strcpy(DirName, FullName); for (i=len-1; i>=0; i--) { ! if (DirName[i] == '/') { strcpy(Name, &(DirName[i+1])); DirName[i] = '\0'; --- 928,932 ---- strcpy(DirName, FullName); for (i=len-1; i>=0; i--) { ! if (DirName[i] == DIR_SEP) { strcpy(Name, &(DirName[i+1])); DirName[i] = '\0'; *************** *** 947,951 **** if (!FileIsRemote(pni->name)) { /* saved_name is used for just_tabbed_from_root */ ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); strcpy(pni->saved_name, pni->name); --- 947,951 ---- if (!FileIsRemote(pni->name)) { /* saved_name is used for just_tabbed_from_root */ ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); strcpy(pni->saved_name, pni->name); *************** *** 1011,1015 **** pni->name[pni->name_index++] = buf[0]; pni->name[pni->name_index] = '\0'; ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); } else if (buf[0] == '$') { --- 1011,1015 ---- pni->name[pni->name_index++] = buf[0]; pni->name[pni->name_index] = '\0'; ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); } else if (buf[0] == '$') { *************** *** 1022,1028 **** pni->name_index = strlen(pni->name); #ifdef apollo ! } else if (pni->name_index == 0 && buf[0] == '/' && *pni->dir_name == '\0') { ! strcpy(pni->dir_name, "/"); pni->name[pni->name_index++] = buf[0]; i = pni->num_entries; --- 1022,1028 ---- pni->name_index = strlen(pni->name); #ifdef apollo ! } else if (pni->name_index == 0 && buf[0] == DIR_SEP && *pni->dir_name == '\0') { ! strcpy(pni->dir_name, DIR_SEP_STR); pni->name[pni->name_index++] = buf[0]; i = pni->num_entries; *************** *** 1029,1033 **** strcpy(pni->inbuf, "//"); #endif /* apollo */ ! } else if (pni->name_index == 0 && buf[0] == '/') { if (*pni->saved_dir_name == '\0') { strcpy(pni->saved_dir_name, pni->dir_name); --- 1029,1033 ---- strcpy(pni->inbuf, "//"); #endif /* apollo */ ! } else if (pni->name_index == 0 && buf[0] == DIR_SEP) { if (*pni->saved_dir_name == '\0') { strcpy(pni->saved_dir_name, pni->dir_name); *************** *** 1040,1044 **** *pni->dir_name = *pni->name = '\0'; pni->name_index = 0; ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); break; --- 1040,1044 ---- *pni->dir_name = *pni->name = '\0'; pni->name_index = 0; ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); break; *************** *** 1065,1071 **** } pni->marked_index = i; ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); ! if (buf[0] == '/') { *pn_changing = FALSE; *pn_selected_btn_index = INVALID; --- 1065,1071 ---- } pni->marked_index = i; ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); ! if (buf[0] == DIR_SEP) { *pn_changing = FALSE; *pn_selected_btn_index = INVALID; *************** *** 1420,1424 **** if (pni->buf_index == 0) return; ! if (pni->inbuf[pni->buf_index-1] == '/') { pni->inbuf[--pni->buf_index] = '\0'; new_dir = TRUE; --- 1420,1424 ---- if (pni->buf_index == 0) return; ! if (pni->inbuf[pni->buf_index-1] == DIR_SEP) { pni->inbuf[--pni->buf_index] = '\0'; new_dir = TRUE; *************** *** 1425,1429 **** } else { while (pni->buf_index > 0) { ! if (pni->inbuf[(pni->buf_index)-1] == '/') { pni->inbuf[pni->buf_index] = '\0'; break; --- 1425,1429 ---- } else { while (pni->buf_index > 0) { ! if (pni->inbuf[(pni->buf_index)-1] == DIR_SEP) { pni->inbuf[pni->buf_index] = '\0'; break; *************** *** 1471,1475 **** /* back-up one word */ BackUpOneWord(pn_changing, pn_selected_btn_index); ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); } else { --- 1471,1475 ---- /* back-up one word */ BackUpOneWord(pn_changing, pn_selected_btn_index); ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); } else { *************** *** 1483,1487 **** strcpy(pni->name, &(pni->entries[i])[pni->leading]); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); } else { --- 1483,1487 ---- strcpy(pni->name, &(pni->entries[i])[pni->leading]); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); } else { *************** *** 1617,1621 **** } pni->name[pni->name_index] = '\0'; ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); } else { --- 1617,1621 ---- } pni->name[pni->name_index] = '\0'; ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); } else { *************** *** 1708,1712 **** &(pni->entries[pni->marked_index])[pni->leading]); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); } else { --- 1708,1712 ---- &(pni->entries[pni->marked_index])[pni->leading]); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); } else { *************** *** 1818,1822 **** } } ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); --- 1818,1822 ---- } } ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); *************** *** 1840,1844 **** return TRUE; } ! if (pni->inbuf[pni->buf_index-1] != '/') { if (!pni->just_tabbed_from_root) { return TRUE; --- 1840,1844 ---- return TRUE; } ! if (pni->inbuf[pni->buf_index-1] != DIR_SEP) { if (!pni->just_tabbed_from_root) { return TRUE; *************** *** 1851,1855 **** for (i=strlen(pni->dir_name)-1; ! i >= 0 && pni->dir_name[i] != '/'; i--) { } if (i < 0) { --- 1851,1855 ---- for (i=strlen(pni->dir_name)-1; ! i >= 0 && pni->dir_name[i] != DIR_SEP; i--) { } if (i < 0) { *************** *** 1861,1865 **** } } else { ! strcpy(&pni->inbuf[pni->buf_index++], "/"); ParseFileName(pni->inbuf, pni->dir_name, pni->name); } --- 1861,1865 ---- } } else { ! strcpy(&pni->inbuf[pni->buf_index++], DIR_SEP_STR); ParseFileName(pni->inbuf, pni->dir_name, pni->name); } *************** *** 1939,1943 **** strcpy(pni->name, pni->saved_name); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); *pni->saved_name = '\0'; --- 1939,1943 ---- strcpy(pni->name, pni->saved_name); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); *pni->saved_name = '\0'; *************** *** 1953,1957 **** strcpy(pni->name, pni->saved_name); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); *pni->saved_name = '\0'; --- 1953,1957 ---- strcpy(pni->name, pni->saved_name); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); *pni->saved_name = '\0'; *************** *** 2034,2038 **** &(pni->entries[pni->marked_index])[pni->leading]); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s/%s", pni->dir_name, pni->name); pni->buf_index = strlen(pni->inbuf); } --- 2034,2038 ---- &(pni->entries[pni->marked_index])[pni->leading]); pni->name_index = strlen(pni->name); ! sprintf(pni->inbuf, "%s%c%s", pni->dir_name, DIR_SEP, pni->name); pni->buf_index = strlen(pni->inbuf); } *** exec.c.orig Sun Jan 17 13:36:53 1999 --- exec.c Sun Jan 17 13:36:53 1999 *************** *** 849,852 **** --- 849,854 ---- */ { + int rc=FALSE; + *pn_quit = FALSE; *************** *** 873,877 **** sprintf(gszMsgBox, "WaitForEvent(): select() system call failed."); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! return FALSE; } else if (status == 0) { if (fp_is_pipe && PipeReachedEOF(fp)) { --- 875,879 ---- sprintf(gszMsgBox, "WaitForEvent(): select() system call failed."); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! break; } else if (status == 0) { if (fp_is_pipe && PipeReachedEOF(fp)) { *************** *** 911,915 **** } } else if (status == 2) { ! return TRUE; } else { sprintf(gszMsgBox, "WaitForEvent(): %s %1d %s.", --- 913,918 ---- } } else if (status == 2) { ! rc = TRUE; ! break; } else { sprintf(gszMsgBox, "WaitForEvent(): %s %1d %s.", *************** *** 917,924 **** "for the select() system call"); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! return FALSE; } } ! return FALSE; } --- 920,927 ---- "for the select() system call"); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); ! break; } } ! return rc; } *************** *** 1555,1559 **** rc = FALSE; } else { ! char *psz=UtilStrRChr(file_name, '/'); int changed=FALSE; --- 1558,1562 ---- rc = FALSE; } else { ! char *psz=UtilStrRChr(file_name, DIR_SEP); int changed=FALSE; *************** *** 3582,3588 **** if (curFileDefined) { if (*curSymDir == '\0') { ! sprintf(gszMsgBox, "%s/%s", curDir, curFileName); } else { ! sprintf(gszMsgBox, "%s/%s", curSymDir, curFileName); } full_name = UtilStrDup(gszMsgBox); --- 3585,3591 ---- if (curFileDefined) { if (*curSymDir == '\0') { ! sprintf(gszMsgBox, "%s%c%s", curDir, DIR_SEP, curFileName); } else { ! sprintf(gszMsgBox, "%s%c%s", curSymDir, DIR_SEP, curFileName); } full_name = UtilStrDup(gszMsgBox); *************** *** 3613,3620 **** char *psz=NULL; ! sprintf(gszMsgBox, "%s/%s", curDir, curFileName); if ((psz=UtilStrRChr(gszMsgBox, '.')) == NULL) { ! sprintf(gszMsgBox, "%s '%s/%s' %s '%s' %s.", ! "Cannot find '.' in", curDir, curFileName, "while executing the", orig_cmd, "command"); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); --- 3616,3623 ---- char *psz=NULL; ! sprintf(gszMsgBox, "%s%c%s", curDir, DIR_SEP, curFileName); if ((psz=UtilStrRChr(gszMsgBox, '.')) == NULL) { ! sprintf(gszMsgBox, "%s '%s%c%s' %s '%s' %s.", ! "Cannot find '.' in", curDir, DIR_SEP, curFileName, "while executing the", orig_cmd, "command"); MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); *************** *** 5977,5981 **** return FALSE; } ! if (*sym_path != '/') { sprintf(execDummyStr, "%s '%s' %s '%s' %s.", "Invalid absolute path", sym_path, "used when executing the", --- 5980,5984 ---- return FALSE; } ! if (*sym_path != DIR_SEP) { sprintf(execDummyStr, "%s '%s' %s '%s' %s.", "Invalid absolute path", sym_path, "used when executing the", *** file.c.orig Sun Jan 17 13:36:56 1999 --- file.c Sun Jan 17 13:36:56 1999 *************** *** 488,492 **** /* no program specified, assume it's okay */ return TRUE; ! } else if (*szPath == '/') { if (UtilPathExists(szPath)) return TRUE; } else { --- 488,492 ---- /* no program specified, assume it's okay */ return TRUE; ! } else if (*szPath == DIR_SEP) { if (UtilPathExists(szPath)) return TRUE; } else { *************** *** 501,505 **** if (env == NULL) FailAllocMessage(); for (psz=strtok(env, ":"); psz != NULL; psz=strtok(NULL, ":")) { ! sprintf(gszMsgBox, "%s/%s", psz, szPath); if (UtilPathExists(gszMsgBox)) { UtilFree(env); --- 501,505 ---- if (env == NULL) FailAllocMessage(); for (psz=strtok(env, ":"); psz != NULL; psz=strtok(NULL, ":")) { ! sprintf(gszMsgBox, "%s%c%s", psz, DIR_SEP, szPath); if (UtilPathExists(gszMsgBox)) { UtilFree(env); *************** *** 511,519 **** if (msg == NULL || *msg == '\0') { sprintf(gszMsgBox, "Cannot find '%s'%s.\n\n%s '%s' anyway?", ! szPath, (*szPath=='/' ? "" : " in the PATH"), "Would you like to execute", cmd); } else { sprintf(gszMsgBox, "Cannot find '%s'%s. %s\n\n%s '%s' anyway?", ! szPath, (*szPath=='/' ? "" : " in the PATH"), msg, "Would you like to execute", cmd); } --- 511,519 ---- if (msg == NULL || *msg == '\0') { sprintf(gszMsgBox, "Cannot find '%s'%s.\n\n%s '%s' anyway?", ! szPath, (*szPath==DIR_SEP ? "" : " in the PATH"), "Would you like to execute", cmd); } else { sprintf(gszMsgBox, "Cannot find '%s'%s. %s\n\n%s '%s' anyway?", ! szPath, (*szPath==DIR_SEP ? "" : " in the PATH"), msg, "Would you like to execute", cmd); } *************** *** 1170,1179 **** return; } ! if (*new_file_name == '/') { strcpy(new_full_name, new_file_name); } else if (curDirIsLocal) { ! sprintf(new_full_name, "%s/%s", curDir, new_file_name); } else { ! sprintf(new_full_name, "%s/%s", curLocalDir, new_file_name); } if (!OkayToCreateFile(new_full_name)) return; --- 1170,1179 ---- return; } ! if (*new_file_name == DIR_SEP) { strcpy(new_full_name, new_file_name); } else if (curDirIsLocal) { ! sprintf(new_full_name, "%s%c%s", curDir, DIR_SEP, new_file_name); } else { ! sprintf(new_full_name, "%s%c%s", curLocalDir, DIR_SEP, new_file_name); } if (!OkayToCreateFile(new_full_name)) return; *************** *** 1434,1441 **** } if (strcmp(dir_name, ".") == 0) { ! sprintf(new_full_name, "%s/%s", (curDirIsLocal ? curDir : curLocalDir), ! new_file_name); } else { ! sprintf(new_full_name, "%s/%s", dir_name, new_file_name); } --- 1434,1441 ---- } if (strcmp(dir_name, ".") == 0) { ! sprintf(new_full_name, "%s%c%s", (curDirIsLocal ? curDir : curLocalDir), ! DIR_SEP, new_file_name); } else { ! sprintf(new_full_name, "%s%c%s", dir_name, DIR_SEP, new_file_name); } *************** *** 1611,1617 **** } if (file_type == SYM_FILE_TYPE || file_type == PIN_FILE_TYPE) { ! sprintf(full_name, "%s/%s", curSymDir, curFileName); } else { ! sprintf(full_name, "%s/%s", curDir, curFileName); } if ((short_name=IsPrefix(bootDir, full_name, &rest))) ++rest; --- 1611,1617 ---- } if (file_type == SYM_FILE_TYPE || file_type == PIN_FILE_TYPE) { ! sprintf(full_name, "%s%c%s", curSymDir, DIR_SEP, curFileName); } else { ! sprintf(full_name, "%s%c%s", curDir, DIR_SEP, curFileName); } if ((short_name=IsPrefix(bootDir, full_name, &rest))) ++rest; *************** *** 3336,3340 **** return; } ! sprintf(file_name, "%s/%s", path, name); } else if (SelectFileNameToImport( "Please select an object file to IMPORT...", --- 3336,3340 ---- return; } ! sprintf(file_name, "%s%c%s", path, DIR_SEP, name); } else if (SelectFileNameToImport( "Please select an object file to IMPORT...", *************** *** 4124,4132 **** strcpy(s, FileName); len = strlen(s); ! for (i=len-1; i >= 0 && s[i] != '/'; i--) ; if (i >= 0) { ! sprintf(FileName, "%s/%s", outputDir, &s[i+1]); } else { ! sprintf(FileName, "%s/%s", outputDir, s); } } --- 4124,4132 ---- strcpy(s, FileName); len = strlen(s); ! for (i=len-1; i >= 0 && s[i] != DIR_SEP; i--) ; if (i >= 0) { ! sprintf(FileName, "%s%c%s", outputDir, DIR_SEP, &s[i+1]); } else { ! sprintf(FileName, "%s%c%s", outputDir, DIR_SEP, s); } } *************** *** 4138,4151 **** { struct TextRec *text_ptr=ObjPtr->detail.t; ! MiniLineInfo *pMiniLine=NULL; if (text_ptr->pen == NONEPAT) return; ! for (pMiniLine=text_ptr->minilines.first; pMiniLine != NULL; ! pMiniLine=pMiniLine->next) { ! if (fprintf(FP, "%s\n", pMiniLine->first_block->seg->dyn_str.s) == EOF) { ! writeFileFailed = TRUE; ! } ! totalBBoxValid = TRUE; ! } } --- 4138,4146 ---- { struct TextRec *text_ptr=ObjPtr->detail.t; ! MiniLinesInfo *minilines=(&text_ptr->minilines); if (text_ptr->pen == NONEPAT) return; ! DumpMiniLinesInAscii(FP, minilines, &totalBBoxValid); ! if (fprintf(FP, "\n") == EOF) writeFileFailed = TRUE; } *************** *** 4542,4546 **** long tmp_bytes, tiff_bytes; ! sprintf(xbm_fname, "%s/%s", curDir, curFileName); len = strlen(xbm_fname); for (i=len-1; xbm_fname[i] != '.'; i--) ; --- 4537,4541 ---- long tmp_bytes, tiff_bytes; ! sprintf(xbm_fname, "%s%c%s", curDir, DIR_SEP, curFileName); len = strlen(xbm_fname); for (i=len-1; xbm_fname[i] != '.'; i--) ; *************** *** 4548,4552 **** ModifyOutputFileName(xbm_fname); ! sprintf(tiff_fname, "%s/%s", curDir, curFileName); len = strlen(tiff_fname); for (i=len-1; tiff_fname[i] != '.'; i--) ; --- 4543,4547 ---- ModifyOutputFileName(xbm_fname); ! sprintf(tiff_fname, "%s%c%s", curDir, DIR_SEP, curFileName); len = strlen(tiff_fname); for (i=len-1; tiff_fname[i] != '.'; i--) ; *************** *** 4714,4718 **** int i=0, len=0; ! sprintf(ps_file, "%s/%s", curDir, curFileName); len = strlen(ps_file); for (i=len-1; ps_file[i] != '.'; i--) ; --- 4709,4713 ---- int i=0, len=0; ! sprintf(ps_file, "%s%c%s", curDir, DIR_SEP, curFileName); len = strlen(ps_file); for (i=len-1; ps_file[i] != '.'; i--) ; *************** *** 6285,6289 **** return; } ! sprintf(file_name, "%s/%s", path, name); } else { sprintf(gszMsgBox, "Please select a file to be used as template..."); --- 6280,6284 ---- return; } ! sprintf(file_name, "%s%c%s", path, DIR_SEP, name); } else { sprintf(gszMsgBox, "Please select a file to be used as template..."); *** imgproc.c.orig Sun Jan 17 13:36:59 1999 --- imgproc.c Sun Jan 17 13:36:59 1999 *************** *** 2749,2753 **** ok = FALSE; } else { ! sprintf(xpm_fname, "%s/%s", path, name); } } else if (SelectFileNameToImport( --- 2749,2753 ---- ok = FALSE; } else { ! sprintf(xpm_fname, "%s%c%s", path, DIR_SEP, name); } } else if (SelectFileNameToImport( *** import.c.orig Sun Jan 17 13:37:02 1999 --- import.c Sun Jan 17 13:37:02 1999 *************** *** 347,351 **** return; } ! sprintf(xbm_fname, "%s/%s", path, name); } else if (SelectFileNameToImport( "Please select an XBitmap file to IMPORT...", --- 347,351 ---- return; } ! sprintf(xbm_fname, "%s%c%s", path, DIR_SEP, name); } else if (SelectFileNameToImport( "Please select an XBitmap file to IMPORT...", *************** *** 464,468 **** return; } ! sprintf(xpm_fname, "%s/%s", path, name); } else if (SelectFileNameToImport( "Please select an XPixmap file to IMPORT...", --- 464,468 ---- return; } ! sprintf(xpm_fname, "%s%c%s", path, DIR_SEP, name); } else if (SelectFileNameToImport( "Please select an XPixmap file to IMPORT...", *************** *** 556,560 **** return; } ! sprintf(eps_fname, "%s/%s", path, name); } else if (SelectFileNameToImport("Please select an EPS file to IMPORT...", EPSF_FILE_EXT, eps_fname) == INVALID) { --- 556,560 ---- return; } ! sprintf(eps_fname, "%s%c%s", path, DIR_SEP, name); } else if (SelectFileNameToImport("Please select an EPS file to IMPORT...", EPSF_FILE_EXT, eps_fname) == INVALID) { *************** *** 774,778 **** return; } ! sprintf(szGifPath, "%s/%s", path, name); } else if (SelectFileNameToImport("Please select a GIF file to IMPORT...", "gif", szGifPath) == INVALID) { --- 774,778 ---- return; } ! sprintf(szGifPath, "%s%c%s", path, DIR_SEP, name); } else if (SelectFileNameToImport("Please select a GIF file to IMPORT...", "gif", szGifPath) == INVALID) { *************** *** 1029,1033 **** return FALSE; } ! sprintf(szOtherPath, "%s/%s", dir_name, name); } else if (SelectFileNameToImport(szTop, pii->ext, szOtherPath) == INVALID) { --- 1029,1033 ---- return FALSE; } ! sprintf(szOtherPath, "%s%c%s", dir_name, DIR_SEP, name); } else if (SelectFileNameToImport(szTop, pii->ext, szOtherPath) == INVALID) { *************** *** 1220,1224 **** return; } ! sprintf(gif_fname, "%s/%s", dir_name, name); } else if (SelectFileNameToImport(szTop, "gif", gif_fname) == INVALID) { importingFile = FALSE; --- 1220,1224 ---- return; } ! sprintf(gif_fname, "%s%c%s", dir_name, DIR_SEP, name); } else if (SelectFileNameToImport(szTop, "gif", gif_fname) == INVALID) { importingFile = FALSE; *************** *** 1252,1256 **** /* determine how many to import */ *name = '\0'; ! if ((psz=UtilStrRChr(remote_file ? tmp_fname : gif_fname, '/')) != NULL) { strcpy(name, ++psz); } else { --- 1252,1256 ---- /* determine how many to import */ *name = '\0'; ! if ((psz=UtilStrRChr((remote_file?tmp_fname:gif_fname), DIR_SEP)) != NULL) { strcpy(name, ++psz); } else { *************** *** 1545,1549 **** continue; } ! sprintf(name, "%s/%s", DirName, d->d_name); sprintf(gszMsgBox, "Opening %s...", &name[savedDirNameLen+1]); SetStringStatus(gszMsgBox); --- 1545,1549 ---- continue; } ! sprintf(name, "%s%c%s", DirName, DIR_SEP, d->d_name); sprintf(gszMsgBox, "Opening %s...", &name[savedDirNameLen+1]); SetStringStatus(gszMsgBox); *************** *** 1643,1647 **** len = strlen(d->d_name); if (len > 4 && (strcmp(".dir", &d->d_name[len-4]) == 0)) { ! sprintf(name, "%s/%s", DirName, d->d_name); if (BrowseDir(name, ExtStr, ExtStrLen, ObjType, pii)) { interrupted = TRUE; --- 1643,1647 ---- len = strlen(d->d_name); if (len > 4 && (strcmp(".dir", &d->d_name[len-4]) == 0)) { ! sprintf(name, "%s%c%s", DirName, DIR_SEP, d->d_name); if (BrowseDir(name, ExtStr, ExtStrLen, ObjType, pii)) { interrupted = TRUE; *************** *** 1653,1657 **** struct stat stat_buf; ! sprintf(name, "%s/%s", DirName, d->d_name); if (stat(name, &stat_buf) == 0 && (stat_buf.st_mode & S_IFDIR)) { int skip=FALSE; --- 1653,1657 ---- struct stat stat_buf; ! sprintf(name, "%s%c%s", DirName, DIR_SEP, d->d_name); if (stat(name, &stat_buf) == 0 && (stat_buf.st_mode & S_IFDIR)) { int skip=FALSE; *** ini.c.orig Sun Jan 17 13:37:03 1999 --- ini.c Sun Jan 17 13:37:03 1999 *************** *** 42,48 **** #ifdef WIN32 #define DIR_SEP '\\' #else /* ~WIN32 */ #define DIR_SEP '/' ! #endif #endif /* ~DIR_SEP */ --- 42,50 ---- #ifdef WIN32 #define DIR_SEP '\\' + #define DIR_SEP_STR "\\" #else /* ~WIN32 */ #define DIR_SEP '/' ! #define DIR_SEP_STR "/" ! #endif /* WIN32 */ #endif /* ~DIR_SEP */ *** mainloop.c.orig Sun Jan 17 13:37:05 1999 --- mainloop.c Sun Jan 17 13:37:05 1999 *************** *** 442,447 **** FILE *fp; ! if (len > 0 && c_ptr[len-1] == '/') c_ptr[--len] = '/'; ! sprintf(path, "%s/%s", c_ptr, TOOL_NAME); if ((fp=fopen(path, "r")) != NULL) { UtilStrCpyN(psz_target_dir, cb_target_dir, c_ptr); --- 442,447 ---- FILE *fp; ! if (len > 0 && c_ptr[len-1] == DIR_SEP) c_ptr[--len] = DIR_SEP; ! sprintf(path, "%s%c%s", c_ptr, DIR_SEP, TOOL_NAME); if ((fp=fopen(path, "r")) != NULL) { UtilStrCpyN(psz_target_dir, cb_target_dir, c_ptr); *************** *** 496,504 **** if (xEnvStr == NULL) FailAllocMessage(); sprintf(xEnvStr, "%s%s%s", c_ptr, ! ((c_ptr[len-1] == '/') ? "" : "/"), TOOL_NAME); if ((xenv_fp=fopen(xEnvStr, "r")) != NULL) { fclose(xenv_fp); sprintf(xEnvStr, "XENVIRONMENT=%s%s%s", c_ptr, ! ((c_ptr[len-1] == '/') ? "" : "/"), TOOL_NAME); if (putenv(xEnvStr)) { sprintf(gszMsgBox, "Warning: Cannot putenv(%s).", xEnvStr); --- 496,504 ---- if (xEnvStr == NULL) FailAllocMessage(); sprintf(xEnvStr, "%s%s%s", c_ptr, ! ((c_ptr[len-1] == DIR_SEP) ? "" : DIR_SEP_STR), TOOL_NAME); if ((xenv_fp=fopen(xEnvStr, "r")) != NULL) { fclose(xenv_fp); sprintf(xEnvStr, "XENVIRONMENT=%s%s%s", c_ptr, ! ((c_ptr[len-1] == DIR_SEP) ? "" : DIR_SEP_STR), TOOL_NAME); if (putenv(xEnvStr)) { sprintf(gszMsgBox, "Warning: Cannot putenv(%s).", xEnvStr); *************** *** 656,663 **** Msg(gszMsgBox); ! if (*file_name == '/') { strcpy(full_name, file_name); } else { ! sprintf(full_name, "%s/%s", curDir, file_name); } if (obj_file) { --- 656,663 ---- Msg(gszMsgBox); ! if (*file_name == DIR_SEP) { strcpy(full_name, file_name); } else { ! sprintf(full_name, "%s%c%s", curDir, DIR_SEP, file_name); } if (obj_file) { *************** *** 737,744 **** if (!foundGoodStateObject) PasteString(remote_buf); } else { ! if (*file_name == '/') { strcpy(full_name, file_name); } else { ! sprintf(full_name, "%s/%s", curDir, file_name); } if (obj_file) { --- 737,744 ---- if (!foundGoodStateObject) PasteString(remote_buf); } else { ! if (*file_name == DIR_SEP) { strcpy(full_name, file_name); } else { ! sprintf(full_name, "%s%c%s", curDir, DIR_SEP, file_name); } if (obj_file) { *** menu.c.orig Sun Jan 17 13:37:06 1999 --- menu.c Sun Jan 17 13:37:06 1999 *************** *** 1452,1460 **** TGMU_MASK_MENUSTR | TGMU_MASK_STATUSSTR; - /* if (pn_fg_pixels != NULL) { - flags |= TGMU_MASK_MULTICOLOR; - stMenuItem.multicolor_pixel = pn_fg_pixels[i]; - } - */ if (item_info->shortcut_str == TGMUITEM_SUBMENU || item_info->shortcut_str == TGMUITEM_PINNABLESUBMENU) { --- 1452,1455 ---- *************** *** 1702,1706 **** } } ! return (*c_ptr == '\0' && **Rest == '/'); } --- 1697,1701 ---- } } ! return (*c_ptr == '\0' && **Rest == DIR_SEP); } *************** *** 1716,1722 **** if (curFileDefined) { if (*curSymDir == '\0') { ! sprintf(name, "%s/%s", curDir, curFileName); } else { ! sprintf(name, "%s/%s", curSymDir, curFileName); } if (IsPrefix(bootDir, name, &rest)) { --- 1711,1717 ---- if (curFileDefined) { if (*curSymDir == '\0') { ! sprintf(name, "%s%c%s", curDir, DIR_SEP, curFileName); } else { ! sprintf(name, "%s%c%s", curSymDir, DIR_SEP, curFileName); } if (IsPrefix(bootDir, name, &rest)) { *************** *** 1868,1875 **** } strcpy(s, drawPath); ! strcat(s, "/"); if ((c_ptr=getenv("TGIFICON")) == NULL) { if ((c_ptr=XGetDefault(mainDisplay,TOOL_NAME,"TGIFICON")) != NULL) { ! if (*c_ptr == '/') { strcpy(s, c_ptr); } else { --- 1863,1870 ---- } strcpy(s, drawPath); ! strcat(s, DIR_SEP_STR); if ((c_ptr=getenv("TGIFICON")) == NULL) { if ((c_ptr=XGetDefault(mainDisplay,TOOL_NAME,"TGIFICON")) != NULL) { ! if (*c_ptr == DIR_SEP) { strcpy(s, c_ptr); } else { *************** *** 1882,1886 **** /* too long, must be an error */ strcat(s, iconFileName); ! } else if (*c_ptr == '/') { strcpy(s, c_ptr); } else { --- 1877,1881 ---- /* too long, must be an error */ strcat(s, iconFileName); ! } else if (*c_ptr == DIR_SEP) { strcpy(s, c_ptr); } else { *************** *** 1950,1954 **** iconWindowW = w; } else { ! dx = -ltx+(iconWindowW-w)/2; } if (h > iconWindowH) { --- 1945,1949 ---- iconWindowW = w; } else { ! dx = -ltx+((iconWindowW-w)>>1); } if (h > iconWindowH) { *************** *** 1956,1960 **** iconWindowH = h; } else { ! dy = -lty+(iconWindowH-h)/2; } for (obj_ptr=topObj; obj_ptr != NULL; obj_ptr=obj_ptr->next) { --- 1951,1955 ---- iconWindowH = h; } else { ! dy = -lty+((iconWindowH-h)>>1); } for (obj_ptr=topObj; obj_ptr != NULL; obj_ptr=obj_ptr->next) { *** miniline.c.orig Sun Jan 17 13:37:08 1999 --- miniline.c Sun Jan 17 13:37:08 1999 *************** *** 4573,4575 **** --- 4573,4659 ---- } } + + /* --------------------- DumpMiniLinesInAscii() --------------------- */ + + static + void DumpStrSegInAscii(FP, pStrSeg, pnSomethingPrinted) + FILE *FP; + StrSegInfo *pStrSeg; + int *pnSomethingPrinted; + { + if (*pStrSeg->dyn_str.s == '\0') return; + + if (fprintf(FP, "%s", pStrSeg->dyn_str.s) == EOF) { + writeFileFailed = TRUE; + } + if (pnSomethingPrinted != NULL) *pnSomethingPrinted = TRUE; + } + + static + void DumpStrBlockInAscii(FP, pStrBlock, pnSomethingPrinted) + FILE *FP; + StrBlockInfo *pStrBlock; + int *pnSomethingPrinted; + { + int block_w=pStrBlock->w; + + switch (pStrBlock->type) { + case SB_SIMPLE: + DumpStrSegInAscii(FP, pStrBlock->seg, pnSomethingPrinted); + break; + + case SB_CHAR_SPACE: + if (fprintf(FP, " ") == EOF) writeFileFailed = TRUE; + break; + + case SB_SUPSUB_LEFT: + case SB_SUPSUB_CENTER: + case SB_SUPSUB_RIGHT: + fprintf(FP, "\n"); + if (pStrBlock->type == SB_SUPSUB_CENTER) { + /* pStrBlock->seg better not be NULL or it will crash */ + DumpStrSegInAscii(FP, pStrBlock->seg, pnSomethingPrinted); + if (fprintf(FP, "\n") == EOF) writeFileFailed = TRUE; + } + if (pStrBlock->sup != NULL) { + if (!BlankMiniLines(pStrBlock->sup)) { + DumpMiniLinesInAscii(FP, pStrBlock->sup, pnSomethingPrinted); + } + } + if (pStrBlock->sub != NULL) { + if (!BlankMiniLines(pStrBlock->sub)) { + DumpMiniLinesInAscii(FP, pStrBlock->sub, pnSomethingPrinted); + } + } + break; + } + } + + static + void DumpMiniLineInAscii(FP, pMiniLine, pnSomethingPrinted) + FILE *FP; + MiniLineInfo *pMiniLine; + int *pnSomethingPrinted; + { + StrBlockInfo *pStrBlock=NULL; + + for (pStrBlock=pMiniLine->first_block; pStrBlock != NULL; + pStrBlock=pStrBlock->next) { + DumpStrBlockInAscii(FP, pStrBlock, pnSomethingPrinted); + } + } + + void DumpMiniLinesInAscii(FP, minilines, pnSomethingPrinted) + FILE *FP; + MiniLinesInfo *minilines; + int *pnSomethingPrinted; + { + MiniLineInfo *pMiniLine=NULL; + + for (pMiniLine=minilines->first; pMiniLine != NULL; + pMiniLine=pMiniLine->next) { + DumpMiniLineInAscii(FP, pMiniLine, pnSomethingPrinted); + if (fprintf(FP, "\n") == EOF) writeFileFailed = TRUE; + } + } *** names.c.orig Sun Jan 17 13:37:10 1999 --- names.c Sun Jan 17 13:37:10 1999 *************** *** 323,327 **** ext_len = (ext_str == NULL ? 0 : strlen(ext_str)); if (*Path == '\0') { ! strcpy(path, "/"); if ((dirp=opendir(path)) == NULL) { sprintf(gszMsgBox, "%s '%s' %s.", --- 323,327 ---- ext_len = (ext_str == NULL ? 0 : strlen(ext_str)); if (*Path == '\0') { ! strcpy(path, DIR_SEP_STR); if ((dirp=opendir(path)) == NULL) { sprintf(gszMsgBox, "%s '%s' %s.", *************** *** 340,344 **** return NULL; } ! strcat(path, "/"); } --- 340,344 ---- return NULL; } ! strcat(path, DIR_SEP_STR); } *************** *** 361,365 **** #ifdef VMS if (len > 4 && (strcmp(".dir", &d->d_name[len-4]) == 0)) { ! d->d_name[len-4] = '/'; d->d_name[len-4+1] = '\0'; dsp_ptr = (DspList*)malloc(sizeof(DspList)); --- 361,365 ---- #ifdef VMS if (len > 4 && (strcmp(".dir", &d->d_name[len-4]) == 0)) { ! d->d_name[len-4] = DIR_SEP; d->d_name[len-4+1] = '\0'; dsp_ptr = (DspList*)malloc(sizeof(DspList)); *************** *** 394,398 **** if (stat_buf.st_mode & S_IFDIR) { dsp_ptr->directory = TRUE; ! strcat(d->d_name, "/"); } else { dsp_ptr->directory = FALSE; --- 394,398 ---- if (stat_buf.st_mode & S_IFDIR) { dsp_ptr->directory = TRUE; ! strcat(d->d_name, DIR_SEP_STR); } else { dsp_ptr->directory = FALSE; *************** *** 410,414 **** #ifdef VMS } else if (len > 4 && (strcmp(".dir", &d->d_name[len-4]) == 0)) { ! d->d_name[len-4] = '/'; d->d_name[len-4+1] = '\0'; dsp_ptr = (DspList*)malloc(sizeof(DspList)); --- 410,414 ---- #ifdef VMS } else if (len > 4 && (strcmp(".dir", &d->d_name[len-4]) == 0)) { ! d->d_name[len-4] = DIR_SEP; d->d_name[len-4+1] = '\0'; dsp_ptr = (DspList*)malloc(sizeof(DspList)); *************** *** 440,444 **** memset(dsp_ptr, 0, sizeof(DspList)); dsp_ptr->directory = TRUE; ! strcat(d->d_name, "/"); UtilStrCpyN(dsp_ptr->itemstr, sizeof(dsp_ptr->itemstr), d->d_name); } else { --- 440,444 ---- memset(dsp_ptr, 0, sizeof(DspList)); dsp_ptr->directory = TRUE; ! strcat(d->d_name, DIR_SEP_STR); UtilStrCpyN(dsp_ptr->itemstr, sizeof(dsp_ptr->itemstr), d->d_name); } else { *************** *** 636,640 **** len = strlen(DLPtr->itemstr); if (!ignoreDirectoryFlag && !DLPtr->directory) { ! for (j = len; j >= 0 && DLPtr->itemstr[j] != '/'; j--) ; if (j >= 0) { strcpy(c_ptr, (&(DLPtr->itemstr[j]))+1); --- 636,640 ---- len = strlen(DLPtr->itemstr); if (!ignoreDirectoryFlag && !DLPtr->directory) { ! for (j = len; j >= 0 && DLPtr->itemstr[j] != DIR_SEP; j--) ; if (j >= 0) { strcpy(c_ptr, (&(DLPtr->itemstr[j]))+1); *************** *** 857,861 **** int len=strlen(selected_str); ! if (len > 0 && selected_str[len-1] == '/') { selected_str[--len] = '\0'; } --- 857,861 ---- int len=strlen(selected_str); ! if (len > 0 && selected_str[len-1] == DIR_SEP) { selected_str[--len] = '\0'; } *************** *** 1427,1490 **** } - static - void ShrinkName(FileName) - char *FileName; - { - char *c_ptr, *real_ptr, real_name[MAXPATHLENGTH]; - - if (*FileName != '/') return; - - strcpy(real_name, FileName); - real_ptr = real_name; - c_ptr = (&real_name[1]); - - while (*c_ptr != '\0') { - if (*c_ptr == '.') { - if (*(c_ptr+1) == '.') { - if (*(c_ptr+2) == '/') { - /* "../" */ - if (real_ptr != real_name) { - while (*(--real_ptr) != '/') ; - } - c_ptr += 3; - } else { - while (*c_ptr != '\0' && *c_ptr != '/') { - *(++real_ptr) = *c_ptr++; - } - if (*c_ptr == '/') { - c_ptr++; - *(++real_ptr) = '/'; - } - } - } else if (*(c_ptr+1) == '/') { - /* "./" */ - c_ptr += 2; - } else { - while (*c_ptr != '\0' && *c_ptr != '/') { - *(++real_ptr) = *c_ptr++; - } - if (*c_ptr == '/') { - c_ptr++; - *(++real_ptr) = '/'; - } - } - #ifndef apollo - } else if (*c_ptr == '/') { - c_ptr++; - #endif - } else { - while (*c_ptr != '\0' && *c_ptr != '/') { - *(++real_ptr) = *c_ptr++; - } - if (*c_ptr == '/') { - c_ptr++; - *(++real_ptr) = '/'; - } - } - } - *(++real_ptr) = '\0'; - strcpy(FileName, real_name); - } - void SetCurDir(FileName) char *FileName; --- 1427,1430 ---- *************** *** 1494,1498 **** strcpy(file_name, FileName); ! ShrinkName(file_name); if (curDirIsLocal && FileIsRemote(FileName)) { --- 1434,1438 ---- strcpy(file_name, FileName); ! UtilShrinkName(file_name); if (curDirIsLocal && FileIsRemote(FileName)) { *************** *** 1505,1512 **** *curLocalDir = '\0'; } ! for (i=strlen(file_name)-1; i>=0 && file_name[i]!='/'; i--) ; if (i < 0) { ! TwoLineMsg("Error: No '/' found in SetCurDir().", " curDir set to '.'."); strcpy(curDir, "."); --- 1445,1452 ---- *curLocalDir = '\0'; } ! for (i=strlen(file_name)-1; i>=0 && file_name[i]!=DIR_SEP; i--) ; if (i < 0) { ! TwoLineMsg("Error: No directory-separator found in SetCurDir().", " curDir set to '.'."); strcpy(curDir, "."); *************** *** 1528,1537 **** strcpy(file_name, FileName); ! ShrinkName(file_name); ! for (i = strlen(file_name)-1; i>=0 && file_name[i]!='/'; i--) ; if (i < 0) { ! TwoLineMsg("Error: No '/' found in SetCurSymDir().", " curSymDir set to '.'."); strcpy(curSymDir, "."); --- 1468,1477 ---- strcpy(file_name, FileName); ! UtilShrinkName(file_name); ! for (i = strlen(file_name)-1; i>=0 && file_name[i]!=DIR_SEP; i--) ; if (i < 0) { ! TwoLineMsg("Error: No directory-separator found in SetCurSymDir().", " curSymDir set to '.'."); strcpy(curSymDir, "."); *************** *** 1551,1560 **** strcpy(file_name, FileName); ! ShrinkName(file_name); ! for (i = strlen(file_name)-1; i>=0 && file_name[i]!='/'; i--) ; if (i < 0) { ! TwoLineMsg("Error: No '/' found in SetCurImportDir().", " curImportDir set to '.'."); strcpy(curImportDir, "."); --- 1491,1500 ---- strcpy(file_name, FileName); ! UtilShrinkName(file_name); ! for (i = strlen(file_name)-1; i>=0 && file_name[i]!=DIR_SEP; i--) ; if (i < 0) { ! TwoLineMsg("Error: No directory-separator found in SetCurImportDir().", " curImportDir set to '.'."); strcpy(curImportDir, "."); *** navigate.c.orig Sun Jan 17 13:37:11 1999 --- navigate.c Sun Jan 17 13:37:11 1999 *************** *** 525,529 **** curNavigate->full_fname = (char*)malloc((len+1)*sizeof(char)); if (curNavigate->full_fname == NULL) FailAllocMessage(); ! sprintf(curNavigate->full_fname, "%s/%s", curDir, curFileName); if (firstPage != NULL && firstPage->name != NULL) { curNavigate->doc_name = UtilStrDup(firstPage->name); --- 525,529 ---- curNavigate->full_fname = (char*)malloc((len+1)*sizeof(char)); if (curNavigate->full_fname == NULL) FailAllocMessage(); ! sprintf(curNavigate->full_fname, "%s%c%s", curDir, DIR_SEP, curFileName); if (firstPage != NULL && firstPage->name != NULL) { curNavigate->doc_name = UtilStrDup(firstPage->name); *************** *** 1090,1094 **** return; } ! sprintf(full_fname, "%s/%s", curDir, curFileName); if ((ppsz_buf=ReadHotListFile(&num_entries)) == NULL) return; if ((fp=fopen(hotListFileName, "w")) == NULL) { --- 1090,1094 ---- return; } ! sprintf(full_fname, "%s%c%s", curDir, DIR_SEP, curFileName); if ((ppsz_buf=ReadHotListFile(&num_entries)) == NULL) return; if ((fp=fopen(hotListFileName, "w")) == NULL) { *** oval.c.orig Sun Jan 17 13:37:13 1999 --- oval.c Sun Jan 17 13:37:13 1999 *************** *** 551,555 **** XGCValues values; XEvent input, ev; ! XMotionEvent *motion_ev; bbox.ltx = bbox.rbx = OrigX; --- 551,555 ---- XGCValues values; XEvent input, ev; ! XMotionEvent *motion_ev=NULL; bbox.ltx = bbox.rbx = OrigX; *************** *** 602,608 **** } else if (input.type == MotionNotify || input.type == KeyPress || input.type == KeyRelease) { ! motion_ev = &(input.xmotion); ! end_x = motion_ev->x; ! end_y = motion_ev->y; if (input.type == KeyPress || input.type == KeyRelease) { end_x = grid_x; --- 602,632 ---- } else if (input.type == MotionNotify || input.type == KeyPress || input.type == KeyRelease) { ! if (input.type == KeyPress) { ! KeySym key_sym; ! char s[80]; ! int has_ch; ! ! has_ch = XLookupString(&(input.xkey), s, sizeof(s), &key_sym, ! &c_stat); ! TranslateKeys(s, &key_sym); ! if (CharIsESC(&(input.xkey), s, key_sym, &has_ch)) { ! XUngrabPointer(mainDisplay, CurrentTime); ! MyContinueOval(drawWindow, drawGC, &bbox); ! EndIntervalRulers(grid_x, grid_y); ! PixelToMeasurementUnit(w_buf, ABS_SIZE(abs(bbox.rbx-OrigX))); ! PixelToMeasurementUnit(h_buf, ABS_SIZE(abs(bbox.rby-OrigY))); ! 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; ! done = TRUE; ! } ! } ! if (done) { ! break; ! } ! motion_ev = (&(input.xmotion)); if (input.type == KeyPress || input.type == KeyRelease) { end_x = grid_x; *************** *** 622,626 **** } GridXY(end_x, end_y, &grid_x, &grid_y); ! if (curChoice != DRAWEDGECIRCLE && (motion_ev->state & (ShiftMask | ControlMask)) != 0) { int w, h, pos_w=TRUE, pos_h=TRUE; --- 646,650 ---- } GridXY(end_x, end_y, &grid_x, &grid_y); ! if (input.type == MotionNotify && curChoice != DRAWEDGECIRCLE && (motion_ev->state & (ShiftMask | ControlMask)) != 0) { int w, h, pos_w=TRUE, pos_h=TRUE; *************** *** 662,685 **** DrawIntervalRulers(OrigX, OrigY, grid_x, grid_y); while (XCheckMaskEvent(mainDisplay, PointerMotionMask, &ev)) ; - } else if (input.type == KeyPress) { - KeySym key_sym; - char s[80]; - int has_ch; - - has_ch = XLookupString(&(input.xkey), s, sizeof(s), &key_sym, &c_stat); - TranslateKeys(s, &key_sym); - if (CharIsESC(&(input.xkey), s, key_sym, &has_ch)) { - XUngrabPointer(mainDisplay, CurrentTime); - MyContinueOval(drawWindow, drawGC, &bbox); - EndIntervalRulers(grid_x, grid_y); - PixelToMeasurementUnit(w_buf, ABS_SIZE(abs(bbox.rbx-OrigX))); - PixelToMeasurementUnit(h_buf, ABS_SIZE(abs(bbox.rby-OrigY))); - 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; - done = TRUE; - } } } --- 686,689 ---- *** poly.c.orig Sun Jan 17 13:37:14 1999 --- poly.c Sun Jan 17 13:37:14 1999 *************** *** 502,505 **** --- 502,534 ---- } else if (input.type == MotionNotify || input.type == KeyPress || input.type == KeyRelease) { + if (input.type == KeyPress) { + KeySym key_sym; + char s[80]; + int has_ch; + + has_ch = XLookupString(&(input.xkey), s, sizeof(s), &key_sym, + &c_stat); + TranslateKeys(s, &key_sym); + if (CharIsESC(&(input.xkey), s, key_sym, &has_ch)) { + if (curChoice == FREEHAND) { + PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); + PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); + sprintf(buf, "x=%s\ny=%s", x_buf, y_buf); + } else { + PixelToMeasurementUnit(w_buf, ABS_SIZE(abs(grid_x-OrigX))); + PixelToMeasurementUnit(h_buf, ABS_SIZE(abs(grid_y-OrigY))); + 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; + done = TRUE; + } + } + if (done) { + break; + } if (curChoice == FREEHAND) { PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); *************** *** 832,859 **** } done = TRUE; - } else if (input.type == KeyPress) { - KeySym key_sym; - char s[80]; - int has_ch; - - has_ch = XLookupString(&(input.xkey), s, sizeof(s), &key_sym, &c_stat); - TranslateKeys(s, &key_sym); - if (CharIsESC(&(input.xkey), s, key_sym, &has_ch)) { - if (curChoice == FREEHAND) { - PixelToMeasurementUnit(x_buf, ABS_X(grid_x)); - PixelToMeasurementUnit(y_buf, ABS_Y(grid_y)); - sprintf(buf, "x=%s\ny=%s", x_buf, y_buf); - } else { - PixelToMeasurementUnit(w_buf, ABS_SIZE(abs(grid_x-OrigX))); - PixelToMeasurementUnit(h_buf, ABS_SIZE(abs(grid_y-OrigY))); - 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; - done = TRUE; - } } } --- 861,864 ---- *** remote.c.orig Sun Jan 17 13:37:16 1999 --- remote.c Sun Jan 17 13:37:16 1999 *************** *** 417,421 **** { if (psz_def_ext != NULL) { ! char *slash_ptr=UtilStrRChr(psz_file, (int)'/'), *dot_ptr=NULL; if (slash_ptr == NULL) { --- 417,421 ---- { if (psz_def_ext != NULL) { ! char *slash_ptr=UtilStrRChr(psz_file, (int)DIR_SEP), *dot_ptr=NULL; if (slash_ptr == NULL) { *************** *** 498,502 **** } } else { ! if (*psz_file == '/') { if (!FormLocalName(psz_file, psz_def_ext, psz_return)) rc = FALSE; } else if (FileIsRemote(psz_file)) { --- 498,502 ---- } } else { ! if (*psz_file == DIR_SEP) { if (!FormLocalName(psz_file, psz_def_ext, psz_return)) rc = FALSE; } else if (FileIsRemote(psz_file)) { *************** *** 508,512 **** if (fname == NULL) return FailAllocMessage(); ! sprintf(fname, "%s/%s", psz_dir, psz_file); if (!FormLocalName(fname, psz_def_ext, psz_return)) rc = FALSE; free(fname); --- 508,512 ---- if (fname == NULL) return FailAllocMessage(); ! sprintf(fname, "%s%c%s", psz_dir, DIR_SEP, psz_file); if (!FormLocalName(fname, psz_def_ext, psz_return)) rc = FALSE; free(fname); *** scroll.c.orig Sun Jan 17 13:37:18 1999 --- scroll.c Sun Jan 17 13:37:18 1999 *************** *** 133,137 **** } block_area -= (scrollBarW<<1); ! frac = (double)((double)length / (double)total); if (frac > 1.0) frac = 1.0; block_start = ((int)(block_area * start_frac)); --- 133,141 ---- } block_area -= (scrollBarW<<1); ! if (total == 0) { ! frac = (double)1.0; ! } else { ! frac = (double)((double)length / (double)total); ! } if (frac > 1.0) frac = 1.0; block_start = ((int)(block_area * start_frac)); *************** *** 242,246 **** } block_area -= (scrollBarW<<1); ! frac = (double)((double)length / (double)total); if (frac > 1.0) frac = 1.0; block_start = scrollBarW + ((int)(block_area * start_frac)); --- 246,254 ---- } block_area -= (scrollBarW<<1); ! if (total == 0) { ! frac = (double)1.0; ! } else { ! frac = (double)((double)length / (double)total); ! } if (frac > 1.0) frac = 1.0; block_start = scrollBarW + ((int)(block_area * start_frac)); *************** *** 290,294 **** TgDrawThreeDButton(dpy, win, textMenuGC, &bbox, TGBS_RAISED, 2, FALSE); } else { ! frac = (double)((double)length / (double)total); if (frac > 1.0) frac = 1.0; block_start = (int)(block_area * start_frac); --- 298,306 ---- TgDrawThreeDButton(dpy, win, textMenuGC, &bbox, TGBS_RAISED, 2, FALSE); } else { ! if (total == 0) { ! frac = (double)1.0; ! } else { ! frac = (double)((double)length / (double)total); ! } if (frac > 1.0) frac = 1.0; block_start = (int)(block_area * start_frac); *************** *** 333,337 **** while (XCheckWindowEvent(mainDisplay, vSBarWindow, ExposureMask, &ev)) ; ! start_frac = (double)((double)drawOrigY / (double)total); TgDrawScrollBar(mainDisplay, vSBarWindow, VERT_SCROLLBAR, scrollBarW, scrollAreaH, start_frac, drawWinH, total); --- 345,354 ---- while (XCheckWindowEvent(mainDisplay, vSBarWindow, ExposureMask, &ev)) ; ! if (total == 0) { ! start_frac = (double)1.0; ! } else { ! start_frac = (double)((double)drawOrigY / (double)total); ! } ! if (start_frac > 1.0) start_frac = 1.0; TgDrawScrollBar(mainDisplay, vSBarWindow, VERT_SCROLLBAR, scrollBarW, scrollAreaH, start_frac, drawWinH, total); *************** *** 347,351 **** while (XCheckWindowEvent(mainDisplay, hSBarWindow, ExposureMask, &ev)) ; ! start_frac = (double)((double)drawOrigX / (double)total); TgDrawScrollBar(mainDisplay, hSBarWindow, HORI_SCROLLBAR, scrollAreaW, scrollBarW, start_frac, drawWinW, total); --- 364,373 ---- while (XCheckWindowEvent(mainDisplay, hSBarWindow, ExposureMask, &ev)) ; ! if (total == 0) { ! start_frac = (double)1.0; ! } else { ! start_frac = (double)((double)drawOrigX / (double)total); ! } ! if (start_frac > 1.0) start_frac = 1.0; TgDrawScrollBar(mainDisplay, hSBarWindow, HORI_SCROLLBAR, scrollAreaW, scrollBarW, start_frac, drawWinW, total); *************** *** 597,601 **** XButtonEvent btn_ev; ! start_frac = (double)((double)drawOrigY / (double)total); hit = TgGetScrollHit(button_ev->x, button_ev->y, VERT_SCROLLBAR, scrollBarW, scrollAreaH, start_frac, drawWinH, total, --- 619,628 ---- XButtonEvent btn_ev; ! if (total == 0) { ! start_frac = (double)1.0; ! } else { ! start_frac = (double)((double)drawOrigY / (double)total); ! } ! if (start_frac > 1.0) start_frac = 1.0; hit = TgGetScrollHit(button_ev->x, button_ev->y, VERT_SCROLLBAR, scrollBarW, scrollAreaH, start_frac, drawWinH, total, *************** *** 919,923 **** XButtonEvent btn_ev; ! start_frac = (double)((double)drawOrigX / (double)total); hit = TgGetScrollHit(button_ev->x, button_ev->y, HORI_SCROLLBAR, scrollAreaW, scrollBarW, start_frac, drawWinW, total, --- 946,955 ---- XButtonEvent btn_ev; ! if (total == 0) { ! start_frac = (double)1.0; ! } else { ! start_frac = (double)((double)drawOrigX / (double)total); ! } ! if (start_frac > 1.0) start_frac = 1.0; hit = TgGetScrollHit(button_ev->x, button_ev->y, HORI_SCROLLBAR, scrollAreaW, scrollBarW, start_frac, drawWinW, total, *************** *** 1124,1133 **** SetMouseStatus("scroll down", "", ""); } else { ! int total=max(paperHeight,(drawOrigY+drawWinH)); ! double start_frac=(double)((double)drawOrigY / (double)total); ! int hit=TgGetScrollHit(input->xmotion.x, input->xmotion.y, VERT_SCROLLBAR, scrollBarW, scrollAreaH, start_frac, drawWinH, total, NULL); - if (hit < 0) { SetMouseStatus("scroll page up", "", ""); --- 1156,1171 ---- SetMouseStatus("scroll down", "", ""); } else { ! int total=max(paperHeight,(drawOrigY+drawWinH)), hit=FALSE; ! double start_frac=(double)0.0; ! ! if (total == 0) { ! start_frac = (double)1.0; ! } else { ! start_frac = (double)((double)drawOrigY / (double)total); ! } ! if (start_frac > 1.0) start_frac = 1.0; ! hit = TgGetScrollHit(input->xmotion.x, input->xmotion.y, VERT_SCROLLBAR, scrollBarW, scrollAreaH, start_frac, drawWinH, total, NULL); if (hit < 0) { SetMouseStatus("scroll page up", "", ""); *************** *** 1163,1172 **** SetMouseStatus("scroll right", "", ""); } else { ! int total=max(paperWidth,(drawOrigX+drawWinW)); ! double start_frac=(double)((double)drawOrigX / (double)total); ! int hit=TgGetScrollHit(input->xmotion.x, input->xmotion.y, HORI_SCROLLBAR, scrollAreaW, scrollBarW, start_frac, drawWinW, total, NULL); - if (hit < 0) { SetMouseStatus("scroll page left", "", ""); --- 1201,1216 ---- SetMouseStatus("scroll right", "", ""); } else { ! int total=max(paperWidth,(drawOrigX+drawWinW)), hit=FALSE; ! double start_frac=(double)0.0; ! ! if (total == 0) { ! start_frac = (double)1.0; ! } else { ! start_frac=(double)((double)drawOrigX / (double)total); ! } ! if (start_frac > 1.0) start_frac = 1.0; ! hit = TgGetScrollHit(input->xmotion.x, input->xmotion.y, HORI_SCROLLBAR, scrollAreaW, scrollBarW, start_frac, drawWinW, total, NULL); if (hit < 0) { SetMouseStatus("scroll page left", "", ""); *** select.c.orig Sun Jan 17 13:37:19 1999 --- select.c Sun Jan 17 13:37:19 1999 *************** *** 1811,1817 **** referer_set = TRUE; if (*curSymDir == '\0') { ! sprintf(gszMsgBox, "%s/%s", curDir, curFileName); } else { ! sprintf(gszMsgBox, "%s/%s", curSymDir, curFileName); } HttpSetReferer(gszMsgBox); --- 1811,1817 ---- referer_set = TRUE; if (*curSymDir == '\0') { ! sprintf(gszMsgBox, "%s%c%s", curDir, DIR_SEP, curFileName); } else { ! sprintf(gszMsgBox, "%s%c%s", curSymDir, DIR_SEP, curFileName); } HttpSetReferer(gszMsgBox); *** setup.c.orig Sun Jan 17 13:37:21 1999 --- setup.c Sun Jan 17 13:37:21 1999 *************** *** 773,780 **** *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, '.'); --- 773,780 ---- *pPixmap = *pPixmapMask = None; if (c_ptr == NULL) return FALSE; ! if (*c_ptr == DIR_SEP) { strncpy(fname, c_ptr, sizeof(fname)); } else { ! sprintf(fname, "%s%c%s", drawPath, DIR_SEP, c_ptr); } c_ptr = UtilStrRChr(fname, '.'); *************** *** 1350,1359 **** } i = strlen(drawPath); ! if (drawPath[i-1] == '/') drawPath[i-1] = '\0'; if ((c_ptr=getenv("HOME")) == NULL) { ! strcpy(homeDir, "/"); } else if (strlen(c_ptr) >= MAXPATHLENGTH-1) { ! strcpy(homeDir, "/"); } else { strcpy(homeDir, c_ptr); --- 1350,1359 ---- } i = strlen(drawPath); ! if (drawPath[i-1] == DIR_SEP) drawPath[i-1] = '\0'; if ((c_ptr=getenv("HOME")) == NULL) { ! strcpy(homeDir, DIR_SEP_STR); } else if (strlen(c_ptr) >= MAXPATHLENGTH-1) { ! strcpy(homeDir, DIR_SEP_STR); } else { strcpy(homeDir, c_ptr); *** special.c.orig Sun Jan 17 13:37:23 1999 --- special.c Sun Jan 17 13:37:23 1999 *************** *** 215,219 **** FILE *fp; ! sprintf(file_name, "%s/%s.%s", PathName, SymName, SYM_FILE_EXT); if ((short_name=IsPrefix(bootDir, file_name, &rest))) ++rest; --- 215,219 ---- FILE *fp; ! sprintf(file_name, "%s%c%s.%s", PathName, DIR_SEP, SymName, SYM_FILE_EXT); if ((short_name=IsPrefix(bootDir, file_name, &rest))) ++rest; *************** *** 450,454 **** ExposeEventHandler(&ev, TRUE); } ! sprintf(file_name, "%s/%s", path_name, sym_name); len = strlen(sym_name); --- 450,454 ---- ExposeEventHandler(&ev, TRUE); } ! sprintf(file_name, "%s%c%s", path_name, DIR_SEP, sym_name); len = strlen(sym_name); *************** *** 721,725 **** } if (sym_path == NULL) { ! sprintf(file_name, "%s/%s", curDir, icon_full_name); } else { strcpy(file_name, icon_full_name); --- 721,725 ---- } if (sym_path == NULL) { ! sprintf(file_name, "%s%c%s", curDir, DIR_SEP, icon_full_name); } else { strcpy(file_name, icon_full_name); *************** *** 1079,1088 **** Dialog(msg, gszMsgBox, fname); if (*fname == '\0') return; ! if (*fname == '/') { strcpy(full_fname, fname); } else { ! sprintf(full_fname, "%s/%s", curDirIsLocal ? curDir : curLocalDir, fname); } ! if ((c_ptr=UtilStrRChr(full_fname, (int)'/')) == NULL) { if ((dot_ptr=UtilStrRChr(full_fname, (int)'.')) == NULL) { sprintf(&full_fname[strlen(full_fname)], ".%s", TEXT_FILE_EXT); --- 1079,1089 ---- Dialog(msg, gszMsgBox, fname); if (*fname == '\0') return; ! if (*fname == DIR_SEP) { strcpy(full_fname, fname); } else { ! sprintf(full_fname, "%s%c%s", curDirIsLocal ? curDir : curLocalDir, ! DIR_SEP, fname); } ! if ((c_ptr=UtilStrRChr(full_fname, (int)DIR_SEP)) == NULL) { if ((dot_ptr=UtilStrRChr(full_fname, (int)'.')) == NULL) { sprintf(&full_fname[strlen(full_fname)], ".%s", TEXT_FILE_EXT); *************** *** 1587,1596 **** if (*fname == '\0') return; ! if (*fname == '/') { strcpy(full_fname, fname); } else { ! sprintf(full_fname, "%s/%s", curDirIsLocal ? curDir : curLocalDir, fname); } ! if ((c_ptr=UtilStrRChr(full_fname, (int)'/')) == NULL) { if ((dot_ptr=UtilStrRChr(full_fname, (int)'.')) == NULL) { sprintf(&full_fname[strlen(full_fname)], ".%s", TEXT_FILE_EXT); --- 1588,1598 ---- if (*fname == '\0') return; ! if (*fname == DIR_SEP) { strcpy(full_fname, fname); } else { ! sprintf(full_fname, "%s%c%s", curDirIsLocal ? curDir : curLocalDir, ! DIR_SEP, fname); } ! if ((c_ptr=UtilStrRChr(full_fname, (int)DIR_SEP)) == NULL) { if ((dot_ptr=UtilStrRChr(full_fname, (int)'.')) == NULL) { sprintf(&full_fname[strlen(full_fname)], ".%s", TEXT_FILE_EXT); *** stk.c.orig Sun Jan 17 13:37:24 1999 --- stk.c Sun Jan 17 13:37:24 1999 *************** *** 249,258 **** strcpy(sym_name, topSel->obj->detail.r->s); ! if (*sym_name == '/') { ! char *psz=UtilStrRChr(sym_name, '/'), *psz1=sym_name; *psz = '\0'; strcpy(path_name, sym_name); ! *psz++ = '/'; while (*psz != '\0') *psz1++ = *psz++; *psz1 = '\0'; --- 249,258 ---- strcpy(sym_name, topSel->obj->detail.r->s); ! if (*sym_name == DIR_SEP) { ! char *psz=UtilStrRChr(sym_name, DIR_SEP), *psz1=sym_name; *psz = '\0'; strcpy(path_name, sym_name); ! *psz++ = DIR_SEP; while (*psz != '\0') *psz1++ = *psz++; *psz1 = '\0'; *************** *** 271,275 **** strcat(sym_name, SYM_FILE_EXT); } ! sprintf(file_name, "%s/%s", path_name, sym_name); if ((short_name=IsPrefix(bootDir, file_name, &rest))) ++rest; --- 271,275 ---- strcat(sym_name, SYM_FILE_EXT); } ! sprintf(file_name, "%s%c%s", path_name, DIR_SEP, sym_name); if ((short_name=IsPrefix(bootDir, file_name, &rest))) ++rest; *************** *** 448,454 **** strcpy(curFileName, StkPtr->name); if (*curSymDir == '\0') { ! sprintf(fname, "%s/%s", StkPtr->dir, curFileName); } else { ! sprintf(fname, "%s/%s", curSymDir, curFileName); } if (IsPrefix(bootDir, fname, &rest)) { --- 448,454 ---- strcpy(curFileName, StkPtr->name); if (*curSymDir == '\0') { ! sprintf(fname, "%s%c%s", StkPtr->dir, DIR_SEP, curFileName); } else { ! sprintf(fname, "%s%c%s", curSymDir, DIR_SEP, curFileName); } if (IsPrefix(bootDir, fname, &rest)) { *** tgif.c.orig Sun Jan 17 13:37:25 1999 --- tgif.c Sun Jan 17 13:37:25 1999 *************** *** 130,134 **** char *FileName; { ! char *c_ptr=UtilStrRChr(FileName, '/'); if (c_ptr != NULL && *(++c_ptr) != '\0') { --- 130,134 ---- char *FileName; { ! char *c_ptr=UtilStrRChr(FileName, DIR_SEP); if (c_ptr != NULL && *(++c_ptr) != '\0') { *************** *** 193,200 **** char file_path[MAXPATHLENGTH+1]; ! if (*full_name == '/') { strcpy(file_path, full_name); } else { ! sprintf(file_path, "%s/%s", curDir, full_name); } curFileDefined = TRUE; --- 193,200 ---- char file_path[MAXPATHLENGTH+1]; ! if (*full_name == DIR_SEP) { strcpy(file_path, full_name); } else { ! sprintf(file_path, "%s%c%s", curDir, DIR_SEP, full_name); } curFileDefined = TRUE; *** tgif_dbg.c.orig Sun Jan 17 13:37:26 1999 --- tgif_dbg.c Sun Jan 17 13:37:26 1999 *************** *** 32,36 **** */ - #ifdef _TGIF_DBG - #define _INCLUDE_FROM_TGIF_DBG_C_ --- 32,34 ---- */ #define _INCLUDE_FROM_TGIF_DBG_C_ *************** *** 46,49 **** --- 44,49 ---- #include + #ifdef _TGIF_DBG + #undef _Xconst #define _Xconst *** util.c.orig Sun Jan 17 13:37:27 1999 --- util.c Sun Jan 17 13:37:27 1999 *************** *** 243,250 **** char *pszFile; { ! char *c_ptr, *real_ptr, *real_name; ! if (strncmp(pszFile, "./", 2) == 0) return TRUE; ! if (*pszFile != '/') return FALSE; real_name = UtilStrDup(pszFile); --- 243,250 ---- char *pszFile; { ! char *c_ptr=NULL, *real_ptr=NULL, *real_name=NULL; ! if (pszFile[0] == '.' && pszFile[1] == DIR_SEP) return TRUE; ! if (*pszFile != DIR_SEP) return FALSE; real_name = UtilStrDup(pszFile); *************** *** 255,297 **** while (*c_ptr != '\0') { if (*c_ptr == '.') { ! if (*(c_ptr+1) == '.') { ! if (*(c_ptr+2) == '/') { /* "../" */ if (real_ptr != real_name) { ! while (*(--real_ptr) != '/') ; } ! c_ptr += 3; } else { ! while (*c_ptr != '\0' && *c_ptr != '/') { *(++real_ptr) = *c_ptr++; } ! if (*c_ptr == '/') { c_ptr++; ! *(++real_ptr) = '/'; } } ! } else if (*(c_ptr+1) == '/') { /* "./" */ ! c_ptr += 2; } else { ! while (*c_ptr != '\0' && *c_ptr != '/') { *(++real_ptr) = *c_ptr++; } ! if (*c_ptr == '/') { c_ptr++; ! *(++real_ptr) = '/'; } } #ifndef apollo ! } else if (*c_ptr == '/') { c_ptr++; #endif } else { ! while (*c_ptr != '\0' && *c_ptr != '/') { *(++real_ptr) = *c_ptr++; } ! if (*c_ptr == '/') { c_ptr++; ! *(++real_ptr) = '/'; } } --- 255,297 ---- while (*c_ptr != '\0') { if (*c_ptr == '.') { ! if (c_ptr[1] == '.') { ! if (c_ptr[2] == DIR_SEP) { /* "../" */ if (real_ptr != real_name) { ! while (*(--real_ptr) != DIR_SEP) ; } ! c_ptr = (&c_ptr[3]); } else { ! while (*c_ptr != '\0' && *c_ptr != DIR_SEP) { *(++real_ptr) = *c_ptr++; } ! if (*c_ptr == DIR_SEP) { c_ptr++; ! *(++real_ptr) = DIR_SEP; } } ! } else if (c_ptr[1] == DIR_SEP) { /* "./" */ ! c_ptr = (&c_ptr[2]); } else { ! while (*c_ptr != '\0' && *c_ptr != DIR_SEP) { *(++real_ptr) = *c_ptr++; } ! if (*c_ptr == DIR_SEP) { c_ptr++; ! *(++real_ptr) = DIR_SEP; } } #ifndef apollo ! } else if (*c_ptr == DIR_SEP) { c_ptr++; #endif } else { ! while (*c_ptr != '\0' && *c_ptr != DIR_SEP) { *(++real_ptr) = *c_ptr++; } ! if (*c_ptr == DIR_SEP) { c_ptr++; ! *(++real_ptr) = DIR_SEP; } } *** wb1.c.orig Sun Jan 17 13:37:28 1999 --- wb1.c Sun Jan 17 13:37:28 1999 *************** *** 5,10 **** */ - #ifdef _TGIF_WB - #define _INCLUDE_FROM_WB1_C_ --- 5,8 ---- */ #define _INCLUDE_FROM_WB1_C_ *************** *** 11,14 **** --- 9,14 ---- #include "tgifdefs.h" + #ifdef _TGIF_WB + #include "arc.e" #include "box.e" *** wb2.c.orig Sun Jan 17 13:37:30 1999 --- wb2.c Sun Jan 17 13:37:30 1999 *************** *** 5,10 **** */ - #ifdef _TGIF_WB - #define _INCLUDE_FROM_WB2_C_ --- 5,8 ---- */ #define _INCLUDE_FROM_WB2_C_ *************** *** 11,14 **** --- 9,14 ---- #include "tgifdefs.h" + #ifdef _TGIF_WB + #include "attr.e" #include "auxtext.e" *** wb3.c.orig Sun Jan 17 13:37:31 1999 --- wb3.c Sun Jan 17 13:37:31 1999 *************** *** 5,10 **** */ - #ifdef _TGIF_WB - #define _INCLUDE_FROM_WB3_C_ --- 5,8 ---- */ #define _INCLUDE_FROM_WB3_C_ *************** *** 11,14 **** --- 9,14 ---- #include "tgifdefs.h" + #ifdef _TGIF_WB + #include "align.e" #include "auxtext.e" *** xbitmap.c.orig Sun Jan 17 13:37:32 1999 --- xbitmap.c Sun Jan 17 13:37:32 1999 *************** *** 1543,1547 **** if (generateHtmlHref && imageMapFileFormat==IMF_FORMAT_SPYG) { ! if (value_str[0] == '#' && strchr(value_str, '/') == NULL && (((!(PRTGIF && !cmdLineOpenDisplay)) && dumpOneFilePerPage) || (PRTGIF && !cmdLineOpenDisplay && cmdLineOneFilePerPage))) { --- 1543,1547 ---- if (generateHtmlHref && imageMapFileFormat==IMF_FORMAT_SPYG) { ! if (value_str[0] == '#' && strchr(value_str, DIR_SEP) == NULL && (((!(PRTGIF && !cmdLineOpenDisplay)) && dumpOneFilePerPage) || (PRTGIF && !cmdLineOpenDisplay && cmdLineOneFilePerPage))) { *************** *** 1552,1556 **** sprintf(page_spec, "%1d", page_num); ! if ((name=UtilStrRChr(curFileName, '/')) == NULL) { name = curFileName; } else { --- 1552,1556 ---- sprintf(page_spec, "%1d", page_num); ! if ((name=UtilStrRChr(curFileName, DIR_SEP)) == NULL) { name = curFileName; } else { *************** *** 1573,1577 **** } } else { ! if ((name=UtilStrRChr(value_str, '/')) == NULL) { name = value_str; } else { --- 1573,1577 ---- } } else { ! if ((name=UtilStrRChr(value_str, DIR_SEP)) == NULL) { name = value_str; } else { *************** *** 1794,1799 **** char *gif_fname, *map_fname; { ! char *gif_fname_ptr=UtilStrRChr(gif_fname, '/'); ! char *map_fname_ptr=UtilStrRChr(map_fname, '/'); int page_num=0; struct AttrRec *attr_ptr; --- 1794,1799 ---- char *gif_fname, *map_fname; { ! char *gif_fname_ptr=UtilStrRChr(gif_fname, DIR_SEP); ! char *map_fname_ptr=UtilStrRChr(map_fname, DIR_SEP); int page_num=0; struct AttrRec *attr_ptr; *************** *** 2053,2057 **** name[j] = '\0'; ! sprintf(xbm_file_name, "%s/%s", curDir, curFileName); len = strlen(xbm_file_name); for (j=len-1; xbm_file_name[j] != '.'; j--) ; --- 2053,2057 ---- name[j] = '\0'; ! sprintf(xbm_file_name, "%s%c%s", curDir, DIR_SEP, curFileName); len = strlen(xbm_file_name); for (j=len-1; xbm_file_name[j] != '.'; j--) ; *** xprtfltr.c.orig Sun Jan 17 13:37:34 1999 --- xprtfltr.c Sun Jan 17 13:37:34 1999 *************** *** 82,86 **** char *pszPath; { ! char *psz=UtilStrRChr(pszPath, '/'), *psz1=NULL; int nReturn=0; --- 82,86 ---- char *pszPath; { ! char *psz=UtilStrRChr(pszPath, DIR_SEP), *psz1=NULL; int nReturn=0; *** miniline.e.orig Sun Jan 17 13:37:36 1999 --- miniline.e Sun Jan 17 13:37:36 1999 *************** *** 242,245 **** --- 242,247 ---- FILE*, struct BBRec *, int do_dump, int indent)); + extern void DumpMiniLinesInAscii ARGS_DECL((FILE*, MiniLinesInfo*, + int *pnSomethingPrinted)); #ifdef _INCLUDE_FROM_MINILINE_C_ *** const.h.orig Sun Jan 17 13:37:37 1999 --- const.h Sun Jan 17 13:37:37 1999 *************** *** 66,71 **** --- 66,73 ---- #ifdef WIN32 #define DIR_SEP '\\' + #define DIR_SEP_STR "\\" #else /* ~WIN32 */ #define DIR_SEP '/' + #define DIR_SEP_STR "/" #endif *** patchlvl.h.orig Sun Jan 17 13:37:38 1999 --- patchlvl.h Sun Jan 17 13:37:38 1999 *************** *** 35,39 **** #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 5 #endif /*_TGIF_PATCHLEVEL_H_*/ --- 35,39 ---- #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 6 #endif /*_TGIF_PATCHLEVEL_H_*/ *** vms_comp.h.orig Sun Jan 17 13:37:39 1999 --- vms_comp.h Sun Jan 17 13:37:39 1999 *************** *** 20,26 **** #define _VMS_COMP_H_ #ifdef VMS - #include #include #include --- 20,27 ---- #define _VMS_COMP_H_ + #include + #ifdef VMS #include #include *** Imakefile.orig Sun Jan 17 13:37:40 1999 --- Imakefile Sun Jan 17 13:37:40 1999 *************** *** 53,57 **** $(MOREDEFINES) ! TGIFVERSION = 4.0.5 XCOMM Things to try to add to the DEFINES line above: --- 53,57 ---- $(MOREDEFINES) ! TGIFVERSION = 4.0.6 XCOMM Things to try to add to the DEFINES line above: *** tgif.pl.orig Sun Jan 17 13:37:41 1999 --- tgif.pl Sun Jan 17 13:37:41 1999 *************** *** 43,48 **** % ! tgif_state(FileVersion,Obj) :- tgif_state(FileVersion,Obj,_). tgif_state(FileVersion,Obj,Parms) :- ( var(Obj) -> OutputObj = true, --- 43,59 ---- % ! internal_file_version(FileVersion) :- ! nl, write('Sorry, FileVersion '), write(FileVersion), ! write(' belongs to an internal release and it is not supported.'), nl. + check_file_version(34) :- internal_file_version(34), !, fail. + check_file_version(35) :- internal_file_version(35), !, fail. + check_file_version(36) :- internal_file_version(36), !, fail. + check_file_version(_). + + tgif_state(FileVersion,Obj) :- + tgif_state(FileVersion,Obj,_), + !, check_file_version(FileVersion). + tgif_state(FileVersion,Obj,Parms) :- ( var(Obj) -> OutputObj = true, *************** *** 531,535 **** _RotationIncrement), tgif_chk_output(OutputObj,Obj), ! FileVersion >= 33, ( (_PageLayoutMode == 0) -> % stack mode _CurPageNum = _PageArg1, _LastPageNum = _PageArg2, --- 542,546 ---- _RotationIncrement), tgif_chk_output(OutputObj,Obj), ! FileVersion =< 34, ( (_PageLayoutMode == 0) -> % stack mode _CurPageNum = _PageArg1, _LastPageNum = _PageArg2, *************** *** 561,564 **** --- 572,626 ---- !, abolish(tgif_file_version/1), !, assert(tgif_file_version(FileVersion)). + tgif_state(FileVersion,Obj,Parms) :- + ( var(Obj) -> OutputObj = true, + current_predicate(state, + state(_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_)) + ; OutputObj = false + ), + Obj = state(_PageStyle,FileVersion,_PrintMag,_OrigX,_OrigY,_Zoom, + _EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth, + _Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_FontName, + _TextStyle,_FontSize,0,_Dash,_GridSystem, + _MetricGridSize,_TextVSpace,_ZoomIn,_GridShown,_MoveMode, + _TextRotate,_RCBoxRadius,_UseGray,_PageLayoutMode,_PageArg1, + _PageArg2,_PageLineShownInTileMode,_ColorDump, + _OnePageWidth,_OnePageHeight,_StretchableText,_TextRotation, + _RotationIncrement,_TransPat), + tgif_chk_output(OutputObj,Obj), + FileVersion >= 35, + ( (_PageLayoutMode == 0) -> % stack mode + _CurPageNum = _PageArg1, _LastPageNum = _PageArg2, + _PaperRow = 1, _PaperCol = 1 + ; _PaperCol = _PageArg1, _PaperRow = _PageArg2, + _CurPageNum = 1, _LastPageNum = 1 + ), + Parms = [page_style=_PageStyle,file_version=FileVersion, + print_mag=_PrintMag, + orig_x=_OrigX,orig_y=_OrigY,zoom=_Zoom, + english_grid_size=_GridSize,snap_on=_Grid,color=_Color, + h_align=_HoriAlign,v_align=_VertAlign,line_width=_LineWidth, + line_type=_Spline, + line_style=_LineStyle,obj_fill=_ObjFill,pen_pat=_PenPat, + text_just=_TextJust,font_name=_FontName,text_style=_TextStyle, + _font_size_or_sz_unit=_FontSize,line_dash=_Dash, + grid_system=_GridSystem,metric_grid=_MetricGridSize, + text_v_space=_TextVSpace,zoom_in=_ZoomIn,grid_shown=_GridShown, + move_mode=_ModeMode,text_rotate=_TextRotate, + rcb_radius=_RCBoxRadius,use_gray=_UseGray, + page_layout_mode=_PageLayoutMode, + page_line_shown_in_tile_mode=_PageLineShownInTileMode, + papge_col=_PaperCol,papge_row=_PaperRow, + cur_page_num=_CurPageNum,last_page_num=_LastPageNum, + color_dump=_ColorDump,one_page_width=_OnePageWidth, + one_page_height=_OnePageHeight, + stretchable_text=_StretchableText,text_rotation=_TextRotation, + rotation_increment=_RotationIncrement,trans_pat=_TransPat], + FileVersion >= 35, + ( (FileVersion == 35) -> % stack mode + _font_size_or_sz_unit = 'font_size' + ; _font_size_or_sz_unit = 'font_sz_unit' + ), + !, abolish(tgif_file_version/1), + !, assert(tgif_file_version(FileVersion)). % --------------------------------------------------------------------- % *************** *** 691,695 **** bbox_h=_BBoxH,id=_Id,text_dpi=_TextDPI,asc=_Asc,des=_Des, obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! locked=_Locked,strs=StrList], tgif_strs(StrList). tgif_text(Obj,Parms) :- --- 753,757 ---- bbox_h=_BBoxH,id=_Id,text_dpi=_TextDPI,asc=_Asc,des=_Des, obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! obj_locked=_Locked,strs=StrList], tgif_strs(StrList). tgif_text(Obj,Parms) :- *************** *** 709,713 **** bbox_w=_BBoxW,bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! locked=_Locked,strs=StrList], tgif_strs(StrList). tgif_text(Obj,Parms) :- --- 771,775 ---- bbox_w=_BBoxW,bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! obj_locked=_Locked,strs=StrList], tgif_strs(StrList). tgif_text(Obj,Parms) :- *************** *** 730,734 **** bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! locked=_Locked,underline_on=_UnderlineOn, underline=_Underline,min_lbearing=_MinLBearing, max_rextra=_MaxRExtra,double_byte=_DoubleByte, --- 792,796 ---- bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! obj_locked=_Locked,underline_on=_UnderlineOn, underline=_Underline,min_lbearing=_MinLBearing, max_rextra=_MaxRExtra,double_byte=_DoubleByte, *************** *** 751,755 **** bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! locked=_Locked,underline_on=_UnderlineOn, underline=_Underline,min_lbearing=_MinLBearing, max_rextra=_MaxRExtra,double_byte=_DoubleByte, --- 813,817 ---- bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! obj_locked=_Locked,underline_on=_UnderlineOn, underline=_Underline,min_lbearing=_MinLBearing, max_rextra=_MaxRExtra,double_byte=_DoubleByte, *************** *** 760,815 **** ), tgif_strs(StrList). tgif_text(Obj,Parms) :- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 34, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), ( _Transformed = 0, ! Obj = text(_Color,_X,_Y,_FontName,_TextStyle,_FontSize, ! _NumLines,_TextJust,_TextRotate,_PenPat,_BBoxW,_BBoxH, ! _Id,0,_Asc,_Des,_ObjFill,_VSpace,_Rotation,_Locked, ! _UnderlineOn,_Underline,_MinLBearing,_MaxRExtra, ! _DoubleByte,_Direction,_CustomFontName,_Compressed, ! _Transformed,_Invisible,0, ! StrList), tgif_chk_output(OutputObj,Obj), ! Parms = [color=_Color,x=_X,y=_Y,font_name=_FontName, ! text_style=_TextStyle,font_size=_FontSize, ! num_lines=_NumLines,text_just=_TextJust, ! text_rotate=_TextRotate,pen_pat=_PenPat,bbox_w=_BBoxW, ! bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, ! obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! locked=_Locked,underline_on=_UnderlineOn, ! underline=_Underline,min_lbearing=_MinLBearing, ! max_rextra=_MaxRExtra,double_byte=_DoubleByte, ! direction=_Direction,custom_font_name=_CustomFontName, compressed=_Compressed,transformed=_Transformed, ! invisible=_Invisible, ! strs=StrList] | _Transformed = 1, ! Obj = text(_Color,_X,_Y,_FontName,_TextStyle,_FontSize, ! _NumLines,_TextJust,_TextRotate,_PenPat,_BBoxW,_BBoxH, ! _Id,0,_Asc,_Des,_ObjFill,_VSpace,_Rotation,_Locked, ! _UnderlineOn,_Underline,_MinLBearing,_MaxRExtra, ! _DoubleByte,_Direction,_CustomFontName,_Compressed, ! _Transformed,_Invisible,0, ! TransformSpec,StrList), tgif_chk_output(OutputObj,Obj), tgif_text_transform_spec(TransformSpec,TransformParms), ! Parms = [color=_Color,x=_X,y=_Y,font_name=_FontName, ! text_style=_TextStyle,font_size=_FontSize, ! num_lines=_NumLines,text_just=_TextJust, ! text_rotate=_TextRotate,pen_pat=_PenPat,bbox_w=_BBoxW, ! bbox_h=_BBoxH,id=_Id,asc=_Asc,des=_Des, ! obj_fill=_ObjFill,v_space=_VSpace,rotation=_Rotation, ! locked=_Locked,underline_on=_UnderlineOn, ! underline=_Underline,min_lbearing=_MinLBearing, ! max_rextra=_MaxRExtra,double_byte=_DoubleByte, ! direction=_Direction,custom_font_name=_CustomFontName, compressed=_Compressed,transformed=_Transformed, ! invisible=_Invisible, ! transform_spec=TransformParms,strs=StrList] ), ! tgif_strs(StrList). % --------------------------------------------------------------------- % --- 822,870 ---- ), tgif_strs(StrList). + % + % Note: FileVersions 34, 35, and 36 are skipped. See check_file_version/1. + % tgif_text(Obj,Parms) :- current_predicate(tgif_file_version,tgif_file_version(_)), tgif_file_version(FileVersion), ! FileVersion >= 37, !, ( var(Obj) -> OutputObj = true ; OutputObj = false ), ( _Transformed = 0, ! Obj = text(_BgColor,_X,_Y, ! _NumLines,_TextJust,_PenPat,_BBoxW,_BBoxH,_Id, ! _Asc,_Des,_ObjFill,_VSpace,_Rotation,_Locked,_Underline, ! _TextW,_TextH,_MinLBearing,_MaxRExtra,_CustomFontName,_Compressed, ! _Transformed,_Invisible,_TransPat,_BaselineY, ! MinilinesList), tgif_chk_output(OutputObj,Obj), ! Parms = [bg_color=_BgColor,x=_X,y=_Y,num_lines=_NumLines, ! text_just=_TextJust,pen_pat=_PenPat,bbox_w=_BBoxW,bbox_h=_BBoxH, ! id=_Id,asc=_Asc,des=_Des,obj_fill=_ObjFill,v_space=_VSpace, ! rotation=_Rotation,obj_locked=_Locked,underline=_Underline, ! text_w=_TextW,text_h=_TextH,min_lbearing=_MinLBearing, ! max_rextra=_MaxRExtra,custom_font_name=_CustomFontName, compressed=_Compressed,transformed=_Transformed, ! invisible=_Invisible,trans_pat=_TransPat,baseline_y=_BaselineY, ! minilines=MinilinesList] | _Transformed = 1, ! Obj = text(_BgColor,_X,_Y, ! _NumLines,_TextJust,_PenPat,_BBoxW,_BBoxH,_Id, ! _Asc,_Des,_ObjFill,_VSpace,_Rotation,_Locked,_Underline, ! _TextW,_TextH,_MinLBearing,_MaxRExtra,_CustomFontName,_Compressed, ! _Transformed,_Invisible,_TransPat,_BaselineY, ! TransformSpec,MinilinesList), tgif_chk_output(OutputObj,Obj), tgif_text_transform_spec(TransformSpec,TransformParms), ! Parms = [bg_color=_BgColor,x=_X,y=_Y,num_lines=_NumLines, ! text_just=_TextJust,pen_pat=_PenPat,bbox_w=_BBoxW,bbox_h=_BBoxH, ! id=_Id,asc=_Asc,des=_Des,obj_fill=_ObjFill,v_space=_VSpace, ! rotation=_Rotation,obj_locked=_Locked,underline=_Underline, ! text_w=_TextW,text_h=_TextH,min_lbearing=_MinLBearing, ! max_rextra=_MaxRExtra,custom_font_name=_CustomFontName, compressed=_Compressed,transformed=_Transformed, ! invisible=_Invisible,trans_pat=_TransPat,baseline_y=_BaselineY, ! transform_spec=TransformParms,minilines=MinilinesList] ), ! tgif_minilines_list(MinilinesList). % --------------------------------------------------------------------- % *************** *** 872,876 **** Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, ! id=_Id,line_dash=_Dash,rotation=_Rotation,locked=_Locked, attrs=AttrList], tgif_attrs(AttrList). --- 927,931 ---- Parms = [color=_Color,ltx=_X1,lty=_Y1,rbx=_X2,rby=_Y2, obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, ! id=_Id,line_dash=_Dash,rotation=_Rotation,obj_locked=_Locked, attrs=AttrList], tgif_attrs(AttrList). *************** *** 888,892 **** obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, id=_Id,line_dash=_Dash,rotation=_Rotation, ! locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, attrs=AttrList] --- 943,947 ---- obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, id=_Id,line_dash=_Dash,rotation=_Rotation, ! obj_locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, attrs=AttrList] *************** *** 900,904 **** obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, id=_Id,line_dash=_Dash,rotation=_Rotation, ! locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, transform_spec=TransformParms,attrs=AttrList] --- 955,959 ---- obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, id=_Id,line_dash=_Dash,rotation=_Rotation, ! obj_locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, transform_spec=TransformParms,attrs=AttrList] *************** *** 969,973 **** rby=_RightBotY,obj_fill=_ObjFill,line_width=_LineWidth, pen_pat=_PenPat,id=_Id,line_dash=_Dash,rotation=_Rotation, ! locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). tgif_oval(Obj,Parms) :- --- 1024,1028 ---- rby=_RightBotY,obj_fill=_ObjFill,line_width=_LineWidth, pen_pat=_PenPat,id=_Id,line_dash=_Dash,rotation=_Rotation, ! obj_locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). tgif_oval(Obj,Parms) :- *************** *** 985,989 **** rbx=_RightBotX,rby=_RightBotY,obj_fill=_ObjFill, line_width=_LineWidth,pen_pat=_PenPat,id=_Id, ! line_dash=_Dash,rotation=_Rotation,locked=_Locked, transformed=_Transformed,invisible=_Invisible, line_width_spec=_LineWidthSpec,attrs=AttrList] --- 1040,1044 ---- rbx=_RightBotX,rby=_RightBotY,obj_fill=_ObjFill, line_width=_LineWidth,pen_pat=_PenPat,id=_Id, ! line_dash=_Dash,rotation=_Rotation,obj_locked=_Locked, transformed=_Transformed,invisible=_Invisible, line_width_spec=_LineWidthSpec,attrs=AttrList] *************** *** 998,1002 **** rbx=_RightBotX,rby=_RightBotY,obj_fill=_ObjFill, line_width=_LineWidth,pen_pat=_PenPat,id=_Id, ! line_dash=_Dash,rotation=_Rotation,locked=_Locked, transformed=_Transformed,invisible=_Invisible, line_width_spec=_LineWidthSpec, --- 1053,1057 ---- rbx=_RightBotX,rby=_RightBotY,obj_fill=_ObjFill, line_width=_LineWidth,pen_pat=_PenPat,id=_Id, ! line_dash=_Dash,rotation=_Rotation,obj_locked=_Locked, transformed=_Transformed,invisible=_Invisible, line_width_spec=_LineWidthSpec, *************** *** 1096,1100 **** obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). tgif_poly(Obj,Parms) :- --- 1151,1155 ---- obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! obj_locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). tgif_poly(Obj,Parms) :- *************** *** 1111,1115 **** obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! locked=_Locked,smooth_spec=_SmoothSpecStr,attrs=AttrList], tgif_attrs(AttrList). tgif_poly(Obj,Parms) :- --- 1166,1170 ---- obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! obj_locked=_Locked,smooth_spec=_SmoothSpecStr,attrs=AttrList], tgif_attrs(AttrList). tgif_poly(Obj,Parms) :- *************** *** 1130,1134 **** obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, arrow_head_w_spec=_ArrowHeadWSpec, --- 1185,1189 ---- obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! obj_locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, arrow_head_w_spec=_ArrowHeadWSpec, *************** *** 1148,1152 **** obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, arrow_head_w_spec=_ArrowHeadWSpec, --- 1203,1207 ---- obj_fill=_ObjFill,line_dash=_Dash,rotation=_Rotation, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! obj_locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, arrow_head_w_spec=_ArrowHeadWSpec, *************** *** 1225,1229 **** Parms = [color=_Color,num_vs=_NumVs,vs=_Vs,obj_fill=_ObjFill, line_width=_LineWidth,pen_pat=_PenPat,line_type=_Spline, ! id=_Id,line_dash=_Dash,rotation=_Rotation,locked=_Locked, attrs=AttrList], tgif_attrs(AttrList). --- 1280,1284 ---- Parms = [color=_Color,num_vs=_NumVs,vs=_Vs,obj_fill=_ObjFill, line_width=_LineWidth,pen_pat=_PenPat,line_type=_Spline, ! id=_Id,line_dash=_Dash,rotation=_Rotation,obj_locked=_Locked, attrs=AttrList], tgif_attrs(AttrList). *************** *** 1238,1242 **** Parms = [color=_Color,num_vs=_NumVs,vs=_Vs,obj_fill=_ObjFill, line_width=_LineWidth,pen_pat=_PenPat,line_type=_Spline, ! id=_Id,line_dash=_Dash,rotation=_Rotation,locked=_Locked, smooth_spec=_SmoothSpecStr,attrs=AttrList], tgif_attrs(AttrList). --- 1293,1297 ---- Parms = [color=_Color,num_vs=_NumVs,vs=_Vs,obj_fill=_ObjFill, line_width=_LineWidth,pen_pat=_PenPat,line_type=_Spline, ! id=_Id,line_dash=_Dash,rotation=_Rotation,obj_locked=_Locked, smooth_spec=_SmoothSpecStr,attrs=AttrList], tgif_attrs(AttrList). *************** *** 1255,1259 **** line_width=_LineWidth,pen_pat=_PenPat, line_type=_Spline,id=_Id,line_dash=_Dash, ! rotation=_Rotation,locked=_Locked, transformed=_Transformed,invisible=_Invisible, line_width_spec=_LineWidthSpec, --- 1310,1314 ---- line_width=_LineWidth,pen_pat=_PenPat, line_type=_Spline,id=_Id,line_dash=_Dash, ! rotation=_Rotation,obj_locked=_Locked, transformed=_Transformed,invisible=_Invisible, line_width_spec=_LineWidthSpec, *************** *** 1269,1273 **** line_width=_LineWidth,pen_pat=_PenPat, line_type=_Spline,id=_Id,line_dash=_Dash, ! rotation=_Rotation,locked=_Locked, transformed=_Transformed,invisible=_Invisible, line_width_spec=_LineWidthSpec, --- 1324,1328 ---- line_width=_LineWidth,pen_pat=_PenPat, line_type=_Spline,id=_Id,line_dash=_Dash, ! rotation=_Rotation,obj_locked=_Locked, transformed=_Transformed,invisible=_Invisible, line_width_spec=_LineWidthSpec, *************** *** 1317,1321 **** obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, line_dash=_Dash,radius=_Radius,id=_Id,rotation=_Rotation, ! locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). tgif_rcbox(Obj,Parms) :- --- 1372,1376 ---- obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, line_dash=_Dash,radius=_Radius,id=_Id,rotation=_Rotation, ! obj_locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). tgif_rcbox(Obj,Parms) :- *************** *** 1332,1336 **** obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, line_dash=_Dash,radius=_Radius,id=_Id,rotation=_Rotation, ! locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, attrs=AttrList] --- 1387,1391 ---- obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, line_dash=_Dash,radius=_Radius,id=_Id,rotation=_Rotation, ! obj_locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, attrs=AttrList] *************** *** 1344,1348 **** obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, line_dash=_Dash,radius=_Radius,id=_Id,rotation=_Rotation, ! locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, transform_spec=TransformParms,attrs=AttrList] --- 1399,1403 ---- obj_fill=_ObjFill,line_width=_LineWidth,pen_pat=_PenPat, line_dash=_Dash,radius=_Radius,id=_Id,rotation=_Rotation, ! obj_locked=_Locked,transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, transform_spec=TransformParms,attrs=AttrList] *************** *** 1430,1434 **** id=_Id,rotation=_Rotation,line_style=_Style, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). tgif_arc(Obj,Parms) :- --- 1485,1489 ---- id=_Id,rotation=_Rotation,line_style=_Style, arrow_head_w=_ArrowHeadW,arrow_head_h=_ArrowHeadH, ! obj_locked=_Locked,attrs=AttrList], tgif_attrs(AttrList). tgif_arc(Obj,Parms) :- *************** *** 1450,1454 **** angle1=_Angle1,angle2=_Angle2,id=_Id,rotation=_Rotation, line_style=_Style,arrow_head_w=_ArrowHeadW, ! arrow_head_h=_ArrowHeadH,locked=_Locked, transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, --- 1505,1509 ---- angle1=_Angle1,angle2=_Angle2,id=_Id,rotation=_Rotation, line_style=_Style,arrow_head_w=_ArrowHeadW, ! arrow_head_h=_ArrowHeadH,obj_locked=_Locked, transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, *************** *** 1469,1473 **** angle1=_Angle1,angle2=_Angle2,id=_Id,rotation=_Rotation, line_style=_Style,arrow_head_w=_ArrowHeadW, ! arrow_head_h=_ArrowHeadH,locked=_Locked, transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, --- 1524,1528 ---- angle1=_Angle1,angle2=_Angle2,id=_Id,rotation=_Rotation, line_style=_Style,arrow_head_w=_ArrowHeadW, ! arrow_head_h=_ArrowHeadH,obj_locked=_Locked, transformed=_Transformed, invisible=_Invisible,line_width_spec=_LineWidthSpec, *************** *** 1570,1574 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] | _RealType = 1, _NoBitmap = 0, --- 1625,1629 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] | _RealType = 1, _NoBitmap = 0, *************** *** 1582,1586 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] | _RealType = 1, _NoBitmap = 1, --- 1637,1641 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] | _RealType = 1, _NoBitmap = 1, *************** *** 1593,1597 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, date=_Date,file=_File,attrs=AttrList] ), --- 1648,1652 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, date=_Date,file=_File,attrs=AttrList] ), *************** *** 1612,1616 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF, date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] --- 1667,1671 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF, date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] *************** *** 1625,1629 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF, date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] --- 1680,1684 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF, date=_Date,file=_File,xbm_str=_BitmapStr,attrs=AttrList] *************** *** 1638,1642 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF, date=_Date,file=_File,attrs=AttrList] --- 1693,1697 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF, date=_Date,file=_File,attrs=AttrList] *************** *** 1653,1657 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF,num_epsf_lines=_NumEPSFLines, epsf_lines=_EPSFLines,date=_Date,file=_File, --- 1708,1712 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF,num_epsf_lines=_NumEPSFLines, epsf_lines=_EPSFLines,date=_Date,file=_File, *************** *** 1676,1680 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, --- 1731,1735 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, *************** *** 1692,1696 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, --- 1747,1751 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, *************** *** 1708,1712 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, --- 1763,1767 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, *************** *** 1726,1730 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, --- 1781,1785 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, *************** *** 1744,1748 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, --- 1799,1803 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='xbm',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, *************** *** 1762,1766 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, --- 1817,1821 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, *************** *** 1780,1784 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, --- 1835,1839 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, *************** *** 1800,1804 **** image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, --- 1855,1859 ---- image_w=_ImageW,image_h=_ImageH,rotate=_Rotate, flip=_Flip,real_type='eps',llx=_LLX,lly=_LLY, ! urx=_URX,ury=_URY,no_bitmap=_NoBitmap,obj_locked=_Locked, save_epsf=_SaveEPSF,compressed=_Compressed, transformed=_Transformed,invisible=_Invisible, *************** *** 1892,1896 **** first_pixel_is_bg=_FirstPixelIsBg,id=_Id,rotation=_Rotation, image_w=_ImageW,image_h=_ImageH,rotate=_Rotate,flip=_Flip, ! locked=_Locked,color_names=ColorNames,pixels=Pixels, attrs=AttrList], tgif_color_info(ColorNames), --- 1947,1951 ---- first_pixel_is_bg=_FirstPixelIsBg,id=_Id,rotation=_Rotation, image_w=_ImageW,image_h=_ImageH,rotate=_Rotate,flip=_Flip, ! obj_locked=_Locked,color_names=ColorNames,pixels=Pixels, attrs=AttrList], tgif_color_info(ColorNames), *************** *** 1913,1917 **** first_pixel_is_bg=_FirstPixelIsBg,id=_Id, rotation=_Rotation,image_w=_ImageW,image_h=_ImageH, ! rotate=_Rotate,flip=_Flip,locked=_Locked, compressed=_Compressed,transformed=_Transformed, invisible=_Invisible,color_names=ColorNames, --- 1968,1972 ---- first_pixel_is_bg=_FirstPixelIsBg,id=_Id, rotation=_Rotation,image_w=_ImageW,image_h=_ImageH, ! rotate=_Rotate,flip=_Flip,obj_locked=_Locked, compressed=_Compressed,transformed=_Transformed, invisible=_Invisible,color_names=ColorNames, *************** *** 1930,1934 **** first_pixel_is_bg=_FirstPixelIsBg,id=_Id, rotation=_Rotation,image_w=_ImageW,image_h=_ImageH, ! rotate=_Rotate,flip=_Flip,locked=_Locked, compressed=_Compressed,transformed=_Transformed, invisible=_Invisible,transform_spec=TransformParms, --- 1985,1989 ---- first_pixel_is_bg=_FirstPixelIsBg,id=_Id, rotation=_Rotation,image_w=_ImageW,image_h=_ImageH, ! rotate=_Rotate,flip=_Flip,obj_locked=_Locked, compressed=_Compressed,transformed=_Transformed, invisible=_Invisible,transform_spec=TransformParms, *************** *** 1970,1974 **** Obj = group(ObjList,_Id,_Locked,AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [objs=ObjList,id=_Id,locked=_Locked,attrs=AttrList], tgif_objs(ObjList), tgif_attrs(AttrList). --- 2025,2029 ---- Obj = group(ObjList,_Id,_Locked,AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [objs=ObjList,id=_Id,obj_locked=_Locked,attrs=AttrList], tgif_objs(ObjList), tgif_attrs(AttrList). *************** *** 1980,1984 **** Obj = group(ObjList,_Id,_Locked,_Invisible,AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [objs=ObjList,id=_Id,locked=_Locked,invisible=_Invisible, attrs=AttrList], tgif_objs(ObjList), --- 2035,2039 ---- Obj = group(ObjList,_Id,_Locked,_Invisible,AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [objs=ObjList,id=_Id,obj_locked=_Locked,invisible=_Invisible, attrs=AttrList], tgif_objs(ObjList), *************** *** 2016,2020 **** Obj = sym(ObjList,_Id,_Locked,AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [objs=ObjList,id=_Id,locked=_Locked,attrs=AttrList], tgif_objs(ObjList), tgif_attrs(AttrList). --- 2071,2075 ---- Obj = sym(ObjList,_Id,_Locked,AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [objs=ObjList,id=_Id,obj_locked=_Locked,attrs=AttrList], tgif_objs(ObjList), tgif_attrs(AttrList). *************** *** 2026,2030 **** Obj = sym(ObjList,_Id,_Locked,_Invisible,_AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [objs=ObjList,id=_Id,locked=_Locked,invisible=_Invisible, attrs=AttrList], tgif_objs(ObjList), --- 2081,2085 ---- Obj = sym(ObjList,_Id,_Locked,_Invisible,_AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [objs=ObjList,id=_Id,obj_locked=_Locked,invisible=_Invisible, attrs=AttrList], tgif_objs(ObjList), *************** *** 2063,2067 **** Obj = icon(ObjList,_Name,_Id,_Rotation,_Flip,_Locked,AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [name=_Name,id=_Id,rotation=_Rotation,locked=_Locked, objs=ObjList,attrs=AttrList], tgif_objs(ObjList), --- 2118,2122 ---- Obj = icon(ObjList,_Name,_Id,_Rotation,_Flip,_Locked,AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [name=_Name,id=_Id,rotation=_Rotation,obj_locked=_Locked, objs=ObjList,attrs=AttrList], tgif_objs(ObjList), *************** *** 2075,2079 **** AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [name=_Name,id=_Id,rotation=_Rotation,locked=_Locked, invisible=_Invisible,objs=ObjList,attrs=AttrList], tgif_objs(ObjList), --- 2130,2134 ---- AttrList), tgif_chk_output(OutputObj,Obj), ! Parms = [name=_Name,id=_Id,rotation=_Rotation,obj_locked=_Locked, invisible=_Invisible,objs=ObjList,attrs=AttrList], tgif_objs(ObjList), *************** *** 2107,2110 **** --- 2162,2302 ---- % --------------------------------------------------------------------- % + + tgif_strseg(Obj) :- tgif_strseg(Obj,_). + + tgif_strseg(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 37, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = str_seg(_Color,_FontName,_TextStyle,_FontSzUnit, + _W,_Asc,_Des,_MinLBearing,_MaxRExtra,_UnderlineOn, + _DoubleByte,_DBModBytes,_DBVertical,_Direction,Str), + tgif_chk_output(OutputObj,Obj), + Parms = [color=_Color,font_name=_FontName,text_style=_TextStyle, + font_sz_unit=_FontSzUnit,w=_W,asc=_Asc,des=_Des, + min_lbearing=_MinLBearing,max_rextra=_MaxRExtra, + underline_on=_UnderlineOn,double_byte=_DoubleByte, + db_mod_bytes=_DBModBytes,db_vertical=_DBVertical,direction=_Direction, + str=Str], + atom_chars(_Str,Str). + + % --------------------------------------------------------------------- % + + tgif_strblock_list([SimpleStrBlock]) :- + !, tgif_simple_strblock(SimpleStrBlock). + tgif_strblock_list([SimpleStrBlock1,SimpleStrBlock2|StrBlocks]) :- + tgif_simple_strblock(SimpleStrBlock1), + tgif_simple_strblock(SimpleStrBlock2), + !, tgif_strblock_list([SimpleStrBlock2|StrBlocks]). + tgif_strblock_list([SimpleStrBlock,ComplexStrBlock|StrBlocks]) :- + tgif_simple_strblock(SimpleStrBlock), + tgif_complex_strblock(ComplexStrBlock), + !, tgif_strblock_list(StrBlocks). + + tgif_simple_strblock(StrBlock) :- tgif_simple_strblock(StrBlock,_). + + tgif_simple_strblock(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 37, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = str_block(0,_W,_Asc,_Des,_MinLBearing,_MaxRExtra,_,_,_, + [_StrSeg]), + tgif_chk_output(OutputObj,Obj), + Parms = [w=_W,asc=_Asc,des=_Des,min_lbearing=_MinLBearing, + max_rextra=_MaxRExtra,str_seg=_StrSeg], + tgif_strseg(_StrSeg). + + tgif_complex_strblock(StrBlock) :- tgif_complex_strblock(StrBlock,_). + + tgif_complex_strblock(StrBlock,Parms) :- + tgif_space_strblock(StrBlock,Parms), !. + tgif_complex_strblock(StrBlock,Parms) :- + tgif_center_supsub_strblock(StrBlock,Parms), !. + tgif_complex_strblock(StrBlock,Parms) :- + tgif_leftright_supsub_strblock(StrBlock,Parms), !. + + tgif_space_strblock(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 37, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = str_block(4,_W,_,_,_,_,_SpaceW,0,0), + !, tgif_chk_output(OutputObj,Obj), + Parms = [type=4,w=_W,space_w=_SpaceW]. + + tgif_center_supsub_strblock(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 37, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = str_block(2,_W,_Asc,_Des,_MinLBearing,_MaxRExtra,_,1,1, + [_SupMinilines,_SubMinilines,_StrSeg]), + !, tgif_chk_output(OutputObj,Obj), + Parms = [type=2,w=_W,asc=_Asc,des=_Des,min_lbearing=_MinLBearing, + max_rextra=_MaxRExtra,sup_minilines=_SupMinilines, + _sub_minilines=_SubMinilines,str_seg=_StrSeg], + !, tgif_minilines(_SupMinilines), + !, tgif_minilines(_SubMinilines), + !, tgif_strseg(_StrSeg). + + tgif_leftright_supsub_strblock(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 37, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = str_block(_Type,_W,_Asc,_Des,_MinLBearing,_MaxRExtra,_,1,1, + [_SupMinilines,_SubMinilines]), + ( _Type == 1 | _Type == 3 ), + !, tgif_chk_output(OutputObj,Obj), + Parms = [type=_Type,w=_W,asc=_Asc,des=_Des,min_lbearing=_MinLBearing, + max_rextra=_MaxRExtra,sup_minilines=_SupMinilines, + _sub_minilines=_SubMinilines], + !, tgif_minilines(_SupMinilines), + !, tgif_minilines(_SubMinilines). + + % --------------------------------------------------------------------- % + + tgif_miniline_list([]) :- !. + tgif_miniline_list([Miniline|MinilineList]) :- + tgif_miniline(Miniline), !, tgif_miniline_list(MinilineList). + + tgif_miniline(Obj) :- tgif_miniline(Obj,_). + + tgif_miniline(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 37, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = mini_line(_W,_Asc,_Des,_MinLBearing,_MaxRExtra,_VGap,_StrBlockList), + tgif_chk_output(OutputObj,Obj), + Parms = [w=_W,asc=_Asc,des=_Des,min_lbearing=_MinLBearing, + max_rextra=_MaxRExtra,v_gap=_VGap, + miniline_list=_StrBlockList], + tgif_strblock_list(_StrBlockList). + + % --------------------------------------------------------------------- % + + tgif_minilines_list([]) :- !. + tgif_minilines_list([Minilines|MinilinesList]) :- + tgif_minilines(Minilines), !, tgif_minilines_list(MinilinesList). + + tgif_minilines(Obj) :- tgif_minilines(Obj,_). + + tgif_minilines(Obj,Parms) :- + current_predicate(tgif_file_version,tgif_file_version(_)), + tgif_file_version(FileVersion), + FileVersion >= 37, !, + ( var(Obj) -> OutputObj = true ; OutputObj = false ), + Obj = minilines(_W,_H,_MinLBearing,_MaxRExtra,_Just,_VSpace, + _BaselineOffset,_MiniLineList), + tgif_chk_output(OutputObj,Obj), + Parms = [w=_W,h=_H,min_lbearing=_MinLBearing,max_rextra=_MaxRExtra, + just=_Just,v_space=_VSpace,baseline_offset=_BaselineOffset, + miniline_list=_MiniLineList], + tgif_miniline_list(_MiniLineList). + + % --------------------------------------------------------------------- % tgif_obj(Obj) :- var(Obj), !, tgif_obj(_,Obj). *** HISTORY.orig Sun Jan 17 13:37:43 1999 --- HISTORY Sun Jan 17 13:37:43 1999 *************** *** 1,2 **** --- 1,16 ---- + -----------------------> tgif-4.0.5 => tgif-4.0.6 <----------------------- + Here's a short list of added features/bug fixes. + + 1) Fix divide by zero bugs which causes a seg fault on OSF1 (apparently, + this doesn't crash on either Solaris or Linux). + 2) Handles correctly when creating objects. Thanks to + Dick Wesseling for pointing out the problem. + 3) Add the following files: + + Tgif.tmpl-osf1 + + Also moved some code around so tgif will compile under Digital UNIX + (OSF1). + -----------------------> tgif-4.0.4 => tgif-4.0.5 <----------------------- Here's a short list of added features/bug fixes. *** frontend.pl.orig Sun Jan 17 13:37:44 1999 --- frontend.pl Sun Jan 17 13:37:44 1999 *************** *** 42,46 **** interface_updattr(+string, +string, +string, +string, -string)). ! :- load_foreign_files(['frontend11.o'], ['-L../../lib','-lX11','-lm']), abolish(foreign_file/2), abolish(foreign/3). --- 42,47 ---- interface_updattr(+string, +string, +string, +string, -string)). ! :- load_foreign_files(['frontend11.o'], ! ['-lXext','-lX11','-ldl','-lm','-lsocket','-lnsl','-lgen']), abolish(foreign_file/2), abolish(foreign/3). *** Tgif.tmpl-osf1.orig Sun Jan 17 13:37:45 1999 --- Tgif.tmpl-osf1 Sun Jan 17 13:37:45 1999 *************** *** 0 **** --- 1,74 ---- + XCOMM + XCOMM Author: William Chia-Wei Cheng (william@cs.ucla.edu) + XCOMM + XCOMM Copyright (C) 1990-1999, William Chia-Wei Cheng. + XCOMM + XCOMM Permission limited to the use, copy, display, distribute without + XCOMM charging for a fee, and produce derivative works of "tgif" and + XCOMM its documentation for not-for-profit purpose is hereby granted by + XCOMM the Author, provided that the above copyright notice appears in + XCOMM all copies made of "tgif" and that both the copyright notice + XCOMM and this permission notice appear in supporting documentation, + XCOMM and that the name of the Author not be used in advertising or + XCOMM publicity pertaining to distribution of the software without + XCOMM specific, written prior permission. The Author makes no + XCOMM representations about the suitability of this software for any + XCOMM purpose. It is provided "as is" without express or implied + XCOMM warranty. All other rights (including, but not limited to, the + XCOMM right to sell "tgif", the right to sell or distribute derivative + XCOMM works of "tgif", the right to distribute "tgif" for a fee, and + XCOMM the right to include "tgif" or derivative works of "tgif" in a + XCOMM for-sale product) are reserved by the Author. + XCOMM + XCOMM THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + XCOMM INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + XCOMM EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR + XCOMM CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF + XCOMM USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + XCOMM OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + XCOMM PERFORMANCE OF THIS SOFTWARE. + XCOMM + XCOMM @(#)$Header: /mm/src/tgif/v4/RCS/Tgif.tmpl-osf1,v 4.0 1999/01/15 19:33:43 william Exp $ + XCOMM + + #if ProjectX == 5 + #if BuildXimp + XIMPDEFINES = + #else + XIMPDEFINES = -D_NO_XIMP + #endif + #elif ProjectX > 5 + XIMPDEFINES = + #endif + + PROGRAMS = tgif XCOMM prtgif frontend11.o testdrive + XCOMM CDEBUGFLAGS= -g -Wall + XCOMM INSTPGMFLAGS= -s + XCOMM BINDIR = /u/halfmoon/bin + XCOMM MANPATH = /u/halfmoon/man + XCOMM TGIFDIR = /u/halfmoon/lib/X11/tgif + TGIFDIR = $(LIBDIR)/tgif + DIRDEFINES = -DTGIF_PATH=\"$(TGIFDIR)\" -DPSFILE_MOD=0664 \@@\ + -DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\" \@@\ + -DLAUNCH_ATTR=\"launch=\" -DEXEC_ATTR=\"exec=\" + EXTDEFINES = -DEPSF_FILE_EXT=\"eps\" -DPS_FILE_EXT=\"ps\" \@@\ + -DXBM_FILE_EXT=\"xbm\" -DXPM_FILE_EXT=\"xpm\" \@@\ + -DOBJ_FILE_EXT=\"obj\" -DSYM_FILE_EXT=\"sym\" \@@\ + -DTEXT_FILE_EXT=\"txt\" -DPIN_FILE_EXT=\"pin\" + MISCDEFINES = -D_BACKGROUND_DONT_FORK -D_USE_XDRAWPOINT_TO_PUT_A_POINT + MOREDEFINES = + + XCOMM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + XCOMM Please see Imakefile for more defines to be added to MOREDEFINES above + XCOMM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + DEPLIBS = $(DEPXLIB) + LOCAL_LIBRARIES = $(XLIB) + XCOMM LOCAL_LIBRARIES = $(XMULIB) $(XTOOLLIB) $(XLIB) + XCOMM SYS_LIBRARIES = -ldl -lm + SYS_LIBRARIES = -lm + + XCOMM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ XCOMM + XCOMM This file has been tested under (uname -s -r): XCOMM + XCOMM OSF1 V4.0 XCOMM + XCOMM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ XCOMM