head 1.2; access; symbols netbsd-11-0-RC4:1.2 netbsd-11-0-RC3:1.2 netbsd-11-0-RC2:1.2 netbsd-11-0-RC1:1.2 perseant-exfatfs-base-20250801:1.2 netbsd-11:1.2.0.56 netbsd-11-base:1.2 netbsd-10-1-RELEASE:1.2 perseant-exfatfs-base-20240630:1.2 perseant-exfatfs:1.2.0.54 perseant-exfatfs-base:1.2 netbsd-8-3-RELEASE:1.2 netbsd-9-4-RELEASE:1.2 netbsd-10-0-RELEASE:1.2 netbsd-10-0-RC6:1.2 netbsd-10-0-RC5:1.2 netbsd-10-0-RC4:1.2 netbsd-10-0-RC3:1.2 netbsd-10-0-RC2:1.2 thorpej-ifq:1.2.0.52 thorpej-ifq-base:1.2 thorpej-altq-separation:1.2.0.50 thorpej-altq-separation-base:1.2 netbsd-10-0-RC1:1.2 netbsd-10:1.2.0.48 netbsd-10-base:1.2 bouyer-sunxi-drm:1.2.0.46 bouyer-sunxi-drm-base:1.2 netbsd-9-3-RELEASE:1.2 thorpej-i2c-spi-conf2:1.2.0.44 thorpej-i2c-spi-conf2-base:1.2 thorpej-futex2:1.2.0.42 thorpej-futex2-base:1.2 thorpej-cfargs2:1.2.0.40 thorpej-cfargs2-base:1.2 cjep_sun2x-base1:1.2 cjep_sun2x:1.2.0.38 cjep_sun2x-base:1.2 cjep_staticlib_x-base1:1.2 netbsd-9-2-RELEASE:1.2 cjep_staticlib_x:1.2.0.36 cjep_staticlib_x-base:1.2 thorpej-i2c-spi-conf:1.2.0.34 thorpej-i2c-spi-conf-base:1.2 thorpej-cfargs:1.2.0.32 thorpej-cfargs-base:1.2 thorpej-futex:1.2.0.30 thorpej-futex-base:1.2 netbsd-9-1-RELEASE:1.2 bouyer-xenpvh-base2:1.2 phil-wifi-20200421:1.2 bouyer-xenpvh-base1:1.2 phil-wifi-20200411:1.2 bouyer-xenpvh:1.2.0.28 bouyer-xenpvh-base:1.2 is-mlppp:1.2.0.26 is-mlppp-base:1.2 phil-wifi-20200406:1.2 netbsd-8-2-RELEASE:1.2 ad-namecache-base3:1.2 netbsd-9-0-RELEASE:1.2 netbsd-9-0-RC2:1.2 ad-namecache-base2:1.2 ad-namecache-base1:1.2 ad-namecache:1.2.0.24 ad-namecache-base:1.2 netbsd-9-0-RC1:1.2 phil-wifi-20191119:1.2 netbsd-9:1.2.0.22 netbsd-9-base:1.2 phil-wifi-20190609:1.2 netbsd-8-1-RELEASE:1.2 netbsd-8-1-RC1:1.2 isaki-audio2:1.2.0.20 isaki-audio2-base:1.2 pgoyette-compat-merge-20190127:1.2 pgoyette-compat-20190127:1.2 pgoyette-compat-20190118:1.2 pgoyette-compat-1226:1.2 pgoyette-compat-1126:1.2 pgoyette-compat-1020:1.2 pgoyette-compat-0930:1.2 pgoyette-compat-0906:1.2 jdolecek-ncqfixes:1.2.0.18 jdolecek-ncqfixes-base:1.2 netbsd-7-2-RELEASE:1.1 pgoyette-compat-0728:1.2 netbsd-8-0-RELEASE:1.2 phil-wifi:1.2.0.16 phil-wifi-base:1.2 pgoyette-compat-0625:1.2 netbsd-8-0-RC2:1.2 pgoyette-compat-0521:1.2 pgoyette-compat-0502:1.2 pgoyette-compat-0422:1.2 netbsd-8-0-RC1:1.2 pgoyette-compat-0415:1.2 pgoyette-compat-0407:1.2 pgoyette-compat-0330:1.2 pgoyette-compat-0322:1.2 pgoyette-compat-0315:1.2 netbsd-7-1-2-RELEASE:1.1 pgoyette-compat:1.2.0.14 pgoyette-compat-base:1.2 netbsd-7-1-1-RELEASE:1.1 tls-maxphys-base-20171202:1.2 matt-nb8-mediatek:1.2.0.12 matt-nb8-mediatek-base:1.2 nick-nhusb-base-20170825:1.2 perseant-stdc-iso10646:1.2.0.10 perseant-stdc-iso10646-base:1.2 netbsd-8:1.2.0.8 netbsd-8-base:1.2 prg-localcount2-base3:1.2 prg-localcount2-base2:1.2 prg-localcount2-base1:1.2 prg-localcount2:1.2.0.6 prg-localcount2-base:1.2 pgoyette-localcount-20170426:1.2 bouyer-socketcan-base1:1.2 jdolecek-ncq:1.2.0.4 jdolecek-ncq-base:1.2 pgoyette-localcount-20170320:1.2 netbsd-7-1:1.1.0.46 netbsd-7-1-RELEASE:1.1 netbsd-7-1-RC2:1.1 nick-nhusb-base-20170204:1.2 netbsd-7-nhusb-base-20170116:1.1 bouyer-socketcan:1.2.0.2 bouyer-socketcan-base:1.2 pgoyette-localcount-20170107:1.2 netbsd-7-1-RC1:1.1 nick-nhusb-base-20161204:1.2 pgoyette-localcount-20161104:1.2 netbsd-7-0-2-RELEASE:1.1 nick-nhusb-base-20161004:1.1 localcount-20160914:1.1 netbsd-7-nhusb:1.1.0.44 netbsd-7-nhusb-base:1.1 pgoyette-localcount-20160806:1.1 pgoyette-localcount-20160726:1.1 pgoyette-localcount:1.1.0.42 pgoyette-localcount-base:1.1 nick-nhusb-base-20160907:1.1 nick-nhusb-base-20160529:1.1 netbsd-7-0-1-RELEASE:1.1 nick-nhusb-base-20160422:1.1 nick-nhusb-base-20160319:1.1 nick-nhusb-base-20151226:1.1 netbsd-7-0:1.1.0.40 netbsd-7-0-RELEASE:1.1 nick-nhusb-base-20150921:1.1 netbsd-7-0-RC3:1.1 netbsd-7-0-RC2:1.1 netbsd-7-0-RC1:1.1 nick-nhusb-base-20150606:1.1 nick-nhusb-base-20150406:1.1 nick-nhusb:1.1.0.38 nick-nhusb-base:1.1 netbsd-6-0-6-RELEASE:1.1 netbsd-6-1-5-RELEASE:1.1 netbsd-7:1.1.0.36 netbsd-7-base:1.1 yamt-pagecache-base9:1.1 yamt-pagecache-tag8:1.1 netbsd-6-1-4-RELEASE:1.1 netbsd-6-0-5-RELEASE:1.1 tls-earlyentropy:1.1.0.34 tls-earlyentropy-base:1.1 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1 riastradh-drm2-base3:1.1 netbsd-6-1-3-RELEASE:1.1 netbsd-6-0-4-RELEASE:1.1 netbsd-6-1-2-RELEASE:1.1 netbsd-6-0-3-RELEASE:1.1 rmind-smpnet-nbase:1.1 netbsd-6-1-1-RELEASE:1.1 riastradh-drm2-base2:1.1 riastradh-drm2-base1:1.1 riastradh-drm2:1.1.0.32 riastradh-drm2-base:1.1 rmind-smpnet:1.1.0.24 rmind-smpnet-base:1.1 netbsd-6-1:1.1.0.30 netbsd-6-0-2-RELEASE:1.1 netbsd-6-1-RELEASE:1.1 khorben-n900:1.1.0.28 netbsd-6-1-RC4:1.1 netbsd-6-1-RC3:1.1 agc-symver:1.1.0.26 agc-symver-base:1.1 netbsd-6-1-RC2:1.1 netbsd-6-1-RC1:1.1 yamt-pagecache-base8:1.1 netbsd-6-0-1-RELEASE:1.1 yamt-pagecache-base7:1.1 matt-nb6-plus-nbase:1.1 yamt-pagecache-base6:1.1 netbsd-6-0:1.1.0.22 netbsd-6-0-RELEASE:1.1 netbsd-6-0-RC2:1.1 tls-maxphys:1.1.0.20 tls-maxphys-base:1.1 matt-nb6-plus:1.1.0.18 matt-nb6-plus-base:1.1 netbsd-6-0-RC1:1.1 jmcneill-usbmp-base10:1.1 yamt-pagecache-base5:1.1 jmcneill-usbmp-base9:1.1 yamt-pagecache-base4:1.1 jmcneill-usbmp-base8:1.1 jmcneill-usbmp-base7:1.1 jmcneill-usbmp-base6:1.1 jmcneill-usbmp-base5:1.1 jmcneill-usbmp-base4:1.1 jmcneill-usbmp-base3:1.1 jmcneill-usbmp-pre-base2:1.1 jmcneill-usbmp-base2:1.1 netbsd-6:1.1.0.16 netbsd-6-base:1.1 jmcneill-usbmp:1.1.0.14 jmcneill-usbmp-base:1.1 jmcneill-audiomp3:1.1.0.12 jmcneill-audiomp3-base:1.1 yamt-pagecache-base3:1.1 yamt-pagecache-base2:1.1 yamt-pagecache:1.1.0.10 yamt-pagecache-base:1.1 rmind-uvmplock-nbase:1.1 jruoho-x86intr:1.1.0.8 cherry-xenmp:1.1.0.6 cherry-xenmp-base:1.1 bouyer-quota2:1.1.0.4 rmind-uvmplock-base:1.1 rmind-uvmplock:1.1.0.2 bouyer-quota2-base:1.1 bouyer-quota2-nbase:1.1; locks; strict; comment @# @; 1.2 date 2016.10.26.13.47.05; author christos; state Exp; branches; next 1.1; commitid Eoovhu4mFgk7VErz; 1.1 date 2011.02.06.18.26.54; author tsutsui; state Exp; branches 1.1.2.1 1.1.4.1 1.1.8.1 1.1.20.1 1.1.38.1 1.1.42.1; next ; 1.1.2.1 date 2011.02.06.18.26.54; author rmind; state dead; branches; next 1.1.2.2; 1.1.2.2 date 2011.03.05.20.53.09; author rmind; state Exp; branches; next ; 1.1.4.1 date 2011.02.06.18.26.54; author bouyer; state dead; branches; next 1.1.4.2; 1.1.4.2 date 2011.03.06.15.07.56; author bouyer; state Exp; branches; next ; 1.1.8.1 date 2011.02.06.18.26.54; author jruoho; state dead; branches; next 1.1.8.2; 1.1.8.2 date 2011.06.06.09.07.49; author jruoho; state Exp; branches; next ; 1.1.20.1 date 2017.12.03.11.37.02; author jdolecek; state Exp; branches; next ; commitid XcIYRZTAh1LmerhA; 1.1.38.1 date 2016.12.05.10.55.01; author skrll; state Exp; branches; next ; commitid 4H3tiQVJXN6oEMwz; 1.1.42.1 date 2016.11.04.14.49.08; author pgoyette; state Exp; branches; next ; commitid 2m1JRwYmpwPkOOsz; desc @@ 1.2 log @don't escape the unescapable @ text @#! /usr/bin/awk -f # $NetBSD: devlist2h.awk,v 1.1 2011/02/06 18:26:54 tsutsui Exp $ # $OpenBSD: devlist2h.awk,v 1.4 2006/08/10 23:44:16 miod Exp $ # # Copyright (c) 2003, Miodrag Vallat. # 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. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. # BEGIN { header = 0 } NR == 1 { VERSION = $0 gsub("\\$", "", VERSION) printf("/*\t$NetBSD%s\t*/\n\n", "$") printf("/*\n") printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") printf(" *\n") printf(" * generated from:\n") printf(" *\t%s\n", VERSION) printf(" */\n") next } $1 == "keyboard" || $1 == "mouse" || $1 == "idmodule" || $1 == "buttonbox" { if (header == 0) { printf("const struct hildevice hildevs[] = {\n") header = 1 } printf("\t{ 0x%s, 0x%s, HIL_DEVICE_%s, \"", $2, $3, toupper($1)) # description, with optional ``#''-prefixed comments comment = 0 i = 4 f = i while (f <= NF) { if ($f == "#") { comment = 1 printf ("\" },\t/*") } else { if (f > i) printf(" ") printf("%s", $f) } f++ } if (comment) printf(" */\n"); else printf("\" },\n") next } { if ($0 == "") blanklines++ if (blanklines < 2) print $0 } END { printf("\t{ -1, -1, -1, NULL }\n") printf("};\n") } @ 1.1 log @Switch NetBSD/hp300 to wscons with rasops. Simply ported from OpenBSD/hp300. - Only A1416 Kathmandu (topcat) framebuffer on 425t is tested, but all other variants (TigerShark, Hyperion, DaVinci, GatorBox, Renaissance) should also work if they are working on OpenBSD/hp300. - sti(4) and SGC bus support are not pulled because I don't have 425e and I can't confirm that 362 and 382 actually have SGC bus. (I'll commit a DIO based dumb driver for 362 and 382 framebuffers later) - Xorg server with wsfb driver will also be integrated soon once after keycode with NoSymbol problem is addressed. (We have to re-think what code should be used on WSDISPLAY_COMPAT_RAWKBD) - MI HIL keyboard and mouse drivers are working fine though cngetc via hilkbd has some problem (still we can input commands). - No old HP-UX like HIL ioctl compatibility (we removed COMPAT_HPUX anyway). grfinfo(8) and hilinfo(8) will be removed shortly. Demonstrated on NetBSD booth at Open Source Conference 2011 Kagawa. @ text @d2 1 a2 1 # $NetBSD$ d35 1 a35 1 printf("/*\t\$NetBSD\$\t*/\n\n") @ 1.1.20.1 log @update from HEAD @ text @d35 1 a35 1 printf("/*\t$NetBSD%s\t*/\n\n", "$") @ 1.1.38.1 log @Sync with HEAD @ text @d2 1 a2 1 # $NetBSD: devlist2h.awk,v 1.2 2016/10/26 13:47:05 christos Exp $ d35 1 a35 1 printf("/*\t$NetBSD%s\t*/\n\n", "$") @ 1.1.42.1 log @Sync with HEAD @ text @d2 1 a2 1 # $NetBSD: devlist2h.awk,v 1.2 2016/10/26 13:47:05 christos Exp $ d35 1 a35 1 printf("/*\t$NetBSD%s\t*/\n\n", "$") @ 1.1.8.1 log @file devlist2h.awk was added on branch jruoho-x86intr on 2011-06-06 09:07:49 +0000 @ text @d1 86 @ 1.1.8.2 log @Sync with HEAD. @ text @a0 86 #! /usr/bin/awk -f # $NetBSD: devlist2h.awk,v 1.1 2011/02/06 18:26:54 tsutsui Exp $ # $OpenBSD: devlist2h.awk,v 1.4 2006/08/10 23:44:16 miod Exp $ # # Copyright (c) 2003, Miodrag Vallat. # 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. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. # BEGIN { header = 0 } NR == 1 { VERSION = $0 gsub("\\$", "", VERSION) printf("/*\t\$NetBSD\$\t*/\n\n") printf("/*\n") printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") printf(" *\n") printf(" * generated from:\n") printf(" *\t%s\n", VERSION) printf(" */\n") next } $1 == "keyboard" || $1 == "mouse" || $1 == "idmodule" || $1 == "buttonbox" { if (header == 0) { printf("const struct hildevice hildevs[] = {\n") header = 1 } printf("\t{ 0x%s, 0x%s, HIL_DEVICE_%s, \"", $2, $3, toupper($1)) # description, with optional ``#''-prefixed comments comment = 0 i = 4 f = i while (f <= NF) { if ($f == "#") { comment = 1 printf ("\" },\t/*") } else { if (f > i) printf(" ") printf("%s", $f) } f++ } if (comment) printf(" */\n"); else printf("\" },\n") next } { if ($0 == "") blanklines++ if (blanklines < 2) print $0 } END { printf("\t{ -1, -1, -1, NULL }\n") printf("};\n") } @ 1.1.4.1 log @file devlist2h.awk was added on branch bouyer-quota2 on 2011-03-06 15:07:56 +0000 @ text @d1 86 @ 1.1.4.2 log @Sync with HEAD @ text @a0 86 #! /usr/bin/awk -f # $NetBSD: devlist2h.awk,v 1.1 2011/02/06 18:26:54 tsutsui Exp $ # $OpenBSD: devlist2h.awk,v 1.4 2006/08/10 23:44:16 miod Exp $ # # Copyright (c) 2003, Miodrag Vallat. # 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. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. # BEGIN { header = 0 } NR == 1 { VERSION = $0 gsub("\\$", "", VERSION) printf("/*\t\$NetBSD\$\t*/\n\n") printf("/*\n") printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") printf(" *\n") printf(" * generated from:\n") printf(" *\t%s\n", VERSION) printf(" */\n") next } $1 == "keyboard" || $1 == "mouse" || $1 == "idmodule" || $1 == "buttonbox" { if (header == 0) { printf("const struct hildevice hildevs[] = {\n") header = 1 } printf("\t{ 0x%s, 0x%s, HIL_DEVICE_%s, \"", $2, $3, toupper($1)) # description, with optional ``#''-prefixed comments comment = 0 i = 4 f = i while (f <= NF) { if ($f == "#") { comment = 1 printf ("\" },\t/*") } else { if (f > i) printf(" ") printf("%s", $f) } f++ } if (comment) printf(" */\n"); else printf("\" },\n") next } { if ($0 == "") blanklines++ if (blanklines < 2) print $0 } END { printf("\t{ -1, -1, -1, NULL }\n") printf("};\n") } @ 1.1.2.1 log @file devlist2h.awk was added on branch rmind-uvmplock on 2011-03-05 20:53:09 +0000 @ text @d1 86 @ 1.1.2.2 log @sync with head @ text @a0 86 #! /usr/bin/awk -f # $NetBSD$ # $OpenBSD: devlist2h.awk,v 1.4 2006/08/10 23:44:16 miod Exp $ # # Copyright (c) 2003, Miodrag Vallat. # 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. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. # BEGIN { header = 0 } NR == 1 { VERSION = $0 gsub("\\$", "", VERSION) printf("/*\t\$NetBSD\$\t*/\n\n") printf("/*\n") printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") printf(" *\n") printf(" * generated from:\n") printf(" *\t%s\n", VERSION) printf(" */\n") next } $1 == "keyboard" || $1 == "mouse" || $1 == "idmodule" || $1 == "buttonbox" { if (header == 0) { printf("const struct hildevice hildevs[] = {\n") header = 1 } printf("\t{ 0x%s, 0x%s, HIL_DEVICE_%s, \"", $2, $3, toupper($1)) # description, with optional ``#''-prefixed comments comment = 0 i = 4 f = i while (f <= NF) { if ($f == "#") { comment = 1 printf ("\" },\t/*") } else { if (f > i) printf(" ") printf("%s", $f) } f++ } if (comment) printf(" */\n"); else printf("\" },\n") next } { if ($0 == "") blanklines++ if (blanklines < 2) print $0 } END { printf("\t{ -1, -1, -1, NULL }\n") printf("};\n") } @