From kehr@iti.informatik.th-darmstadt.de Sun Feb  2 17:14:18 MET 1997
Article: 437 of gnu.utils.bug
x-gateway: relay2.UU.NET from bug-gnu-utils to gnu.utils.bug; Thu, 16 Jan 1997 09:14:09 EST
From: kehr@iti.informatik.th-darmstadt.de (Roger Kehr)
Message-ID: <199701161409.PAA19517@spock.iti.informatik.th-darmstadt.de>
Subject: Rx-1.5 Documentation patch
Date: Thu, 16 Jan 1997 15:09:34 +0100
X-Mailer: ELM [version 2.4 PL25+]
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Approved: bug-gnu-utils-request@prep.ai.mit.edu
Newsgroups: gnu.utils.bug
Path: knorke.saar.de!wg.saar.de!News.Saar.DE!news.coli.uni-sb.de!news-kar1.dfn.de!news-fra1.dfn.de!news.apfel.de!news.radio.cz!CESspool!www.nntp.primenet.com!nntp.primenet.com!news.sprintlink.net!news-peer.sprintlink.net!uunet!in3.uu.net!relay2.uu.net!wendy-fate.uu.net!bug-gnu-utils
Sender: bug-gnu-utils-request@prep.ai.mit.edu
Lines: 51


	Hi,

I also fixed two more errors that stayed in the documentation. A patch
is included below.

Bye

---
*** rx.texi	Thu Jan 16 12:00:26 1997
--- rx.texi.new	Thu Jan 16 12:22:39 1997
***************
*** 408,414 ****
  @end example

  @example
! bana(na\)\+
  @end example

  does not.   Both match
--- 408,414 ----
  @end example

  @example
! bana\(na\)\+
  @end example

  does not.   Both match
***************
*** 585,591 ****

  @code{\?} -- match the preceeding element 0 or 1 time.

! @code{@{m,n@}} -- match the preceeding element at least @code{m}, and as
  many as @code{n} times.

  @code{regexp-1\|regexp-2\|..} -- match any regexp-n.
--- 585,591 ----

  @code{\?} -- match the preceeding element 0 or 1 time.

! @code{\@{m,n\@}} -- match the preceeding element at least @code{m}, and as
  many as @code{n} times.

  @code{regexp-1\|regexp-2\|..} -- match any regexp-n.
---

--
----------------------------------------------------------------------
Roger Kehr  	kehr@iti.informatik.th-darmstadt.de
----------------------------------------------------------------------


From ghazi@caip.rutgers.edu Sun Feb  2 17:14:52 MET 1997
Article: 428 of gnu.utils.bug
x-gateway: relay5.UU.NET from bug-gnu-utils to gnu.utils.bug; Thu, 16 Jan 1997 11:31:22 EST
From: "Kaveh R."  <ghazi@caip.rutgers.edu>
Date: Thu, 16 Jan 1997 11:14:48 -0500
Message-ID: <199701161614.LAA19105@caip.rutgers.edu>
Subject: rx-1.5, build nits ...
Approved: bug-gnu-utils-request@prep.ai.mit.edu
Newsgroups: gnu.utils.bug
Path: knorke.saar.de!wg.saar.de!News.Saar.DE!news.coli.uni-sb.de!news-kar1.dfn.de!news.nacamar.de!news.icm.edu.pl!hammer.uoregon.edu!arclight.uoregon.edu!su-news-hub1.bbnplanet.com!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!mindspring!uunet!in3.uu.net!192.48.96.15!wendy-fate.uu.net!bug-gnu-utils
Sender: bug-gnu-utils-request@prep.ai.mit.edu
Lines: 172

Hello,

	I tried building rx-1.5 on the following systems using cc:

Dec Alpha OSF 4.0
HP9000/755 HP-UX 9.01
IBM PowerPC AIX 4.1.4.0
SGI IRIX 4.0.5
SGI IRIX 5.3
SunOS 4.1.3
SunOS 5.5

-----------------------------------------------------------------------------
	I got errors on SunOS4 and hpux9 due to an ANSI function prototype:

cc -c -I. -I../../rx -I../../rx/../libsystas -Dconst= -I../../rx
	../../rx/rxdbug.c
"../../rx/rxdbug.c", line 74: syntax error at or near word "struct"
"../../rx/rxdbug.c", line 77: s undefined
"../../rx/rxdbug.c", line 77: bracket undefined
make[1]: *** [rxdbug.o] Error 1

-----------------------------------------------------------------------------

	I had warnings on SunOS4, Solaris2.5 & alphaOSF4.0 and errors
on irix405 shown below, due to "char" vs "unsigned char" assignments:

accom: Error: ../../rx/rxnode.c, line 48: Illegal pointer combination:
         thisone->contents    = tmp;
       ----------------------------^
accom: Error: ../../rx/rxnode.c, line 91: Illegal pointer combination:
             str->contents = temp;
       --------------------------^
accom: Error: ../../rx/rxnode.c, line 123: Illegal pointer combination:
         to->contents = tmp;
       --------------------^
accom: Error: ../../rx/rxnode.c, line 167: Illegal pointer combination:
         string = str->contents;
       ------------------------^
