| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: ntp_scanner.c,v 1.1.1.1 2009/12/13 16:56:14 kardel Exp $ */ | | 1 | /* $NetBSD: ntp_scanner.c,v 1.2 2010/08/28 20:52:55 kardel Exp $ */ |
2 | | | 2 | |
3 | | | 3 | |
4 | /* ntp_scanner.c | | 4 | /* ntp_scanner.c |
5 | * | | 5 | * |
6 | * The source code for a simple lexical analyzer. | | 6 | * The source code for a simple lexical analyzer. |
7 | * | | 7 | * |
8 | * Written By: Sachin Kamboj | | 8 | * Written By: Sachin Kamboj |
9 | * University of Delaware | | 9 | * University of Delaware |
10 | * Newark, DE 19711 | | 10 | * Newark, DE 19711 |
11 | * Copyright (c) 2006 | | 11 | * Copyright (c) 2006 |
12 | */ | | 12 | */ |
13 | | | 13 | |
14 | #ifdef HAVE_CONFIG_H | | 14 | #ifdef HAVE_CONFIG_H |
| @@ -343,27 +343,27 @@ is_double( | | | @@ -343,27 +343,27 @@ is_double( |
343 | if (!lexeme[i]) | | 343 | if (!lexeme[i]) |
344 | return 1; | | 344 | return 1; |
345 | else | | 345 | else |
346 | return 0; | | 346 | return 0; |
347 | } | | 347 | } |
348 | | | 348 | |
349 | | | 349 | |
350 | /* is_special() - Test whether a character is a token */ | | 350 | /* is_special() - Test whether a character is a token */ |
351 | static inline int | | 351 | static inline int |
352 | is_special( | | 352 | is_special( |
353 | int ch | | 353 | int ch |
354 | ) | | 354 | ) |
355 | { | | 355 | { |
356 | return (int)strchr(special_chars, ch); | | 356 | return strchr(special_chars, ch) != NULL; |
357 | } | | 357 | } |
358 | | | 358 | |
359 | | | 359 | |
360 | static int | | 360 | static int |
361 | is_EOC( | | 361 | is_EOC( |
362 | int ch | | 362 | int ch |
363 | ) | | 363 | ) |
364 | { | | 364 | { |
365 | if ((old_config_style && (ch == '\n')) || | | 365 | if ((old_config_style && (ch == '\n')) || |
366 | (!old_config_style && (ch == ';'))) | | 366 | (!old_config_style && (ch == ';'))) |
367 | return 1; | | 367 | return 1; |
368 | return 0; | | 368 | return 0; |
369 | } | | 369 | } |