From MAILER-DAEMON Fri Aug 03 16:59:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxOyI-0004ay-6S
	for mharc-bug-global@gnu.org; Fri, 03 Aug 2012 16:59:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48901)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <patchesthomas.vie@web.de>) id 1Sx21i-0004WA-Fz
	for bug-global@gnu.org; Thu, 02 Aug 2012 16:29:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <patchesthomas.vie@web.de>) id 1Sx21g-0001Qb-Q9
	for bug-global@gnu.org; Thu, 02 Aug 2012 16:29:46 -0400
Received: from mout.web.de ([212.227.17.12]:65176)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <patchesthomas.vie@web.de>) id 1Sx21g-0001QX-Fa
	for bug-global@gnu.org; Thu, 02 Aug 2012 16:29:44 -0400
Received: from idefix.localnet ([212.255.22.93]) by smtp.web.de (mrweb002)
	with ESMTPSA (Nemesis) id 0M1FqS-1TlQp410Js-00tXgZ;
	Thu, 02 Aug 2012 22:29:42 +0200
From: Thomas Viehweger <patchesThomas.Vie@web.de>
Date: Thu, 2 Aug 2012 22:29:30 +0200
User-Agent: KMail/1.13.7 (Linux/3.4.7; KDE/4.8.4; x86_64; ; )
MIME-Version: 1.0
To: bug-global@gnu.org
Subject: Patch for gtags.el problems
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_qMuGQ5w7vrFC4FG"
Message-Id: <201208022229.30773.patchesThomas.Vie@web.de>
X-Provags-ID: V02:K0:Zk5Sl91ib7OrjzcO8c4IckexDlrK9GHH9k3C/PMAEX5
	QfMnrP01QC7Mg+O7iowFPDED1h/tP2FLpeniEHFHokKb89jsAK
	vp6tSDmAQmRw/pPOpZUYko7DXeEAvf8ltnym6ORtVKCl5yKIxo
	kIiP08NcMtq8PeNQwzH2/JVukjH6rnf/RIbUIqE0mAMcYb4fRp
	cPT37vms8yJHpkCpJzr+U+cz43uLoxCkoXiA3/MiGs=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.12
X-Mailman-Approved-At: Fri, 03 Aug 2012 16:59:45 -0400
Cc: Ron Lee <ron@debian.org>
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Aug 2012 20:29:48 -0000

--Boundary-00=_qMuGQ5w7vrFC4FG
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,

I built a Debian package for global 6.2.4 based on Ron Lees existing package. 
But as XEmacs user I had some problems with your gtags.el.

1) Mouse bindings do not work ([mouse-3] vs 'button3)

2) Debugger entered--Lisp error: (wrong-type-argument characterp nil)
  char-equal(nil ?C)
  gtags-goto-tag("tag" "" nil)
According to the documentation of char-equal in XEmacs: Both arguments must be 
characters

3) Byte-compiling covers some old code:
Emacs23:
In gtags-get-rootpath:
gtags.el:447:14:Warning: assignment to free variable `n'
gtags.el:447:14:Warning: reference to free variable `n'

In gtags-decode-pathname:
gtags.el:460:36:Warning: `string-to-int' is an obsolete function (as of Emacs
    22.1); use `string-to-number' instead.

