config.y (111230) | config.y (111582) |
---|---|
1%union { 2 char *str; 3 int val; 4 struct file_list *file; 5} 6 7%token ARCH 8%token COMMA 9%token CONFIG 10%token CPU 11%token DEVICE | 1%union { 2 char *str; 3 int val; 4 struct file_list *file; 5} 6 7%token ARCH 8%token COMMA 9%token CONFIG 10%token CPU 11%token DEVICE |
12%token NODEVICE |
|
12%token ENV 13%token EQUALS 14%token HINTS 15%token IDENT 16%token MAXUSERS | 13%token ENV 14%token EQUALS 15%token HINTS 16%token IDENT 17%token MAXUSERS |
17%token NODEVICE | |
18%token PROFILE 19%token OPTIONS | 18%token PROFILE 19%token OPTIONS |
20%token NOOPTION |
|
20%token MAKEOPTIONS | 21%token MAKEOPTIONS |
22%token NOMAKEOPTION |
|
21%token SEMICOLON 22%token INCLUDE 23 24%token <str> ID 25%token <val> NUMBER 26 27%type <str> Save_id 28%type <str> Opt_value --- 29 unchanged lines hidden (view full) --- 58 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 59 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 60 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 61 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 62 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 63 * SUCH DAMAGE. 64 * 65 * @(#)config.y 8.1 (Berkeley) 6/6/93 | 23%token SEMICOLON 24%token INCLUDE 25 26%token <str> ID 27%token <val> NUMBER 28 29%type <str> Save_id 30%type <str> Opt_value --- 29 unchanged lines hidden (view full) --- 60 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 61 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 62 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 63 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 64 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 65 * SUCH DAMAGE. 66 * 67 * @(#)config.y 8.1 (Berkeley) 6/6/93 |
66 * $FreeBSD: head/usr.sbin/config/config.y 111230 2003-02-21 23:17:00Z ru $ | 68 * $FreeBSD: head/usr.sbin/config/config.y 111582 2003-02-26 23:36:59Z ru $ |
67 */ 68 69#include <ctype.h> 70#include <err.h> 71#include <stdio.h> 72#include <string.h> 73 74#include "config.h" --- 56 unchanged lines hidden (view full) --- 131 struct cputype *cp = 132 (struct cputype *)malloc(sizeof (struct cputype)); 133 memset(cp, 0, sizeof(*cp)); 134 cp->cpu_name = $2; 135 SLIST_INSERT_HEAD(&cputype, cp, cpu_next); 136 } | 137 OPTIONS Opt_list 138 | | 69 */ 70 71#include <ctype.h> 72#include <err.h> 73#include <stdio.h> 74#include <string.h> 75 76#include "config.h" --- 56 unchanged lines hidden (view full) --- 133 struct cputype *cp = 134 (struct cputype *)malloc(sizeof (struct cputype)); 135 memset(cp, 0, sizeof(*cp)); 136 cp->cpu_name = $2; 137 SLIST_INSERT_HEAD(&cputype, cp, cpu_next); 138 } | 139 OPTIONS Opt_list 140 | |
141 NOOPTION Save_id 142 = { rmopt(&opt, $2); } | |
|
139 MAKEOPTIONS Mkopt_list 140 | | 143 MAKEOPTIONS Mkopt_list 144 | |
145 NOMAKEOPTION Save_id 146 = { rmopt(&mkopt, $2); } | |
|
141 IDENT ID 142 = { ident = $2; } | 143 System_spec 144 | 145 MAXUSERS NUMBER 146 = { maxusers = $2; } | 147 PROFILE NUMBER 148 = { profiling = $2; } | --- 94 unchanged lines hidden (view full) --- 243 /* and the device part */ 244 newdev($2, $3); 245 if ($3 == 0) 246 errx(1, "%s:%d: devices with zero units are not " 247 "likely to be correct", yyfile, yyline); 248 } | 249 NODEVICE Dev 250 = { | 147 IDENT ID 148 = { ident = $2; } | 149 System_spec 150 | 151 MAXUSERS NUMBER 152 = { maxusers = $2; } | 153 PROFILE NUMBER 154 = { profiling = $2; } | --- 94 unchanged lines hidden (view full) --- 249 /* and the device part */ 250 newdev($2, $3); 251 if ($3 == 0) 252 errx(1, "%s:%d: devices with zero units are not " 253 "likely to be correct", yyfile, yyline); 254 } | 255 NODEVICE Dev 256 = { |
251 rmopt(&opt, devopt($2)); | 257 char *s = devopt($2); 258 259 rmopt(&opt, s); 260 free(s); |
252 /* and the device part */ 253 rmdev($2); 254 } ; 255 256%% 257 258void 259yyerror(const char *s) --- 73 unchanged lines hidden --- | 261 /* and the device part */ 262 rmdev($2); 263 } ; 264 265%% 266 267void 268yyerror(const char *s) --- 73 unchanged lines hidden --- |