Article View: gnu.utils.bug
Article #906some sed 1.10 bugs
From: Rainer Orth
Date: Tue, 13 Oct 1992 21:38
Date: Tue, 13 Oct 1992 21:38
82 lines
2807 bytes
2807 bytes
Trying to install sed 1.10 revealed a couple of problems:
* configure: '?' cannot be used as sed's delimiter with a preceding $, sh
expands $? in this case; using autoconf 1.1 with the supplied
configure.in fixes the problem, ',' was used as a delimiter here
* sed.c (main): its clearer to use RE_SYNTAX_SED from regex 0.11 (Hint from
Karl Berry)
removed local definition of bcopy, it breaks on NeXT OS 2.1 where bcopy
is a macro in <string.h>; define bcopy to use memcpy if USG ||
STDC_HEADERS, but undef first to avoid redefinition warning
* regex.c: undef bcopy, bcmp, and bzero; NeXT OS 2.1 defines them in
<string.h>
===================================================================
RCS file: RCS/regex.c,v
retrieving revision 1.1
diff -u -r1.1 regex.c
--- regex.c 1992/09/16 14:52:41 1.1
+++ regex.c 1992/10/13 19:17:24
@@ -47,6 +47,9 @@
`BSTRING', as far as I know, and neither of them use this code. */
#if USG || STDC_HEADERS
#include <string.h>
+#undef bcmp
+#undef bcopy
+#undef bzero
#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
#define bcopy(s, d, n) memcpy ((d), (s), (n))
#define bzero(s, n) memset ((s), 0, (n))
===================================================================
RCS file: RCS/sed.c,v
retrieving revision 1.1
diff -u -r1.1 sed.c
--- sed.c 1992/10/13 06:15:07 1.1
+++ sed.c 1992/10/13 19:14:34
@@ -38,27 +38,12 @@
#if !defined(STDC_HEADERS)
#include <memory.h>
#endif
+#undef bcopy
+#define bcopy(s, d, n) memcpy (d, s, n)
#else
#include <strings.h>
#endif
-void bcopy (from, to, len)
- char * from;
- char * to;
- int len;
-{
- if (from < to)
- {
- from += len - 1;
- to += len - 1;
- while (len--)
- *to-- = *from--;
- }
- else
- while (len--)
- *to++ = *from++;
-}
-
char *version_string = "GNU sed version 1.10";
/* Struct vector is used to describe a chunk of a sed program. There is one
@@ -343,7 +328,7 @@
struct sed_label *go,*lbl;
/* see regex.h */
- re_set_syntax (RE_SYNTAX_POSIX_BASIC);
+ re_set_syntax (RE_SYNTAX_SED);
myname=argv[0];
-----------------------------------------------------------------------------
Rainer Orth, Technical Computer Science, University of Bielefeld
Internet: ro@TechFak.Uni-Bielefeld.DE
Technical Details
Message-ID:
<9210131938.AA16776@lupine.techfak.uni-bielefeld.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!techfak.uni-bielefeld.DE!roShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!techfak.uni-bielefeld.DE!ro From: ro@techfak.uni-bielefeld.DE (Rainer Orth) Subject: some sed 1.10 bugs Message-ID: <9210131938.AA16776@lupine.techfak.uni-bielefeld.de> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 13 Oct 1992 21:38:07 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 84