From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 12 02:40:27 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55F5516A4FC for ; Sun, 12 Sep 2004 02:40:27 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21E3A43D54 for ; Sun, 12 Sep 2004 02:40:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8C2eRDR087043 for ; Sun, 12 Sep 2004 02:40:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8C2eRWK087042; Sun, 12 Sep 2004 02:40:27 GMT (envelope-from gnats) Resent-Date: Sun, 12 Sep 2004 02:40:27 GMT Resent-Message-Id: <200409120240.i8C2eRWK087042@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Lukes Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD04416A4CE for ; Sun, 12 Sep 2004 02:38:12 +0000 (GMT) Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D90943D2D for ; Sun, 12 Sep 2004 02:37:59 +0000 (GMT) (envelope-from dan@obluda.cz) Received: from kulesh.obluda.cz (localhost.eunet.cz [127.0.0.1]) by kulesh.obluda.cz (8.13.1/8.13.1) with ESMTP id i8C2bvNU007107 for ; Sun, 12 Sep 2004 04:37:58 +0200 (CEST) (envelope-from dan@obluda.cz) Received: (from root@localhost) by kulesh.obluda.cz (8.13.1/8.13.1/Submit) id i8C2bvcL007106 for FreeBSD-gnats-submit@freebsd.org; Sun, 12 Sep 2004 04:37:57 +0200 (CEST) (envelope-from dan@obluda.cz) Message-Id: <200409120237.i8C2bvcL007106@kulesh.obluda.cz> Date: Sun, 12 Sep 2004 04:37:57 +0200 (CEST) From: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/71623: [PATCH] cleanup of the usr.sbin/pcvt code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dan Lukes List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2004 02:40:27 -0000 >Number: 71623 >Category: bin >Synopsis: [PATCH] cleanup of the usr.sbin/pcvt code >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 12 02:40:26 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 5.3-BETA3 i386 >Organization: Obludarium >Environment: System: FreeBSD kulesh.obluda.cz 5.3-BETA3 FreeBSD 5.3-BETA3 #8: Sun Sep 5 07:06:40 CEST 2004 dan@kulesh.obluda.cz:/usr/obj/usr/src/sys/Dan i386 usr.sbin/pcvt/cursor/cursor.c,v 1.10 2001/01/19 23:11:18 kris usr.sbin/pcvt/demo/playvt.c,v 1.6 2001/03/01 06:22:43 imp usr.sbin/pcvt/fontedit/fontedit.c,v 1.6 2002/05/28 21:52:10 alfred usr.sbin/pcvt/ispcvt/ispcvt.c,v 1.11 2001/03/01 06:22:44 imp usr.sbin/pcvt/kbdio/lex.l,v 1.6 1999/09/06 07:39:30 peter usr.sbin/pcvt/kbdio/kbdio.y,v 1.7 2002/09/17 17:59:50 mike usr.sbin/pcvt/kcon/kcon.c,v 1.7 2001/03/01 06:22:44 imp usr.sbin/pcvt/keycap/keycap.c,v 1.5 2001/07/26 11:02:37 sheldonh usr.sbin/pcvt/loadfont/loadfont.c,v 1.9 2001/03/01 06:22:45 imp usr.sbin/pcvt/scon/scon.c,v 1.8 2001/03/01 06:22:46 imp usr.sbin/pcvt/userkeys/vt220keys.c,v 1.8 2002/04/22 13:44:45 des usr.sbin/pcvt/vgaio/vgaio.y,v 1.6 2002/09/17 17:59:51 mike usr.sbin/pcvt/vgaio/lex.l,v 1.5 1999/09/06 07:39:30 peter usr.sbin/pcvt/vttest/header.h,v 1.5 2001/07/27 04:40:04 brooks usr.sbin/pcvt/vttest/main.c,v 1.7 2003/04/29 19:53:00 kan usr.sbin/pcvt/vttest/esc.c,v 1.6 2001/07/27 04:40:04 brooks >Description: There are more than 5000 warnings issued during "make buildworld". Some of them are false positives, but some of them are sign of true errors. Nobody is upset by warnings due it's amount, so some errors remain uncorrected. I want to cleanup the code-base from warnings, so warnings will become "attention mark" again. usr.sbin/pcvt/keycap/keycap.c:96: warning: type defaults to `int' in declaration of `n' usr.sbin/pcvt/keycap/keycap.c:96: warning: implicit declaration of function `strlen' usr.sbin/pcvt/keycap/keycap.c:99: warning: implicit declaration of function `strncmp' usr.sbin/pcvt/keycap/keycap.c:100: warning: suggest parentheses around && within || usr.sbin/pcvt/keycap/keycap.c:110: warning: return type defaults to `int' usr.sbin/pcvt/keycap/keycap.c:122: warning: implicit declaration of function `open' usr.sbin/pcvt/keycap/keycap.c:116: warning: unused variable `cp2' usr.sbin/pcvt/keycap/keycap.c:186: warning: implicit declaration of function `strcpy' usr.sbin/pcvt/keycap/keycap.c:43: warning: 'id' defined but not used usr.sbin/pcvt/keycap/keycap.c:82: warning: 'pfp' defined but not used usr.sbin/pcvt/cursor/cursor.c:58: warning: return type defaults to `int' usr.sbin/pcvt/cursor/cursor.c:80: warning: implicit declaration of function `atoi' usr.sbin/pcvt/cursor/cursor.c:93: warning: implicit declaration of function `usage' usr.sbin/pcvt/cursor/cursor.c:124: warning: implicit declaration of function `exit' usr.sbin/pcvt/cursor/cursor.c:128: warning: return type defaults to `int' usr.sbin/pcvt/cursor/cursor.c:68: warning: 'device' might be used uninitialized in this function usr.sbin/pcvt/cursor/cursor.c:36: warning: 'id' defined but not used usr.sbin/pcvt/fontedit/fontedit.c:123: warning: return type defaults to `int' usr.sbin/pcvt/fontedit/fontedit.c:138: warning: implicit declaration of function `exit' usr.sbin/pcvt/fontedit/fontedit.c:148: warning: return type defaults to `int' usr.sbin/pcvt/fontedit/fontedit.c:162: warning: implicit declaration of function `sleep' usr.sbin/pcvt/fontedit/fontedit.c:265: warning: implicit declaration of function `get_key' usr.sbin/pcvt/fontedit/fontedit.c:269: warning: implicit declaration of function `move' usr.sbin/pcvt/fontedit/fontedit.c:490: warning: implicit declaration of function `strcmp' usr.sbin/pcvt/fontedit/fontedit.c:506: warning: return type defaults to `int' usr.sbin/pcvt/fontedit/fontedit.c:673: warning: return type defaults to `int' usr.sbin/pcvt/fontedit/fontedit.c:859: warning: implicit declaration of function `strncmp' usr.sbin/pcvt/fontedit/fontedit.c:676: warning: control reaches end of non-void function usr.sbin/pcvt/fontedit/fontedit.c:512: warning: control reaches end of non-void function usr.sbin/pcvt/fontedit/fontedit.c:235: warning: control reaches end of non-void function usr.sbin/pcvt/kcon/kcon.c:76: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:98: warning: implicit declaration of function `atoi' usr.sbin/pcvt/kcon/kcon.c:147: warning: implicit declaration of function `usage' usr.sbin/pcvt/kcon/kcon.c:157: warning: implicit declaration of function `open' usr.sbin/pcvt/kcon/kcon.c:160: warning: implicit declaration of function `exit' usr.sbin/pcvt/kcon/kcon.c:165: warning: implicit declaration of function `showtypeamatic' usr.sbin/pcvt/kcon/kcon.c:171: warning: implicit declaration of function `listcurrent' usr.sbin/pcvt/kcon/kcon.c:185: warning: implicit declaration of function `setrepeat' usr.sbin/pcvt/kcon/kcon.c:200: warning: implicit declaration of function `settypeam' usr.sbin/pcvt/kcon/kcon.c:205: warning: implicit declaration of function `remapkeys' usr.sbin/pcvt/kcon/kcon.c:216: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:246: warning: comparison is always true due to limited range of data type usr.sbin/pcvt/kcon/kcon.c:257: warning: `0' flag ignored with precision and `%o' printf format usr.sbin/pcvt/kcon/kcon.c:261: warning: `0' flag ignored with precision and `%X' printf format usr.sbin/pcvt/kcon/kcon.c:272: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:385: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:450: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:471: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:507: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:541: warning: `return' with no value, in function returning non-void usr.sbin/pcvt/kcon/kcon.c:546: warning: implicit declaration of function `set_lock' usr.sbin/pcvt/kcon/kcon.c:548: warning: implicit declaration of function `set_shift' usr.sbin/pcvt/kcon/kcon.c:550: warning: implicit declaration of function `set_char' usr.sbin/pcvt/kcon/kcon.c:557: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:569: warning: missing braces around initializer usr.sbin/pcvt/kcon/kcon.c:569: warning: (near initialization for `lock[0]') usr.sbin/pcvt/kcon/kcon.c:560: warning: unused variable `j' usr.sbin/pcvt/kcon/kcon.c:609: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:621: warning: missing braces around initializer usr.sbin/pcvt/kcon/kcon.c:621: warning: (near initialization for `shift[0]') usr.sbin/pcvt/kcon/kcon.c:662: warning: return type defaults to `int' usr.sbin/pcvt/kcon/kcon.c:676: warning: missing braces around initializer usr.sbin/pcvt/kcon/kcon.c:676: warning: (near initialization for `standard[0]') usr.sbin/pcvt/kcon/kcon.c:713: warning: suggest parentheses around assignment used as truth value usr.sbin/pcvt/kcon/kcon.c:465: warning: control reaches end of non-void function usr.sbin/pcvt/kcon/kcon.c:501: warning: control reaches end of non-void function usr.sbin/pcvt/kcon/kcon.c:444: warning: control reaches end of non-void function usr.sbin/pcvt/kcon/kcon.c:379: warning: control reaches end of non-void function usr.sbin/pcvt/kcon/kcon.c:656: warning: control reaches end of non-void function usr.sbin/pcvt/kcon/kcon.c:603: warning: control reaches end of non-void function usr.sbin/pcvt/kcon/kcon.c:741: warning: control reaches end of non-void function usr.sbin/pcvt/kcon/kcon.c:551: warning: control reaches end of non-void function usr.sbin/pcvt/kcon/kcon.c:85: warning: 'map' might be used uninitialized in this function usr.sbin/pcvt/loadfont/loadfont.c:77: warning: return type defaults to `int' usr.sbin/pcvt/loadfont/loadfont.c:100: warning: implicit declaration of function `atoi' usr.sbin/pcvt/loadfont/loadfont.c:119: warning: implicit declaration of function `usage' usr.sbin/pcvt/loadfont/loadfont.c:152: warning: implicit declaration of function `printheader' usr.sbin/pcvt/loadfont/loadfont.c:155: warning: implicit declaration of function `printvgafontattr' usr.sbin/pcvt/loadfont/loadfont.c:166: warning: implicit declaration of function `exit' usr.sbin/pcvt/loadfont/loadfont.c:207: warning: int format, different type arg (arg 4) usr.sbin/pcvt/loadfont/loadfont.c:210: warning: implicit declaration of function `malloc' usr.sbin/pcvt/loadfont/loadfont.c:215: warning: int format, different type arg (arg 4) usr.sbin/pcvt/loadfont/loadfont.c:217: warning: implicit declaration of function `loadfont' usr.sbin/pcvt/loadfont/loadfont.c:218: warning: implicit declaration of function `setfont' usr.sbin/pcvt/loadfont/loadfont.c:224: warning: return type defaults to `int' usr.sbin/pcvt/loadfont/loadfont.c:239: warning: return type defaults to `int' usr.sbin/pcvt/loadfont/loadfont.c:263: warning: return type defaults to `int' usr.sbin/pcvt/loadfont/loadfont.c:291: warning: return type defaults to `int' usr.sbin/pcvt/loadfont/loadfont.c:298: warning: return type defaults to `int' usr.sbin/pcvt/loadfont/loadfont.c:295: warning: control reaches end of non-void function usr.sbin/pcvt/loadfont/loadfont.c:288: warning: control reaches end of non-void function usr.sbin/pcvt/loadfont/loadfont.c:260: warning: control reaches end of non-void function usr.sbin/pcvt/loadfont/loadfont.c:236: warning: control reaches end of non-void function usr.sbin/pcvt/loadfont/loadfont.c:89: warning: 'filename' might be used uninitialized in this function usr.sbin/pcvt/loadfont/loadfont.c:93: warning: 'device' might be used uninitialized in this function usr.sbin/pcvt/scon/scon.c:173: warning: return type defaults to `int' usr.sbin/pcvt/scon/scon.c:196: warning: implicit declaration of function `atoi' usr.sbin/pcvt/scon/scon.c:218: warning: implicit declaration of function `strncmp' usr.sbin/pcvt/scon/scon.c:237: warning: implicit declaration of function `strcmp' usr.sbin/pcvt/scon/scon.c:279: warning: implicit declaration of function `usage' usr.sbin/pcvt/scon/scon.c:310: warning: implicit declaration of function `printadaptor' usr.sbin/pcvt/scon/scon.c:311: warning: implicit declaration of function `exit' usr.sbin/pcvt/scon/scon.c:316: warning: implicit declaration of function `printmonitor' usr.sbin/pcvt/scon/scon.c:324: warning: implicit declaration of function `printinfo' usr.sbin/pcvt/scon/scon.c:472: warning: return type defaults to `int' usr.sbin/pcvt/scon/scon.c:498: warning: return type defaults to `int' usr.sbin/pcvt/scon/scon.c:528: warning: return type defaults to `int' usr.sbin/pcvt/scon/scon.c:605: warning: return type defaults to `int' usr.sbin/pcvt/scon/scon.c:752: warning: suggest parentheses around assignment used as truth value usr.sbin/pcvt/scon/scon.c:768: warning: implicit declaration of function `strlen' usr.sbin/pcvt/scon/scon.c:772: warning: implicit declaration of function `strtoul' usr.sbin/pcvt/scon/scon.c:777: warning: implicit declaration of function `strcasecmp' usr.sbin/pcvt/scon/scon.c:546: warning: control reaches end of non-void function usr.sbin/pcvt/scon/scon.c:525: warning: control reaches end of non-void function usr.sbin/pcvt/scon/scon.c:705: warning: control reaches end of non-void function usr.sbin/pcvt/userkeys/vt220keys.c:53: warning: missing braces around initializer usr.sbin/pcvt/userkeys/vt220keys.c:53: warning: (near initialization for `keys[0]') usr.sbin/pcvt/userkeys/vt220keys.c:77: warning: return type defaults to `int' usr.sbin/pcvt/userkeys/vt220keys.c:87: warning: implicit declaration of function `usage' usr.sbin/pcvt/userkeys/vt220keys.c:111: warning: implicit declaration of function `clearkeys' usr.sbin/pcvt/userkeys/vt220keys.c:113: warning: implicit declaration of function `getinit' usr.sbin/pcvt/userkeys/vt220keys.c:121: warning: implicit declaration of function `dokey' usr.sbin/pcvt/userkeys/vt220keys.c:125: warning: implicit declaration of function `lockkeys' usr.sbin/pcvt/userkeys/vt220keys.c:144: warning: return type defaults to `int' usr.sbin/pcvt/userkeys/vt220keys.c:149: warning: suggest parentheses around assignment used as truth value usr.sbin/pcvt/userkeys/vt220keys.c:157: warning: `return' with no value, in function returning non-void usr.sbin/pcvt/userkeys/vt220keys.c:166: warning: return type defaults to `int' usr.sbin/pcvt/userkeys/vt220keys.c:174: warning: return type defaults to `int' usr.sbin/pcvt/userkeys/vt220keys.c:182: warning: return type defaults to `int' usr.sbin/pcvt/userkeys/vt220keys.c:222: warning: return type defaults to `int' usr.sbin/pcvt/userkeys/vt220keys.c:177: warning: control reaches end of non-void function usr.sbin/pcvt/userkeys/vt220keys.c:169: warning: control reaches end of non-void function usr.sbin/pcvt/userkeys/vt220keys.c:161: warning: control reaches end of non-void function usr.sbin/pcvt/userkeys/vt220keys.c:287: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/header.h:40: warning: type defaults to `int' in declaration of `onterm' usr.sbin/pcvt/vttest/header.h:40: warning: type defaults to `int' in declaration of `onbrk' usr.sbin/pcvt/vttest/main.c:75: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:95: warning: implicit declaration of function `initterminal' usr.sbin/pcvt/vttest/main.c:106: warning: implicit declaration of function `ed' usr.sbin/pcvt/vttest/main.c:107: warning: implicit declaration of function `cup' usr.sbin/pcvt/vttest/main.c:108: warning: implicit declaration of function `println' usr.sbin/pcvt/vttest/main.c:109: warning: implicit declaration of function `menu' usr.sbin/pcvt/vttest/main.c:111: warning: implicit declaration of function `tst_movements' usr.sbin/pcvt/vttest/main.c:112: warning: implicit declaration of function `tst_screen' usr.sbin/pcvt/vttest/main.c:113: warning: implicit declaration of function `tst_characters' usr.sbin/pcvt/vttest/main.c:114: warning: implicit declaration of function `tst_doublesize' usr.sbin/pcvt/vttest/main.c:115: warning: implicit declaration of function `tst_keyboard' usr.sbin/pcvt/vttest/main.c:116: warning: implicit declaration of function `tst_reports' usr.sbin/pcvt/vttest/main.c:117: warning: implicit declaration of function `tst_vt52' usr.sbin/pcvt/vttest/main.c:118: warning: implicit declaration of function `tst_insdel' usr.sbin/pcvt/vttest/main.c:119: warning: implicit declaration of function `tst_bugs' usr.sbin/pcvt/vttest/main.c:120: warning: implicit declaration of function `tst_rst' usr.sbin/pcvt/vttest/main.c:123: warning: implicit declaration of function `bye' usr.sbin/pcvt/vttest/main.c:126: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:145: warning: implicit declaration of function `rm' usr.sbin/pcvt/vttest/main.c:146: warning: implicit declaration of function `sm' usr.sbin/pcvt/vttest/main.c:148: warning: implicit declaration of function `decaln' usr.sbin/pcvt/vttest/main.c:150: warning: implicit declaration of function `el' usr.sbin/pcvt/vttest/main.c:158: warning: implicit declaration of function `hvp' usr.sbin/pcvt/vttest/main.c:164: warning: implicit declaration of function `cub' usr.sbin/pcvt/vttest/main.c:165: warning: implicit declaration of function `ind' usr.sbin/pcvt/vttest/main.c:170: warning: implicit declaration of function `ri' usr.sbin/pcvt/vttest/main.c:179: warning: implicit declaration of function `nel' usr.sbin/pcvt/vttest/main.c:184: warning: implicit declaration of function `cuf' usr.sbin/pcvt/vttest/main.c:195: warning: implicit declaration of function `cuu' usr.sbin/pcvt/vttest/main.c:196: warning: implicit declaration of function `cud' usr.sbin/pcvt/vttest/main.c:211: warning: implicit declaration of function `holdit' usr.sbin/pcvt/vttest/main.c:223: warning: implicit declaration of function `brcstr' usr.sbin/pcvt/vttest/main.c:142: warning: unused variable `c' usr.sbin/pcvt/vttest/main.c:239: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:274: warning: implicit declaration of function `tbc' usr.sbin/pcvt/vttest/main.c:277: warning: implicit declaration of function `hts' usr.sbin/pcvt/vttest/main.c:324: warning: implicit declaration of function `decstbm' usr.sbin/pcvt/vttest/main.c:360: warning: implicit declaration of function `sgr' usr.sbin/pcvt/vttest/main.c:397: warning: implicit declaration of function `scs' usr.sbin/pcvt/vttest/main.c:402: warning: implicit declaration of function `decsc' usr.sbin/pcvt/vttest/main.c:404: warning: implicit declaration of function `decrc' usr.sbin/pcvt/vttest/main.c:417: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:459: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:483: warning: implicit declaration of function `decdhl' usr.sbin/pcvt/vttest/main.c:483: warning: implicit declaration of function `decdwl' usr.sbin/pcvt/vttest/main.c:483: warning: implicit declaration of function `decswl' usr.sbin/pcvt/vttest/main.c:552: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:831: warning: implicit declaration of function `decll' usr.sbin/pcvt/vttest/main.c:843: warning: implicit declaration of function `inputline' usr.sbin/pcvt/vttest/main.c:844: warning: implicit declaration of function `strlen' usr.sbin/pcvt/vttest/main.c:889: warning: implicit declaration of function `inflush' usr.sbin/pcvt/vttest/main.c:895: warning: implicit declaration of function `chrprint' usr.sbin/pcvt/vttest/main.c:925: warning: implicit declaration of function `esc' usr.sbin/pcvt/vttest/main.c:928: warning: implicit declaration of function `strcmp' usr.sbin/pcvt/vttest/main.c:961: warning: implicit declaration of function `deckpam' usr.sbin/pcvt/vttest/main.c:962: warning: implicit declaration of function `deckpnm' usr.sbin/pcvt/vttest/main.c:1042: warning: implicit declaration of function `ttybin' usr.sbin/pcvt/vttest/main.c:1050: warning: array subscript has type `char' usr.sbin/pcvt/vttest/main.c:1056: warning: array subscript has type `char' usr.sbin/pcvt/vttest/main.c:1057: warning: array subscript has type `char' usr.sbin/pcvt/vttest/main.c:1059: warning: array subscript has type `char' usr.sbin/pcvt/vttest/main.c:1085: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1176: warning: implicit declaration of function `dsr' usr.sbin/pcvt/vttest/main.c:1201: warning: implicit declaration of function `da' usr.sbin/pcvt/vttest/main.c:1226: warning: implicit declaration of function `decreqtparm' usr.sbin/pcvt/vttest/main.c:1240: warning: implicit declaration of function `scanto' usr.sbin/pcvt/vttest/main.c:1282: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1308: warning: implicit declaration of function `vt52cup' usr.sbin/pcvt/vttest/main.c:1407: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1436: warning: implicit declaration of function `il' usr.sbin/pcvt/vttest/main.c:1437: warning: implicit declaration of function `dl' usr.sbin/pcvt/vttest/main.c:1457: warning: implicit declaration of function `dch' usr.sbin/pcvt/vttest/main.c:1486: warning: implicit declaration of function `ich' usr.sbin/pcvt/vttest/main.c:1495: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1495: warning: implicit declaration of function `brc' usr.sbin/pcvt/vttest/main.c:1496: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1497: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1498: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1502: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1539: warning: implicit declaration of function `bug_a' usr.sbin/pcvt/vttest/main.c:1540: warning: implicit declaration of function `bug_b' usr.sbin/pcvt/vttest/main.c:1541: warning: implicit declaration of function `bug_c' usr.sbin/pcvt/vttest/main.c:1542: warning: implicit declaration of function `bug_d' usr.sbin/pcvt/vttest/main.c:1543: warning: implicit declaration of function `bug_e' usr.sbin/pcvt/vttest/main.c:1544: warning: implicit declaration of function `bug_f' usr.sbin/pcvt/vttest/main.c:1545: warning: implicit declaration of function `bug_w' usr.sbin/pcvt/vttest/main.c:1546: warning: implicit declaration of function `bug_l' usr.sbin/pcvt/vttest/main.c:1547: warning: implicit declaration of function `bug_s' usr.sbin/pcvt/vttest/main.c:1554: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1585: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1608: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1619: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1640: warning: implicit declaration of function `readnl' usr.sbin/pcvt/vttest/main.c:1653: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1673: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1674: warning: unused variable `i' usr.sbin/pcvt/vttest/main.c:1674: warning: unused variable `row' usr.sbin/pcvt/vttest/main.c:1674: warning: unused variable `col' usr.sbin/pcvt/vttest/main.c:1704: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1734: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1785: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1801: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1812: warning: implicit declaration of function `ris' usr.sbin/pcvt/vttest/main.c:1816: warning: implicit declaration of function `zleep' usr.sbin/pcvt/vttest/main.c:1822: warning: implicit declaration of function `dectst' usr.sbin/pcvt/vttest/main.c:1833: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1886: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1912: warning: implicit declaration of function `exit' usr.sbin/pcvt/vttest/main.c:1916: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1924: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1930: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1936: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1957: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1978: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:1996: warning: suggest parentheses around assignment used as truth value usr.sbin/pcvt/vttest/main.c:2005: warning: return type defaults to `int' usr.sbin/pcvt/vttest/main.c:2018: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1498: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1497: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1496: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1495: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1884: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1922: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1955: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1934: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1831: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1799: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1783: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1724: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1692: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1669: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1615: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1604: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1581: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1493: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1405: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1280: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1083: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:550: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:457: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:415: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:237: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1649: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:1550: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/main.c:124: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/header.h:40: warning: type defaults to `int' in declaration of `onterm' usr.sbin/pcvt/vttest/header.h:40: warning: type defaults to `int' in declaration of `onbrk' usr.sbin/pcvt/vttest/esc.c:8: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:12: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:16: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:17: warning: format argument is not a pointer (arg 3) usr.sbin/pcvt/vttest/esc.c:17: warning: format argument is not a pointer (arg 4) usr.sbin/pcvt/vttest/esc.c:20: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:24: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:28: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:32: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:35: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:38: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:41: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:44: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:47: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:50: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:53: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:57: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:60: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:63: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:66: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:69: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:72: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:75: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:78: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:83: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:86: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:89: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:92: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:95: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:98: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:101: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:104: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:107: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:110: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:113: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:116: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:119: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:124: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:127: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:130: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:134: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:146: warning: unused variable `waittime' usr.sbin/pcvt/vttest/esc.c:206: warning: implicit declaration of function `zleep' usr.sbin/pcvt/vttest/esc.c:196: warning: unused variable `val' usr.sbin/pcvt/vttest/esc.c:196: warning: unused variable `crflag' usr.sbin/pcvt/vttest/esc.c:196: warning: unused variable `ch' usr.sbin/pcvt/vttest/esc.c:251: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:323: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:346: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:356: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:386: warning: return type defaults to `int' usr.sbin/pcvt/vttest/esc.c:10: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:14: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:18: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:22: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:26: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:30: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:34: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:37: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:40: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:43: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:46: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:49: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:52: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:56: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:59: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:62: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:65: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:68: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:71: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:74: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:77: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:82: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:85: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:88: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:91: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:94: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:97: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:100: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:103: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:106: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:109: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:112: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:115: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:118: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:123: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:126: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:129: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:132: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:136: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:251: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:323: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:354: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:384: warning: control reaches end of non-void function usr.sbin/pcvt/vttest/esc.c:403: warning: control reaches end of non-void function usr.sbin/pcvt/ispcvt/ispcvt.c:48: warning: return type defaults to `int' usr.sbin/pcvt/ispcvt/ispcvt.c:85: warning: implicit declaration of function `usage' usr.sbin/pcvt/ispcvt/ispcvt.c:96: warning: implicit declaration of function `exit' usr.sbin/pcvt/ispcvt/ispcvt.c:111: warning: implicit declaration of function `strcmp' usr.sbin/pcvt/ispcvt/ispcvt.c:139: warning: `0' flag ignored with precision and `%d' printf format usr.sbin/pcvt/ispcvt/ispcvt.c:171: warning: implicit declaration of function `next' usr.sbin/pcvt/ispcvt/ispcvt.c:226: warning: unsigned int format, u_long arg (arg 3) usr.sbin/pcvt/ispcvt/ispcvt.c:54: warning: unused variable `p' usr.sbin/pcvt/ispcvt/ispcvt.c:231: warning: return type defaults to `int' usr.sbin/pcvt/ispcvt/ispcvt.c:242: warning: return type defaults to `int' usr.sbin/pcvt/ispcvt/ispcvt.c:248: warning: control reaches end of non-void function usr.sbin/pcvt/ispcvt/ispcvt.c:228: warning: control reaches end of non-void function usr.sbin/pcvt/ispcvt/ispcvt.c:60: warning: 'device' might be used uninitialized in this function usr.sbin/pcvt/vgaio/vgaio.y:248: warning: implicit declaration of function `yyparse' y.tab.c:471: warning: implicit declaration of function `yylex' usr.sbin/pcvt/vgaio/vgaio.y:165: warning: 'val' might be used uninitialized in this function usr.sbin/pcvt/vgaio/lex.l:429: warning: 'yyunput' defined but not used usr.sbin/pcvt/kbdio/kbdio.y:263: warning: unused variable `x' usr.sbin/pcvt/kbdio/kbdio.y:263: warning: unused variable `x' usr.sbin/pcvt/kbdio/kbdio.y:263: warning: unused variable `x' usr.sbin/pcvt/kbdio/kbdio.y:263: warning: unused variable `x' usr.sbin/pcvt/kbdio/kbdio.y:263: warning: unused variable `x' usr.sbin/pcvt/kbdio/kbdio.y:263: warning: unused variable `x' usr.sbin/pcvt/kbdio/kbdio.y:325: warning: implicit declaration of function `yyparse' y.tab.c:570: warning: implicit declaration of function `yylex' usr.sbin/pcvt/kbdio/lex.l:445: warning: 'yyunput' defined but not used usr.sbin/pcvt/demo/playvt.c:54: warning: return type defaults to `int' usr.sbin/pcvt/demo/playvt.c:69: warning: implicit declaration of function `atoi' usr.sbin/pcvt/demo/playvt.c:79: warning: implicit declaration of function `usage' usr.sbin/pcvt/demo/playvt.c:89: warning: implicit declaration of function `strcpy' usr.sbin/pcvt/demo/playvt.c:90: warning: implicit declaration of function `strcat' usr.sbin/pcvt/demo/playvt.c:92: warning: implicit declaration of function `exit' usr.sbin/pcvt/demo/playvt.c:106: warning: return type defaults to `int' usr.sbin/pcvt/demo/playvt.c:102: warning: control reaches end of non-void function usr.sbin/pcvt/demo/playvt.c:62: warning: 'filename' might be used uninitialized in this function >How-To-Repeat: N/A >Fix: *** usr.sbin/pcvt/cursor/cursor.c.ORIG Sat Jan 20 00:11:18 2001 --- usr.sbin/pcvt/cursor/cursor.c Sat Sep 11 20:32:47 2004 *************** *** 33,40 **** * */ ! static char *id = ! "@(#)cursor.c, 3.20, Last Edit-Date: [Tue Apr 4 12:27:54 1995]\n$FreeBSD: src/usr.sbin/pcvt/cursor/cursor.c,v 1.10 2001/01/19 23:11:18 kris Exp $"; /*---------------------------------------------------------------------------* * --- 33,42 ---- * */ ! #include ! static char *id __unused = ! "@(#)cursor.c, 3.20, Last Edit-Date: [Tue Apr 4 12:27:54 1995]"; ! __FBSDID("$FreeBSD: src/usr.sbin/pcvt/cursor/cursor.c,v 1.10 2001/01/19 23:11:18 kris Exp $"); /*---------------------------------------------------------------------------* * *************** *** 45,50 **** --- 47,53 ---- *---------------------------------------------------------------------------*/ #include + #include #include #include #include *************** *** 52,59 **** #include #include ! #define DEFAULTFD 0 main(argc,argv) int argc; char *argv[]; --- 55,65 ---- #include #include ! #define DEFAULTFD STDIN_FILENO + static void usage(); + + int main(argc,argv) int argc; char *argv[]; *************** *** 65,71 **** int start = -1; int end = -1; int dflag = -1; ! char *device; while( (c = getopt(argc, argv, "d:n:s:e:")) != -1) { --- 71,77 ---- int start = -1; int end = -1; int dflag = -1; ! char *device = device; /* "init" to avoid "might be used unitialized" warning */ while( (c = getopt(argc, argv, "d:n:s:e:")) != -1) { *************** *** 124,129 **** --- 130,136 ---- exit(0); } + void usage() { fprintf(stderr,"\ncursor - set cursor shape for pcvt video driver\n"); *** usr.sbin/pcvt/demo/playvt.c.ORIG Mon Jul 1 23:55:09 2002 --- usr.sbin/pcvt/demo/playvt.c Sun Sep 12 00:04:11 2004 *************** *** 30,43 **** * */ #ifndef lint #if 0 static char *id = "@(#)playvt.c, 1.00, Last Edit-Date: [Sun Jan 1 18:32:22 1995]"; #endif - static const char rcsid[] = - "$FreeBSD: src/usr.sbin/pcvt/demo/playvt.c,v 1.6 2001/03/01 06:22:43 imp Exp $"; #endif /* not lint */ /*---------------------------------------------------------------------------* * --- 30,43 ---- * */ + #include #ifndef lint #if 0 static char *id = "@(#)playvt.c, 1.00, Last Edit-Date: [Sun Jan 1 18:32:22 1995]"; #endif #endif /* not lint */ + __FBSDID("$FreeBSD: src/usr.sbin/pcvt/demo/playvt.c,v 1.6 2001/03/01 06:22:43 imp Exp $"); /*---------------------------------------------------------------------------* * *************** *** 48,55 **** --- 48,60 ---- *---------------------------------------------------------------------------*/ #include + #include + #include #include + static void usage(void); + + int main(argc,argv) int argc; char *argv[]; *************** *** 59,65 **** volatile int i; int delay = 0; int fflag = -1; ! char *filename; while( (c = getopt(argc, argv, "d:f:")) != -1) { --- 64,70 ---- volatile int i; int delay = 0; int fflag = -1; ! char *filename = filename; /* "init" to avoid "might be used uninitialized" warning */ while( (c = getopt(argc, argv, "d:f:")) != -1) { *************** *** 99,107 **** for(i = delay; i > 0; i--) ; } } ! usage() { fprintf(stderr,"\nplayvt - play a VT animation with programmable delay\n"); --- 104,113 ---- for(i = delay; i > 0; i--) ; } + return(0); } ! void usage() { fprintf(stderr,"\nplayvt - play a VT animation with programmable delay\n"); *** usr.sbin/pcvt/fontedit/fontedit.c.ORIG Mon Jul 1 23:55:09 2002 --- usr.sbin/pcvt/fontedit/fontedit.c Sat Sep 11 20:33:31 2004 *************** *** 23,30 **** * $FreeBSD: src/usr.sbin/pcvt/fontedit/fontedit.c,v 1.6 2002/05/28 21:52:10 alfred Exp $ */ ! void clear_screen(); #include #ifdef SYSV #include #endif /* SYSV */ --- 23,35 ---- * $FreeBSD: src/usr.sbin/pcvt/fontedit/fontedit.c,v 1.6 2002/05/28 21:52:10 alfred Exp $ */ ! static void clear_screen(); ! static void move( int, int ); ! static int get_key(void); ! #include + #include + #include #ifdef SYSV #include #endif /* SYSV */ *************** *** 32,37 **** --- 37,43 ---- #include #endif /* BSD */ #if defined (__NetBSD__) || defined (__FreeBSD__) + #include #include #include #endif /* __NetBSD__ || __FreeBSD__ */ *************** *** 118,124 **** * Interrupt * Exit gracefully. */ ! interrupt() { void clear_screen(); --- 124,130 ---- * Interrupt * Exit gracefully. */ ! int interrupt() { void clear_screen(); *************** *** 144,149 **** --- 150,156 ---- * Grab input/output file and call main command processor. */ + int main( argc, argv ) int argc; char *argv[]; *************** *** 232,237 **** --- 239,245 ---- #ifdef CURFIX printf("%s\n",CURSORON); #endif /* CURFIX */ + return(0); } *************** *** 501,507 **** * pad * Emit nulls so that the terminal can catch up. */ ! pad() { int i; --- 509,515 ---- * pad * Emit nulls so that the terminal can catch up. */ ! void pad() { int i; *************** *** 668,674 **** /* * move */ ! move( y, x ) int y, x; { --- 676,682 ---- /* * move */ ! void move( y, x ) int y, x; { *** usr.sbin/pcvt/ispcvt/ispcvt.c.ORIG Thu Mar 1 07:22:44 2001 --- usr.sbin/pcvt/ispcvt/ispcvt.c Sat Sep 11 23:03:42 2004 *************** *** 37,49 **** *---------------------------------------------------------------------------*/ #include #include #include #include #include ! #define DEFAULTFD 0 main(argc,argv) int argc; char *argv[]; --- 37,55 ---- *---------------------------------------------------------------------------*/ #include + #include + #include #include #include #include #include ! #define DEFAULTFD STDIN_FILENO + static void usage(void); + static void next(void); + + int main(argc,argv) int argc; char *argv[]; *************** *** 51,63 **** struct pcvtid pcvtid; struct pcvtinfo pcvtinfo; int c; - char *p; int verbose = 0; int config = 0; int dflag = 0; int n_screens = 0; int fd; ! char *device; while( (c = getopt(argc, argv, "cd:nv")) != -1) { --- 57,68 ---- struct pcvtid pcvtid; struct pcvtinfo pcvtinfo; int c; int verbose = 0; int config = 0; int dflag = 0; int n_screens = 0; int fd; ! char *device = device; /* "init" to avoid "might be used uninitialized" warning */ while( (c = getopt(argc, argv, "cd:nv")) != -1) { *************** *** 135,141 **** if(verbose) { ! warnx("\nkernel and utils match, driver name [%s], release [%1.1d.%02.2d]\n", pcvtid.name, pcvtid.rmajor, pcvtid.rminor); } --- 140,146 ---- if(verbose) { ! warnx("\nkernel and utils match, driver name [%s], release [%1.1d.%02d]\n", pcvtid.name, pcvtid.rmajor, pcvtid.rminor); } *************** *** 223,232 **** fprintf(stderr,"PCVT_UPDATEFAST = %u\n", pcvtinfo.updatefast); fprintf(stderr,"PCVT_UPDATESLOW = %u\n", pcvtinfo.updateslow); fprintf(stderr,"PCVT_SYSBEEPF = %u\n", pcvtinfo.sysbeepf); ! fprintf(stderr,"Compile options = 0x%08X\n", pcvtinfo.compile_opts); } } usage() { fprintf(stderr,"\nispcvt - verify current video driver is the pcvt-driver\n"); --- 228,239 ---- fprintf(stderr,"PCVT_UPDATEFAST = %u\n", pcvtinfo.updatefast); fprintf(stderr,"PCVT_UPDATESLOW = %u\n", pcvtinfo.updateslow); fprintf(stderr,"PCVT_SYSBEEPF = %u\n", pcvtinfo.sysbeepf); ! fprintf(stderr,"Compile options = 0x%08lX\n", pcvtinfo.compile_opts); } + return(0); } + void usage() { fprintf(stderr,"\nispcvt - verify current video driver is the pcvt-driver\n"); *************** *** 238,243 **** --- 245,251 ---- exit(5); } + void next() { static int i = 0; *** usr.sbin/pcvt/kbdio/lex.l.ORIG Mon Sep 6 09:39:30 1999 --- usr.sbin/pcvt/kbdio/lex.l Sat Sep 11 23:48:50 2004 *************** *** 52,57 **** --- 52,58 ---- #include "y.tab.h" extern YYSTYPE yylval; + #define YY_NO_UNPUT 1 %} *** usr.sbin/pcvt/kbdio/kbdio.y.ORIG Tue Sep 17 19:59:50 2002 --- usr.sbin/pcvt/kbdio/kbdio.y Sat Sep 11 23:57:17 2004 *************** *** 60,75 **** #endif #define KBD_DELAY \ ! { u_char x = inb(0x84); } \ ! { u_char x = inb(0x84); } \ ! { u_char x = inb(0x84); } \ ! { u_char x = inb(0x84); } \ ! { u_char x = inb(0x84); } \ ! { u_char x = inb(0x84); } #define YYDEBUG 1 void yyerror(const char *msg); static void help(int), status(void), data(int), kbd(int), cmdbyte(int), kbc(int), whatMCA(void); --- 60,77 ---- #endif #define KBD_DELAY \ ! { u_char x __unused = inb(0x84); } \ ! { u_char x __unused = inb(0x84); } \ ! { u_char x __unused = inb(0x84); } \ ! { u_char x __unused = inb(0x84); } \ ! { u_char x __unused = inb(0x84); } \ ! { u_char x __unused = inb(0x84); } #define YYDEBUG 1 void yyerror(const char *msg); + int yyparse(void); + int yylex(void); static void help(int), status(void), data(int), kbd(int), cmdbyte(int), kbc(int), whatMCA(void); *** usr.sbin/pcvt/kcon/kcon.c.ORIG Mon Jul 1 23:55:10 2002 --- usr.sbin/pcvt/kcon/kcon.c Sat Sep 11 20:32:04 2004 *************** *** 50,57 **** --- 50,60 ---- *---------------------------------------------------------------------------*/ #include + #include #include #include + #include + #include #include #include #include *************** *** 69,77 **** --- 72,91 ---- int xf = 0; int sf = 0; + static void usage(void); + static void set_char(char [], int); + static void set_shift(char [], int); + static void set_lock(char [], int); + static void remapkeys(int, char *); + static void settypeam(int, int, int); + static void setrepeat(int, int); + static void showtypeamatic(int); + static void listcurrent(int); + /*---------------------------------------------------------------------------* * main entry *---------------------------------------------------------------------------*/ + int main(argc, argv) int argc; char *argv[]; *************** *** 82,88 **** int rate = -1; int delay = -1; ! char *map; int kbfd; while((c = getopt(argc, argv, "Rd:lm:opr:st:x")) != -1) --- 96,102 ---- int rate = -1; int delay = -1; ! char *map = map; /* "init" to suppress "might be used unitialised" warning */ int kbfd; while((c = getopt(argc, argv, "Rd:lm:opr:st:x")) != -1) *************** *** 212,217 **** --- 226,232 ---- /*---------------------------------------------------------------------------* * display usage info & exit *---------------------------------------------------------------------------*/ + void usage() { fprintf(stderr, "\nkcon: keyboard control and remapping utility for pcvt video driver\n"); *************** *** 243,249 **** for(i = 0; s[i]; i++) { ! if(((s[i] > 0x20) && (s[i] <= 0x7e)) || ((s[i] >= 0xa0) && (s[i] <= 0xff))) { conv_buf[0] = s[i]; conv_buf[1] = '\0'; --- 258,264 ---- for(i = 0; s[i]; i++) { ! if( isprint(s[i]) ) { conv_buf[0] = s[i]; conv_buf[1] = '\0'; *************** *** 254,264 **** } else if(of) { ! sprintf(conv_buf,"\\%03.3o ", s[i]); } else { ! sprintf(conv_buf,"0x%02.2X ", s[i]); } strcat(res_str, conv_buf); } --- 269,279 ---- } else if(of) { ! sprintf(conv_buf,"\\%03o ", s[i]); } else { ! sprintf(conv_buf,"0x%02X ", s[i]); } strcat(res_str, conv_buf); } *************** *** 268,273 **** --- 283,289 ---- /*---------------------------------------------------------------------------* * list the current keyboard mapping *---------------------------------------------------------------------------*/ + void listcurrent(kbfd) int kbfd; { *************** *** 381,386 **** --- 397,403 ---- /*---------------------------------------------------------------------------* * show delay and rate values for keyboard *---------------------------------------------------------------------------*/ + void showtypeamatic(kbfd) int kbfd; { *************** *** 446,451 **** --- 463,469 ---- /*---------------------------------------------------------------------------* * set repeat feature on/off *---------------------------------------------------------------------------*/ + void setrepeat(kbfd, tf) int kbfd; int tf; *************** *** 467,472 **** --- 485,491 ---- /*---------------------------------------------------------------------------* * set delay and rate values for keyboard *---------------------------------------------------------------------------*/ + void settypeam(kbfd, delay, rate) int kbfd; int delay; *************** *** 503,508 **** --- 522,528 ---- /*---------------------------------------------------------------------------* * remap keyboard from keycap entry *---------------------------------------------------------------------------*/ + void remapkeys(kbfd, map) int kbfd; char *map; *************** *** 553,563 **** /*---------------------------------------------------------------------------* * care for lock keys *---------------------------------------------------------------------------*/ set_lock(keyflag, kbfd) char keyflag[]; int kbfd; { ! int i, j; char cap[16]; struct kbd_ovlkey entry; --- 573,584 ---- /*---------------------------------------------------------------------------* * care for lock keys *---------------------------------------------------------------------------*/ + void set_lock(keyflag, kbfd) char keyflag[]; int kbfd; { ! int i; char cap[16]; struct kbd_ovlkey entry; *************** *** 566,575 **** u_short typ; } lock[] = { ! "ca", KBD_CAPS, ! "sh", KBD_SHFTLOCK, ! "nl", KBD_NUMLOCK, ! "sc", KBD_SCROLL }; --- 587,596 ---- u_short typ; } lock[] = { ! { "ca", KBD_CAPS }, ! { "sh", KBD_SHFTLOCK }, ! { "nl", KBD_NUMLOCK }, ! { "sc", KBD_SCROLL } }; *************** *** 605,610 **** --- 626,632 ---- /*---------------------------------------------------------------------------* * care for shifting keys *---------------------------------------------------------------------------*/ + void set_shift(keyflag, kbfd) char keyflag[]; int kbfd; *************** *** 618,627 **** u_short typ; } shift[] = { ! 'm', KBD_META, ! 'l', KBD_ALTGR, ! 'h', KBD_SHIFT, ! 't', KBD_CTL }; for(i = 0; i < 4; i++) --- 640,649 ---- u_short typ; } shift[] = { ! { 'm', KBD_META }, ! { 'l', KBD_ALTGR }, ! { 'h', KBD_SHIFT }, ! { 't', KBD_CTL } }; for(i = 0; i < 4; i++) *************** *** 658,663 **** --- 680,686 ---- /*---------------------------------------------------------------------------* * care for normal keys *---------------------------------------------------------------------------*/ + void set_char(keyflag, kbfd) char keyflag[]; int kbfd; *************** *** 673,683 **** char *addr; char ch; } standard[] = { ! 0, 'D', ! &entry.unshift[0], 'K', ! &entry.shift[0], 'S', ! &entry.ctrl[0], 'C', ! &entry.altgr[0], 'A' }; for(i = 1; i < KBDMAXKEYS; i++) --- 696,706 ---- char *addr; char ch; } standard[] = { ! { 0, 'D' }, ! { &entry.unshift[0], 'K' }, ! { &entry.shift[0], 'S' }, ! { &entry.ctrl[0], 'C' }, ! { &entry.altgr[0], 'A' } }; for(i = 1; i < KBDMAXKEYS; i++) *************** *** 710,716 **** else { addr_str = standard[j].addr; ! if(new_str = kgetstr(cap, &addr_str)) { if(strlen(new_str) > KBDMAXOVLKEYSIZE) { --- 733,739 ---- else { addr_str = standard[j].addr; ! if((new_str = kgetstr(cap, &addr_str))) { if(strlen(new_str) > KBDMAXOVLKEYSIZE) { *** usr.sbin/pcvt/keycap/keycap.c.ORIG Mon Jul 1 23:55:11 2002 --- usr.sbin/pcvt/keycap/keycap.c Sun Sep 12 00:10:40 2004 *************** *** 35,46 **** * */ ! #ifndef lint ! static const char rcsid[] = ! "$FreeBSD: src/usr.sbin/pcvt/keycap/keycap.c,v 1.5 2001/07/26 11:02:37 sheldonh Exp $"; ! #endif ! ! static char *id = "@(#)keycap.c, 3.20, Last Edit-Date: [Tue Dec 20 14:51:50 1994]"; /*---------------------------------------------------------------------------* --- 35,43 ---- * */ ! #include ! __FBSDID("$FreeBSD: src/usr.sbin/pcvt/keycap/keycap.c,v 1.5 2001/07/26 11:02:37 sheldonh Exp $"); ! static char *id __unused = "@(#)keycap.c, 3.20, Last Edit-Date: [Tue Dec 20 14:51:50 1994]"; /*---------------------------------------------------------------------------* *************** *** 68,75 **** --- 65,74 ---- *---------------------------------------------------------------------------*/ #include + #include #include #include + #include #include "keycap.h" *************** *** 79,85 **** char *getenv(); - static FILE *pfp = NULL; /* keycap data base file pointer */ static char *tbuf; static int hopcount; /* detect infinite loops in keycap, init 0 */ --- 78,83 ---- *************** *** 93,103 **** static char *nmatch(id,cstr) char *id,*cstr; { ! register n = strlen(id); register char *c = cstr+n; ! if (strncmp(id,cstr,n)==0 && ! (*c==':' || *c=='|' || *c=='=' || *c=='#') || *c=='@') return c; return 0; } --- 91,101 ---- static char *nmatch(id,cstr) char *id,*cstr; { ! register size_t n = strlen(id); register char *c = cstr+n; ! if ((strncmp(id,cstr,n)==0 && ! (*c==':' || *c=='|' || *c=='=' || *c=='#')) || *c=='@') return c; return 0; } *************** *** 106,111 **** --- 104,110 ---- * Get an entry for keyboard name in buffer bp from the keycap file. * Parse is very rudimentary, we just notice escaped newlines. *---------------------------------------------------------------------------*/ + int kgetent(bp, name) char *bp, *name; { *************** *** 113,119 **** register int c; register int i = 0, cnt = 0; char ibuf[KEYCAP_BUFSIZ]; - char *cp2; int tf; tbuf = bp; --- 112,117 ---- *** usr.sbin/pcvt/loadfont/loadfont.c.ORIG Thu Mar 1 07:22:45 2001 --- usr.sbin/pcvt/loadfont/loadfont.c Sat Sep 11 20:33:16 2004 *************** *** 44,49 **** --- 44,50 ---- *---------------------------------------------------------------------------*/ #include + #include #include #include #include *************** *** 69,78 **** struct screeninfo screeninfo; ! #define DEFAULTFD 0 int fd; main(argc,argv) int argc; char *argv[]; --- 70,85 ---- struct screeninfo screeninfo; ! #define DEFAULTFD STDIN_FILENO int fd; + static void usage(void); + static void printheader(void); + static void printvgafontattr(int); + static void loadfont(int, int, unsigned char *); + static void setfont(int, int, int, int, int); + int main(argc,argv) int argc; char *argv[]; *************** *** 86,96 **** int scr_rows; int c; int chr_set = -1; ! char *filename; int fflag = -1; int info = -1; int dflag = 0; ! char *device; while( (c = getopt(argc, argv, "c:d:f:i")) != -1) { --- 93,103 ---- int scr_rows; int c; int chr_set = -1; ! char *filename = filename; /* "init" to avoid "might be used uninitialised" warning */ int fflag = -1; int info = -1; int dflag = 0; ! char *device = device; /* "init" to avoid "might be used uninitialised" warning */ while( (c = getopt(argc, argv, "c:d:f:i")) != -1) { *************** *** 204,217 **** break; default: ! errx(1, "error, file %s is no valid font file, size=%d", argv[1], sbp->st_size); } if((fonttab = (unsigned char *)malloc((size_t)sbp->st_size)) == NULL) errx(1, "error, malloc failed"); if((ret = fread(fonttab, sizeof(*fonttab), sbp->st_size, in)) != sbp->st_size) ! errx(1, "error reading file %s, size = %d, read = is no valid font file, size=%d", argv[1], sbp->st_size, ret); loadfont(chr_set, chr_height, fonttab); --- 211,224 ---- break; default: ! errx(1, "error, file %s is no valid font file, size=%qd", argv[1], sbp->st_size); } if((fonttab = (unsigned char *)malloc((size_t)sbp->st_size)) == NULL) errx(1, "error, malloc failed"); if((ret = fread(fonttab, sizeof(*fonttab), sbp->st_size, in)) != sbp->st_size) ! errx(1, "error reading file %s, size = %qd, read = is no valid font file, size=%d", argv[1], sbp->st_size, ret); loadfont(chr_set, chr_height, fonttab); *************** *** 220,225 **** --- 227,233 ---- exit(0); } + void setfont(charset, fontloaded, charscan, scrscan, scrrow) int charset, fontloaded, charscan, scrscan, scrrow; { *************** *** 235,240 **** --- 243,249 ---- err(1, "ioctl VGASETFONTATTR failed, error"); } + void loadfont(fontset,charscanlines,font_table) int fontset; int charscanlines; *************** *** 259,264 **** --- 268,274 ---- } } + void printvgafontattr(charset) int charset; { *************** *** 287,292 **** --- 297,303 ---- printf("\n"); } + void printheader() { printf("\nEGA/VGA Charactersets Status Info:\n\n"); *************** *** 294,299 **** --- 305,311 ---- printf("--- ------ ----- ------------- ---------------\n"); } + void usage() { fprintf(stderr,"\nloadfont - load font into ega/vga font ram for pcvt video driver\n"); *** usr.sbin/pcvt/scon/scon.c.ORIG Thu Mar 1 07:22:46 2001 --- usr.sbin/pcvt/scon/scon.c Sat Sep 11 20:30:52 2004 *************** *** 38,46 **** --- 38,48 ---- *---------------------------------------------------------------------------*/ #include + #include #include #include #include + #include #include #define DEFAULTFD 0 *************** *** 168,174 **** --- 170,181 ---- static void parsepopt(char *arg, unsigned *idx, unsigned *r, unsigned *g, unsigned *b); static void printpalette(int fd); + static void printadaptor(int); + static void printmonitor(int); + static void printinfo(int); + static void usage(void); + int main(argc,argv) int argc; char *argv[]; *************** *** 468,473 **** --- 475,481 ---- exit(0); } + void usage() { fprintf(stderr,"\nscon - screen control utility for the pcvt video driver\n"); *************** *** 494,499 **** --- 502,508 ---- exit(1); } + void printadaptor(fd) int fd; { *************** *** 524,529 **** --- 533,539 ---- } } + void printmonitor(fd) int fd; { *************** *** 601,606 **** --- 611,617 ---- return(vga_tab[number]); } + void printinfo(fd) int fd; { *************** *** 749,755 **** const char *cp; printf("%5d %5d %5d %5d", idx, palette[idx].r, palette[idx].g, palette[idx].b); ! if(cp = findname(idx)) printf(" %s\n", cp); else putchar('\n'); --- 760,766 ---- const char *cp; printf("%5d %5d %5d %5d", idx, palette[idx].r, palette[idx].g, palette[idx].b); ! if((cp = findname(idx))) printf(" %s\n", cp); else putchar('\n'); *** usr.sbin/pcvt/userkeys/vt220keys.c.ORIG Mon Apr 22 15:44:45 2002 --- usr.sbin/pcvt/userkeys/vt220keys.c Sat Sep 11 20:51:38 2004 *************** *** 33,47 **** #include #include - /* - * The default toupper() macro is stupid, will toupper anything - */ - - #ifdef toupper - #undef toupper - #endif - #define toupper(c) (islower(c) ? ((c)-' ') : c) - #define VT200_7BIT 1 #define ESC 033 #define INITFILE ".vt220rc" --- 33,38 ---- *************** *** 50,78 **** char *name ; char *string ; } keys[] = { ! "F6", "17", ! "F7", "18", ! "F8", "19", ! "F9", "20", ! "F10", "21", ! "F11", "23", ! "ESC", "23", ! "F12", "24", ! "BS", "24", ! "F13", "25", ! "LF", "25", ! "F14", "26", ! "HELP", "28", ! "DO", "29", ! "F17", "31", ! "F18", "32", ! "F19", "33", ! "F20", "34", ! NULL, NULL }; char prog[BUFSIZ]; main(argc,argv) int argc; char *argv[]; --- 41,76 ---- char *name ; char *string ; } keys[] = { ! { "F6", "17" }, ! { "F7", "18" }, ! { "F8", "19" }, ! { "F9", "20" }, ! { "F10", "21" }, ! { "F11", "23" }, ! { "ESC", "23" }, ! { "F12", "24" }, ! { "BS", "24" }, ! { "F13", "25" }, ! { "LF", "25" }, ! { "F14", "26" }, ! { "HELP", "28" }, ! { "DO", "29" }, ! { "F17", "31" }, ! { "F18", "32" }, ! { "F19", "33" }, ! { "F20", "34" }, ! { NULL, NULL } }; char prog[BUFSIZ]; + static void dokey(char *, char *); + static void clearkeys(void); + static void lockkeys(void); + static void usage(void); + static void getinit(void); + + int main(argc,argv) int argc; char *argv[]; *************** *** 141,152 **** * for each pair, who cares, really. */ dokey(nm,val) char *nm, *val; { register char *scr; register struct keynames *kp; ! for(scr = nm; *scr = toupper(*scr); scr++) ; for(kp = keys; kp->name != NULL; kp++) if(strcmp(nm,kp->name) == 0) { --- 139,151 ---- * for each pair, who cares, really. */ + void dokey(nm,val) char *nm, *val; { register char *scr; register struct keynames *kp; ! for(scr = nm; (*scr = toupper(*scr)) != '\0'; scr++) ; for(kp = keys; kp->name != NULL; kp++) if(strcmp(nm,kp->name) == 0) { *************** *** 162,167 **** --- 161,167 ---- /****************************************************************************/ + void clearkeys() { printf("%cP0;1|%c\\",ESC,ESC); *************** *** 170,175 **** --- 170,176 ---- /****************************************************************************/ + void lockkeys() { printf("%cP1;0|%c\\",ESC,ESC); *************** *** 178,183 **** --- 179,185 ---- /****************************************************************************/ + void usage() { int i; *************** *** 218,223 **** --- 220,226 ---- #include #include + void getinit() { char *home; /* user's home directory */ *** usr.sbin/pcvt/vgaio/vgaio.y.ORIG Tue Sep 17 19:59:51 2002 --- usr.sbin/pcvt/vgaio/vgaio.y Sat Sep 11 23:41:53 2004 *************** *** 66,71 **** --- 66,73 ---- void setreg(struct reg r, int val); void getreg(struct reg r); void yyerror(const char *msg); + int yyparse(void); + int yylex(void); #define YYDEBUG 1 *************** *** 190,195 **** --- 192,202 ---- case MI: val = inb(0x3cc); break; + + default: /* unknown group */ + val = 0; + break; + } printf("%s%02x = 0x%02x = %s (bin)\n", getname(r), r.num, val, bin_str(val,8)); *** usr.sbin/pcvt/vgaio/lex.l.ORIG Mon Sep 6 09:39:30 1999 --- usr.sbin/pcvt/vgaio/lex.l Sat Sep 11 23:47:10 2004 *************** *** 56,61 **** --- 56,62 ---- #include "y.tab.h" extern YYSTYPE yylval; + #define YY_NO_UNPUT 1 %} *** usr.sbin/pcvt/vttest/header.h.ORIG Mon Jul 1 23:55:16 2002 --- usr.sbin/pcvt/vttest/header.h Sat Sep 11 22:50:07 2004 *************** *** 26,45 **** #include - #ifdef UNIX #include #include #include #include #include jmp_buf intrenv; struct sgttyb sgttyOrg, sgttyNew; char stdioBuf[BUFSIZ]; int brkrd, reading; ! extern onterm(), onbrk(); #ifdef SIII #include #endif #endif int ttymode; --- 26,90 ---- #include #ifdef UNIX + #include #include #include #include #include #include + #include jmp_buf intrenv; struct sgttyb sgttyOrg, sgttyNew; char stdioBuf[BUFSIZ]; int brkrd, reading; ! extern void onterm(int), onbrk(int); #ifdef SIII #include #endif #endif int ttymode; + + /* from esc.c */ + void println(char *); + void cup(int, int); /* Cursor Position */ + void ed(int); /* Erase in Display */ + void rm(char *); /* Reset Mode */ + void sm(char *); /* Set Mode */ + void decaln(void); /* Screen Alignment Display */ + void el(int); /* Erase in Line */ + void brcstr(char *, char); + void brc(int, char); + void cub(int); /* Cursor Backward */ + void cud(int); /* Cursor Down */ + void cuf(int); /* Cursor Forward */ + void cuu(int); /* Cursor Up */ + void hvp(int, int); /* Horizontal and Vertical Position */ + void ind(void); /* Index */ + void nel(void); /* Next Line */ + void ri(void); /* Reverse Index */ + void ris(void); /* Reset to Initial State */ + void decdhl(int); /* Double Height Line (also double width) */ + void decdwl(void); /* Double Wide Line */ + void decll(char *); /* Load LEDs */ + void decrc(void); /* Restore Cursor */ + void decsc(void); /* Save Cursor */ + void decstbm(int, int); /* Set Top and Bottom Margins */ + void decswl(void); /* Single With Line */ + void hts(void); /* Horizontal Tabulation Set */ + void scs(int, char); /* Select character Set */ + void tbc(int); /* Tabulation Clear */ + void sgr(char *); /* Select Graphic Rendition */ + void inputline(char *); + void esc(char *); + void esc2(char *, char *); + void inflush(void); + void deckpam(void); /* Keypad Application Mode */ + void deckpnm(void); /* Keypad Numeric Mode */ + void ttybin(int); + void da(void); /* Device Attributes */ + void decreqtparm(int); /* Request Terminal Parameters */ + void dsr(int); /* Device Status Report */ + void vt52cup(int, int); + void dectst(int); /* Invoke Confidence Test */ + void zleep(int); *** usr.sbin/pcvt/vttest/main.c.ORIG Thu May 29 19:34:16 2003 --- usr.sbin/pcvt/vttest/main.c Sat Sep 11 22:51:22 2004 *************** *** 72,77 **** --- 72,109 ---- #endif #endif + static void tst_movements(void); + static void tst_screen(void); + static void tst_characters(void); + static void tst_doublesize(void); + static void tst_keyboard(void); + static void tst_reports(void); + static void tst_vt52(void); + static void tst_insdel(void); + static void tst_bugs(void); + static void tst_rst(void); + static void bug_a(void); + static void bug_b(void); + static void bug_c(void); + static void bug_d(void); + static void bug_e(void); + static void bug_f(void); + static void bug_w(void); + static void bug_l(void); + static void bug_s(void); + static void initterminal(int); + static void bye (void); + static int menu(char *[]); + static void holdit(void); + static void chrprint (char *); + static void dch(int); /* Delete character */ + static void ich(int); /* Insert character -- not in VT102 */ + static void dl(int); /* Delete line */ + static void il(int); /* Insert line */ + static void readnl(void); + static int scanto(char *, int *, char); + + int main() { int menuchoice; *************** *** 123,128 **** --- 155,161 ---- bye(); } + void tst_movements() { /* Test of: *************** *** 139,145 **** */ int i, row, col, pass, width, hlfxtra; ! char c, *ctext = "This is a correct sentence"; for (pass = 0; pass <= 1; pass++) { if (pass == 0) { rm("?3"); width = 80; hlfxtra = 0; } --- 172,178 ---- */ int i, row, col, pass, width, hlfxtra; ! char *ctext = "This is a correct sentence"; for (pass = 0; pass <= 1; pass++) { if (pass == 0) { rm("?3"); width = 80; hlfxtra = 0; } *************** *** 236,241 **** --- 269,275 ---- holdit(); } + void tst_screen() { /* Test of: *************** *** 414,419 **** --- 448,454 ---- holdit(); } + void tst_characters() { /* Test of: SCS (Select character Set) *************** *** 456,461 **** --- 491,497 ---- holdit(); } + void tst_doublesize() { /* Test of: DECSWL (Single Width Line) *************** *** 549,554 **** --- 585,591 ---- holdit(); } + void tst_keyboard() { /* Test of: *************** *** 1047,1062 **** do { cup(23,1); kbdc = inchar(); cup(23,1); el(0); ! if (kbdc < 32) printf(" %s", ckeytab[kbdc].csymbol); else { sprintf(kbds, "%c", kbdc); chrprint(kbds); printf("%s", " -- not a CTRL key"); } ! if (kbdc < 32) ckeytab[kbdc].ccount++; ! if (ckeytab[kbdc].ccount == 2) { cup(1 + (kbdc % 16), 1 + 40 * (kbdc / 16)); ! printf("%s", ckeytab[kbdc].csymbol); } } while (kbdc != '\177'); #ifdef UNIX --- 1084,1099 ---- do { cup(23,1); kbdc = inchar(); cup(23,1); el(0); ! if (kbdc < 32) printf(" %s", ckeytab[(short int)kbdc].csymbol); else { sprintf(kbds, "%c", kbdc); chrprint(kbds); printf("%s", " -- not a CTRL key"); } ! if (kbdc < 32) ckeytab[(short int)kbdc].ccount++; ! if (ckeytab[(short int)kbdc].ccount == 2) { cup(1 + (kbdc % 16), 1 + 40 * (kbdc / 16)); ! printf("%s", ckeytab[(short int)kbdc].csymbol); } } while (kbdc != '\177'); #ifdef UNIX *************** *** 1082,1087 **** --- 1119,1125 ---- holdit(); } + void tst_reports() { /* Test of: (AnswerBack Message) *************** *** 1198,1204 **** cup(7,1); println("Test of Device Attributes report (what are you)"); cup(8,1); ! da(0); report = instr(); cup(8,1); el(0); --- 1236,1242 ---- cup(7,1); println("Test of Device Attributes report (what are you)"); cup(8,1); ! da(); report = instr(); cup(8,1); el(0); *************** *** 1279,1284 **** --- 1317,1323 ---- #endif } + void tst_vt52() { static struct rtabl { *************** *** 1404,1409 **** --- 1443,1449 ---- holdit(); } + void tst_insdel() { /* Test of: *************** *** 1492,1504 **** } } ! dch(pn) int pn; { brc(pn, 'P'); } /* Delete character */ ! ich(pn) int pn; { brc(pn, '@'); } /* Insert character -- not in VT102 */ ! dl(pn) int pn; { brc(pn, 'M'); } /* Delete line */ ! il(pn) int pn; { brc(pn, 'L'); } /* Insert line */ /* Test of some known VT100 bugs and misfeatures */ tst_bugs() { int i, menuchoice; --- 1532,1545 ---- } } ! void dch(pn) int pn; { brc(pn, 'P'); } /* Delete character */ ! void ich(pn) int pn; { brc(pn, '@'); } /* Insert character -- not in VT102 */ ! void dl(pn) int pn; { brc(pn, 'M'); } /* Delete line */ ! void il(pn) int pn; { brc(pn, 'L'); } /* Insert line */ /* Test of some known VT100 bugs and misfeatures */ + void tst_bugs() { int i, menuchoice; *************** *** 1551,1556 **** --- 1592,1598 ---- /* Bug A: Smooth scroll to jump scroll */ + void bug_a() { int i; *************** *** 1582,1587 **** --- 1624,1630 ---- /* Bug B: Scrolling region */ + void bug_b() { char c; *************** *** 1605,1610 **** --- 1648,1654 ---- /* Bug C: Wide to narrow screen */ + void bug_c() { sm("?3"); /* 132 column mode */ cup(1,81); *************** *** 1616,1621 **** --- 1660,1666 ---- /* Bug D: Narrow to wide screen */ + void bug_d() { int i; char result; *************** *** 1650,1655 **** --- 1695,1701 ---- /* Bug E: Cursor move from double- to single-wide line */ + void bug_e() { int i; static char *rend[2] = { "\033[m", "\033[7m" }; *************** *** 1670,1677 **** /* Bug F: Column mode escape sequence */ bug_f() { - int i, row, col; /* * VT100 "toggle origin mode, forget rest" bug. If you try to set --- 1716,1723 ---- /* Bug F: Column mode escape sequence */ + void bug_f() { /* * VT100 "toggle origin mode, forget rest" bug. If you try to set *************** *** 1701,1706 **** --- 1747,1753 ---- * on a CUP. Argh! */ + void bug_w() { int row, col; *************** *** 1731,1736 **** --- 1778,1784 ---- * A VT100 has this misfeature, and many others. Foo! */ + void bug_l() { cup(15, 1); printf("This-is-a-long-line-This-is-a-long-line-"); *************** *** 1782,1787 **** --- 1830,1836 ---- rm("?3"); } + void bug_s() { int i; decstbm(20,10); /* 20-10=-10, < 2, so no scroll region. */ *************** *** 1798,1803 **** --- 1847,1853 ---- decstbm(0,0); /* No scroll region (just in case...) */ } + void tst_rst() { /* *************** *** 1830,1835 **** --- 1880,1886 ---- holdit(); } + void initterminal(pn) int pn; { #ifdef UNIX *************** *** 1883,1888 **** --- 1934,1940 ---- } + void bye () { /* Force my personal prejudices upon the poor luser */ *************** *** 1913,1919 **** } #ifdef UNIX ! onbrk() { signal(SIGINT, (void *)onbrk); if (reading) brkrd = 1; --- 1965,1972 ---- } #ifdef UNIX ! void ! onbrk(int sig __unused) { signal(SIGINT, (void *)onbrk); if (reading) brkrd = 1; *************** *** 1921,1938 **** longjmp(intrenv, 1); } ! onterm() { signal(SIGTERM, (void *)onterm); longjmp(intrenv, 1); } #endif holdit() { inflush(); printf("Push "); readnl(); } readnl() { #ifdef UNIX char ch; --- 1974,1994 ---- longjmp(intrenv, 1); } ! void ! onterm(int sig __unused) { signal(SIGTERM, (void *)onterm); longjmp(intrenv, 1); } #endif + void holdit() { inflush(); printf("Push "); readnl(); } + void readnl() { #ifdef UNIX char ch; *************** *** 1954,1959 **** --- 2010,2016 ---- #endif } + int scanto(str, pos, toc) char *str; int *pos; char toc; { char c; int result = 0; *************** *** 1975,1980 **** --- 2032,2038 ---- return("BAD VALUE"); } + int menu(table) char *table[]; { int i, tablesize, choice; *************** *** 1993,1999 **** for(;;) { inputline(s); choice = 0; ! while (c = *s++) choice = 10 * choice + c - '0'; if (choice >= 0 && choice <= tablesize) { ed(2); return (choice); --- 2051,2057 ---- for(;;) { inputline(s); choice = 0; ! while ((c = *s++)) choice = 10 * choice + c - '0'; if (choice >= 0 && choice <= tablesize) { ed(2); return (choice); *************** *** 2002,2007 **** --- 2060,2066 ---- } } + void chrprint (s) char *s; { int i; *** usr.sbin/pcvt/vttest/esc.c.ORIG Mon Jul 1 23:55:16 2002 --- usr.sbin/pcvt/vttest/esc.c Sat Sep 11 22:49:37 2004 *************** *** 1,136 **** ! #include "header.h" ! #ifndef lint ! static const char rcsid[] = ! "$FreeBSD: src/usr.sbin/pcvt/vttest/esc.c,v 1.6 2001/07/27 04:40:04 brooks Exp $"; ! #endif println(s) char *s; { printf("%s\n", s); } esc(s) char *s; { printf("%c%s", 27, s); } ! esc2(s1, s2) char s1, s2; { printf("%c%s%s", 27, s1, s2); } brcstr(ps, c) char *ps, c; { printf("%c[%s%c", 27, ps, c); } brc(pn,c) int pn; char c; { printf("%c[%d%c", 27, pn, c); } brc2(pn1, pn2 ,c) int pn1, pn2; char c; { printf("%c[%d;%d%c", 27, pn1, pn2, c); } cub(pn) int pn; { /* Cursor Backward */ brc(pn,'D'); } cud(pn) int pn; { /* Cursor Down */ brc(pn,'B'); } cuf(pn) int pn; { /* Cursor Forward */ brc(pn,'C'); } cup(pn1, pn2) int pn1, pn2; { /* Cursor Position */ brc2(pn1, pn2, 'H'); } cuu(pn) int pn; { /* Cursor Up */ brc(pn,'A'); } da() { /* Device Attributes */ brc(0,'c'); } decaln() { /* Screen Alignment Display */ esc("#8"); } decdhl(lower) int lower; { /* Double Height Line (also double width) */ if (lower) esc("#4"); else esc("#3"); } decdwl() { /* Double Wide Line */ esc("#6"); } deckpam() { /* Keypad Application Mode */ esc("="); } deckpnm() { /* Keypad Numeric Mode */ esc(">"); } decll(ps) char *ps; { /* Load LEDs */ brcstr(ps, 'q'); } decrc() { /* Restore Cursor */ esc("8"); } decreqtparm(pn) int pn; { /* Request Terminal Parameters */ brc(pn,'x'); } decsc() { /* Save Cursor */ esc("7"); } decstbm(pn1, pn2) int pn1, pn2; { /* Set Top and Bottom Margins */ if (pn1 || pn2) brc2(pn1, pn2, 'r'); else esc("[r"); /* Good for >24-line terminals */ } decswl() { /* Single With Line */ esc("#5"); } dectst(pn) int pn; { /* Invoke Confidence Test */ brc2(2, pn, 'y'); } dsr(pn) int pn; { /* Device Status Report */ brc(pn, 'n'); } ed(pn) int pn; { /* Erase in Display */ brc(pn, 'J'); } el(pn) int pn; { /* Erase in Line */ brc(pn,'K'); } hts() { /* Horizontal Tabulation Set */ esc("H"); } hvp(pn1, pn2) int pn1, pn2; { /* Horizontal and Vertical Position */ brc2(pn1, pn2, 'f'); } ind() { /* Index */ esc("D"); } nel() { /* Next Line */ esc("E"); } ri() { /* Reverse Index */ esc("M"); } ris() { /* Reset to Initial State */ esc("c"); } rm(ps) char *ps; { /* Reset Mode */ brcstr(ps, 'l'); } scs(g,c) int g; char c; { /* Select character Set */ printf("%c%c%c%c%c%c%c", 27, g ? ')' : '(', c, 27, g ? '(' : ')', 'B', g ? 14 : 15); } sgr(ps) char *ps; { /* Select Graphic Rendition */ brcstr(ps, 'm'); } sm(ps) char *ps; { /* Set Mode */ brcstr(ps, 'h'); } tbc(pn) int pn; { /* Tabulation Clear */ brc(pn, 'g'); } vt52cup(l,c) int l,c; { printf("%cY%c%c", 27, l + 31, c + 31); } --- 1,173 ---- ! #include ! __FBSDID("$FreeBSD: src/usr.sbin/pcvt/vttest/esc.c,v 1.6 2001/07/27 04:40:04 brooks Exp $"); ! #include "header.h" + void println(s) char *s; { printf("%s\n", s); } + void esc(s) char *s; { printf("%c%s", 27, s); } ! void ! esc2(s1, s2) char *s1, *s2; { printf("%c%s%s", 27, s1, s2); } + void brcstr(ps, c) char *ps, c; { printf("%c[%s%c", 27, ps, c); } + void brc(pn,c) int pn; char c; { printf("%c[%d%c", 27, pn, c); } + void brc2(pn1, pn2 ,c) int pn1, pn2; char c; { printf("%c[%d;%d%c", 27, pn1, pn2, c); } + void cub(pn) int pn; { /* Cursor Backward */ brc(pn,'D'); } + void cud(pn) int pn; { /* Cursor Down */ brc(pn,'B'); } + void cuf(pn) int pn; { /* Cursor Forward */ brc(pn,'C'); } + void cup(pn1, pn2) int pn1, pn2; { /* Cursor Position */ brc2(pn1, pn2, 'H'); } + void cuu(pn) int pn; { /* Cursor Up */ brc(pn,'A'); } + void da() { /* Device Attributes */ brc(0,'c'); } + void decaln() { /* Screen Alignment Display */ esc("#8"); } + void decdhl(lower) int lower; { /* Double Height Line (also double width) */ if (lower) esc("#4"); else esc("#3"); } + void decdwl() { /* Double Wide Line */ esc("#6"); } + void deckpam() { /* Keypad Application Mode */ esc("="); } + void deckpnm() { /* Keypad Numeric Mode */ esc(">"); } + void decll(ps) char *ps; { /* Load LEDs */ brcstr(ps, 'q'); } + void decrc() { /* Restore Cursor */ esc("8"); } + void decreqtparm(pn) int pn; { /* Request Terminal Parameters */ brc(pn,'x'); } + void decsc() { /* Save Cursor */ esc("7"); } + void decstbm(pn1, pn2) int pn1, pn2; { /* Set Top and Bottom Margins */ if (pn1 || pn2) brc2(pn1, pn2, 'r'); else esc("[r"); /* Good for >24-line terminals */ } + void decswl() { /* Single With Line */ esc("#5"); } + void dectst(pn) int pn; { /* Invoke Confidence Test */ brc2(2, pn, 'y'); } + void dsr(pn) int pn; { /* Device Status Report */ brc(pn, 'n'); } + void ed(pn) int pn; { /* Erase in Display */ brc(pn, 'J'); } + void el(pn) int pn; { /* Erase in Line */ brc(pn,'K'); } + void hts() { /* Horizontal Tabulation Set */ esc("H"); } + void hvp(pn1, pn2) int pn1, pn2; { /* Horizontal and Vertical Position */ brc2(pn1, pn2, 'f'); } + void ind() { /* Index */ esc("D"); } + void nel() { /* Next Line */ esc("E"); } + void ri() { /* Reverse Index */ esc("M"); } + void ris() { /* Reset to Initial State */ esc("c"); } + void rm(ps) char *ps; { /* Reset Mode */ brcstr(ps, 'l'); } + void scs(g,c) int g; char c; { /* Select character Set */ printf("%c%c%c%c%c%c%c", 27, g ? ')' : '(', c, 27, g ? '(' : ')', 'B', g ? 14 : 15); } + void sgr(ps) char *ps; { /* Select Graphic Rendition */ brcstr(ps, 'm'); } + void sm(ps) char *ps; { /* Set Mode */ brcstr(ps, 'h'); } + void tbc(pn) int pn; { /* Tabulation Clear */ brc(pn, 'g'); } + void vt52cup(l,c) int l,c; { printf("%cY%c%c", 27, l + 31, c + 31); } *************** *** 143,149 **** */ #ifdef UNIX ! int lval, waittime, getpid(); static int val; char ch; fflush(stdout); lval = val; --- 180,186 ---- */ #ifdef UNIX ! int lval; static int val; char ch; fflush(stdout); lval = val; *************** *** 193,199 **** */ ! int i, val, crflag; long l1; char ch; static char result[80]; i = 0; --- 230,239 ---- */ ! int i; long l1; ! #ifdef SARG10 ! int val, crflag; char ch; ! #endif static char result[80]; i = 0; *************** *** 248,253 **** --- 288,294 ---- return(result); } + void ttybin(bin) int bin; { #ifdef SARG10 #define OPEN 050 *************** *** 296,301 **** --- 337,343 ---- * Beware where and how you use it !!!!!!! */ + void superbin(bin) int bin; { int v; *************** *** 309,314 **** --- 351,357 ---- * Set bit 34 to turn it on. Clear it for off. */ + void page(bin) int bin; { int v; *************** *** 320,325 **** --- 363,369 ---- } #endif + void trmop(fc,arg) int fc, arg; { #ifdef SARG10 int retvalp; *************** *** 343,348 **** --- 387,393 ---- #endif } + void inputline(s) char *s; { scanf("%s",s); #ifdef SARG10 *************** *** 353,358 **** --- 398,404 ---- #endif } + void inflush() { /* *************** *** 383,388 **** --- 429,435 ---- #endif } + void zleep(t) int t; { /* >Release-Note: >Audit-Trail: >Unformatted: