Print this page
3764 Semantic of nawk's print statement changed


   5 # Common Development and Distribution License, Version 1.0 only
   6 # (the "License").  You may not use this file except in compliance
   7 # with the License.
   8 #
   9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 # Copyright (c) 1995-1998 by Sun Microsystems, Inc.
  23 # All rights reserved.
  24 #
  25 # ident "%Z%%M% %I%     %E% SMI"
  26 #
  27 # mknames.awk   
  28 #
  29 # XCurses Library
  30 #
  31 # Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved.
  32 #
  33 #  rcsid = $Header: /team/ps/sun_xcurses/archive/local_changes/xcurses/src/lib/libxcurses/src/libc/xcurses/rcs/mknames.awk 1.3 1998/05/29 15:58:51 cbates Exp $
  34 #
  35 
  36 function header(file, array) {
  37 print "/*" > file
  38 print " * Copyright (c) 1998 by Sun Microsystems, Inc." > file
  39 print " * All rights reserved." > file
  40 print " */" > file
  41 print > file
  42 print "#pragma ident    \"@(#)" file "\t%I%\t%E% SMI\"" > file
  43 print > file
  44 print "/*" > file
  45 printf " * %s\n", file > file
  46 print " *" > file
  47 print " * XCurses Library" > file
  48 print " *" > file
  49 print " * **** THIS FILE IS MACHINE GENERATED." > file
  50 print " * **** DO NOT EDIT THIS FILE." > file
  51 print " *" > file
  52 print " * Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved." > file
  53 print " *" > file
  54 print " */" > file
  55 print > file
  56 printf "const char *%s[] = {\n", array > file
  57 }
  58 
  59 function tail(file) {
  60         printf("\t0\n};\n") >file;
  61         close(file);
  62 }
  63 
  64 BEGIN {
  65         header("boolname.c", "boolnames");
  66         header("boolcode.c", "boolcodes");
  67         header("boolfnam.c", "boolfnames");
  68         header("numname.c", "numnames");
  69         header("numcode.c", "numcodes");
  70         header("numfnam.c", "numfnames");
  71         header("strname.c", "strnames");
  72         header("strcode.c", "strcodes");
  73         header("strfnam.c", "strfnames");
  74 }
  75 




   5 # Common Development and Distribution License, Version 1.0 only
   6 # (the "License").  You may not use this file except in compliance
   7 # with the License.
   8 #
   9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 # Copyright (c) 1995-1998 by Sun Microsystems, Inc.
  23 # All rights reserved.
  24 #


  25 # mknames.awk   
  26 #
  27 # XCurses Library
  28 #
  29 # Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved.
  30 #
  31 #  rcsid = $Header: /team/ps/sun_xcurses/archive/local_changes/xcurses/src/lib/libxcurses/src/libc/xcurses/rcs/mknames.awk 1.3 1998/05/29 15:58:51 cbates Exp $
  32 #
  33 
  34 function header(file, array) {
  35 print "/*" > file
  36 print " * Copyright (c) 1998 by Sun Microsystems, Inc." > file
  37 print " * All rights reserved." > file
  38 print " */" > file
  39 print "" > file
  40 print "#pragma ident    \"@(#)" file "\t%I%\t%E% SMI\"" > file
  41 print "" > file
  42 print "/*" > file
  43 printf " * %s\n", file > file
  44 print " *" > file
  45 print " * XCurses Library" > file
  46 print " *" > file
  47 print " * **** THIS FILE IS MACHINE GENERATED." > file
  48 print " * **** DO NOT EDIT THIS FILE." > file
  49 print " *" > file
  50 print " * Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved." > file
  51 print " *" > file
  52 print " */" > file
  53 print "" > file
  54 printf "const char *%s[] = {\n", array > file
  55 }
  56 
  57 function tail(file) {
  58         printf("\t0\n};\n") >file;
  59         close(file);
  60 }
  61 
  62 BEGIN {
  63         header("boolname.c", "boolnames");
  64         header("boolcode.c", "boolcodes");
  65         header("boolfnam.c", "boolfnames");
  66         header("numname.c", "numnames");
  67         header("numcode.c", "numcodes");
  68         header("numfnam.c", "numfnames");
  69         header("strname.c", "strnames");
  70         header("strcode.c", "strcodes");
  71         header("strfnam.c", "strfnames");
  72 }
  73