*** exec.c.orig Wed Oct 8 10:15:38 1997 --- exec.c Wed Oct 8 10:15:38 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/exec.c,v 3.17 1997/09/17 05:59:06 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/exec.c,v 3.19 1997/10/08 13:56:01 william Exp $ */ *************** *** 104,107 **** --- 104,110 ---- char *cmdToExecAfterHyperJump=NULL; + struct StrRec *topTmpStr=NULL; + struct StrRec *botTmpStr=NULL; + extern char * mktemp ARGS_DECL((const char *Template)); extern char * getenv ARGS_DECL((const char *)); *************** *** 237,240 **** --- 240,245 ---- int ExecTrim ARGS_DECL((char**, struct ObjRec *, char*)); int ExecIsAttr ARGS_DECL((char**, struct ObjRec *, char*)); + int ExecFindObjNames ARGS_DECL((char**, struct ObjRec *, char*)); + int ExecTokenize ARGS_DECL((char**, struct ObjRec *, char*)); static *************** *** 328,334 **** --- 333,394 ---- { (void*)ExecTrim, "trim", 1, 1}, { (void*)ExecIsAttr, "is_attr", 2, 0}, + { (void*)ExecFindObjNames, "find_obj_names", 3, 0}, + { (void*)ExecTokenize, "tokenize", 3, 0}, { NULL, NULL, 0, 0 } }; + void CleanTmpStr() + { + struct StrRec *next_str=NULL; + + for ( ; topTmpStr != NULL; topTmpStr=next_str) { + next_str = topTmpStr->next; + FreeStr(topTmpStr); + } + topTmpStr = botTmpStr = NULL; + } + + int PrependToTmpStr(psz) + char *psz; + { + struct StrRec *str_ptr=NewStr(); + + if (str_ptr == NULL) return FALSE; + + DynStrSet(&str_ptr->dyn_str, psz); + + str_ptr->prev = NULL; + str_ptr->next = topTmpStr; + + if (topTmpStr == NULL) { + botTmpStr = str_ptr; + } else { + topTmpStr->prev = str_ptr; + } + topTmpStr = str_ptr; + return TRUE; + } + + int AppendToTmpStr(psz) + char *psz; + { + struct StrRec *str_ptr=NewStr(); + + if (str_ptr == NULL) return FALSE; + + DynStrSet(&str_ptr->dyn_str, psz); + + str_ptr->prev = botTmpStr; + str_ptr->next = NULL; + + if (botTmpStr == NULL) { + topTmpStr = str_ptr; + } else { + botTmpStr->next = str_ptr; + } + botTmpStr = str_ptr; + return TRUE; + } + struct ObjRec *FindObjWithName(BotObj, OrigObj, obj_name, inside_root_obj, inside_this_obj, pp_owner_obj, pp_top_owner) *************** *** 994,997 **** --- 1054,1143 ---- } + void ReplaceAttrAllValues(obj_ptr, attr_ptr, ppTopStr, ppBotStr) + struct ObjRec *obj_ptr; + struct AttrRec *attr_ptr; + struct StrRec **ppTopStr, **ppBotStr; + /* obj_ptr better be a top-level object */ + { + int count=0, need_to_change=FALSE; + struct StrRec *str_ptr=NULL, *str_ptr1=NULL; + + for (str_ptr=(*ppTopStr); str_ptr != NULL; str_ptr=str_ptr->next) { + count++; + } + if (count != attr_ptr->obj->detail.t->lines) { + need_to_change = TRUE; + } else { + for (str_ptr=(*ppTopStr), str_ptr1=attr_ptr->obj->detail.t->first; + str_ptr != NULL; + str_ptr=str_ptr->next, str_ptr1=str_ptr1->next) { + if (str_ptr1 == NULL) { + need_to_change = TRUE; + break; + } else { + if (str_ptr1 == attr_ptr->obj->detail.t->first) { + if (strcmp(attr_ptr->attr_value.s, str_ptr->dyn_str.s) != 0) { + need_to_change = TRUE; + break; + } + } else { + if (strcmp(str_ptr->dyn_str.s, str_ptr->dyn_str.s) != 0) { + need_to_change = TRUE; + break; + } + } + } + } + } + if (need_to_change) { + int ltx, lty, rbx, rby, switch_selected=FALSE; + struct SelRec *saved_top_sel=topSel, *saved_bot_sel=botSel; + + if (topSel == NULL || topSel != botSel || topSel->obj != obj_ptr) { + switch_selected = TRUE; + topSel = botSel = NULL; + if (obj_ptr == tgifObj) AddObj(NULL, topObj, tgifObj); + UpdSelBBox(); + } + ltx = obj_ptr->bbox.ltx; lty = obj_ptr->bbox.lty; + rbx = obj_ptr->bbox.rbx; rby = obj_ptr->bbox.rby; + PrepareToReplaceAnObj(obj_ptr); + + for (str_ptr=attr_ptr->obj->detail.t->first; str_ptr != NULL; + str_ptr=str_ptr1) { + str_ptr1 = str_ptr->next; + FreeStr(str_ptr); + } + attr_ptr->obj->detail.t->first = (*ppTopStr); + attr_ptr->obj->detail.t->last = (*ppBotStr); + attr_ptr->obj->detail.t->lines = count; + (*ppTopStr) = (*ppBotStr) = NULL; + + UpdateAttr(attr_ptr->obj->detail.t, attr_ptr); + AdjObjCache(obj_ptr); + AdjObjBBox(obj_ptr); + + if (obj_ptr == tgifObj) recordCmdIncludeTgifObj = TRUE; + RecordReplaceAnObj(obj_ptr); + if (obj_ptr == tgifObj) recordCmdIncludeTgifObj = FALSE; + if (switch_selected) { + RemoveAllSel(); + if (obj_ptr == tgifObj) UnlinkObj(topObj); + topSel = saved_top_sel; + botSel = saved_bot_sel; + UpdSelBBox(); + } + if (obj_ptr != tgifObj && attr_ptr->shown) { + RedrawAreas(botObj, ltx-GRID_ABS_SIZE(1), lty-GRID_ABS_SIZE(1), + rbx+GRID_ABS_SIZE(1), rby+GRID_ABS_SIZE(1), + obj_ptr->bbox.ltx-GRID_ABS_SIZE(1), + obj_ptr->bbox.lty-GRID_ABS_SIZE(1), + obj_ptr->bbox.rbx+GRID_ABS_SIZE(1), + obj_ptr->bbox.rby+GRID_ABS_SIZE(1)); + } + SetFileModified(TRUE); + } + } + static int CheckExecInterrupt(check_any_button, orig_cmd) *************** *** 1110,1115 **** switch (owner_obj->type) { case OBJ_GROUP: - case OBJ_SYM: case OBJ_ICON: for (obj_ptr=owner_obj->detail.r->first; obj_ptr!=NULL; obj_ptr=obj_ptr->next) { --- 1256,1261 ---- switch (owner_obj->type) { case OBJ_GROUP: case OBJ_ICON: + case OBJ_SYM: for (obj_ptr=owner_obj->detail.r->first; obj_ptr!=NULL; obj_ptr=obj_ptr->next) { *************** *** 4936,4939 **** --- 5082,5337 ---- SetFileModified(TRUE); + return TRUE; + } + + int ExecFindObjNames(argv, obj_ptr, orig_cmd) + char **argv, *orig_cmd; + struct ObjRec *obj_ptr; + /* find_obj_names(result_attr,obj_name,attr_name_value); */ + { + char *result_attr_name=argv[0], *obj_name=argv[1], *attr_str=argv[2]; + char *psz, *attr_name=NULL, *attr_value=NULL; + struct AttrRec *result_attr_ptr; + struct ObjRec *result_attr_owner_obj=NULL, *optr; + struct ObjRec *parent_obj_ptr=NULL, *first_obj_ptr=NULL; + int ok=TRUE; + + UtilRemoveQuotes(result_attr_name); + UtilRemoveQuotes(obj_name); + UtilRemoveQuotes(attr_str); + + sprintf(execDummyStr, "%s=", result_attr_name); + result_attr_ptr = FindAttrWithName(obj_ptr, execDummyStr, + &result_attr_owner_obj); + if (result_attr_ptr == NULL) return BadAttr(execDummyStr, orig_cmd); + + if (*obj_name == '\0') { + parent_obj_ptr = NULL; + } else if ((parent_obj_ptr=FindObjWithName(botObj, obj_ptr, obj_name, FALSE, + FALSE, NULL, NULL)) == NULL) { + return BadObjName(obj_name, orig_cmd); + } else { + switch (parent_obj_ptr->type) { + case OBJ_GROUP: + case OBJ_ICON: + case OBJ_SYM: + break; + default: + sprintf(gszMsgBox, "%s '%s' %s '%s' %s.", + "Non-composite object", obj_name, + "specified while executing the", orig_cmd, "command"); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + return FALSE; + } + } + if (strcmp(attr_str, "") == 0) { + attr_name = attr_value = NULL; + } else if ((psz=strchr(attr_str,'=')) != NULL) { + if (*(++psz) != '\0') { + if (strcmp(psz, "*") == 0) { + attr_value = NULL; + } else { + attr_value = UtilStrDup(psz); + if (attr_value == NULL) FailAllocMessage(); + } + *psz = '\0'; + } else { + attr_value = UtilStrDup(""); + if (attr_value == NULL) FailAllocMessage(); + } + attr_name = attr_str; + } else { + attr_name = NULL; + attr_value = UtilStrDup(attr_str); + if (attr_value == NULL) FailAllocMessage(); + } + CleanTmpStr(); + + if (parent_obj_ptr == NULL) { + first_obj_ptr = topObj; + } else { + first_obj_ptr = parent_obj_ptr->detail.r->first; + } + for (optr=first_obj_ptr; optr != NULL; optr=optr->next) { + struct AttrRec *name_attr=FindAttrWithName(optr,"name=",NULL); + + if (name_attr != NULL) { + if (attr_name == NULL && attr_value == NULL) { + if (!AppendToTmpStr(name_attr->attr_value.s)) { + ok = FALSE; + break; + } + } else { + struct AttrRec *aptr=NULL; + + for (aptr=optr->fattr; aptr != NULL; aptr=aptr->next) { + if (attr_name == NULL) { + if (*aptr->attr_name.s == '\0' && + strcmp(aptr->attr_value.s, attr_value) == 0) { + break; + } + } else if (attr_value == NULL) { + if (strcmp(aptr->attr_name.s, attr_name) == 0) { + break; + } + } else { + if (strcmp(aptr->attr_name.s, attr_name) == 0 && + strcmp(aptr->attr_value.s, attr_value) == 0) { + break; + } + } + } + if (aptr != NULL && !AppendToTmpStr(name_attr->attr_value.s)) { + ok = FALSE; + break; + } + } + } + } + if (ok) { + int count=0; + char *count_buf=(char*)malloc((strlen(result_attr_name)+40)*sizeof(char)); + struct StrRec *str_ptr; + + for (str_ptr=topTmpStr; str_ptr != NULL; str_ptr=str_ptr->next) { + count++; + } + sprintf(count_buf, "%s=%d", result_attr_name, count); + if (PrependToTmpStr(count_buf)) { + ReplaceAttrAllValues(result_attr_owner_obj, result_attr_ptr, + &topTmpStr, &botTmpStr); + } + SetFileModified(TRUE); + } + CleanTmpStr(); + if (attr_value != NULL) UtilFree(attr_value); + return TRUE; + } + + int ExecTokenize(argv, obj_ptr, orig_cmd) + char **argv, *orig_cmd; + struct ObjRec *obj_ptr; + /* tokenize(result_attr,string,separator); */ + { + char *result_attr_name=argv[0], *str=argv[1], *separator=argv[2], *psz; + int ok=TRUE, just_got_sep=FALSE; + struct AttrRec *result_attr_ptr; + struct ObjRec *result_attr_owner_obj=NULL; + + UtilRemoveQuotes(result_attr_name); + UtilRemoveQuotes(str); + UtilRemoveQuotes(separator); + + sprintf(execDummyStr, "%s=", result_attr_name); + result_attr_ptr = FindAttrWithName(obj_ptr, execDummyStr, + &result_attr_owner_obj); + if (result_attr_ptr == NULL) return BadAttr(execDummyStr, orig_cmd); + + if (strlen(separator) != 1) { + sprintf(gszMsgBox, "%s '%s' %s '%s' %s.\n\n(%s.)", + "Invalid separator", separator, + "specified while executing the", orig_cmd, "command", + "Separator must be a single charactor"); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + return FALSE; + } else if (*separator == ' ' || *separator == '"' || *separator == '\'') { + sprintf(gszMsgBox, "%s '%s' %s '%s' %s.", + "Invalid separator", separator, + "specified while executing the", orig_cmd, "command"); + MsgBox(gszMsgBox, TOOL_NAME, INFO_MB); + return FALSE; + } + CleanTmpStr(); + + psz = str; + while (*psz != '\0') { + char sep=(*separator), quote='\0', *start=NULL; + int done=FALSE, inc=TRUE; + + while (*psz == ' ') psz++; + + start = psz; + if (*psz == '\0') { + if (just_got_sep) { + UtilRightTrim(start); + ok = AppendToTmpStr(start); + just_got_sep = FALSE; + } + break; + } + if (*psz == '"' || *psz == '\'') { + just_got_sep = FALSE; + quote = (*psz); + for (psz++; *psz != '\0' && *psz != quote; psz++) ; + if (*psz == quote) { + start = (&start[1]); + *psz = '\0'; + ok = AppendToTmpStr(start); + *psz = quote; + if (ok) { + psz++; + while (*psz == ' ') psz++; + if (*psz == '\0') { + done = TRUE; + } else if (*psz == sep) { + just_got_sep = TRUE; + } else { + inc = FALSE; + } + } + } else { + done = TRUE; + UtilRightTrim(start); + ok = AppendToTmpStr(start); + } + } else if (*psz == sep) { + *psz = '\0'; + UtilRightTrim(start); + ok = AppendToTmpStr(start); + *psz = sep; + just_got_sep = TRUE; + if (!ok) break; + } else { + just_got_sep = FALSE; + for (psz++; *psz != '\0' && *psz != sep; psz++) ; + if (*psz == '\0') { + if (start != psz) { + char ch=(*psz); + + *psz = '\0'; + UtilRightTrim(start); + ok = AppendToTmpStr(start); + *psz = ch; + } + done = TRUE; + } else if (*psz == sep) { + *psz = '\0'; + UtilRightTrim(start); + ok = AppendToTmpStr(start); + *psz = sep; + just_got_sep = TRUE; + } + } + if (!ok || done) break; + if (inc) psz++; + } + if (ok && just_got_sep) { + ok = AppendToTmpStr(""); + } + if (ok) { + int count=0; + char *count_buf=(char*)malloc((strlen(result_attr_name)+40)*sizeof(char)); + struct StrRec *str_ptr; + for (str_ptr=topTmpStr; str_ptr != NULL; str_ptr=str_ptr->next) { + count++; + } + sprintf(count_buf, "%s=%d", result_attr_name, count); + if (PrependToTmpStr(count_buf)) { + ReplaceAttrAllValues(result_attr_owner_obj, result_attr_ptr, + &topTmpStr, &botTmpStr); + } + SetFileModified(TRUE); + } + CleanTmpStr(); return TRUE; } *** grid.c.orig Wed Oct 8 10:15:40 1997 --- grid.c Wed Oct 8 10:15:40 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/grid.c,v 3.9 1997/09/14 20:37:51 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/grid.c,v 3.10 1997/10/03 19:09:04 william Exp $ */ *************** *** 832,836 **** if (zoomedIn && zoomScale == MAX_ZOOMED_IN) { ! Msg ("Already at highest magnification, can no longer zoom in."); return; } --- 832,837 ---- if (zoomedIn && zoomScale == MAX_ZOOMED_IN) { ! MsgBox("Already at highest magnification, can no longer zoom in.", ! TOOL_NAME, INFO_MB); return; } *************** *** 849,853 **** } else if (queryZoomInPoint==TRUE || (queryZoomInPoint==INVALID && topSel==NULL)) { ! MakeQuiescent(); SaveStatusStrings(); TwoLineMsg ("Left button selects a zoom center,", --- 850,856 ---- } else if (queryZoomInPoint==TRUE || (queryZoomInPoint==INVALID && topSel==NULL)) { ! if (queryZoomInPoint==INVALID && topSel==NULL) { ! MakeQuiescent(); ! } SaveStatusStrings(); TwoLineMsg ("Left button selects a zoom center,", *** text.c.orig Wed Oct 8 10:15:42 1997 --- text.c Wed Oct 8 10:15:42 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/text.c,v 3.19 1997/09/17 04:03:10 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/text.c,v 3.20 1997/10/03 20:28:26 william Exp $ */ *************** *** 202,207 **** /* --------------------- Str Routines --------------------- */ ! void FreeStr (str_ptr) ! struct StrRec * str_ptr; { if (str_ptr->dyn_str.s != NULL) free(str_ptr->dyn_str.s); --- 202,207 ---- /* --------------------- Str Routines --------------------- */ ! void FreeStr(str_ptr) ! struct StrRec *str_ptr; { if (str_ptr->dyn_str.s != NULL) free(str_ptr->dyn_str.s); *************** *** 209,223 **** } ! struct StrRec * NewStr () { ! struct StrRec * new_str_ptr; new_str_ptr = (struct StrRec *)malloc(sizeof(struct StrRec)); if (new_str_ptr == NULL) { FailAllocMessage(); return NULL; } ! new_str_ptr->next = new_str_ptr->prev = NULL; ! new_str_ptr->dyn_str.s = NULL; ! new_str_ptr->dyn_str.sz = 0; ! DynStrSet (&new_str_ptr->dyn_str, ""); ! return (new_str_ptr); } --- 209,221 ---- } ! struct StrRec *NewStr() { ! struct StrRec *new_str_ptr; new_str_ptr = (struct StrRec *)malloc(sizeof(struct StrRec)); if (new_str_ptr == NULL) { FailAllocMessage(); return NULL; } ! memset(new_str_ptr, 0, sizeof(struct StrRec)); ! DynStrSet(&new_str_ptr->dyn_str, ""); ! return new_str_ptr; } *** util.c.orig Wed Oct 8 10:15:43 1997 --- util.c Wed Oct 8 10:15:43 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/util.c,v 3.4 1997/09/15 19:02:22 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/util.c,v 3.5 1997/10/06 13:44:44 william Exp $ */ *************** *** 80,83 **** --- 80,119 ---- pszDest[len] = '\0'; return len; + } + + void UtilLeftTrim(pszStr) + char *pszStr; + /* pszStr must be terminated by '\0' */ + { + register char *c_ptr; + + for (c_ptr=pszStr; *c_ptr != '\0'; c_ptr++) { + char ch=(*c_ptr); + + if (!(ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r')) { + break; + } + } + if (*c_ptr != '\0' && c_ptr != pszStr) { + while ((*pszStr++ = *c_ptr++) != '\0') ; + } + } + + void UtilRightTrim(pszStr) + char *pszStr; + /* pszStr must be terminated by '\0' */ + { + register int len; + register char *c_ptr; + + for (len=strlen(pszStr)-1; len >= 0; len--) { + char ch=pszStr[len]; + + if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') { + pszStr[len] = '\0'; + } else { + break; + } + } } *** exec.e.orig Wed Oct 8 10:15:44 1997 --- exec.e Wed Oct 8 10:15:44 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/exec.e,v 3.1 1997/09/14 20:38:06 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/exec.e,v 3.5 1997/10/06 03:24:47 william Exp $ */ *************** *** 44,47 **** --- 44,53 ---- extern char * cmdToExecAfterHyperJump; + extern struct StrRec * topTmpStr; + extern struct StrRec * botTmpStr; + + extern void CleanTmpStr ARGS_DECL((void)); + extern int PrependToTmpStr ARGS_DECL((char*)); + extern int AppendToTmpStr ARGS_DECL((char*)); extern struct ObjRec * FindObjWithName ARGS_DECL((struct ObjRec *BotObj, struct ObjRec *ObjPtr, *************** *** 55,58 **** --- 61,68 ---- extern void ReplaceAttrFirstValue ARGS_DECL((struct ObjRec *, struct AttrRec *, char *)); + extern void ReplaceAttrAllValues ARGS_DECL((struct ObjRec *, + struct AttrRec *, + struct StrRec **ppTopStr, + struct StrRec **ppBotStr)); extern int DoExec ARGS_DECL((struct AttrRec *, struct ObjRec *)); extern void CleanUpExec ARGS_DECL((void)); *** util.e.orig Wed Oct 8 10:15:45 1997 --- util.e Wed Oct 8 10:15:45 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/util.e,v 3.1 1997/09/14 20:38:09 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/util.e,v 3.2 1997/10/06 13:44:44 william Exp $ */ *************** *** 38,41 **** --- 38,43 ---- extern int UtilStrCpy ARGS_DECL((char *lpszDest, int nMaxDestSz, char *lpszSrc)); + extern void UtilLeftTrim ARGS_DECL((char *lpszStr)); + extern void UtilRightTrim ARGS_DECL((char *lpszStr)); extern void UtilTrimBlanks ARGS_DECL((char *lpszStr)); extern int UtilStrNCaseCmp ARGS_DECL((char *pszStr1, char *pszStr2, *** patchlvl.h.orig Wed Oct 8 10:15:46 1997 --- patchlvl.h Wed Oct 8 10:15:46 1997 *************** *** 28,32 **** * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/patchlvl.h,v 3.15 1997/09/14 20:38:11 william Exp $ */ --- 28,32 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/patchlvl.h,v 3.16 1997/10/01 10:54:05 william Exp $ */ *************** *** 34,38 **** #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 14 #endif /*_TGIF_PATCHLEVEL_H_*/ --- 34,38 ---- #define _TGIF_PATCHLEVEL_H_ ! #define TGIF_PATCHLEVEL 15 #endif /*_TGIF_PATCHLEVEL_H_*/ *** Imakefile.orig Wed Oct 8 10:15:47 1997 --- Imakefile Wed Oct 8 10:15:47 1997 *************** *** 36,40 **** XCOMM PERFORMANCE OF THIS SOFTWARE. XCOMM ! XCOMM @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/Imakefile,v 3.19 1997/09/15 19:00:03 william Exp $ XCOMM --- 36,40 ---- XCOMM PERFORMANCE OF THIS SOFTWARE. XCOMM ! XCOMM @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/Imakefile,v 3.20 1997/10/08 13:45:42 william Exp $ XCOMM *************** *** 45,49 **** XCOMM EXTRA_LDOPTIONS = ! TGIFVERSION = 3.0-p14 PROGRAMS = tgif prtgif XCOMM frontend11.o testdrive XCOMM CDEBUGFLAGS= -g --- 45,49 ---- XCOMM EXTRA_LDOPTIONS = ! TGIFVERSION = 3.0-p15 PROGRAMS = tgif prtgif XCOMM frontend11.o testdrive XCOMM CDEBUGFLAGS= -g *** tgif.man.orig Wed Oct 8 10:15:48 1997 --- tgif.man Wed Oct 8 10:15:49 1997 *************** *** 1,9 **** .\" Tgif's man pages. .\" ! .\" @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/tgif.man,v 3.15 1997/09/18 00:44:12 william Exp $ .\" .\" .\" ! .TH TGIF n "Version 3.0 Patchlevel 14 and Above" "Tgif" .\" .SH NAME --- 1,9 ---- .\" Tgif's man pages. .\" ! .\" @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/tgif.man,v 3.16 1997/10/06 18:11:19 william Exp $ .\" .\" .\" ! .TH TGIF n "Version 3.0 Patchlevel 15 and Above" "Tgif" .\" .SH NAME *************** *** 1808,1811 **** --- 1808,1854 ---- specified by exists. It writes a "0" into otherwise. + .TP + .I find_obj_names(,,) + This command finds all objects that are direct sub-objects of the + object specified by and writes their names into . + If is an empty string, all top-level objects are scanned. + .PP + .RS + specifies a filter for the objects. If + is the empty string, all qualifying objects are selected. + If is of the form "=*", an object is selected + if it has an attribute named . + If is of the form "=", an object is + selected if it has an + attribute named and its corresponding value is . + If does not contain the '=' character, + an object is selected if it has an attribute whose name is empty and + the corresponding value is identical to . + .RE + .PP + .RS + If \fIn\fR objects are matched, the attribute specified by + is updated with \fIn+1\fR lines. The value of the zeroth line becomes + \fIn\fR and the object names becomes lines 1 through \fIn\fR of . + The get_line_in_attr() internal command can be used to retrieve the + object names. + .RE + .TP + .I tokenize(,,) + This command breaks into tokens which are separated by the + character and writes the tokens into . + must be a string of length of 1 and it must not be the space + character, the single-quote character, or the double-quote character. + If a token contains the separator character, the token can be surrounded + by a pair of single-quotes or double-quotes which are automatically removed + when this command is executed. + .PP + .RS + If \fIn\fR tokens are found, the attribute specified by + is updated with \fIn+1\fR lines. The value of the zeroth line becomes + \fIn\fR and the tokens becomes lines 1 through \fIn\fR of . + The get_line_in_attr() internal command can be used to retrieve the + tokens. + .RE .\" .SH ARITHMETIC EXPRESSIONS *** HISTORY.orig Wed Oct 8 10:15:50 1997 --- HISTORY Wed Oct 8 10:15:50 1997 *************** *** 1,2 **** --- 1,10 ---- + -----------------------> tgif-3.0-p14 => tgif-3.0-p15 <----------------------- + Here's a short list of added features/bug fixes. + + 1) Add new internal commands: + + find_obj_names(,,) + tokenize(,,) + -----------------------> tgif-3.0-p13 => tgif-3.0-p14 <----------------------- Here's a short list of added features/bug fixes. *************** *** 304,307 **** /* ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/HISTORY,v 3.17 1997/09/30 17:19:02 william Exp $ */ --- 312,315 ---- /* ! * @(#)$Header: /u/halfmoon/home/william/src/tgif/v3/RCS/HISTORY,v 3.18 1997/10/08 13:45:11 william Exp $ */