Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpcmips/hpcmips/platid_gen remove old platid_gen



details:   https://anonhg.NetBSD.org/src/rev/52edcdfb1dab
branches:  trunk
changeset: 503031:52edcdfb1dab
user:      uch <uch%NetBSD.org@localhost>
date:      Mon Jan 29 04:23:01 2001 +0000

description:
remove old platid_gen

diffstat:

 sys/arch/hpcmips/hpcmips/platid_gen/Makefile     |   35 -
 sys/arch/hpcmips/hpcmips/platid_gen/gram.y       |  216 ----------
 sys/arch/hpcmips/hpcmips/platid_gen/platid_gen.c |  463 -----------------------
 sys/arch/hpcmips/hpcmips/platid_gen/platid_gen.h |   49 --
 sys/arch/hpcmips/hpcmips/platid_gen/scan.l       |  111 -----
 5 files changed, 0 insertions(+), 874 deletions(-)

diffs (truncated from 894 to 300 lines):

diff -r e65a055429a7 -r 52edcdfb1dab sys/arch/hpcmips/hpcmips/platid_gen/Makefile
--- a/sys/arch/hpcmips/hpcmips/platid_gen/Makefile      Mon Jan 29 03:50:20 2001 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#      $NetBSD: Makefile,v 1.1 2000/02/06 08:47:11 takemura Exp $
-
-GENHDR=        ../../include/platid_generated.h
-MASK_H=        ../../include/platid_mask.h
-MASK_C=        ../platid_mask.c
-NAME_C=        ../platid_name.c
-GENERATEDS=    ${GENHDR} ${MASK_H} ${MASK_C} ${NAME_C}
-
-PROG=  platid_gen
-BINDIR=        /usr/sbin
-SRCS=  platid_gen.c gram.y scan.l
-
-YFLAGS=
-YHEADER=1
-CPPFLAGS+=-I${.CURDIR} -I.
-CLEANFILES+=gram.h
-LEX=flex
-MAN=
-
-all: $(GENERATEDS)
-
-${GENHDR}: ${PROG} ../platid.def
-       awk -f ../platid_copyright.awk ../platid.def > ${.TARGET}
-       ./${PROG} -header < ../platid.def >> ${GENHDR}
-${MASK_H}: ${PROG} ../platid.def
-       awk -f ../platid_copyright.awk ../platid.def > ${.TARGET}
-       ./${PROG} -mask_h < ../platid.def >> ${MASK_H}
-${MASK_C}: ${PROG} ../platid.def
-       awk -f ../platid_copyright.awk ../platid.def > ${.TARGET}
-       ./${PROG} -mask_c < ../platid.def >> ${MASK_C}
-${NAME_C}: ${PROG} ../platid.def
-       awk -f ../platid_copyright.awk ../platid.def > ${.TARGET}
-       ./${PROG} -name_c < ../platid.def >> ${NAME_C}
-
-.include <bsd.prog.mk>
diff -r e65a055429a7 -r 52edcdfb1dab sys/arch/hpcmips/hpcmips/platid_gen/gram.y
--- a/sys/arch/hpcmips/hpcmips/platid_gen/gram.y        Mon Jan 29 03:50:20 2001 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-%{
-/*     $NetBSD: gram.y,v 1.1 2000/02/06 08:47:12 takemura Exp $        */
-
-/*-
- * Copyright (c) 1999
- *         Shin Takemura and PocketBSD Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the PocketBSD project
- *     and its contributors.
- * 4. Neither the name of the project nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * 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.
- *
- */
-
-#include <stdio.h>
-#include <strings.h>
-
-#include "platid_gen.h"
-
-#define LIST_NEW(l)    { \
-       (l) = new_node(LIST, 0, NULL, NULL, NULL); \
-}
-#define LIST_ADD(l, i) { \
-       if ((l)->ptr1 == NULL) { \
-               (l)->ptr1 = (i); \
-               (l)->ptr2 = (i); \
-       } else { \
-               ((node_t*)(l)->ptr2)->link = (i); \
-               (l)->ptr2 = (i); \
-       } \
-       (i)->link = NULL; \
-       (l)->val++; \
-}
-
-%}
-
-%union {
-       struct node_s *node;
-       const char *str;
-       int     val;
-}
-
-%token '{' '}' '=' ':'
-%token <str>FSYM
-%token <str>SYM
-%token <str>MOD
-%token <str>NAME
-
-%type <str>sym
-%type <val>name_prefix
-%type <node>name_opt
-%type <node>ent
-%type <node>sub_list
-%type <node>sub_item
-%type <node>list
-%type <node>item
-
-%%
-
-start: list { def_tree = $1; };
-
-list:
-  list item { LIST_ADD($1, $2); $$ = $1; } |
-  /* empty */ { LIST_NEW($$); };
-
-item:
-sym ':' { $$ = new_node(LABEL, 0, $1, NULL, NULL); } |
-sym '=' sym  { $$ = new_node(MODIFIER, 0, $1, $3, NULL); } |
-ent { $$ = $1; }|
-'{' sub_list '}' { $$ = $2; };
-
-sub_list:
-  sub_list sub_item { LIST_ADD($1, $2); $$ = $1; } |
-  /* empty */ { LIST_NEW($$); };
-
-sub_item:
-  sym '=' sym { $$ = new_node(MODIFIER, 0, $1, $3, NULL); }|
-  ent { $$ = $1; } |
-  '{' sub_list '}' { $$ = $2; };
-
-ent : sym name_opt {
-       $2->ptr1 = $1;
-       /*
-       if ($2->ptr2 == NULL) {
-               $2->ptr2 = strdup($1);
-       }
-       touppers((char*)$2->ptr1);
-       */
-       $$ = $2;
-};
-
-name_opt:
-    name_prefix NAME { $$ = new_node(ENTRY, $1, NULL, $2, NULL); } |
-    name_prefix { $$ = new_node(ENTRY, $1, NULL, NULL, NULL); };
-
-name_prefix:
-  name_prefix '-' { $$ = $1 + 1; } |
-  /* empty */ { $$ = 0; }
-
-sym:
-  FSYM  { $$ = $1; } |
-  SYM { $$ = $1; } |
-  MOD  { $$ = $1; };
-
-%%
-
-char*
-touppers(s)
-       char *s;
-{
-       char *p;
-
-       for (p = s; *p != '\0'; p++)
-               *p = toupper(*p);
-       return (s);
-}
-
-void*
-mem_alloc(size)
-       int size;
-{
-       void *res;
-
-       if ((res = malloc(size)) == NULL) {
-               fprintf(stderr, "memory allocation failed.\n");
-               exit(1);
-       }
-       return (res);
-}
-
-node_t*
-new_node(type, val, ptr1, ptr2, link)
-       int type;
-       int val;
-       const void *ptr1, *ptr2;
-       node_t *link;
-{
-       node_t *res;
-
-       res = mem_alloc(sizeof(node_t));
-       res->type = type;
-       res->val = val;
-       res->ptr1 = ptr1;
-       res->ptr2 = ptr2;
-       res->link = link;
-       return (res);
-}
-
-void
-dump_node(prefix, n)
-       char *prefix;
-       node_t* n;
-{
-       char prefix2[1024];
-       node_t *np;
-
-       sprintf(prefix2, "%s    ", prefix);
-
-       switch (n->type) {
-       case LABEL:
-               printf("%s%s:\n", prefix, n->ptr1);
-               break;
-       case MODIFIER:
-               printf("%s%s=%s\n", prefix, n->ptr1, n->ptr2);
-               break;
-       case ENTRY:
-               if (n->val == 0)
-                       printf("%s%s(%s)\n", prefix, n->ptr1, n->ptr2);
-               else
-                       printf("%s%s(-%d, %s)\n",
-                              prefix, n->ptr1, n->val, n->ptr2);
-               break;
-       case LIST:
-               printf("%s{\n", prefix);
-               for (np = (node_t*)n->ptr1; np; np = np->link) {
-                       dump_node(prefix2, np);
-               }
-               printf("%s}\n", prefix);
-               break;
-       default:
-               printf("%s???\n", prefix);
-               break;
-       }
-}
-
-void
-yyerror(s)
-       const char *s;
-{
-       extern int yyline;
-
-       fprintf(stderr, "%d: %s\n", yyline, s);
-}
diff -r e65a055429a7 -r 52edcdfb1dab sys/arch/hpcmips/hpcmips/platid_gen/platid_gen.c
--- a/sys/arch/hpcmips/hpcmips/platid_gen/platid_gen.c  Mon Jan 29 03:50:20 2001 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,463 +0,0 @@
-/*     $NetBSD: platid_gen.c,v 1.2 2000/02/17 21:31:13 mycroft Exp $   */
-
-/*-
- * Copyright (c) 1999
- *         Shin Takemura and PocketBSD Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the PocketBSD project
- *     and its contributors.
- * 4. Neither the name of the project nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * 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.
- *
- */
-#include <stdio.h>
-#include <strings.h>



Home | Main Index | Thread Index | Old Index