[BACK]Return to maketab.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / awk

Diff for /src/usr.bin/awk/maketab.c between version 1.1 and 1.2

version 1.1, 1996/07/04 20:34:44 version 1.2, 1997/08/25 16:17:12
Line 1 
Line 1 
   /*      $OpenBSD$       */
 /****************************************************************  /****************************************************************
 Copyright (C) AT&T and Lucent Technologies 1996  Copyright (C) Lucent Technologies 1997
 All Rights Reserved  All Rights Reserved
   
 Permission to use, copy, modify, and distribute this software and  Permission to use, copy, modify, and distribute this software and
Line 7 
Line 8 
 granted, provided that the above copyright notice appear in all  granted, provided that the above copyright notice appear in all
 copies and that both that the copyright notice and this  copies and that both that the copyright notice and this
 permission notice and warranty disclaimer appear in supporting  permission notice and warranty disclaimer appear in supporting
 documentation, and that the names of AT&T or Lucent Technologies  documentation, and that the name Lucent Technologies or any of
 or any of their entities not be used in advertising or publicity  its entities not be used in advertising or publicity pertaining
 pertaining to distribution of the software without specific,  to distribution of the software without specific, written prior
 written prior permission.  permission.
   
 AT&T AND LUCENT DISCLAIM ALL WARRANTIES WITH REGARD TO THIS  LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
 FITNESS. IN NO EVENT SHALL AT&T OR LUCENT OR ANY OF THEIR  IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
 ENTITIES BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR  IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
 USE OR PERFORMANCE OF THIS SOFTWARE.  THIS SOFTWARE.
 ****************************************************************/  ****************************************************************/
   
 /*  /*
  * this program makes the table to link function names   * this program makes the table to link function names
  * and type indices that is used by execute() in run.c.   * and type indices that is used by execute() in run.c.
  * it finds the indices in awkgram.h, produced by yacc.   * it finds the indices in ytab.h, produced by yacc.
  */   */
   
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include "awk.h"  #include "awk.h"
 #include "awkgram.h"  #include "ytab.h"
   
 struct xx  struct xx
 {       int token;  {       int token;
Line 120 
Line 121 
   
         printf("#include <stdio.h>\n");          printf("#include <stdio.h>\n");
         printf("#include \"awk.h\"\n");          printf("#include \"awk.h\"\n");
         printf("#include \"awkgram.h\"\n\n");          printf("#include \"ytab.h\"\n\n");
         for (i = SIZE; --i >= 0; )          for (i = SIZE; --i >= 0; )
                 names[i] = "";                  names[i] = "";
   
         if ((fp = fopen("awkgram.h", "r")) == NULL) {          if ((fp = fopen("ytab.h", "r")) == NULL) {
                 fprintf(stderr, "maketab can't open awkgram.h!\n");                  fprintf(stderr, "maketab can't open ytab.h!\n");
                 exit(1);                  exit(1);
         }          }
         printf("static char *printname[%d] = {\n", SIZE);          printf("static char *printname[%d] = {\n", SIZE);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2