--- old/usr/src/lib/libxcurses/src/libc/xcurses/mkkey.awk	2013-05-11 15:39:55.905169785 +0000
+++ new/usr/src/lib/libxcurses/src/libc/xcurses/mkkey.awk	2013-05-11 15:39:55.920825911 +0000
@@ -22,8 +22,6 @@
 #
 # CDDL HEADER END
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 # mkkey.awk
 #
 # XCurses Library
@@ -48,15 +46,15 @@
 print " * Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved."
 print " *"
 print " */"
-print
+print ""
 print "#if M_RCSID"
 print "#ifndef lint"
 printf "static char rcsID[] = \"$Header%s\";\n", "$"
 print "#endif"
 print "#endif"
-print
+print ""
 print "#include <private.h>"
-print
+print ""
 print "/*"
 print " * This table is used to map a KEY_ constant to an"
 print " * index for cur_term->_str[] for use by keyname()."
--- old/usr/src/lib/libxcurses/src/libc/xcurses/mknames.awk	2013-05-11 15:39:56.287747682 +0000
+++ new/usr/src/lib/libxcurses/src/libc/xcurses/mknames.awk	2013-05-11 15:39:56.299525213 +0000
@@ -45,13 +45,13 @@
 print " * Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved." > file
 print " *" > file
 print " */" > file
-print > file
+print "" > file
 print "#if M_RCSID" > file
 print "#ifndef lint" > file
 printf "static char rcsID[] = \"$Header%s\"\n", "$" > file
 print "#endif" > file
 print "#endif" > file
-print > file
+print "" > file
 printf "char *__m_%s[] = {\n", array > file
 }
 
--- old/usr/src/lib/libxcurses/src/libc/xcurses/mkterm.awk	2013-05-11 15:39:56.744553916 +0000
+++ new/usr/src/lib/libxcurses/src/libc/xcurses/mkterm.awk	2013-05-11 15:39:56.755078521 +0000
@@ -22,8 +22,6 @@
 #
 # CDDL HEADER END
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 # mkterm.awk
 #
 # XCurses Library
@@ -49,12 +47,12 @@
 print " *"
 printf " * $Header%s\n", "$"
 print " */"
-print
+print ""
 print "#ifndef __term_h__"
 print "#define __term_h__\t1"
-print
+print ""
 print "#define _XOPEN_CURSES"
-print
+print ""
 print "#ifndef NCCS"
 print "#include <termios.h>"
 print "#endif"
@@ -62,10 +60,14 @@
 print "#include <sys/types.h>"
 print "#include <unistd.h>"
 print "#endif"
-print
+print ""
 print "#define __TERM cur_term->"
 }
 
+/^#/ || /^$/ {
+	next
+}
+
 $4 == "bool" {
 	printf "#define %-30s __TERM _bool[%d]\n", $1, BoolCount++
 }