In gtags-select-it:
gtags.el:814:13:Warning: `goto-line' used from Lisp code
That command is designed for interactive use only
Wrote /usr/share/emacs23/site-lisp/global/gtags.elc

XEmacs21:
While compiling gtags-get-rootpath in file /usr/share/xemacs21/site-
lisp/global/gtags.el:
  ** assignment to free variable n
  ** reference to free variable n
While compiling gtags-visit-rootdir:
  ** variable n bound but not referenced
While compiling gtags-find-tag-from-here:
  ** variable flag bound but not referenced
While compiling gtags-pop-stack:
  ** variable buffer bound but not referenced
While compiling the end of the data:
  ** The following functions are not known to be defined: 
    posn-point, event-start, posn-window, event-end

Attached is a patch which also replaces the Windows path delimiter (\\) 
by / which is understood by global.

-- 
Regards
Thomas Viehweger

--Boundary-00=_qMuGQ5w7vrFC4FG
Content-Type: text/x-patch;
  charset="UTF-8";
  name="gtags.el.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="gtags.el.diff"

--- gtags.el	2012-05-30 11:30:15.000000000 +0200
+++ gtags-new.el	2012-08-01 22:19:30.289070022 +0200
@@ -12,12 +12,12 @@
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation, either version 3 of the License, or
 ;; (at your option) any later version.
-;; 
+;;
 ;; This program is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;; 
+;;
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;
@@ -191,8 +191,12 @@
       (define-key gtags-mode-map "\e." 'gtags-find-tag)
       (define-key gtags-mode-map "\C-x4." 'gtags-find-tag-other-window)
       (if gtags-disable-pushy-mouse-mapping nil
-        (define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
-        (define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event)))
+        (if gtags-running-xemacs nil
+          (define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
+          (define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event))
+        (if (not gtags-running-xemacs) nil
+          (define-key gtags-mode-map 'button3 'gtags-pop-stack)
+          (define-key gtags-mode-map 'button2 'gtags-find-tag-by-event))))
 )
 ;; Key mapping of old gtags-mode (obsoleted)
 (if (and gtags-suggested-key-mapping gtags-use-old-key-map)
@@ -214,8 +218,12 @@
       (define-key gtags-mode-map "\e." 'gtags-find-tag)
       (define-key gtags-mode-map "\C-x4." 'gtags-find-tag-other-window)
       (if gtags-disable-pushy-mouse-mapping nil
-        (define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
-        (define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event)))
+        (if gtags-running-xemacs nil
+          (define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
+          (define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event))
+        (if (not gtags-running-xemacs) nil
+          (define-key gtags-mode-map 'button3 'gtags-pop-stack)
+          (define-key gtags-mode-map 'button2 'gtags-find-tag-by-event))))
 )
 
 ;; Key mapping of gtags-select-mode.
@@ -238,8 +246,12 @@
       (define-key gtags-select-mode-map "\C-o" 'gtags-select-tag-other-window)
       (define-key gtags-select-mode-map "\e." 'gtags-select-tag)
       (if gtags-disable-pushy-mouse-mapping nil
-        (define-key gtags-select-mode-map [mouse-3] 'gtags-pop-stack)
-        (define-key gtags-select-mode-map [mouse-2] 'gtags-select-tag-by-event)))
+        (if gtags-running-xemacs nil
+          (define-key gtags-select-mode-map [mouse-3] 'gtags-pop-stack)
+          (define-key gtags-select-mode-map [mouse-2] 'gtags-select-tag-by-event))
+        (if (not gtags-running-xemacs) nil
+          (define-key gtags-select-mode-map 'button3 'gtags-pop-stack)
+          (define-key gtags-select-mode-map 'button2 'gtags-select-tag-by-event))))
 )
 
 ;;
@@ -339,6 +351,11 @@
 	case-fold-search
         gtags-ignore-case))
 
+(eval-and-compile
+  (if (not (fboundp 'replace-in-string))
+      (defun replace-in-string (which from-str to-str)
+        (replace-regexp-in-string from-str to-str which))))
+
 (defun gtags-match-string (n)
   (buffer-substring (match-beginning n) (match-end n)))
 
@@ -386,7 +403,7 @@
           1
         (count-lines (point-min) (point))))))
 
-;; completsion function for completing-read.
+;; completion function for completing-read.
 (defun gtags-completing-gtags (string predicate code)
   (gtags-completing 'gtags string predicate code))
 (defun gtags-completing-grtags (string predicate code)
@@ -443,8 +460,7 @@
     (save-excursion
       (setq buffer (generate-new-buffer (generate-new-buffer-name "*rootdir*")))
       (set-buffer buffer)
-      (setq n (call-process gtags-global-command nil t nil "-pr"))
-      (if (= n 0)
+      (if (= (call-process gtags-global-command nil t nil "-pr") 0)
         (setq path (file-name-as-directory (buffer-substring (point-min)(1- (point-max))))))
       (kill-buffer buffer))
     path))
@@ -457,7 +473,7 @@
     (while (setq start (string-match "%\\([0-9a-f][0-9a-f]\\)" path))
       (setq result (concat result
                      (substring path 0 start)
-                     (format "%c" (string-to-int (substring path (match-beginning 1) (match-end 1)) 16))))
+                     (format "%c" (string-to-number (substring path (match-beginning 1) (match-end 1)) 16))))
       (setq path (substring path (match-end 1))))
     (concat result path)))
 ;;
@@ -466,7 +482,7 @@
 (defun gtags-visit-rootdir ()
   "Tell tags commands the root directory of source tree."
   (interactive)
-  (let (path input n)
+  (let (path input)
     (setq path gtags-rootdir)
     (if (not path)
         (setq path (gtags-get-rootpath)))
@@ -586,7 +602,7 @@
 (defun gtags-find-tag-from-here ()
   "Get the expression as a tagname around here and move there."
   (interactive)
-  (let (tagname flag)
+  (let (tagname)
     (setq tagname (gtags-current-token))
     (if (not tagname)
         nil
@@ -654,7 +670,7 @@
 (defun gtags-pop-stack ()
   "Move to previous point on the stack."
   (interactive)
-  (let (delete context buffer)
+  (let (delete context)
     (if (and (not (equal gtags-current-buffer nil))
              (not (equal gtags-current-buffer (current-buffer))))
          (switch-to-buffer gtags-current-buffer)
@@ -682,12 +698,14 @@
   (let (option context save prefix buffer lines flag-char)
     (setq save (current-buffer))
     (setq flag-char (string-to-char flag))
+    (if (equal flag-char nil)
+        (setq flag-char (string-to-char " ")))
     ; Use always ctags-x format.
     (setq option "-x")
     (if (gtags-ignore-casep)
         (setq option (concat option "i")))
     (if (char-equal flag-char ?C)
-        (setq context (concat "--from-here=" (number-to-string (gtags-current-lineno)) ":" (gtags-buffer-file-name)))
+        (setq context (concat "--from-here=" (number-to-string (gtags-current-lineno)) ":" (replace-in-string (gtags-buffer-file-name) "\\\\" "/")))
         (setq option (concat option flag)))
     (cond
      ((char-equal flag-char ?C)
@@ -802,11 +820,11 @@
       ;; will be changed. This might cause loading error, if you use relative
       ;; path in [GTAGS SELECT MODE], because emacs's buffer has its own
       ;; current directory.
-      ;; 
+      ;;
       (let ((prev-buffer (current-buffer)))
         ;; move to the context
-        (if gtags-read-only 
-	    (if (null other-win) (find-file-read-only file) 
+        (if gtags-read-only
+	    (if (null other-win) (find-file-read-only file)
 	      (find-file-read-only-other-window file))
 	  (if (null other-win) (find-file file)
 	    (find-file-other-window file)))

--Boundary-00=_qMuGQ5w7vrFC4FG--


From MAILER-DAEMON Sat Aug 04 12:19:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sxh4A-0003Bc-9t
	for mharc-bug-global@gnu.org; Sat, 04 Aug 2012 12:19:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35718)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1Sxh48-0003AI-Fn
	for bug-global@gnu.org; Sat, 04 Aug 2012 12:19:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1Sxh47-0002d5-CN
	for bug-global@gnu.org; Sat, 04 Aug 2012 12:19:00 -0400
Received: from msa103lp.auone-net.jp ([222.3.140.166]:56252)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1Sxh46-0002cv-Su
	for bug-global@gnu.org; Sat, 04 Aug 2012 12:18:59 -0400
Received: from choota.tamacom.com (KHP059138043202.ppp-bb.dion.ne.jp
	[59.138.43.202])
	by msa103lp.auone-net.jp (au one net msa) with ESMTP id 77E2530003A;
	Sun,  5 Aug 2012 01:18:54 +0900 (JST)
Received: from choota.tamacom.com (localhost [127.0.0.1]) by
	choota.tamacom.com (8.13.6/) with ESMTP id q74GIrXF001103;
	Sun, 5 Aug 2012 01:18:53 +0900 (JST)
Message-Id: <201208041618.q74GIrXF001103@tamacom.com>
To: Thomas Viehweger <patchesThomas.Vie@web.de>
Subject: Re: Patch for gtags.el problems
From: "Shigio YAMAGUCHI" <shigio@gnu.org>
References: <201208022229.30773.patchesThomas.Vie@web.de>
In-reply-to: Message from Thomas Viehweger <patchesThomas.Vie@web.de> of "Thu,
	02 Aug 2012 22:29:30 +0200."
	<201208022229.30773.patchesThomas.Vie@web.de>
Date: Sun, 05 Aug 2012 01:18:53 +0900
Sender: shigio@tamacom.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 222.3.140.166
Cc: bug-global@gnu.org, Ron Lee <ron@debian.org>
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 04 Aug 2012 16:19:01 -0000

Hi,
Thank you for the patch.
I will check later.

> Hi,
> 
> I built a Debian package for global 6.2.4 based on Ron Lees existing package. 
> But as XEmacs user I had some problems with your gtags.el.
> 
> 1) Mouse bindings do not work ([mouse-3] vs 'button3)
> 
> 2) Debugger entered--Lisp error: (wrong-type-argument characterp nil)
>   char-equal(nil ?C)
>   gtags-goto-tag("tag" "" nil)
> According to the documentation of char-equal in XEmacs: Both arguments must be 
> characters
> 
> 3) Byte-compiling covers some old code:
> Emacs23:
> In gtags-get-rootpath:
> gtags.el:447:14:Warning: assignment to free variable `n'
> gtags.el:447:14:Warning: reference to free variable `n'
> 
> In gtags-decode-pathname:
> gtags.el:460:36:Warning: `string-to-int' is an obsolete function (as of Emacs
>     22.1); use `string-to-number' instead.
> 
> In gtags-select-it:
> gtags.el:814:13:Warning: `goto-line' used from Lisp code
> That command is designed for interactive use only
> Wrote /usr/share/emacs23/site-lisp/global/gtags.elc
> 
> XEmacs21:
> While compiling gtags-get-rootpath in file /usr/share/xemacs21/site-
> lisp/global/gtags.el:
>   ** assignment to free variable n
>   ** reference to free variable n
> While compiling gtags-visit-rootdir:
>   ** variable n bound but not referenced
> While compiling gtags-find-tag-from-here:
>   ** variable flag bound but not referenced
> While compiling gtags-pop-stack:
>   ** variable buffer bound but not referenced
> While compiling the end of the data:
>   ** The following functions are not known to be defined: 
>     posn-point, event-start, posn-window, event-end
> 
> Attached is a patch which also replaces the Windows path delimiter (\\) 
> by / which is understood by global.
> 
> -- 
> Regards
> Thomas Viehweger
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