make[1]: *** [rxnode.o] Error 1

-----------------------------------------------------------------------------

	I got warnings on Solaris2.5, shown below.

cc -c -I. -I../../rx -I../../rx/../libsystas -DSTDC_HEADERS=1
	-I../../rx ../../rx/rxposix.c
"../../rx/rxposix.c", line 239: warning: argument #7 is incompatible
	with prototype:
        prototype: pointer to const uchar : "../../rx/rxbasic.h", line 43
        argument : pointer to const char
"../../rx/rxposix.c", line 326: warning: argument #2 is incompatible
	with prototype:
        prototype: pointer to const uchar : "../../rx/rxanal.h", line 60
        argument : pointer to const char

-----------------------------------------------------------------------------

	After applying the following patches, all the systems built
without any diagnostics.  Would you please consider including these in
the next release?

		Thanks,
		--Kaveh

diff -r -u orig/rx-1.5/rx/ChangeLog rx-1.5/rx/ChangeLog
--- orig/rx-1.5/rx/ChangeLog	Wed Jan 15 15:03:18 1997
+++ rx-1.5/rx/ChangeLog	Thu Jan 16 10:55:50 1997
@@ -1,3 +1,16 @@
+Thu Jan 16 10:50:14 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* rxdbug.c (print_string): Make prototype KNR style.
+
+	* rxnode.c (rx_init_string): resolve "char *" vs.
+	"unsigned char *" discrepancies.
+	(rx_adjoin_string) Likewise.
+	(rx_copy_string) Likewise.
+	(rx_string_hash) Likewise.
+
+	* rxposix.c (rx_regmatch): Likewise.
+	(rx_regexec): Likewise.	
+	
 Wed Jan 15 12:00:38 1997  Tom Lord  <lord@rizla.lanminds.com>
 
 	* rxsuper.c (rx_superset_cons): reference count tweak.
diff -r -u orig/rx-1.5/rx/rxdbug.c rx-1.5/rx/rxdbug.c
--- orig/rx-1.5/rx/rxdbug.c	Tue Dec  3 00:33:15 1996
+++ rx-1.5/rx/rxdbug.c	Thu Jan 16 10:22:00 1997
@@ -71,7 +71,9 @@
 }
 
 void
-print_string(struct rx_string *s, char bracket)
+print_string(s, bracket)
+  struct rx_string *s;
+  char bracket;
 {
   int x;
   if (!s && bracket)
diff -r -u orig/rx-1.5/rx/rxnode.c rx-1.5/rx/rxnode.c
--- orig/rx-1.5/rx/rxnode.c	Wed Jan 15 14:47:48 1997
+++ rx-1.5/rx/rxnode.c	Thu Jan 16 10:26:02 1997
@@ -38,9 +38,7 @@
      char first;
 #endif
 {
-  char *tmp;
-
-  tmp = (char *) malloc (INITSIZE);
+  unsigned char *tmp = (unsigned char *) malloc (INITSIZE);
 
   if(!tmp)
     return -1;
@@ -82,8 +80,8 @@
 
   if (str->len == str->reallen)
     {
-      char *temp;
-      temp = (char *) realloc (str->contents, str->reallen + EXPANDSIZE);
+      unsigned char *temp =
+	(unsigned char *) realloc (str->contents, str->reallen + EXPANDSIZE);
 
       if(!temp)
 	return -1;
@@ -107,11 +105,11 @@
 	struct rx_string *from;
 #endif
 {
-  char *tmp;
+  unsigned char *tmp;
 
   if (from->len)
     {
-      tmp = (char *) malloc (from->reallen);
+      tmp = (unsigned char *) malloc (from->reallen);
 
       if (!tmp)
 	return -1;
@@ -161,7 +159,7 @@
   /* From Tcl: */
   unsigned long result;
   int c;
-  char * string;
+  unsigned char * string;
   int len;
 
   string = str->contents;
diff -r -u orig/rx-1.5/rx/rxposix.c rx-1.5/rx/rxposix.c
--- orig/rx-1.5/rx/rxposix.c	Tue Dec  3 13:29:55 1996
+++ rx-1.5/rx/rxposix.c	Thu Jan 16 10:30:23 1997
@@ -236,7 +236,7 @@
 				&& (!local_rules.newline_anchor
 				    || (string[end] != '\n'))));
       solutions = rx_basic_make_solutions (pmatch, preg->pattern, preg->subexps,
-					   start, end, &local_rules, string);
+					   start, end, &local_rules, (unsigned char *)string);
       if (!solutions)
 	return REG_ESPACE;
       
@@ -323,7 +323,8 @@
 		  rx_free_unfa (unfa);
 		  return REG_ESPACE;
 		}
-	      amt = rx_advance_to_final (&machine, string + x, end - start - x);
+	      amt = rx_advance_to_final (&machine, (unsigned char *)string + x,
+					 end - start - x);
 	      if (!machine.final_tag && (amt < (end - start - x)))
 		goto nomatch;
 	    }
--
Kaveh R. Ghazi				Project Leader
ghazi@caip.rutgers.edu			ICon CMT Corp.


