summaryrefslogtreecommitdiff
path: root/graphics/tgif/patches/patch-aa
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/tgif/patches/patch-aa')
-rw-r--r--graphics/tgif/patches/patch-aa202
1 files changed, 0 insertions, 202 deletions
diff --git a/graphics/tgif/patches/patch-aa b/graphics/tgif/patches/patch-aa
deleted file mode 100644
index a8c0aac76d6..00000000000
--- a/graphics/tgif/patches/patch-aa
+++ /dev/null
@@ -1,202 +0,0 @@
-$NetBSD: patch-aa,v 1.5 2001/07/15 03:29:23 dmcmahill Exp $
-
-fix a bug in running tgif scripts via the -exec flag. Patch provided
-by the tgif author:
-Bill Cheng // william@cs.umd.edu <URL:http://www.cs.umd.edu/~william/>
-
-*** exec.c.orig 2000/11/09 00:07:26
---- exec.c 2001/03/19 22:08:19
-***************
-*** 71,74 ****
---- 71,75 ----
- #include "obj.e"
- #include "oval.e"
-+ #include "page.e"
- #include "pattern.e"
- #include "poly.e"
-***************
-*** 1404,1408 ****
- /* obj_ptr better be a top-level object */
- {
-! int count=0, need_to_change=FALSE;
- struct StrRec *str_ptr=NULL;
- MiniLineInfo *pMiniLine=NULL;
---- 1405,1409 ----
- /* obj_ptr better be a top-level object */
- {
-! int count=0, need_to_change=TRUE;
- struct StrRec *str_ptr=NULL;
- MiniLineInfo *pMiniLine=NULL;
-***************
-*** 1411,1439 ****
- count++;
- }
-! if (count != attr_ptr->obj->detail.t->lines) {
-! need_to_change = TRUE;
-! } else {
-! for (str_ptr=(*ppTopStr),
-! pMiniLine=attr_ptr->obj->detail.t->minilines.first;
-! str_ptr != NULL;
-! str_ptr=str_ptr->next, pMiniLine=pMiniLine->next) {
-! if (pMiniLine == NULL) {
-! need_to_change = TRUE;
-! break;
-! } else {
-! if (pMiniLine == attr_ptr->obj->detail.t->minilines.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;
---- 1412,1442 ----
- count++;
- }
-! /*
-! * if (count != attr_ptr->obj->detail.t->lines) {
-! * need_to_change = TRUE;
-! * } else {
-! * for (str_ptr=(*ppTopStr),
-! * pMiniLine=attr_ptr->obj->detail.t->minilines.first;
-! * str_ptr != NULL;
-! * str_ptr=str_ptr->next, pMiniLine=pMiniLine->next) {
-! * if (pMiniLine == NULL) {
-! * need_to_change = TRUE;
-! * break;
-! * } else {
-! * if (pMiniLine == attr_ptr->obj->detail.t->minilines.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;
-***************
-*** 8392,8395 ****
---- 8395,8423 ----
- }
-
-+ static
-+ int DoExecSelectEachObjAndExec(attr_name)
-+ char *attr_name;
-+ {
-+ struct ObjRec *optr=NULL;
-+ int rc=TRUE;
-+
-+ for (optr=botObj; rc && optr != NULL; optr=optr->prev) {
-+ struct AttrRec *attr_ptr=NULL;
-+
-+ attr_ptr = FindAttrWithName(optr, attr_name, NULL);
-+ if (attr_ptr != NULL) {
-+ struct SelRec *sel_ptr=SelectThisObject(optr);
-+
-+ AddSel(NULL, topSel, sel_ptr);
-+ UpdSelBBox();
-+ if (!DoExec(attr_ptr, optr)) {
-+ rc = FALSE;
-+ }
-+ RemoveAllSel();
-+ }
-+ }
-+ return rc;
-+ }
-+
- int ExecSelectEachObjAndExec(argv, obj_ptr, orig_cmd)
- char **argv, *orig_cmd;
-***************
-*** 8398,8420 ****
- {
- char *attr_name_to_exec=argv[0];
-- struct ObjRec *optr=NULL;
-- struct AttrRec *attr_ptr=NULL;
- int rc=TRUE;
-
- UtilRemoveQuotes(attr_name_to_exec);
-- sprintf(execDummyStr, "%s=", attr_name_to_exec);
-- attr_ptr = FindAttrWithName(obj_ptr, execDummyStr, NULL);
-- if (attr_ptr == NULL) return BadAttr(execDummyStr, orig_cmd);
-
-! MakeQuiescent();
-! for (optr=botObj; rc && optr != NULL; optr=optr->prev) {
-! struct SelRec *sel_ptr=SelectThisObject(optr);
-
-! AddSel(NULL, topSel, sel_ptr);
-! UpdSelBBox();
-! if (!DoExec(attr_ptr, optr)) {
-! rc = FALSE;
- }
-! RemoveAllSel();
- }
- return rc;
---- 8426,8477 ----
- {
- char *attr_name_to_exec=argv[0];
- int rc=TRUE;
-
- UtilRemoveQuotes(attr_name_to_exec);
-
-! if (topSel != NULL) {
-! struct AttrRec *attr_ptr=NULL;
-
-! sprintf(execDummyStr, "%s=", attr_name_to_exec);
-! attr_ptr = FindAttrWithName(obj_ptr, execDummyStr, NULL);
-! if (attr_ptr == NULL) return BadAttr(execDummyStr, orig_cmd);
-!
-! rc = DoExecSelectEachObjAndExec(execDummyStr);
-! } else {
-! char *attr_name=(char*)malloc(strlen(attr_name_to_exec)+2);
-!
-! if (attr_name == NULL) FailAllocMessage();
-! sprintf(attr_name, "%s=", attr_name_to_exec);
-!
-! MakeQuiescent();
-! StartCompositeCmd();
-! if (lastPageNum == 1) {
-! rc = DoExecSelectEachObjAndExec(attr_name);
-! } else {
-! int saved_cur_page_num=curPageNum, prev_page_num=curPageNum;
-!
-! for (curPageNum=1; rc && curPageNum <= lastPageNum; curPageNum++) {
-! if (prev_page_num != curPageNum) {
-! PrepareToRecord(CMD_GOTO_PAGE, NULL, NULL, prev_page_num);
-! GotoPageNum(curPageNum);
-! RedrawPageWindow();
-! RecordCmd(CMD_GOTO_PAGE, NULL, NULL, NULL, curPageNum);
-! ClearAndRedrawDrawWindow();
-! prev_page_num = curPageNum;
-! }
-! rc = DoExecSelectEachObjAndExec(attr_name);
-! }
-! if (prev_page_num != curPageNum) {
-! PrepareToRecord(CMD_GOTO_PAGE, NULL, NULL, prev_page_num);
-! GotoPageNum(saved_cur_page_num);
-! RedrawPageWindow();
-! RecordCmd(CMD_GOTO_PAGE, NULL, NULL, NULL, saved_cur_page_num);
-! ClearAndRedrawDrawWindow();
-! prev_page_num = curPageNum;
-! }
- }
-! EndCompositeCmd();
-!
-! UtilFree(attr_name);
- }
- return rc;