@@ -79,11 +81,11 @@
 }
 
 END {
-print
+print ""
 printf "#define __COUNT_BOOL\t\t%d\n", BoolCount
 printf "#define __COUNT_NUM\t\t%d\n", NumberCount
 printf "#define __COUNT_STR\t\t%d\n", StringCount
-print
+print ""
 print "/*"
 print " * MKS Header format for terminfo database files."
 print " *"
@@ -101,9 +103,9 @@
 print " * necessary, to ensure that the number section begins on an even byte"
 print " * offset.  All short integers are aligned on a short word boundary."
 print " */"
-print
+print ""
 print "#define __TERMINFO_MAGIC\t\t0432"
-print
+print ""
 print "typedef struct {"
 print "\tshort magic;"
 print "\tshort name_size;"
@@ -112,7 +114,7 @@
 print "\tshort str_count;"
 print "\tshort str_size;"
 print "} terminfo_header_t;"
-print
+print ""
 print "/*"
 print " * The following __MOVE_ constants are indices into the _move[] member"
 print " * of a SCREEN structure.  The array is used by m_mvcur() for cursor"
@@ -127,16 +129,16 @@
 print "#define __MOVE_RIGHT\t\t3"
 print "#define __MOVE_TAB\t\t4"
 print "#define __MOVE_BACK_TAB\t\t5"
-print
+print ""
 print "#define __MOVE_MAX_RELATIVE\t6"
-print
+print ""
 print "/*"
 print " * These should have fixed costs."
 print " */"
 print "#define __MOVE_RETURN\t\t6"
 print "#define __MOVE_HOME\t\t7"
 print "#define __MOVE_LAST_LINE\t8"
-print
+print ""
 print "/*"
 print " * These have worst case cost based on moving the maximum possible"
 print " * value for a parameter given the screen size."
@@ -148,20 +150,20 @@
 print "#define __MOVE_ROW\t\t13"
 print "#define __MOVE_COLUMN\t\t14"
 print "#define __MOVE_ROW_COLUMN\t15"
-print
+print ""
 print "#define __MOVE_MAX\t\t16"
-print
+print ""
 print "/*"
 print " * For a cursor motion to be used there must be a base-cost of at least 1."
 print " */"
 print "#define __MOVE_INFINITY\t\t1000"
-print
+print ""
 print "#define __TERM_ISATTY_IN\t0x0001\t/* Input is a terminal */"
 print "#define __TERM_ISATTY_OUT\t0x0002\t/* Output is a terminal */"
 print "#define __TERM_HALF_DELAY\t0x0004\t/* halfdelay() has priority. */"
 print "#define __TERM_INSERT_MODE\t0x0008\t/* Terminal is in insert mode. */"
 print "#define __TERM_NL_IS_CRLF\t0x8000\t/* Newline is mapped on output. */"
-print
+print ""
 print "/***"
 print " *** Opaque data type.  Keep your grubby mits off."
 print " ***/"
@@ -187,9 +189,9 @@
 print "\t\tshort _cost;"
 print "\t} _move[__MOVE_MAX];"
 print "} TERMINAL;"
-print
+print ""
 print "extern TERMINAL *cur_term;"
-print
+print ""
 print "extern char *__m_boolnames[];"
 print "extern char *__m_boolcodes[];"
 print "extern char *__m_boolfnames[];"
@@ -199,7 +201,7 @@
 print "extern char *__m_strnames[];"
 print "extern char *__m_strcodes[];"
 print "extern char *__m_strfnames[];"
-print
+print ""
 print "#ifndef _XOPEN_SOURCE"
 print "/*"
 print " * Old System V array names."
@@ -214,7 +216,7 @@
 print "#define strcodes\t__m_strcodes"
 print "#define strfnames\t__m_strfnames"
 print "#endif /* _XOPEN_SOURCE */"
-print
+print ""
 print "/*"
 print " * Exposed internal functions."
 print " */"
@@ -222,7 +224,7 @@
 print "extern int __m_mvcur(int, int, int, int, int (*)(int));"
 print "extern int __m_read_terminfo(const char *, TERMINAL *);"
 print "extern int __m_setupterm(const char *, int, int, int *);"
-print
+print ""
 print "/*"
 print " * Globals"
 print " */"
@@ -230,35 +232,35 @@
 print "extern TERMINAL *set_curterm(TERMINAL *);"
 print "extern int restartterm(const char *, int, int *);"
 print "extern int setupterm(const char *, int, int *);"
-print
+print ""
 print "extern int tgetent(char *, char *);"
 print "extern int tgetflag(const char *);"
 print "extern int tgetnum(const char *);"
 print "extern char *tgetstr(const char *, char **);"
 print "extern char *tgoto(const char *, int, int);"
-print
+print ""
 print "extern int tigetflag(const char *);"
 print "extern int tigetnum(const char *);"
 print "extern char *tigetstr(const char *);"
-print
+print ""
 print "extern int putp(const char *);"
 print "extern const char *tparm("
 print "\tconst char *, long, long, long, long, long, long, long, long, long);"
 print "extern int tputs(const char *, int, int (*)(int));"
-print
+print ""
 print "#ifndef _XOPEN_SOURCE_EXTENDED"
-print
+print ""
 print "#define putp(str)\t\ttputs(str,1,__m_putchar)"
 print "#define del_term\t\tdel_curterm"
 print "#define setterm(t)\t\tsetupterm(t,STDOUT_FILENO,(int *) 0)"
 print "#define tgoto(cm,c,r)\t\ttparm((char *)(cm), (long)(r), (long)(c))"
-print
+print ""
 print "#ifndef _XOPEN_SOURCE"
 print "#define beehive_glitch\t\tno_esc_ctrlc"
 print "#define teleray_glitch\t\tdest_tabs_magic_smso"
 print "#endif /* _XOPEN_SOURCE */"
-print
+print ""
 print "#endif /* _XOPEN_SOURCE_EXTENDED */"
-print
+print ""
 print "#endif /* __term_h__ */"
 }
