Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Rainer Orth
Tue, 13 Oct 1992 21:38
some sed 1.10 bugs
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads