[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users-jp 01334] Re: Forward: debian mgp package problem



From: Fumitoshi UKAI <ukai@debian.or.jp>
Subject: [mgp-users-jp 01333] Forward: debian mgp package problem
Date: Thu, 05 Jun 2003 02:15:39 +0900
Message-ID: <>

 > 添付の報告をうけました。%tab で icon とかを指定しておいても
 > 表示されないというものです。
 > 
 > ちょっとしらべてみたところ  parse.c の thirdpass() で
 > tab_control をコピーする先が以前とかわっているようで
 > #if 0 されているのを #if 1 にすればこの問題はなおるようなのですが、
 > なぜ #if 0 されているのでしょうか?

レポートありがとうございます。
これは今テスト中の機能のためにこうなっています。
今の snapshotでは、

%tab 0 <list-of-directives>

と書く事によって、tabのない行に対して、directiveの listを与えることが
できるようになっています。

ということでこの bugに関しては以下の patchを試してみて下さい。
--
Yoshifumi Nishida
nishida@csl.sony.co.jp



*** mgp.h	2003/04/16 08:02:55	1.133
--- mgp.h	2003/06/05 09:09:27
***************
*** 696,701 ****
--- 696,702 ----
  extern struct ctrl *ctlalloc1 __P((u_int));
  extern void ctlfree __P((struct ctrl *));
  extern struct ctrl *ctlcopy __P((struct ctrl *));
+ extern struct ctrl *ctlcopy1 __P((struct ctrl *));
  extern void debug0 __P((struct ctrl *));
  extern void debug1 __P((struct ctrl *));
  
*** parse.c	2003/05/08 08:31:20	1.91
--- parse.c	2003/06/05 09:09:33
***************
*** 775,780 ****
--- 778,784 ----
  	struct ctrl *cp;
  	struct ctrl *cp1;
  	struct ctrl *cp2;
+ 	struct ctrl *cpt;
  	char *p;
  	struct ctrl *carryover[MAXPAGE];
  
***************
*** 1217,1227 ****
  				    ctlcopy(tab_control[tab_depth]));
  			}
  #else
- 			/* insert CTL_TAB items into the head of the ctrls */
  			if (tab_control[tab_depth]) {
  				ch = &page_control[page][l];
! 				ctlinsert(ch,
! 				    ctlcopy(tab_control[tab_depth]));
  			}
  #endif
  
--- 1221,1238 ----
  				    ctlcopy(tab_control[tab_depth]));
  			}
  #else
  			if (tab_control[tab_depth]) {
  				ch = &page_control[page][l];
! 				for (cpt = tab_control[tab_depth]; cpt; cpt = cpt->ct_next){
! 					/* Thses ctrl items should be in CTL_LINESTART */
! 					if (cpt->ct_op == CTL_IMAGE || cpt->ct_op == CTL_TABPREFIX ||
! 							cpt->ct_op == CTL_ICON){
! 						ctlinsert(&cp1->ct_next, ctlcopy1(cpt));
! 						cp1 = cp1->ct_next; 
! 					} else
! 					/* other ctrl items should be in the head of the ctrls */
! 						ctlinsert(ch, ctlcopy1(cpt));
! 				}
  			}
  #endif
  
***************
*** 1587,1592 ****
--- 1598,1616 ----
  	}
  
  	return dst0;
+ }
+ 
+ struct ctrl *
+ ctlcopy1(src)
+ 	struct ctrl *src;
+ {
+ 	struct ctrl *dst;
+ 	if (!src)
+ 		return NULL;
+ 	dst = ctlalloc1(0);
+ 	memcpy(dst, src, sizeof(struct ctrl));
+ 	dst->ct_next = NULL;
+ 	return dst;
  }
  
  int