From owner-ports-jp@jp.freebsd.org  Tue Jan  9 18:17:14 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id SAA88956;
	Tue, 9 Jan 2001 18:17:14 +0900 (JST)
	(envelope-from owner-ports-jp@jp.FreeBSD.org)
Received: from st41.arena.ne.jp (st41.arena.ne.jp [210.150.208.2])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id SAA88951
	for <ports-jp@jp.freebsd.org>; Tue, 9 Jan 2001 18:17:13 +0900 (JST)
	(envelope-from issei@issei.org)
Received: (qmail 11968 invoked from network); 9 Jan 2001 18:16:57 +0900
Received: from unknown (HELO localhost) (210.197.203.177)
  by issei.org with SMTP; 9 Jan 2001 18:16:57 +0900
Date: Tue, 09 Jan 2001 18:17:19 +0900 (JST)
Message-Id: <20010109.181719.74323605.issei@issei.org>
To: ports-jp@jp.freebsd.org
Cc: sf@FreeBSD.org
From: Issei Suzuki <issei@issei.org>
In-Reply-To: <10101090601.AA07483@m-fukui-tp.sonic.nm.fujitsu.co.jp>
References: <10101090601.AA07483@m-fukui-tp.sonic.nm.fujitsu.co.jp>
X-Mailer: Mew version 1.95b94 on XEmacs 21.1.12 (Channel Islands)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Tue_Jan__9_18:17:19_2001_253)--"
Content-Transfer-Encoding: 7bit
Reply-To: ports-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: ports-jp 10602
Subject: [ports-jp 10602] Re: ports/japanese/less compile error
Errors-To: owner-ports-jp@jp.freebsd.org
Sender: owner-ports-jp@jp.freebsd.org
X-Originator: issei@issei.org

----Next_Part(Tue_Jan__9_18:17:19_2001_253)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

In mail "[ports-jp 10601] ports/japanese/less compile error"
Masayuki FUKUI <fukui@sonic.nm.fujitsu.co.jp> wrote:

> $BEvJ}$N(B FreeBSD-current (20010109$BHG(B) $B$K$F!"(Bports/japanese/less $B$,(B
> $B"-$N$h$&$K(B compile error $B$H$J$j$^$7$?!#(B
($BCfN,(B)
> sys/queue.h $B$+$i(B CIRCLEQ_* $B$N(B define $B$,$9$Y$F:o=|$5$l$?$+$i$N$h$&$G$9!#(B

TAILQ $B$r;H$C$F=q$-D>$7$^$7$?!#(Bless-358-iso254+gtags.diff $B$KBP$9$k:9J,$r(B
$B$D$1$^$9!#(B

Issei.-

----Next_Part(Tue_Jan__9_18:17:19_2001_253)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="less-gtags-tailq.diff"

--- less-358-iso254+gtags/less-358-iso254+gtags.diff	Thu Dec 21 20:19:30 2000
+++ less-358-iso254+gtags2/less-358-iso254+gtags2.diff	Tue Jan  9 18:08:25 2001
@@ -8,9 +8,9 @@
  *
  * Issei Suzuki <issei@FreeBSD.org>
  */
-diff --exclude configure -durN less-358.old/cmd.h less-358-gtags/cmd.h
---- less-358.old/cmd.h	Thu Dec 21 19:14:44 2000
-+++ less-358-gtags/cmd.h	Thu Dec 21 19:14:55 2000
+diff -urN less-358.old/cmd.h less-358/cmd.h
+--- less-358.old/cmd.h	Tue Jan  9 17:46:35 2001
++++ less-358/cmd.h	Tue Jan  9 17:46:52 2001
 @@ -69,6 +69,8 @@
  #define	A_F_FOREVER		50
  #define	A_GOPOS			51
@@ -20,9 +20,9 @@
  
  #if JAPANESE
  #define A_ROT_RCODESET		80
-diff --exclude configure -durN less-358.old/command.c less-358-gtags/command.c
---- less-358.old/command.c	Thu Dec 21 19:14:44 2000
-+++ less-358-gtags/command.c	Thu Dec 21 19:14:55 2000
+diff -urN less-358.old/command.c less-358/command.c
+--- less-358.old/command.c	Tue Jan  9 17:46:35 2001
++++ less-358/command.c	Tue Jan  9 17:46:52 2001
 @@ -222,6 +222,11 @@
  		if (secure)
  			break;
@@ -94,10 +94,10 @@
  		case A_INDEX_FILE:
  			/*
  			 * Examine a particular file.
-diff --exclude configure -durN less-358.old/configure.in less-358-gtags/configure.in
---- less-358.old/configure.in	Thu Dec 21 19:14:44 2000
-+++ less-358-gtags/configure.in	Thu Dec 21 19:15:34 2000
-@@ -140,7 +140,7 @@
+diff -urN less-358.old/configure.in less-358/configure.in
+--- less-358.old/configure.in	Tue Jan  9 17:46:35 2001
++++ less-358/configure.in	Tue Jan  9 17:46:52 2001
+@@ -130,7 +130,7 @@
  
  
  dnl Checks for header files.
@@ -106,7 +106,7 @@
  
  dnl Checks for identifiers.
  AC_TYPE_OFF_T
-@@ -156,7 +156,7 @@
+@@ -146,7 +146,7 @@
  
  dnl Checks for functions and external variables.
  AC_TYPE_SIGNAL
@@ -115,9 +115,9 @@
  
  dnl Some systems have termios.h but not the corresponding functions.
  AC_CHECK_FUNC(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS))
-diff --exclude configure -durN less-358.old/decode.c less-358-gtags/decode.c
---- less-358.old/decode.c	Thu Dec 21 19:14:44 2000
-+++ less-358-gtags/decode.c	Thu Dec 21 19:14:55 2000
+diff -urN less-358.old/decode.c less-358/decode.c
+--- less-358.old/decode.c	Tue Jan  9 17:46:35 2001
++++ less-358/decode.c	Tue Jan  9 17:46:52 2001
 @@ -169,6 +169,8 @@
  	'Q',0,				A_QUIT,
  	':','q',0,			A_QUIT,
@@ -127,9 +127,9 @@
  	'Z','Z',0,			A_QUIT
  };
  
-diff --exclude configure -durN less-358.old/defines.h.in less-358-gtags/defines.h.in
---- less-358.old/defines.h.in	Thu Dec 21 19:14:44 2000
-+++ less-358-gtags/defines.h.in	Thu Dec 21 19:15:59 2000
+diff -urN less-358.old/defines.h.in less-358/defines.h.in
+--- less-358.old/defines.h.in	Tue Jan  9 17:46:35 2001
++++ less-358/defines.h.in	Tue Jan  9 17:46:52 2001
 @@ -331,6 +331,9 @@
  /* Define if you have the sigsetmask function.  */
  #undef HAVE_SIGSETMASK
@@ -150,9 +150,9 @@
  
  /* Define if you have the <termcap.h> header file.  */
  #undef HAVE_TERMCAP_H
-diff --exclude configure -durN less-358.old/funcs.h less-358-gtags/funcs.h
---- less-358.old/funcs.h	Thu Dec 21 19:14:44 2000
-+++ less-358-gtags/funcs.h	Thu Dec 21 19:14:55 2000
+diff -urN less-358.old/funcs.h less-358/funcs.h
+--- less-358.old/funcs.h	Tue Jan  9 17:46:35 2001
++++ less-358/funcs.h	Tue Jan  9 17:46:52 2001
 @@ -244,9 +244,14 @@
  	public RETSIGTYPE winch ();
  	public void init_signals ();
@@ -169,9 +169,9 @@
  	public void open_getchr ();
  	public void close_getchr ();
  	public int getchr ();
-diff --exclude configure -durN less-358.old/main.c less-358-gtags/main.c
---- less-358.old/main.c	Thu Dec 21 19:14:44 2000
-+++ less-358-gtags/main.c	Thu Dec 21 19:14:55 2000
+diff -urN less-358.old/main.c less-358/main.c
+--- less-358.old/main.c	Tue Jan  9 17:46:35 2001
++++ less-358/main.c	Tue Jan  9 17:46:52 2001
 @@ -48,6 +48,7 @@
  #endif
  
@@ -189,9 +189,9 @@
  	{
  		/*
  		 * A -t option was given.
-diff --exclude configure -durN less-358.old/prompt.c less-358-gtags/prompt.c
---- less-358.old/prompt.c	Thu Dec 21 19:14:44 2000
-+++ less-358-gtags/prompt.c	Thu Dec 21 19:14:55 2000
+diff -urN less-358.old/prompt.c less-358/prompt.c
+--- less-358.old/prompt.c	Tue Jan  9 17:46:35 2001
++++ less-358/prompt.c	Tue Jan  9 17:46:52 2001
 @@ -47,13 +47,13 @@
   * These strings are expanded by pr_expand().
   */
@@ -277,10 +277,10 @@
  		break;
  	case 'x':	/* Name of next file */
  		h = next_ifile(curr_ifile);
-diff --exclude configure -durN less-358.old/tags.c less-358-gtags/tags.c
---- less-358.old/tags.c	Thu Dec 21 19:14:44 2000
-+++ less-358-gtags/tags.c	Thu Dec 21 19:19:26 2000
-@@ -15,34 +15,255 @@
+diff -urN less-358.old/tags.c less-358/tags.c
+--- less-358.old/tags.c	Tue Jan  9 17:46:35 2001
++++ less-358/tags.c	Tue Jan  9 17:50:05 2001
+@@ -15,34 +15,253 @@
  
  #if TAGS
  
@@ -331,9 +331,9 @@
 + * line (old style tags format) instead of pattern. In such case,
 + * pattern is NULL.
 + */
-+static CIRCLEQ_HEAD(tag_q, tag) tag_q;
++static TAILQ_HEAD(tag_q, tag) tag_q;
 +struct tag {
-+	CIRCLEQ_ENTRY(tag) ptrs;
++	TAILQ_ENTRY(tag) ptrs;
 +	char *tagfile;		/* source file containing the tag */
 +	int taglinenum;		/* appropriate line number of source file */
 +	char *tagpattern;	/* pattern which should be used to find the tag */
@@ -352,15 +352,13 @@
 +	/* XXX Ideally, we wouldn't do this until after we know that we
 +	 * can load some other tag information. */
 +	curtag = NULL;
-+	tag_p = CIRCLEQ_FIRST(&tag_q);
-+	if (tag_p) {
-+		while (tag_p != (void *)&tag_q) {
-+			tag_save_p = CIRCLEQ_NEXT(tag_p, ptrs);
-+			free(tag_p);
-+			tag_p = tag_save_p;
-+		}
++	tag_p = TAILQ_FIRST(&tag_q);
++	while (tag_p) {
++		tag_save_p = TAILQ_NEXT(tag_p, ptrs);
++		free(tag_p);
++		tag_p = tag_save_p;
 +	}
-+	CIRCLEQ_INIT(&tag_q);
++	TAILQ_INIT(&tag_q);
 +	total = curseq = 0;
 +}
 +/*
@@ -544,7 +542,7 @@
  
  	p = unquote_file(tags);
  	f = fopen(p, "r");
-@@ -50,10 +271,13 @@
+@@ -50,10 +269,13 @@
  	if (f == NULL)
  	{
  		error("No tags file", NULL_PARG);
@@ -559,7 +557,7 @@
  	taglen = strlen(tag);
  
  	/*
-@@ -61,6 +285,11 @@
+@@ -61,6 +283,11 @@
  	 */
  	while (fgets(tline, sizeof(tline), f) != NULL)
  	{
@@ -571,7 +569,7 @@
  		if (strncmp(tag, tline, taglen) != 0 || !WHITESP(tline[taglen]))
  			continue;
  
-@@ -72,8 +301,9 @@
+@@ -72,8 +299,9 @@
  		 * or a search pattern surrounded by a pair of delimiters.
  		 * Parse the line and extract these parts.
  		 */
@@ -582,7 +580,7 @@
  
  		/*
  		 * Skip over the whitespace after the tag name.
-@@ -95,7 +325,6 @@
+@@ -95,7 +323,6 @@
  		if (*p == '\0')
  			/* Pattern is missing! */
  			continue;
@@ -590,7 +588,7 @@
  
  		/*
  		 * First see if it is a line number. 
-@@ -113,39 +342,49 @@
+@@ -113,39 +340,49 @@
  			search_char = *p++;
  			if (*p == '^')
  				p++;
@@ -618,7 +616,7 @@
 +		/* Make new entry and add to queue */
 +		tag_p = maketagent(tag, tagfile, taglinenum, tagpattern, tagendline);
 +		if (tag_p) {
-+			CIRCLEQ_INSERT_TAIL(&tag_q, tag_p, ptrs);
++			TAILQ_INSERT_TAIL(&tag_q, tag_p, ptrs);
 +		} else {
 +			error("malloc() failed", NULL_PARG);
 +			if (f != stdin)
@@ -634,7 +632,7 @@
 +		error("No such tag in tags file", NULL_PARG);
 +		return;
 +	}
-+	curtag = CIRCLEQ_FIRST(&tag_q);
++	curtag = TAILQ_FIRST(&tag_q);
 +	curseq = 1;
  }
 -
@@ -657,7 +655,7 @@
  }
  
  /*
-@@ -157,21 +396,14 @@
+@@ -157,21 +394,14 @@
   *	regcmp vs. re_comp) behave differently in the presence of 
   *	parentheses (which are almost always found in a tag).
   */
@@ -681,7 +679,7 @@
  	pos = ch_zero();
  	linenum = find_linenum(pos);
  
-@@ -217,15 +449,309 @@
+@@ -217,15 +447,309 @@
  		 * If tagendline is set, make sure we match all
  		 * the way to end of line (no extra chars after the match).
  		 */
@@ -805,7 +803,7 @@
 +			/* Make new entry and add to queue */
 +			tag_p = maketagent(name, file, atoi(line), NULL, 0);
 +			if (tag_p) {
-+				CIRCLEQ_INSERT_TAIL(&tag_q, tag_p, ptrs);
++				TAILQ_INSERT_TAIL(&tag_q, tag_p, ptrs);
 +			} else {
 +				error("malloc() failed", NULL_PARG);
 +				if (fp != stdin)
@@ -826,10 +824,10 @@
 +	}
 +
 +	/* Check to see if we found anything. */
-+	if (CIRCLEQ_EMPTY(&tag_q))
++	if (TAILQ_EMPTY(&tag_q))
 +		return;  /* Nope! */
 +
-+	curtag = CIRCLEQ_FIRST(&tag_q);
++	curtag = TAILQ_FIRST(&tag_q);
 +	curseq = 1;
 +}
 +
@@ -849,14 +847,14 @@
 +	/*
 +	 * It is the last tag entry.
 +	 */
-+	if (CIRCLEQ_NEXT(curtag, ptrs) == (void *)&tag_q) {
++	if (TAILQ_NEXT(curtag, ptrs) == NULL) {
 +		if (!circular)
 +			return NULL;
 +		/* Wrapped around to the head of the queue */
-+		curtag = CIRCLEQ_FIRST(&tag_q);
++		curtag = TAILQ_FIRST(&tag_q);
 +		curseq = 1;
 +	} else {
-+		curtag = CIRCLEQ_NEXT(curtag, ptrs);
++		curtag = TAILQ_NEXT(curtag, ptrs);
 +		curseq++;
 +	}
 +	return curtag->tagfile;
@@ -877,14 +875,14 @@
 +	/*
 +	 * It is the first tag entry.
 +	 */
-+	if (CIRCLEQ_PREV(curtag, ptrs) == (void *)&tag_q) {
++	if (TAILQ_PREV(curtag, tag_q, ptrs) == NULL) {
 +		if (!circular)
 +			return NULL;
 +		/* Wrapped around to the tail of the queue */
-+		curtag = CIRCLEQ_LAST(&tag_q);
++		curtag = TAILQ_LAST(&tag_q, tag_q);
 +		curseq = total;
 +	} else {
-+		curtag = CIRCLEQ_PREV(curtag, ptrs);
++		curtag = TAILQ_PREV(curtag, tag_q, ptrs);
 +		curseq--;
 +	}
 +	return curtag->tagfile;

----Next_Part(Tue_Jan__9_18:17:19_2001_253)----
