1 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
2 /* All Rights Reserved */
6 * Copyright (c) 1980 Regents of the University of California.
7 * All rights reserved. The Berkeley software License Agreement
8 * specifies the terms and conditions for redistribution.
12 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
13 * Use is subject to license terms.
16 #pragma ident "%Z%%M% %I% %E% SMI"
22 static void check(FILE *);
25 static int delim
= '$';
28 main(int argc
, char **argv
)
30 (void) setlocale(LC_ALL
, "");
31 #if !defined(TEXT_DOMAIN)
32 #define TEXT_DOMAIN "SYS_TEST"
34 (void) textdomain(TEXT_DOMAIN
);
39 if ((fin
= fopen(*++argv
, "r")) == NULL
) {
43 (void) printf("%s:\n", *argv
);
53 int start
, line
, eq
, ndel
, totdel
;
56 start
= eq
= line
= ndel
= totdel
= 0;
57 while (fgets(in
, 600, f
) != NULL
) {
63 if (*in
== '.' && *(in
+1) == 'E' && *(in
+2) == 'Q') {
66 gettext(" Spurious EQ, line %d\n"),
70 gettext(" EQ in %c%c, line %d\n"),
72 } else if (*in
== '.' && *(in
+1) == 'E' && *(in
+2) == 'N') {
75 gettext(" Spurious EN, line %d\n"),
81 gettext(" EN in %c%c, line %d\n"),
84 } else if (eq
&& *in
== 'd' && *(in
+1) == 'e' &&
85 *(in
+2) == 'l' && *(in
+3) == 'i' && *(in
+4) == 'm') {
86 for (p
= in
+5; *p
; p
++)
88 if (*p
== 'o' && *(p
+1) == 'f')
96 gettext(" Delim off, line %d\n"),
100 gettext(" New delims %c%c, line %d\n"),
103 if (ndel
> 0 && eq
> 0)
105 gettext(" %c%c in EQ, line %d\n"), delim
,
115 gettext(" %d line %c%c, lines %d-%d\n"),
116 line
-start
+1, delim
, delim
, start
, line
);
122 gettext(" %d line %c%c, lines %d-%d\n"),
123 line
-start
+1, delim
, delim
, start
, line
);
130 (void) printf(gettext(" Unfinished %c%c\n"), delim
, delim
);
132 (void) printf(gettext(" Unfinished EQ\n"));