diff options
Diffstat (limited to 'src/regress/lib/libc/regex/main.c')
-rw-r--r-- | src/regress/lib/libc/regex/main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/regress/lib/libc/regex/main.c b/src/regress/lib/libc/regex/main.c index 8d88a8b9b8..add5e8be10 100644 --- a/src/regress/lib/libc/regex/main.c +++ b/src/regress/lib/libc/regex/main.c | |||
@@ -1,10 +1,13 @@ | |||
1 | /* $OpenBSD: main.c,v 1.2 1996/12/21 22:23:42 millert Exp $ */ | ||
1 | /* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ | 2 | /* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ |
2 | 3 | ||
3 | #include <stdio.h> | 4 | #include <stdio.h> |
5 | #include <stdlib.h> | ||
4 | #include <string.h> | 6 | #include <string.h> |
5 | #include <sys/types.h> | 7 | #include <sys/types.h> |
6 | #include <regex.h> | 8 | #include <regex.h> |
7 | #include <assert.h> | 9 | #include <assert.h> |
10 | #include <unistd.h> | ||
8 | 11 | ||
9 | #include "main.ih" | 12 | #include "main.ih" |
10 | 13 | ||
@@ -25,6 +28,7 @@ extern void regprint(); | |||
25 | /* | 28 | /* |
26 | - main - do the simple case, hand off to regress() for regression | 29 | - main - do the simple case, hand off to regress() for regression |
27 | */ | 30 | */ |
31 | int | ||
28 | main(argc, argv) | 32 | main(argc, argv) |
29 | int argc; | 33 | int argc; |
30 | char *argv[]; | 34 | char *argv[]; |
@@ -102,10 +106,10 @@ char *argv[]; | |||
102 | exit(status); | 106 | exit(status); |
103 | } | 107 | } |
104 | if (!(copts®_NOSUB)) { | 108 | if (!(copts®_NOSUB)) { |
105 | len = (int)(subs[0].rm_eo - subs[0].rm_so); | 109 | len = (size_t)(subs[0].rm_eo - subs[0].rm_so); |
106 | if (subs[0].rm_so != -1) { | 110 | if (subs[0].rm_so != -1) { |
107 | if (len != 0) | 111 | if (len != 0) |
108 | printf("match `%.*s'\n", len, | 112 | printf("match `%.*s'\n", (int)len, |
109 | argv[optind] + subs[0].rm_so); | 113 | argv[optind] + subs[0].rm_so); |
110 | else | 114 | else |
111 | printf("match `'@%.1s\n", | 115 | printf("match `'@%.1s\n", |
@@ -501,7 +505,6 @@ efind(name) | |||
501 | char *name; | 505 | char *name; |
502 | { | 506 | { |
503 | static char efbuf[100]; | 507 | static char efbuf[100]; |
504 | size_t n; | ||
505 | regex_t re; | 508 | regex_t re; |
506 | 509 | ||
507 | sprintf(efbuf, "REG_%s", name); | 510 | sprintf(efbuf, "REG_%s", name); |