Deleted Added
full compact
interp_parse.c (119483) interp_parse.c (229403)
1/*-
2 * Redistribution and use in source and binary forms, with or without
3 * modification, are permitted provided that the following conditions
4 * are met:
5 * 1. Redistributions of source code must retain the above copyright
6 * notice, this list of conditions and the following disclaimer.
7 * 2. Redistributions in binary form must reproduce the above copyright
8 * notice, this list of conditions and the following disclaimer in the
9 * documentation and/or other materials provided with the distribution.
10 *
11 * Jordan K. Hubbard
12 * 29 August 1998
13 *
14 * The meat of the simple parser.
15 */
16
17#include <sys/cdefs.h>
1/*-
2 * Redistribution and use in source and binary forms, with or without
3 * modification, are permitted provided that the following conditions
4 * are met:
5 * 1. Redistributions of source code must retain the above copyright
6 * notice, this list of conditions and the following disclaimer.
7 * 2. Redistributions in binary form must reproduce the above copyright
8 * notice, this list of conditions and the following disclaimer in the
9 * documentation and/or other materials provided with the distribution.
10 *
11 * Jordan K. Hubbard
12 * 29 August 1998
13 *
14 * The meat of the simple parser.
15 */
16
17#include <sys/cdefs.h>
18__FBSDID("$FreeBSD: head/sys/boot/common/interp_parse.c 119483 2003-08-25 23:30:41Z obrien $");
18__FBSDID("$FreeBSD: head/sys/boot/common/interp_parse.c 229403 2012-01-03 18:51:58Z ed $");
19
20#include <stand.h>
21#include <string.h>
22#include "bootstrap.h"
23
24static void clean(void);
25static int insert(int *argcp, char *buf);
26static char *variable_lookup(char *name);

--- 105 unchanged lines hidden (view full) ---

132 if (isspace(*p))
133 ++p;
134 else
135 state = STR;
136 break;
137
138 case VAR:
139 if (token) {
19
20#include <stand.h>
21#include <string.h>
22#include "bootstrap.h"
23
24static void clean(void);
25static int insert(int *argcp, char *buf);
26static char *variable_lookup(char *name);

--- 105 unchanged lines hidden (view full) ---

132 if (isspace(*p))
133 ++p;
134 else
135 state = STR;
136 break;
137
138 case VAR:
139 if (token) {
140 PARSE_FAIL((q = index(p, token)) == NULL);
140 PARSE_FAIL((q = strchr(p, token)) == NULL);
141 } else {
142 q = p;
143 while (*q && !isspace(*q))
144 ++q;
145 }
146 tmp = *q;
147 *q = '\0';
148 if ((val = variable_lookup(p)) != NULL) {

--- 56 unchanged lines hidden ---
141 } else {
142 q = p;
143 while (*q && !isspace(*q))
144 ++q;
145 }
146 tmp = *q;
147 *q = '\0';
148 if ((val = variable_lookup(p)) != NULL) {

--- 56 unchanged lines hidden ---