projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.
[gnulib.git]
/
lib
/
rpmatch.c
diff --git
a/lib/rpmatch.c
b/lib/rpmatch.c
index
d3ea353
..
868f714
100644
(file)
--- a/
lib/rpmatch.c
+++ b/
lib/rpmatch.c
@@
-21,13
+21,26
@@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#if STDC_HEADERS || _LIBC
#endif
#if STDC_HEADERS || _LIBC
+# include <stddef.h>
# include <stdlib.h>
# include <stdlib.h>
+#else
+# ifndef NULL
+# define NULL 0
+# endif
#endif
#endif
-#include <regex.h>
+#include <sys/types.h>
+#ifdef WITH_REGEX
+# include <regex.h>
+#else
+# include <rx.h>
+#endif
-#ifndef _
-# define _(String) String
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
#endif
static int
#endif
static int
@@
-71,8
+84,8
@@
rpmatch (response)
static regex_t yesre, nore;
int result;
static regex_t yesre, nore;
int result;
- return ((result = try (response, _("^[yY]
[[:alpha:]]*
"), 1, 0,
+ return ((result = try (response, _("^[yY]"), 1, 0,
&yesexpr, &yesre))
? result
&yesexpr, &yesre))
? result
- : try (response, _("^[nN]
[[:alpha:]]*
"), 0, -1, &noexpr, &nore));
+ : try (response, _("^[nN]"), 0, -1, &noexpr, &nore));
}
}