scan.l (215704) | scan.l (250926) |
---|---|
1%{ 2/* $OpenBSD: scan.l,v 1.23 2009/10/27 23:59:36 deraadt Exp $ */ 3 4/* 5 * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> 6 * 7 * Permission to use, copy, modify, and distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above --- 4 unchanged lines hidden (view full) --- 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20#include <sys/cdefs.h> | 1%{ 2/* $OpenBSD: scan.l,v 1.23 2009/10/27 23:59:36 deraadt Exp $ */ 3 4/* 5 * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> 6 * 7 * Permission to use, copy, modify, and distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above --- 4 unchanged lines hidden (view full) --- 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20#include <sys/cdefs.h> |
21__FBSDID("$FreeBSD: head/usr.bin/bc/scan.l 215704 2010-11-22 20:10:48Z brucec $"); | 21__FBSDID("$FreeBSD: head/usr.bin/bc/scan.l 250926 2013-05-23 05:42:35Z jkim $"); |
22 23#include <err.h> 24#include <errno.h> 25#include <histedit.h> 26#include <stdbool.h> 27#include <string.h> 28#include <unistd.h> 29 --- 11 unchanged lines hidden (view full) --- 41static char *strbuf = NULL; 42static size_t strbuf_sz = 1; 43static bool dot_seen; 44 45static void init_strbuf(void); 46static void add_str(const char *); 47static int bc_yyinput(char *, int); 48 | 22 23#include <err.h> 24#include <errno.h> 25#include <histedit.h> 26#include <stdbool.h> 27#include <string.h> 28#include <unistd.h> 29 --- 11 unchanged lines hidden (view full) --- 41static char *strbuf = NULL; 42static size_t strbuf_sz = 1; 43static bool dot_seen; 44 45static void init_strbuf(void); 46static void add_str(const char *); 47static int bc_yyinput(char *, int); 48 |
49#define YY_DECL int yylex(void) |
|
49#define YY_NO_INPUT 50#undef YY_INPUT 51#define YY_INPUT(buf,retval,max) \ 52 (retval = bc_yyinput(buf, max)) 53%} 54 55%option always-interactive 56 --- 253 unchanged lines hidden --- | 50#define YY_NO_INPUT 51#undef YY_INPUT 52#define YY_INPUT(buf,retval,max) \ 53 (retval = bc_yyinput(buf, max)) 54%} 55 56%option always-interactive 57 --- 253 unchanged lines hidden --- |