--- old/usr/src/lib/libxcurses2/src/libc/xcurses/mkkey.awk	2013-05-11 15:39:57.178134938 +0000
+++ new/usr/src/lib/libxcurses2/src/libc/xcurses/mkkey.awk	2013-05-11 15:39:57.201639106 +0000
@@ -22,8 +22,6 @@
 # Copyright (c) 1995-1998 by Sun Microsystems, Inc.
 # All rights reserved.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 # mkkey.awk
 #
 # XCurses Library
@@ -41,9 +39,9 @@
 print " * Copyright (c) 1998 by Sun Microsystems, Inc."
 print " * All rights reserved."
 print " */"
-print
+print ""
 print "#pragma ident	\"@(#)keyindex.c\t%I%\t%E% SMI\""
-print
+print ""
 print "/*"
 print " * keyindex.c"
 print " *"
@@ -55,9 +53,9 @@
 print " * Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved."
 print " *"
 print " */"
-print
+print ""
 print "#include <private.h>"
-print
+print ""
 print "/*"
 print " * This table is used to map a KEY_ constant to an"
 print " * index for cur_term->_str[] for use by keyname()."
--- old/usr/src/lib/libxcurses2/src/libc/xcurses/mknames.awk	2013-05-11 15:39:57.630061732 +0000
+++ new/usr/src/lib/libxcurses2/src/libc/xcurses/mknames.awk	2013-05-11 15:39:57.647316390 +0000
@@ -22,8 +22,6 @@
 # Copyright (c) 1995-1998 by Sun Microsystems, Inc.
 # All rights reserved.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 # mknames.awk	
 #
 # XCurses Library
@@ -38,9 +36,9 @@
 print " * Copyright (c) 1998 by Sun Microsystems, Inc." > file
 print " * All rights reserved." > file
 print " */" > file
-print > file
+print "" > file
 print "#pragma ident	\"@(#)" file "\t%I%\t%E% SMI\"" > file
-print > file
+print "" > file
 print "/*" > file
 printf " * %s\n", file > file
 print " *" > file
@@ -52,7 +50,7 @@
 print " * Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved." > file
 print " *" > file
 print " */" > file
-print > file
+print "" > file
 printf "const char *%s[] = {\n", array > file
 }
 
--- old/usr/src/lib/libxcurses2/src/libc/xcurses/mkterm.awk	2013-05-11 15:39:58.030389625 +0000
+++ new/usr/src/lib/libxcurses2/src/libc/xcurses/mkterm.awk	2013-05-11 15:39:58.045562638 +0000
@@ -22,8 +22,6 @@
 # Copyright (c) 1995-1998 by Sun Microsystems, Inc.
 # All rights reserved.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
 # mkterm.awk
 #
 # XCurses Library
@@ -41,12 +39,12 @@
 print " * Copyright (c) 1998 by Sun Microsystems, Inc."
 print " * All rights reserved."
 print " */"
-print 
+print ""
 print "#ifndef	_TERM_H"
 print "#define	_TERM_H"
