X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=text2pcap-scanner.l;h=b47edadc3fb3fb683c2937eb41174f50c62edad6;hb=06cb0e53ac14d88063811f325e67bd0d692db30a;hp=da36898ad14cb7c37e0506e4a5c0f58f26f1e8ad;hpb=0f4379723401ff6b5df9c652e9f41e878bda47d4;p=obnox%2Fwireshark%2Fwip.git diff --git a/text2pcap-scanner.l b/text2pcap-scanner.l index da36898ad1..b47edadc3f 100644 --- a/text2pcap-scanner.l +++ b/text2pcap-scanner.l @@ -1,5 +1,10 @@ /* -*-mode: flex-*- */ +/* + * We don't use unput, so don't generate code for it. + */ +%option nounput + %{ /******************************************************************************** @@ -12,12 +17,10 @@ * * $Id$ * - * Ethereal - Network traffic analyzer - * By Gerald Combs + * Wireshark - Network traffic analyzer + * By Gerald Combs * Copyright 1998 Gerald Combs * - * - * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 @@ -30,7 +33,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * *******************************************************************************/ @@ -38,16 +41,29 @@ #include #include "text2pcap.h" - + +/* + * Flex (v 2.5.35) uses this symbol to "exclude" unistd.h + */ +#ifdef _WIN32 +#define YY_NO_UNISTD_H +#endif + +#ifdef _WIN32 +/* disable Windows VC compiler warning "signed/unsigned mismatch" associated */ +/* with YY_INPUT code generated by flex versions such as 2.5.35. */ +#pragma warning (disable:4018) +#endif + %} hexdigit [0-9A-Fa-f] directive #TEXT2PCAP.* comment #[^W].* byte [0-9A-Fa-f][0-9A-Fa-f][ \t] -byte_eol [0-9A-Fa-f][0-9A-Fa-f]\n +byte_eol [0-9A-Fa-f][0-9A-Fa-f]\r?\n offset [0-9A-Fa-f]+[: \t] -offset_eol [0-9A-Fa-f]+\n +offset_eol [0-9A-Fa-f]+\r?\n text [^ \n\t]+ mailfwd > eol \r?\n\r?