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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libxcurses/src/libc/xcurses/mkkey.awk
          +++ new/usr/src/lib/libxcurses/src/libc/xcurses/mkkey.awk
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15  # and limitations under the License.
  16   16  #
  17   17  # When distributing Covered Code, include this CDDL HEADER in each
  18   18  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  19   19  # If applicable, add the following below this CDDL HEADER, with the
  20   20  # fields enclosed by brackets "[]" replaced with your own identifying
  21   21  # information: Portions Copyright [yyyy] [name of copyright owner]
  22   22  #
  23   23  # CDDL HEADER END
  24   24  #
  25      -# ident "%Z%%M% %I%     %E% SMI"
  26      -#
  27   25  # mkkey.awk
  28   26  #
  29   27  # XCurses Library
  30   28  #
  31   29  # Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved.
  32   30  #
  33   31  # USAGE:
  34   32  #       awk -f mkkey.awk caps >keyindex.c
  35   33  #
  36   34  #  rcsid = $Header: /rd/src/libc/xcurses/rcs/mkkey.awk 1.1 1995/05/11 14:39:17 ant Exp $
↓ open down ↓ 4 lines elided ↑ open up ↑
  41   39  print " * keyindex.c"
  42   40  print " *"
  43   41  print " * XCurses Library"
  44   42  print " *"
  45   43  print " * **** THIS FILE IS MACHINE GENERATED."
  46   44  print " * **** DO NOT EDIT THIS FILE."
  47   45  print " *"
  48   46  print " * Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved."
  49   47  print " *"
  50   48  print " */"
  51      -print
       49 +print ""
  52   50  print "#if M_RCSID"
  53   51  print "#ifndef lint"
  54   52  printf "static char rcsID[] = \"$Header%s\";\n", "$"
  55   53  print "#endif"
  56   54  print "#endif"
  57      -print
       55 +print ""
  58   56  print "#include <private.h>"
  59      -print
       57 +print ""
  60   58  print "/*"
  61   59  print " * This table is used to map a KEY_ constant to an"
  62   60  print " * index for cur_term->_str[] for use by keyname()."
  63   61  print " */"
  64   62  print "short __m_keyindex[][2]= {"
  65   63          strcount = 0;
  66   64  }
  67   65  
  68   66  $4 == "str" {
  69   67          if ($1 ~ /^key_f[0-9][0-9]*/)
  70   68                  printf("\t{ %d, KEY_F(%d) },\n", strcount, substr($1, 6, 2));
  71   69          else if ($1 ~ /^key_/)
  72   70                  printf "\t{ %d, %s },\n", strcount, toupper($1);
  73   71          ++strcount;
  74   72  }
  75   73  
  76   74  END {
  77   75          print "\t{ -1, -1 }"
  78   76          print "};"
  79   77  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX