source: trunk/athena/bin/from/emul_re.c @ 6956

Revision 6956, 477 bytes checked in by probe, 31 years ago (diff)
Initial revision
  • Property svn:executable set to *
Line 
1/* This is for AUX.  It is a wrapper around the C library regex functions. */
2/* $Header: /afs/dev.mit.edu/source/repository/athena/bin/from/emul_re.c,v 1.1 1993-10-12 06:01:28 probe Exp $ */
3
4#ifdef _AUX_SOURCE
5
6static char *re;
7int Error = 0;
8char *re_comp(s)
9
10char *s;
11
12{
13  if(!s)
14    return 0;
15  if(re)
16    free(re);
17
18  if(!(re = regcmp(s, (char *)0)))
19    return "Bad argument to re_comp";
20
21  return 0;
22}
23
24int re_exec(s)
25
26char *s;
27
28{
29  return regex(re, s) != 0;
30}
31
32#endif
Note: See TracBrowser for help on using the repository browser.