[Bug 1346] keyword scanner broken where char defaults to unsigned.
[Bug 1347] ntpd/complete.conf missing multicastclient test case.
bk: 4ad79d826ePJSWs2zWr-ExNRVkKF5w
+* [Bug 1345] illegal 'grep' option prevents compilation.
+* [Bug 1346] keyword scanner broken where char defaults to unsigned.
+* [Bug 1347] ntpd/complete.conf missing multicastclient test case.
(4.2.5p233-RC) 2009/10/15 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1337] cast setsockopt() v4 address pointer to void *.
* [Bug 1342] ignore|drop one IPv6 address on an interface blocks all
ntp_keyword.out: keyword-gen
./keyword-gen $(srcdir)/ntp_parser.h > $@
- grep -F -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp1
- grep -F -v diff_ignore_line < $@ > cmp2
+ grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp1
+ grep -v diff_ignore_line < $@ > cmp2
cmp cmp1 cmp2 > /dev/null || cp $@ $(srcdir)/ntp_keyword.h
rm cmp1 cmp2
manycastclient 224.0.1.1
manycastclient ff05::101
manycastserver 224.0.1.1 ff05::101
+multicastclient 224.0.1.1 ff05::101
discard minimum 1 average 3 monitor 1
restrict default nomodify limited kod
restrict trusted.host.name.example.com. nomodify
}
}
}
-
+
list_ptr = queue_head(ptree->manycastserver);
if (list_ptr != NULL) {
- addr = (struct address_node *) list_ptr;
+ addr = list_ptr;
fprintf(df, "manycastserver %s", addr->address);
- for (list_ptr = next_node(list_ptr);
- list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- addr = (struct address_node *) list_ptr;
+ for (addr = next_node(addr);
+ addr != NULL;
+ addr = next_node(addr))
fprintf(df, " %s", addr->address);
- }
fprintf(df, "\n");
}
list_ptr = queue_head(ptree->multicastclient);
if (list_ptr != NULL) {
- addr = (struct address_node *) list_ptr;
+ addr = list_ptr;
fprintf(df, "multicastclient %s", addr->address);
- for (list_ptr = next_node(list_ptr);
- list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- addr = (struct address_node *) list_ptr;
+ for (addr = next_node(addr);
+ addr != NULL;
+ addr = next_node(addr))
fprintf(df, " %s", addr->address);
- }
fprintf(df, "\n");
}
* ---------
*/
-char get_next_char(void);
+int get_next_char(void);
static int is_keyword(char *lexeme, follby *pfollowedby);
* input_from_file flag.
*/
-char
+int
get_next_char(
void
)
char ch;
if (input_from_file)
- return (char)FGETC(ip_file);
+ return FGETC(ip_file);
else {
if (remote_config.buffer[remote_config.pos] == '\0')
return EOF;
/* Read in the lexeme */
i = 0;
- while (EOF != (yytext[i] = get_next_char())) {
+ while (EOF != (ch = get_next_char())) {
+
+ yytext[i] = (char)ch;
/* Break on whitespace or a special character */
- if (isspace(yytext[i]) || is_EOC(ch)
- || '"' == yytext[i]
+ if (isspace(ch) || is_EOC(ch)
+ || '"' == ch
|| (FOLLBY_TOKEN == followedby
- && is_special(yytext[i])))
+ && is_special(ch)))
break;
/* Read the rest of the line on reading a start
of comment character */
- if ('#' == yytext[i]) {
- while (EOF != (yytext[i] = get_next_char())
- && '\n' != yytext[i])
+ if ('#' == ch) {
+ while (EOF != (ch = get_next_char())
+ && '\n' != ch)
; /* Null Statement */
break;
}
*
* XXX - HMS: I'm not sure we want to assume the closing "
*/
- if ('"' == yytext[i]) {
+ if ('"' == ch) {
instring = 1;
- while (EOF != (yytext[i] = get_next_char()) &&
- yytext[i] != '"' && yytext[i] != '\n') {
- i++;
+ while (EOF != (ch = get_next_char()) &&
+ ch != '"' && ch != '\n') {
+ yytext[i++] = (char)ch;
if (i >= COUNTOF(yytext))
goto lex_too_long;
}
* this lexeme, but any closing quote should
* not be pushed back, so we read another char.
*/
- if ('"' == yytext[i])
- yytext[i] = get_next_char();
+ if ('"' == ch)
+ ch = get_next_char();
}
/* Pushback the last character read that is not a part
* of this lexeme.
* newline character. This is to prevent a parse error
* when there is no newline at the end of a file.
*/
- if (EOF == yytext[i])
+ if (EOF == ch)
push_back_char('\n');
else
- push_back_char(yytext[i]);
+ push_back_char(ch);
yytext[i] = '\0';
} while (i == 0);
/* SCANNER GLOBAL VARIABLES
* ------------------------
*/
-extern struct state *key_scanner; /* A FSA for recognizing keywords */
extern struct config_tree cfgt; /* Parser output stored here */
extern int curr_include_level; /* The current include level */