-print
+print ""
 print "#pragma ident	\"@(#)term.h	%I%	%E% SMI\""
-print
+print ""
 print "/*"
 print " * term.h"
 print " *"
@@ -59,15 +57,19 @@
 print " *"
 printf " * $Header%s\n", "$"
 print " */"
-print
-print
+print ""
+print ""
 print "#ifdef	__cplusplus"
 print "extern \"C\" {"
 print "#endif"
-print
+print ""
 print "#define	__TERM cur_term->"
 }
 
+/^#/ || /^$/ {
+	next
+}
+
 $4 == "bool" {
 	printf "#define	%s\t\t__TERM _bool[%d]\n", $1, BoolCount++
 }
@@ -81,11 +83,11 @@
 }
 
 END {
-print
+print ""
 printf "#define	__COUNT_BOOL\t\t%d\n", BoolCount
 printf "#define	__COUNT_NUM\t\t%d\n", NumberCount
 printf "#define	__COUNT_STR\t\t%d\n", StringCount
-print
+print ""
 #print "/*"
 #print " * MKS Header format for terminfo database files."
 #print " *"
@@ -129,16 +131,16 @@
 print "#define	__MOVE_RIGHT\t\t3"
 print "#define	__MOVE_TAB\t\t4"
 print "#define	__MOVE_BACK_TAB\t\t5"
-print
+print ""
 print "#define	__MOVE_MAX_RELATIVE\t6"
-print
+print ""
 print "/*"
 print " * These should have fixed costs."
 print " */"
 print "#define	__MOVE_RETURN\t\t6"
 print "#define	__MOVE_HOME\t\t7"
 print "#define	__MOVE_LAST_LINE\t8"
-print
+print ""
 print "/*"
 print " * These have worst case cost based on moving the maximum possible"
 print " * value for a parameter given the screen size."
@@ -150,20 +152,20 @@
 print "#define	__MOVE_ROW\t\t13"
 print "#define	__MOVE_COLUMN\t\t14"
 print "#define	__MOVE_ROW_COLUMN\t15"
-print
+print ""
 print "#define	__MOVE_MAX\t\t16"
-print
+print ""
 print "/*"
 print " * For a cursor motion to be used there must be a base-cost of at least 1."
 print " */"
 print "#define	__MOVE_INFINITY\t\t1000"
-print
+print ""
 print "#define	__TERM_ISATTY_IN\t0x0001\t/* Input is a terminal */"
 print "#define	__TERM_ISATTY_OUT\t0x0002\t/* Output is a terminal */"
 print "#define	__TERM_HALF_DELAY\t0x0004\t/* halfdelay() has priority. */"
 print "#define	__TERM_INSERT_MODE\t0x0008\t/* Terminal is in insert mode. */"
 print "#define	__TERM_NL_IS_CRLF\t0x8000\t/* Newline is mapped on output. */"
-print
+print ""
 print "/*"
 print " * Opaque data type.  Keep your grubby mits off."
 print " */"
@@ -194,16 +196,16 @@
 print "\t\tshort	_cost;"
 print "\t} _move[__MOVE_MAX];"
 print "} TERMINAL;"
-print
+print ""
 print "extern TERMINAL *cur_term;"
-print
+print ""
 print "#if !(defined(__cplusplus) && defined(_BOOL))"
 print "#ifndef _BOOL_DEFINED"
 print "typedef short	bool;"
 print "#define	_BOOL_DEFINED"
 print "#endif"
 print "#endif"
-print
+print ""
 print "/*"
 print " * Globals"
 print " */"
@@ -223,10 +225,10 @@
 print "extern char *tparm("
 print "\tchar *, long, long, long, long, long, long, long, long, long);"
 print "extern int tputs(const char *, int, int (*)(int));"
-print
+print ""
 print "#ifdef	__cplusplus"
 print "}"
 print "#endif"
-print
+print ""
 print "#endif /* _TERM_H */"
 }
