| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | %{ | | 1 | %{ |
2 | /* $NetBSD: scan.l,v 1.32 2020/04/03 19:53:41 joerg Exp $ */ | | 2 | /* $NetBSD: scan.l,v 1.33 2020/07/26 22:25:47 uwe Exp $ */ |
3 | | | 3 | |
4 | /* | | 4 | /* |
5 | * Copyright (c) 1992, 1993 | | 5 | * Copyright (c) 1992, 1993 |
6 | * The Regents of the University of California. All rights reserved. | | 6 | * The Regents of the University of California. All rights reserved. |
7 | * | | 7 | * |
8 | * This software was developed by the Computer Systems Engineering group | | 8 | * This software was developed by the Computer Systems Engineering group |
9 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and | | 9 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and |
10 | * contributed to Berkeley. | | 10 | * contributed to Berkeley. |
11 | * | | 11 | * |
12 | * All advertising materials mentioning features or use of this software | | 12 | * All advertising materials mentioning features or use of this software |
13 | * must display the following acknowledgement: | | 13 | * must display the following acknowledgement: |
14 | * This product includes software developed by the University of | | 14 | * This product includes software developed by the University of |
15 | * California, Lawrence Berkeley Laboratories. | | 15 | * California, Lawrence Berkeley Laboratories. |
| @@ -32,27 +32,27 @@ | | | @@ -32,27 +32,27 @@ |
32 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 32 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
33 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 33 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
34 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 34 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
35 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 35 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
36 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 36 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
37 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 37 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
38 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 38 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
39 | * SUCH DAMAGE. | | 39 | * SUCH DAMAGE. |
40 | * | | 40 | * |
41 | * from: @(#)scan.l 8.1 (Berkeley) 6/6/93 | | 41 | * from: @(#)scan.l 8.1 (Berkeley) 6/6/93 |
42 | */ | | 42 | */ |
43 | | | 43 | |
44 | #include <sys/cdefs.h> | | 44 | #include <sys/cdefs.h> |
45 | __RCSID("$NetBSD: scan.l,v 1.32 2020/04/03 19:53:41 joerg Exp $"); | | 45 | __RCSID("$NetBSD: scan.l,v 1.33 2020/07/26 22:25:47 uwe Exp $"); |
46 | | | 46 | |
47 | #include <sys/param.h> | | 47 | #include <sys/param.h> |
48 | #include <errno.h> | | 48 | #include <errno.h> |
49 | #include <libgen.h> | | 49 | #include <libgen.h> |
50 | #include <stdio.h> | | 50 | #include <stdio.h> |
51 | #include <stdlib.h> | | 51 | #include <stdlib.h> |
52 | #include <string.h> | | 52 | #include <string.h> |
53 | #include <unistd.h> | | 53 | #include <unistd.h> |
54 | #include <stddef.h> | | 54 | #include <stddef.h> |
55 | #include <ctype.h> | | 55 | #include <ctype.h> |
56 | #include <util.h> | | 56 | #include <util.h> |
57 | #undef ECHO | | 57 | #undef ECHO |
58 | #include "defs.h" | | 58 | #include "defs.h" |
| @@ -545,27 +545,27 @@ include(const char *fname, int ateof, in | | | @@ -545,27 +545,27 @@ include(const char *fname, int ateof, in |
545 | in = ecalloc(1, sizeof *in); | | 545 | in = ecalloc(1, sizeof *in); |
546 | in->in_prev = incl; | | 546 | in->in_prev = incl; |
547 | in->in_buf = YY_CURRENT_BUFFER; | | 547 | in->in_buf = YY_CURRENT_BUFFER; |
548 | in->in_where.w_srcfile = yyfile; | | 548 | in->in_where.w_srcfile = yyfile; |
549 | in->in_where.w_srcline = (u_short)yyline; | | 549 | in->in_where.w_srcline = (u_short)yyline; |
550 | in->in_ateof = ateof; | | 550 | in->in_ateof = ateof; |
551 | in->in_interesting = interesting; | | 551 | in->in_interesting = interesting; |
552 | in->in_ifdefstate = ifdefstate; | | 552 | in->in_ifdefstate = ifdefstate; |
553 | in->in_ifdefshift = ifdefshift; | | 553 | in->in_ifdefshift = ifdefshift; |
554 | interesting = direct & interesting; | | 554 | interesting = direct & interesting; |
555 | if (interesting) | | 555 | if (interesting) |
556 | logconfig_include(fp, fname); | | 556 | logconfig_include(fp, fname); |
557 | incl = in; | | 557 | incl = in; |
558 | CFGDBG(1, "include `%s' from `%s' line %d", fname, yyfile, yyline); | | 558 | CFGDBG(1, "include `%s'", fname); |
559 | yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE)); | | 559 | yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE)); |
560 | yyfile = intern(s); | | 560 | yyfile = intern(s); |
561 | yyline = 1; | | 561 | yyline = 1; |
562 | free(s); | | 562 | free(s); |
563 | includedepth++; | | 563 | includedepth++; |
564 | return (0); | | 564 | return (0); |
565 | } | | 565 | } |
566 | | | 566 | |
567 | /* | | 567 | /* |
568 | * Extract the pathname from a include/cinclude/package into curinclpath | | 568 | * Extract the pathname from a include/cinclude/package into curinclpath |
569 | */ | | 569 | */ |
570 | static int | | 570 | static int |
571 | getincludepath(void) | | 571 | getincludepath(void) |