Removed #ifdef sun
authorChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Sat, 4 Jul 1992 05:03:11 +0000 (21:03 -0800)
committerChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Sat, 4 Jul 1992 05:03:11 +0000 (21:03 -0800)
SCCS-vsn: lib/libedit/el.h 5.3
SCCS-vsn: lib/libedit/search.c 5.3
SCCS-vsn: lib/libedit/sys.h 5.3

usr/src/lib/libedit/el.h
usr/src/lib/libedit/search.c
usr/src/lib/libedit/sys.h

index 630d9d3..c676e89 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)el.h        5.2 (Berkeley) %G%
+ *     @(#)el.h        5.3 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -23,9 +23,6 @@
 #define ANCHOR
 
 #include <stdio.h>
 #define ANCHOR
 
 #include <stdio.h>
-#ifdef sun
-#include <malloc.h>
-#endif
 #include <sys/types.h>
 
 #define EL_BUFSIZ      1024            /* Maximum line size            */
 #include <sys/types.h>
 
 #define EL_BUFSIZ      1024            /* Maximum line size            */
index aae9a4f..8f9a830 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if !defined(lint) && !defined(SCCSID)
  */
 
 #if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)search.c   5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)search.c   5.3 (Berkeley) %G%";
 #endif /* not lint && not SCCSID */
 
 /*
 #endif /* not lint && not SCCSID */
 
 /*
@@ -17,7 +17,7 @@ static char sccsid[] = "@(#)search.c  5.2 (Berkeley) %G%";
  */
 #include "sys.h"
 #include <stdlib.h>
  */
 #include "sys.h"
 #include <stdlib.h>
-#ifndef sun
+#ifdef REGEXP
 #include <regexp.h>
 #endif
 #include "el.h"
 #include <regexp.h>
 #endif
 #include "el.h"
@@ -56,7 +56,7 @@ search_end(el)
     el->el_search.patbuf = NULL;
 }
 
     el->el_search.patbuf = NULL;
 }
 
-#ifndef sun
+#ifdef REGEXP
 /* regerror():
  *     Handle regular expression errors
  */
 /* regerror():
  *     Handle regular expression errors
  */
@@ -76,7 +76,7 @@ el_match(str, pat)
     const char *str;
     const char *pat;
 {
     const char *str;
     const char *pat;
 {
-#ifdef sun
+#ifndef REGEXP
     extern char *re_comp __P((const char *));
     extern int re_exec __P((const char *));
 #else
     extern char *re_comp __P((const char *));
     extern int re_exec __P((const char *));
 #else
@@ -86,7 +86,7 @@ el_match(str, pat)
 
     if (strstr(str, pat) != NULL)
        return 1;
 
     if (strstr(str, pat) != NULL)
        return 1;
-#ifdef sun
+#ifndef REGEXP
     if (re_comp(pat) != NULL)
        return 0;
     else
     if (re_comp(pat) != NULL)
        return 0;
     else
index 1cdf989..913c5b1 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)sys.h       5.2 (Berkeley) %G%
+ *     @(#)sys.h       5.3 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -50,10 +50,13 @@ typedef char* ioctl_t;
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
+#define REGEXP
 
 
-#ifdef sun
+#ifdef SUNOS
+# undef REGEXP
+# include <malloc.h>
 typedef void (*sig_t)__P((int));
 typedef void (*sig_t)__P((int));
-#ifdef __GNUC__
+# ifdef __GNUC__
 /*
  * Broken hdrs.
  */
 /*
  * Broken hdrs.
  */
@@ -71,13 +74,13 @@ extern int  errno, sys_nerr;
 extern char    *sys_errlist[];
 extern void    perror          __P((const char *));
 extern int     read            __P((int, const char*, int));
 extern char    *sys_errlist[];
 extern void    perror          __P((const char *));
 extern int     read            __P((int, const char*, int));
-#include <string.h>
-#define strerror(e)    sys_errlist[e]
-#endif
-#ifdef SABER
+#  include <string.h>
+#  define strerror(e)  sys_errlist[e]
+# endif
+# ifdef SABER
 extern ptr_t    memcpy         __P((ptr_t, const ptr_t, size_t));
 extern ptr_t    memset         __P((ptr_t, int, size_t));
 extern ptr_t    memcpy         __P((ptr_t, const ptr_t, size_t));
 extern ptr_t    memset         __P((ptr_t, int, size_t));
-#endif
+# endif
 extern char    *fgetline       __P((FILE *, int *));
 #endif
 
 extern char    *fgetline       __P((FILE *, int *));
 #endif