diff options
author | markm <markm@FreeBSD.org> | 2001-12-02 23:40:46 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2001-12-02 23:40:46 +0000 |
commit | 6aad061ae72991511c19b2a0ffdda6d071ccb1bd (patch) | |
tree | 77671be032d017fcc1795356679eb6222071c15a /usr.bin/colldef/scan.l | |
parent | 8896138d554d35b01373620fbe55221f586eda5b (diff) | |
download | FreeBSD-src-6aad061ae72991511c19b2a0ffdda6d071ccb1bd.zip FreeBSD-src-6aad061ae72991511c19b2a0ffdda6d071ccb1bd.tar.gz |
WARNS=2 fixup.
Use __FBSDID().
Set NO_WERROR because this would rely on some lex(1) fixes that
cannot be committed yet.
Diffstat (limited to 'usr.bin/colldef/scan.l')
-rw-r--r-- | usr.bin/colldef/scan.l | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/colldef/scan.l b/usr.bin/colldef/scan.l index 8085440..04f3a57 100644 --- a/usr.bin/colldef/scan.l +++ b/usr.bin/colldef/scan.l @@ -25,10 +25,12 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include <sys/cdefs.h> + +__FBSDID("$FreeBSD$"); + #include <ctype.h> #include <err.h> #include <unistd.h> @@ -45,6 +47,7 @@ YY_BUFFER_STATE main_buf, map_buf; #ifdef FLEX_DEBUG YYSTYPE yylval; #endif /* FLEX_DEBUG */ +int yylex(void); %} %% <INITIAL,charmap,nchar,subs,subs2>[ \t]+ ; @@ -166,7 +169,7 @@ YYSTYPE yylval; return STRING; } <name,defn>. { - char *s = (map_fp != NULL) ? map_name : "input"; + const char *s = (map_fp != NULL) ? map_name : "input"; if (!isascii(*yytext) || !isprint(*yytext)) errx(EX_UNAVAILABLE, "non-ASCII or non-printable character 0x%02x not allowed in the map/name near line %u of %s", @@ -219,12 +222,12 @@ YYSTYPE yylval; *ptr++ = '\a'; } <name,string,defn>\n { - char *s = (map_fp != NULL) ? map_name : "input"; + const char *s = (map_fp != NULL) ? map_name : "input"; errx(EX_UNAVAILABLE, "unterminated map/name/string near line %u of %s", line_no, s); } <name,string,nchar><<EOF>> { - char *s = (map_fp != NULL) ? map_name : "input"; + const char *s = (map_fp != NULL) ? map_name : "input"; errx(EX_UNAVAILABLE, "premature EOF in the name/string/char near line %u of %s", line_no, s); } |