source: trunk/athena/bin/attach/emul_re.c @ 5261

Revision 5261, 432 bytes checked in by probe, 33 years ago (diff)
Added "int Error;" (libc is broken on A/UX)
Line 
1/*
2 * This is for A/UX.  It is a wrapper around the C library regex functions.
3 *
4 * $Id: emul_re.c,v 1.2 1991-07-06 14:56:34 probe Exp $
5 */
6
7#ifdef _AUX_SOURCE
8
9static char *re;
10int Error;
11
12char *re_comp(s)
13    char *s;
14{
15    if (!s)
16        return 0;
17    if (re)
18        free(re);
19
20    if (!(re = regcmp(s, (char *)0)))
21        return "Bad argument to re_comp";
22
23    return 0;
24}
25
26int re_exec(s)
27    char *s;
28{
29    return regex(re, s) != 0;
30}
31
32#endif
Note: See TracBrowser for help on using the repository browser.