comparison src/regex.c @ 9717:96a592ccb751

(re_comp, re_exec): Define this obsolete 4.2bsd interface only if the new feature test macro _REGEX_RE_COMP is defined. This avoids a clash with Cray YMP include files.
author Paul Eggert <eggert@twinsun.com>
date Wed, 26 Oct 1994 22:43:45 +0000
parents 0088fa4ae1fa
children ef6e1637c777
comparison
equal deleted inserted replaced
9716:dfe865222721 9717:96a592ccb751
4932 4932
4933 return re_error_msg[(int) ret]; 4933 return re_error_msg[(int) ret];
4934 } 4934 }
4935 4935
4936 /* Entry points compatible with 4.2 BSD regex library. We don't define 4936 /* Entry points compatible with 4.2 BSD regex library. We don't define
4937 them if this is an Emacs or POSIX compilation. */ 4937 them unless specifically requested. */
4938 4938
4939 #if !defined (emacs) && !defined (_POSIX_SOURCE) 4939 #ifdef _REGEX_RE_COMP
4940 4940
4941 /* BSD has one and only one pattern buffer. */ 4941 /* BSD has one and only one pattern buffer. */
4942 static struct re_pattern_buffer re_comp_buf; 4942 static struct re_pattern_buffer re_comp_buf;
4943 4943
4944 char * 4944 char *
4985 { 4985 {
4986 const int len = strlen (s); 4986 const int len = strlen (s);
4987 return 4987 return
4988 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); 4988 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
4989 } 4989 }
4990 #endif /* not emacs and not _POSIX_SOURCE */ 4990 #endif /* _REGEX_RE_COMP */
4991 4991
4992 /* POSIX.2 functions. Don't define these for Emacs. */ 4992 /* POSIX.2 functions. Don't define these for Emacs. */
4993 4993
4994 #ifndef emacs 4994 #ifndef emacs
4995 4995