home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / compat / regex.diff < prev    next >
Encoding:
Text File  |  1994-10-26  |  1.6 KB  |  59 lines

  1. *** regex.c.orig    Fri May  7 14:43:30 1993
  2. --- regex.c    Fri May  7 14:44:41 1993
  3. ***************
  4. *** 24,30 ****
  5. --- 24,32 ----
  6.     #pragma alloca
  7.   #endif
  8.   
  9. + #ifndef    _GNU_SOURCE
  10.   #define _GNU_SOURCE
  11. + #endif
  12.   
  13.   /* We need this for `regex.h', and perhaps for the Emacs include files.  */
  14.   #include <sys/types.h>
  15. ***************
  16. *** 4679,4685 ****
  17.   /* Entry points compatible with 4.2 BSD regex library.  We don't define
  18.      them if this is an Emacs or POSIX compilation.  */
  19.   
  20. ! #if !defined (emacs) && !defined (_POSIX_SOURCE)
  21.   
  22.   /* BSD has one and only one pattern buffer.  */
  23.   static struct re_pattern_buffer re_comp_buf;
  24. --- 4681,4687 ----
  25.   /* Entry points compatible with 4.2 BSD regex library.  We don't define
  26.      them if this is an Emacs or POSIX compilation.  */
  27.   
  28. ! #if (!defined (emacs) && !defined (_POSIX_SOURCE)) || defined(USE_BSD_REGEX)
  29.   
  30.   /* BSD has one and only one pattern buffer.  */
  31.   static struct re_pattern_buffer re_comp_buf;
  32. ***************
  33. *** 4773,4779 ****
  34.   {
  35.     reg_errcode_t ret;
  36.     
  37. !   if (!s)
  38.       {
  39.         if (!re_comp_buf.buffer)
  40.       return "No previous regular expression";
  41. --- 4775,4781 ----
  42.   {
  43.     reg_errcode_t ret;
  44.     
  45. !   if (!s || *s == '\0')
  46.       {
  47.         if (!re_comp_buf.buffer)
  48.       return "No previous regular expression";
  49. ***************
  50. *** 4784,4789 ****
  51. --- 4786,4792 ----
  52.     /* regex_compile will allocate the space for the compiled pattern.  */
  53.     preg->buffer = 0;
  54.     preg->allocated = 0;
  55. +   preg->used = 0;
  56.     
  57.     /* Don't bother to use a fastmap when searching.  This simplifies the
  58.        REG_NEWLINE case: if we used a fastmap, we'd have to put all the
  59.