From MAILER-DAEMON Tue Aug 07 19:46:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SytU1-0003Ne-Kq
	for mharc-bug-global@gnu.org; Tue, 07 Aug 2012 19:46:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39518)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SytTy-0003MB-DK
	for bug-global@gnu.org; Tue, 07 Aug 2012 19:46:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SytTw-0004qZ-IJ
	for bug-global@gnu.org; Tue, 07 Aug 2012 19:46:38 -0400
Received: from msa105lp.auone-net.jp ([222.3.140.168]:40358)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SytTv-0004q2-S0
	for bug-global@gnu.org; Tue, 07 Aug 2012 19:46:36 -0400
Received: from choota.tamacom.com (KHP059138043202.ppp-bb.dion.ne.jp
	[59.138.43.202])
	by msa105lp.auone-net.jp (au one net msa) with ESMTP id 4C2237F0037;
	Wed,  8 Aug 2012 08:46:32 +0900 (JST)
Received: from choota.tamacom.com (localhost [127.0.0.1]) by
	choota.tamacom.com (8.13.6/) with ESMTP id q77NkVZ2000926;
	Wed, 8 Aug 2012 08:46:31 +0900 (JST)
Message-Id: <201208072346.q77NkVZ2000926@tamacom.com>
To: Thomas Viehweger <patchesThomas.Vie@web.de>
Subject: Re: Patch for gtags.el problems
From: "Shigio YAMAGUCHI" <shigio@gnu.org>
References: <201208022229.30773.patchesThomas.Vie@web.de>
In-reply-to: Message from Thomas Viehweger <patchesThomas.Vie@web.de> of "Thu,
	02 Aug 2012 22:29:30 +0200."
	<201208022229.30773.patchesThomas.Vie@web.de>
Date: Wed, 08 Aug 2012 08:46:31 +0900
Sender: shigio@tamacom.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 222.3.140.168
Cc: bug-global@gnu.org, Ron Lee <ron@debian.org>
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Aug 2012 23:46:40 -0000

Hi,
I have committed your patch to the CVS repository.
Thank you.

Shigio

> --Boundary-00=_qMuGQ5w7vrFC4FG
> Content-Type: Text/Plain;
>   charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> 
> Hi,
> 
> I built a Debian package for global 6.2.4 based on Ron Lees existing package. 
> But as XEmacs user I had some problems with your gtags.el.
> 
> 1) Mouse bindings do not work ([mouse-3] vs 'button3)
> 
> 2) Debugger entered--Lisp error: (wrong-type-argument characterp nil)
>   char-equal(nil ?C)
>   gtags-goto-tag("tag" "" nil)
> According to the documentation of char-equal in XEmacs: Both arguments must be 
> characters
> 
> 3) Byte-compiling covers some old code:
> Emacs23:
> In gtags-get-rootpath:
> gtags.el:447:14:Warning: assignment to free variable `n'
> gtags.el:447:14:Warning: reference to free variable `n'
> 
> In gtags-decode-pathname:
> gtags.el:460:36:Warning: `string-to-int' is an obsolete function (as of Emacs
>     22.1); use `string-to-number' instead.
> 
> In gtags-select-it:
> gtags.el:814:13:Warning: `goto-line' used from Lisp code
> That command is designed for interactive use only
> Wrote /usr/share/emacs23/site-lisp/global/gtags.elc
> 
> XEmacs21:
> While compiling gtags-get-rootpath in file /usr/share/xemacs21/site-
> lisp/global/gtags.el:
>   ** assignment to free variable n
>   ** reference to free variable n
> While compiling gtags-visit-rootdir:
>   ** variable n bound but not referenced
> While compiling gtags-find-tag-from-here:
>   ** variable flag bound but not referenced
> While compiling gtags-pop-stack:
>   ** variable buffer bound but not referenced
> While compiling the end of the data:
>   ** The following functions are not known to be defined: 
>     posn-point, event-start, posn-window, event-end
> 
> Attached is a patch which also replaces the Windows path delimiter (\\) 
> by / which is understood by global.
> 
> -- 
> Regards
> Thomas Viehweger
> 
> --Boundary-00=_qMuGQ5w7vrFC4FG
> Content-Type: text/x-patch;
>   charset="UTF-8";
>   name="gtags.el.diff"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: attachment;
> 	filename="gtags.el.diff"
> 
> --- gtags.el	2012-05-30 11:30:15.000000000 +0200
> +++ gtags-new.el	2012-08-01 22:19:30.289070022 +0200
> @@ -12,12 +12,12 @@
>  ;; it under the terms of the GNU General Public License as published by
>  ;; the Free Software Foundation, either version 3 of the License, or
>  ;; (at your option) any later version.
> -;; 
> +;;
>  ;; This program is distributed in the hope that it will be useful,
>  ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
>  ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>  ;; GNU General Public License for more details.
> -;; 
> +;;
>  ;; You should have received a copy of the GNU General Public License
>  ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
>  ;;
> @@ -191,8 +191,12 @@
>        (define-key gtags-mode-map "\e." 'gtags-find-tag)
>        (define-key gtags-mode-map "\C-x4." 'gtags-find-tag-other-window)
>        (if gtags-disable-pushy-mouse-mapping nil
> -        (define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
> -        (define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event)))
> +        (if gtags-running-xemacs nil
> +          (define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
> +          (define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event))
> +        (if (not gtags-running-xemacs) nil
> +          (define-key gtags-mode-map 'button3 'gtags-pop-stack)
> +          (define-key gtags-mode-map 'button2 'gtags-find-tag-by-event))))
>  )
>  ;; Key mapping of old gtags-mode (obsoleted)
>  (if (and gtags-suggested-key-mapping gtags-use-old-key-map)
> @@ -214,8 +218,12 @@
>        (define-key gtags-mode-map "\e." 'gtags-find-tag)
>        (define-key gtags-mode-map "\C-x4." 'gtags-find-tag-other-window)
>        (if gtags-disable-pushy-mouse-mapping nil
> -        (define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
> -        (define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event)))
> +        (if gtags-running-xemacs nil
> +          (define-key gtags-mode-map [mouse-3] 'gtags-pop-stack)
> +          (define-key gtags-mode-map [mouse-2] 'gtags-find-tag-by-event))
> +        (if (not gtags-running-xemacs) nil
> +          (define-key gtags-mode-map 'button3 'gtags-pop-stack)
> +          (define-key gtags-mode-map 'button2 'gtags-find-tag-by-event))))
>  )
>  
>  ;; Key mapping of gtags-select-mode.
> @@ -238,8 +246,12 @@
>        (define-key gtags-select-mode-map "\C-o" 'gtags-select-tag-other-window)
>        (define-key gtags-select-mode-map "\e." 'gtags-select-tag)
>        (if gtags-disable-pushy-mouse-mapping nil
> -        (define-key gtags-select-mode-map [mouse-3] 'gtags-pop-stack)
> -        (define-key gtags-select-mode-map [mouse-2] 'gtags-select-tag-by-event)))
> +        (if gtags-running-xemacs nil
> +          (define-key gtags-select-mode-map [mouse-3] 'gtags-pop-stack)
> +          (define-key gtags-select-mode-map [mouse-2] 'gtags-select-tag-by-event))
> +        (if (not gtags-running-xemacs) nil
> +          (define-key gtags-select-mode-map 'button3 'gtags-pop-stack)
> +          (define-key gtags-select-mode-map 'button2 'gtags-select-tag-by-event))))
>  )
>  
>  ;;
> @@ -339,6 +351,11 @@
>  	case-fold-search
>          gtags-ignore-case))
>  
> +(eval-and-compile
> +  (if (not (fboundp 'replace-in-string))
> +      (defun replace-in-string (which from-str to-str)
> +        (replace-regexp-in-string from-str to-str which))))
> +
>  (defun gtags-match-string (n)
>    (buffer-substring (match-beginning n) (match-end n)))
>  
> @@ -386,7 +403,7 @@
>            1
>          (count-lines (point-min) (point))))))
>  
> -;; completsion function for completing-read.
> +;; completion function for completing-read.
>  (defun gtags-completing-gtags (string predicate code)
>    (gtags-completing 'gtags string predicate code))
>  (defun gtags-completing-grtags (string predicate code)
> @@ -443,8 +460,7 @@
>      (save-excursion
>        (setq buffer (generate-new-buffer (generate-new-buffer-name "*rootdir*")))
>        (set-buffer buffer)
> -      (setq n (call-process gtags-global-command nil t nil "-pr"))
> -      (if (= n 0)
> +      (if (= (call-process gtags-global-command nil t nil "-pr") 0)
>          (setq path (file-name-as-directory (buffer-substring (point-min)(1- (point-max))))))
>        (kill-buffer buffer))
>      path))
> @@ -457,7 +473,7 @@
>      (while (setq start (string-match "%\\([0-9a-f][0-9a-f]\\)" path))
>        (setq result (concat result
>                       (substring path 0 start)
> -                     (format "%c" (string-to-int (substring path (match-beginning 1) (match-end 
1)) 16))))
> +                     (format "%c" (string-to-number (substring path (match-beginning 1) (match-e
nd 1)) 16))))
>        (setq path (substring path (match-end 1))))
>      (concat result path)))
>  ;;
> @@ -466,7 +482,7 @@
>  (defun gtags-visit-rootdir ()
>    "Tell tags commands the root directory of source tree."
>    (interactive)
> -  (let (path input n)
> +  (let (path input)
>      (setq path gtags-rootdir)
>      (if (not path)
>          (setq path (gtags-get-rootpath)))
> @@ -586,7 +602,7 @@
>  (defun gtags-find-tag-from-here ()
>    "Get the expression as a tagname around here and move there."
>    (interactive)
> -  (let (tagname flag)
> +  (let (tagname)
>      (setq tagname (gtags-current-token))
>      (if (not tagname)
>          nil
> @@ -654,7 +670,7 @@
>  (defun gtags-pop-stack ()
>    "Move to previous point on the stack."
>    (interactive)
> -  (let (delete context buffer)
> +  (let (delete context)
>      (if (and (not (equal gtags-current-buffer nil))
>               (not (equal gtags-current-buffer (current-buffer))))
>           (switch-to-buffer gtags-current-buffer)
> @@ -682,12 +698,14 @@
>    (let (option context save prefix buffer lines flag-char)
>      (setq save (current-buffer))
>      (setq flag-char (string-to-char flag))
> +    (if (equal flag-char nil)
> +        (setq flag-char (string-to-char " ")))
>      ; Use always ctags-x format.
>      (setq option "-x")
>      (if (gtags-ignore-casep)
>          (setq option (concat option "i")))
>      (if (char-equal flag-char ?C)
> -        (setq context (concat "--from-here=" (number-to-string (gtags-current-lineno)) ":" (gtag
s-buffer-file-name)))
> +        (setq context (concat "--from-here=" (number-to-string (gtags-current-lineno)) ":" (repl
ace-in-string (gtags-buffer-file-name) "\\\\" "/")))
>          (setq option (concat option flag)))
>      (cond
>       ((char-equal flag-char ?C)
> @@ -802,11 +820,11 @@
>        ;; will be changed. This might cause loading error, if you use relative
>        ;; path in [GTAGS SELECT MODE], because emacs's buffer has its own
>        ;; current directory.
> -      ;; 
> +      ;;
>        (let ((prev-buffer (current-buffer)))
>          ;; move to the context
> -        (if gtags-read-only 
> -	    (if (null other-win) (find-file-read-only file) 
> +        (if gtags-read-only
> +	    (if (null other-win) (find-file-read-only file)
>  	      (find-file-read-only-other-window file))
>  	  (if (null other-win) (find-file file)
>  	    (find-file-other-window file)))
> 
> --Boundary-00=_qMuGQ5w7vrFC4FG
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> _______________________________________________
> Bug-global mailing list
> Bug-global@gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-global
> 
> --Boundary-00=_qMuGQ5w7vrFC4FG--
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


From MAILER-DAEMON Wed Aug 08 21:18:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzHOf-0004Yc-Nn
	for mharc-bug-global@gnu.org; Wed, 08 Aug 2012 21:18:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51236)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <si.44.delooks@googlemail.com>) id 1SzBnu-0001mf-71
	for bug-global@gnu.org; Wed, 08 Aug 2012 15:20:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <si.44.delooks@googlemail.com>) id 1SzBnp-0000Z2-8D
	for bug-global@gnu.org; Wed, 08 Aug 2012 15:20:26 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:51669)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <si.44.delooks@googlemail.com>) id 1SzBno-0000YY-U1
	for bug-global@gnu.org; Wed, 08 Aug 2012 15:20:21 -0400
Received: by wgbez12 with SMTP id ez12so708735wgb.30
	for <bug-global@gnu.org>; Wed, 08 Aug 2012 12:20:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=20120113;
	h=message-id:from:to:subject:date:mime-version:content-type
	:x-priority:x-msmail-priority:x-mailer:x-mimeole;
	bh=rJox8UYhBwYwKbFnWyI4KbHgbYX26SfQRodyGMOoscI=;
	b=Ly9/q9WTrI6uTjg2Kl0kFFs0RLaE17plNbNa+Bic3Kr3lRoFH/qldbgu6VTVD40lDZ
	xyX5jIMA3oeLe/t8q+yeeQr4iimYmQpPx5aqMTd6PTnZkXAiiqrVzLYW+5tcLm1y0Zht
	xZperZZ1MC96htfhy6ui1t5PkGDOIoRVaW8pcEvFzpLPjFMUfEY2lWFSOUs82ploHEXT
	v+PBSW8mJ6uf0IEAEv0G1RA8EfcLBGDL/e5gZY6RZJL39hRsLlrk3XyDkSeliC+F+lFx
	YPIkIUBzYtPUUbbGIhFH4H16KLrX0ocN0Y3SLUdafNp/cTedJtumx/BzCK9II5zG9oMQ
	N+fQ==
Received: by 10.180.99.133 with SMTP id eq5mr227225wib.0.1344453618997;
	Wed, 08 Aug 2012 12:20:18 -0700 (PDT)
Received: from SimonHP2007PC (host86-131-146-117.range86-131.btcentralplus.com.
	[86.131.146.117])
	by mx.google.com with ESMTPS id cu1sm6708791wib.6.2012.08.08.12.20.17
	(version=SSLv3 cipher=OTHER); Wed, 08 Aug 2012 12:20:18 -0700 (PDT)
Message-ID: <A10A073C80FE43F8B62F706E0246358A@SimonHP2007PC>
From: "Simon D" <si.44.delooks@googlemail.com>
To: <bug-global@gnu.org>
Subject: Bug
Date: Wed, 8 Aug 2012 20:19:45 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0018_01CD75A3.272E7ED0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Windows Mail 6.0.6002.18197
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
X-Mailman-Approved-At: Wed, 08 Aug 2012 21:18:44 -0400
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Aug 2012 19:20:30 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0018_01CD75A3.272E7ED0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hi, my name is Simon Dommett from the UK, got a possible bug for you.

I am using global version 6.2.4

You should change the tolower() code in /htags/incop.c [strtolower()] =
and
  /libutil/locatestring.c [strincmp()], as on some systems they
 are #define macros, where the argument gets evaluated more than once.

Change into something like this:

//  /htags/incop.c

static const char *
strtolower(const char *s)
{
 static char lower[MAXPATHLEN];
 char *t =3D lower, *end =3D lower + sizeof(lower);

 do {
  if (t =3D=3D end)
   die("name is too long.");

  *t =3D tolower((unsigned char)*s);
  s++;
 } while (*t++ !=3D '\0');

 return lower;
}

//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
// /libutil/locatestring.c

static int
strincmp(const char *string, const char *pattern, size_t len)
{
 unsigned char s, p;

 while (len--) {
  s =3D tolower((unsigned char)*string);
  p =3D tolower((unsigned char)*pattern);
  if (s !=3D p)
   return s - p;
  if (s =3D=3D 0)
   break;
  string++;
  pattern++;
 }
 return 0;
}


You may use these code snippets however you like (placed into the public =
domain).

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
I have been converting your function header comments into Doxygen =
comments,
 will be sending diffs in 3 to 4 weeks time.


Please don't make my email address publicly viewable.
Thank you.

 
------=_NextPart_000_0018_01CD75A3.272E7ED0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.19272">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2 face=3DArial><BR>Hi, my name is Simon Dommett from =
the UK, got a=20
possible bug for you.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am using global version 6.2.4</DIV>
<DIV>&nbsp;</DIV>
<DIV>You should change the tolower() code in /htags/incop.c =
[strtolower()]=20
and<BR>&nbsp; /libutil/locatestring.c [strincmp()], as on some systems=20
they<BR>&nbsp;are #define macros, where the argument gets evaluated more =
than=20
once.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Change into something like this:</DIV>
<DIV>&nbsp;</DIV>
<DIV>//&nbsp; /htags/incop.c<BR><FONT face=3D"DejaVu Sans =
Mono"></FONT></DIV>
<DIV><FONT face=3D"DejaVu Sans Mono">static const char =
*<BR>strtolower(const char=20
*s)<BR>{<BR>&nbsp;static char lower[MAXPATHLEN];<BR>&nbsp;char *t =3D =
lower, *end=20
=3D lower + sizeof(lower);</FONT></DIV>
<DIV><FONT face=3D"DejaVu Sans Mono"></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"DejaVu Sans Mono">&nbsp;do {<BR>&nbsp;&nbsp;if (t =
=3D=3D=20
end)<BR>&nbsp;&nbsp;&nbsp;die("name is too long.");</FONT></DIV>
<DIV><FONT face=3D"DejaVu Sans Mono"></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"DejaVu Sans Mono">&nbsp;&nbsp;*t =3D =
tolower((unsigned=20
char)*s);<BR>&nbsp;&nbsp;s++;<BR>&nbsp;} while (*t++ !=3D =
'\0');</FONT></DIV>
<DIV><FONT face=3D"DejaVu Sans Mono"></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"DejaVu Sans Mono">&nbsp;return =
lower;<BR>}</FONT></DIV>
<DIV><FONT face=3D"DejaVu Sans Mono"></FONT>&nbsp;</DIV>
<DIV>//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D<BR>//=20
/libutil/locatestring.c</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"DejaVu Sans Mono">static int<BR>strincmp(const char =
*string,=20
const char *pattern, size_t len)<BR>{<BR>&nbsp;unsigned char s, =
p;</FONT></DIV>
<DIV><FONT face=3D"DejaVu Sans Mono"></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"DejaVu Sans Mono">&nbsp;while (len--) =
{<BR>&nbsp;&nbsp;s =3D=20
tolower((unsigned char)*string);<BR>&nbsp;&nbsp;p =3D tolower((unsigned=20
char)*pattern);<BR>&nbsp;&nbsp;if (s !=3D p)<BR>&nbsp;&nbsp;&nbsp;return =
s -=20
p;<BR>&nbsp;&nbsp;if (s =3D=3D=20
0)<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;string++;<BR>&nbsp;&nbsp;pa=
ttern++;<BR>&nbsp;}<BR>&nbsp;return=20
0;<BR>}</FONT></DIV>
<DIV><FONT face=3D"DejaVu Sans Mono"></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>You may use these code snippets however you like (placed into the =
public=20
domain).</DIV>
<DIV>&nbsp;</DIV>
<DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>I have been=20
converting your function header comments into Doxygen =
comments,<BR>&nbsp;will be=20
sending diffs in&nbsp;3 to 4&nbsp;weeks time.<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>Please don't make my email address publicly viewable.</DIV>
<DIV>Thank you.</DIV>
<DIV><BR>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_0018_01CD75A3.272E7ED0--



From MAILER-DAEMON Wed Aug 08 22:44:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzIja-0005OI-J0
	for mharc-bug-global@gnu.org; Wed, 08 Aug 2012 22:44:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53148)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SzIjX-0005NR-GM
	for bug-global@gnu.org; Wed, 08 Aug 2012 22:44:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SzIjW-0006WL-Fx
	for bug-global@gnu.org; Wed, 08 Aug 2012 22:44:23 -0400
Received: from msa101lp.auone-net.jp ([222.3.140.164]:33146)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <shigio@tamacom.com>) id 1SzIjW-0006Ub-6C
	for bug-global@gnu.org; Wed, 08 Aug 2012 22:44:22 -0400
Received: from choota.tamacom.com (KHP059138043202.ppp-bb.dion.ne.jp
	[59.138.43.202])
	by msa101lp.auone-net.jp (au one net msa) with ESMTP id BB5E318C038;
	Thu,  9 Aug 2012 11:44:18 +0900 (JST)
Received: from choota.tamacom.com (localhost [127.0.0.1]) by
	choota.tamacom.com (8.13.6/) with ESMTP id q792iH5n008390;
	Thu, 9 Aug 2012 11:44:17 +0900 (JST)
Message-Id: <201208090244.q792iH5n008390@tamacom.com>
To: "Simon D" <si.44.delooks@googlemail.com>
Subject: Re: Bug
From: "Shigio YAMAGUCHI" <shigio@gnu.org>
References: <A10A073C80FE43F8B62F706E0246358A@SimonHP2007PC>
In-reply-to: Message from "Simon D" <si.44.delooks@googlemail.com> of "Wed,
	08 Aug 2012 20:19:45 +0100."
	<A10A073C80FE43F8B62F706E0246358A@SimonHP2007PC>
Date: Thu, 09 Aug 2012 11:44:17 +0900
Sender: shigio@tamacom.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 222.3.140.164
Cc: bug-global@gnu.org
X-BeenThere: bug-global@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for GNU GLOBAL <bug-global.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-global>
List-Post: <mailto:bug-global@gnu.org>
List-Help: <mailto:bug-global-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-global>,
	<mailto:bug-global-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Aug 2012 02:44:24 -0000

Hi,
I have committed your code.
Thank you.

Congratulations on 22 (progress) gold medals.

Shigio
> Hi, my name is Simon Dommett from the UK, got a possible bug for you.
> 
> I am using global version 6.2.4
> 
> You should change the tolower() code in /htags/incop.c [strtolower()]
> and
>   /libutil/locatestring.c [strincmp()], as on some systems they
>  are #define macros, where the argument gets evaluated more than once.
> 
> Change into something like this:
> 
> //  /htags/incop.c
> 
> static const char *
> strtolower(const char *s)
> {
>  static char lower[MAXPATHLEN];
>  char *t = lower, *end = lower + sizeof(lower);
> 
>  do {
>   if (t == end)
>    die("name is too long.");
> 
>   *t = tolower((unsigned char)*s);
>   s++;
>  } while (*t++ != '\0');
> 
>  return lower;
> }
> 
> //=======================================================
> // /libutil/locatestring.c
> 
> static int
> strincmp(const char *string, const char *pattern, size_t len)
> {
>  unsigned char s, p;
> 
>  while (len--) {
>   s = tolower((unsigned char)*string);
>   p = tolower((unsigned char)*pattern);
>   if (s != p)
>    return s - p;
>   if (s == 0)
>    break;
>   string++;
>   pattern++;
>  }
>  return 0;
> }
> 
> 
> You may use these code snippets however you like (placed into the public
> domain).
> 
> ===========================================================
> I have been converting your function header comments into Doxygen
> comments,
>  will be sending diffs in 3 to 4 weeks time.
> 
> 
> Please don't make my email address publicly viewable.
> Thank you.
--
Shigio YAMAGUCHI <shigio@gnu.org>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


