From owner-cvs-usrbin Wed Dec 27 15:23:46 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA25096 for cvs-usrbin-outgoing; Wed, 27 Dec 1995 15:23:46 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA25089 Wed, 27 Dec 1995 15:23:44 -0800 (PST) Date: Wed, 27 Dec 1995 15:23:44 -0800 (PST) From: Joerg Wunsch Message-Id: <199512272323.PAA25089@freefall.freebsd.org> To: CVS-committers, cvs-usrbin Subject: cvs commit: src/usr.bin/tftp main.c Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk joerg 95/12/27 15:23:44 Modified: usr.bin/tftp main.c Log: Kill the (hopefully) last occurance of gets(3) in the base source tree. Revision Changes Path 1.3 +11 -6 src/usr.bin/tftp/main.c From owner-cvs-usrbin Wed Dec 27 20:34:10 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id UAA12070 for cvs-usrbin-outgoing; Wed, 27 Dec 1995 20:34:10 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id UAA12034 Wed, 27 Dec 1995 20:33:43 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id PAA13912; Thu, 28 Dec 1995 15:31:43 +1100 Date: Thu, 28 Dec 1995 15:31:43 +1100 From: Bruce Evans Message-Id: <199512280431.PAA13912@godzilla.zeta.org.au> To: CVS-committers@freefall.freebsd.org, cvs-usrbin@freefall.freebsd.org, joerg@freefall.freebsd.org Subject: Re: cvs commit: src/usr.bin/tftp main.c Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk > Modified: usr.bin/tftp main.c > Log: > Kill the (hopefully) last occurance of gets(3) in the base source tree. > > Revision Changes Path > 1.3 +11 -6 src/usr.bin/tftp/main.c Now we can start fixing the fixes :-(. The one in sail/pl_main.c leaves \n in the captain's name, and almost all of them don't read to the end of the line for long lines, so junk may be left for the next read. I would prefer a core dump. Bruce From owner-cvs-usrbin Wed Dec 27 21:23:29 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id VAA14330 for cvs-usrbin-outgoing; Wed, 27 Dec 1995 21:23:29 -0800 (PST) Received: from jhome.DIALix.COM (root@jhome.DIALix.COM [192.203.228.69]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id VAA14313 Wed, 27 Dec 1995 21:23:17 -0800 (PST) Received: (from peter@localhost) by jhome.DIALix.COM (8.7.3/8.7.3) id NAA13964; Thu, 28 Dec 1995 13:22:53 +0800 (WST) Date: Thu, 28 Dec 1995 13:22:53 +0800 (WST) From: Peter Wemm To: Bruce Evans cc: CVS-committers@freefall.freebsd.org, cvs-usrbin@freefall.freebsd.org, joerg@freefall.freebsd.org Subject: Re: cvs commit: src/usr.bin/tftp main.c In-Reply-To: <199512280431.PAA13912@godzilla.zeta.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk On Thu, 28 Dec 1995, Bruce Evans wrote: > > Modified: usr.bin/tftp main.c > > Log: > > Kill the (hopefully) last occurance of gets(3) in the base source tree. > > > > Revision Changes Path > > 1.3 +11 -6 src/usr.bin/tftp/main.c > > Now we can start fixing the fixes :-(. The one in sail/pl_main.c leaves > \n in the captain's name, and almost all of them don't read to the end > of the line for long lines, so junk may be left for the next read. I > would prefer a core dump. > > Bruce Perhaps the safest "fix" may be to shove a simple replacement for gets() into libc or libutil with a similar interface that we can use to take care of this sort of thing. We can edit our sources to change gets(line); to __ngets(line, sizeof(line)); stub take care of the hard work. Naturally, it's not portable but heck, our sources are for FreeBSD, not PortableBSD.. :-) Perhaps something like this for starters.. char * __ngets(buf, len) char *buf; size_t len; { char *s; size_t l; s = fgetln(stdin, &l); if (s == NULL || l == 0) { return NULL; } else { if (s[l-1] == '\n') --l; if (l > (len - 1)) l = len - 1; memcpy(buf, s, l); buf[l] = '\0'; return buf; } } Dont shoot! :-) It's just a thought... :-) (or perhaps put this in as a static function in the programs that wanted to call gets() in the first place and get them to use this instead...) Cheers, -Peter From owner-cvs-usrbin Thu Dec 28 02:46:35 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA27302 for cvs-usrbin-outgoing; Thu, 28 Dec 1995 02:46:35 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id CAA27291 Thu, 28 Dec 1995 02:46:17 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id VAA26015; Thu, 28 Dec 1995 21:43:05 +1100 Date: Thu, 28 Dec 1995 21:43:05 +1100 From: Bruce Evans Message-Id: <199512281043.VAA26015@godzilla.zeta.org.au> To: bde@zeta.org.au, peter@jhome.DIALix.COM Subject: Re: cvs commit: src/usr.bin/tftp main.c Cc: CVS-committers@freefall.freebsd.org, cvs-usrbin@freefall.freebsd.org, joerg@freefall.freebsd.org Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk >Perhaps the safest "fix" may be to shove a simple replacement for gets() >into libc or libutil with a similar interface that we can use to take >care of this sort of thing. We can edit our sources to change > gets(line); >to > __ngets(line, sizeof(line)); I think the replacement should be something like int fgets_DWIM(same args as fgets); which reads to the next newline (if any) and discards the newline and discards any data that doesn't fit. Bruce From owner-cvs-usrbin Thu Dec 28 05:43:45 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA04780 for cvs-usrbin-outgoing; Thu, 28 Dec 1995 05:43:45 -0800 (PST) Received: (from ache@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA04773 Thu, 28 Dec 1995 05:43:43 -0800 (PST) Date: Thu, 28 Dec 1995 05:43:43 -0800 (PST) From: "Andrey A. Chernov" Message-Id: <199512281343.FAA04773@freefall.freebsd.org> To: CVS-committers, cvs-usrbin Subject: cvs commit: src/usr.bin/strings strings.c Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk ache 95/12/28 05:43:43 Modified: usr.bin/strings strings.c Log: Localize it Revision Changes Path 1.3 +4 -1 src/usr.bin/strings/strings.c From owner-cvs-usrbin Thu Dec 28 08:31:36 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA14375 for cvs-usrbin-outgoing; Thu, 28 Dec 1995 08:31:36 -0800 (PST) Received: (from ache@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA14367 Thu, 28 Dec 1995 08:31:30 -0800 (PST) Date: Thu, 28 Dec 1995 08:31:30 -0800 (PST) From: "Andrey A. Chernov" Message-Id: <199512281631.IAA14367@freefall.freebsd.org> To: CVS-committers, cvs-usrbin Subject: cvs commit: src/usr.bin/strings strings.c Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk ache 95/12/28 08:31:27 Modified: usr.bin/strings strings.c Log: Use more complicated printable test to remove unnecessary 8bit chars Revision Changes Path 1.4 +3 -1 src/usr.bin/strings/strings.c From owner-cvs-usrbin Fri Dec 29 04:18:52 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA17016 for cvs-usrbin-outgoing; Fri, 29 Dec 1995 04:18:52 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA17009 Fri, 29 Dec 1995 04:18:49 -0800 (PST) Date: Fri, 29 Dec 1995 04:18:49 -0800 (PST) From: Joerg Wunsch Message-Id: <199512291218.EAA17009@freefall.freebsd.org> To: CVS-committers, cvs-usrbin Subject: cvs commit: src/usr.bin/jot jot.c Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk joerg 95/12/29 04:18:48 Modified: usr.bin/jot jot.c Log: >Number: 917 >Category: bin >Synopsis: -s option in jot is broken Revision Changes Path 1.2 +2 -2 src/usr.bin/jot/jot.c From owner-cvs-usrbin Fri Dec 29 04:20:38 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA17276 for cvs-usrbin-outgoing; Fri, 29 Dec 1995 04:20:38 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA17269 Fri, 29 Dec 1995 04:20:34 -0800 (PST) Date: Fri, 29 Dec 1995 04:20:34 -0800 (PST) From: Joerg Wunsch Message-Id: <199512291220.EAA17269@freefall.freebsd.org> To: CVS-committers, cvs-usrbin Subject: cvs commit: src/usr.bin/jot jot.c Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk joerg 95/12/29 04:20:32 Branch: usr.bin/jot RELENG_2_1_0 Modified: usr.bin/jot jot.c Log: >Number: 917 >Category: bin >Synopsis: -s option in jot is broken Submitted by: edward@edcom.com (Edward Wang) Revision Changes Path 1.1.1.1.6.1 +2 -2 src/usr.bin/jot/jot.c From owner-cvs-usrbin Fri Dec 29 04:24:14 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA17611 for cvs-usrbin-outgoing; Fri, 29 Dec 1995 04:24:14 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id EAA17543 Fri, 29 Dec 1995 04:24:00 -0800 (PST) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id NAA26991; Fri, 29 Dec 1995 13:23:50 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id NAA23357; Fri, 29 Dec 1995 13:23:50 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.7.3/8.6.9) id NAA11408; Fri, 29 Dec 1995 13:22:47 +0100 (MET) From: J Wunsch Message-Id: <199512291222.NAA11408@uriah.heep.sax.de> Subject: Re: cvs commit: src/usr.bin/jot jot.c To: joerg@freefall.freebsd.org (Joerg Wunsch) Date: Fri, 29 Dec 1995 13:22:47 +0100 (MET) Cc: CVS-committers@freefall.freebsd.org, cvs-usrbin@freefall.freebsd.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199512291218.EAA17009@freefall.freebsd.org> from "Joerg Wunsch" at Dec 29, 95 04:18:49 am X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk As Joerg Wunsch wrote: > > joerg 95/12/29 04:18:48 > > Modified: usr.bin/jot jot.c > Log: > >Number: 917 > >Category: bin > >Synopsis: -s option in jot is broken Forgot this again: Submitted by: edward@edcom.com (Edward Wang) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-cvs-usrbin Fri Dec 29 07:21:07 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA24759 for cvs-usrbin-outgoing; Fri, 29 Dec 1995 07:21:07 -0800 (PST) Received: (from bde@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA24750 Fri, 29 Dec 1995 07:21:03 -0800 (PST) Date: Fri, 29 Dec 1995 07:21:03 -0800 (PST) From: Bruce Evans Message-Id: <199512291521.HAA24750@freefall.freebsd.org> To: CVS-committers, cvs-usrbin Subject: cvs commit: src/usr.bin/gprof4 - Imported sources Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk bde 95/12/29 07:21:01 Branch: usr.bin/gprof4 1.1.1 Log: gprof4 is a version of gprof with 4-byte histogram counters. Status: Vendor Tag: BDE Release Tags: a I src/usr.bin/gprof4/modules/CVS N src/usr.bin/gprof4/modules/modules No conflicts created by this import From owner-cvs-usrbin Fri Dec 29 07:47:09 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA26606 for cvs-usrbin-outgoing; Fri, 29 Dec 1995 07:47:09 -0800 (PST) Received: (from bde@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA26589 Fri, 29 Dec 1995 07:47:06 -0800 (PST) Date: Fri, 29 Dec 1995 07:47:06 -0800 (PST) From: Bruce Evans Message-Id: <199512291547.HAA26589@freefall.freebsd.org> To: CVS-committers, cvs-usrbin Subject: cvs commit: src/usr.bin/gprof gprof.h Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk bde 95/12/29 07:47:03 Modified: usr.bin/gprof gprof.h Log: Implemented non-statistical kernel profiling. This is based on looking at a high resolution clock for each of the following events: function call, function return, interrupt entry, interrupt exit, and interesting branches. The differences between the times of these events are added at appropriate places in a ordinary histogram (as if very fast statistical profiling sampled the pc at those places) so that ordinary gprof can be used to analyze the times. gmon.h: Histogram counters need to be 4 bytes for microsecond resolutions. They will need to be larger for the 586 clock. The comments were vax-centric and wrong even on vaxes. Does anyone disagree? gprof4.c: The standard gprof should support counters of all integral sizes and the size of the counter should be in the gmon header. This hack will do until then. (Use gprof4 -u to examine the results of non-statistical profiling.) config/*: Non-statistical profiling is configured with `config -pp'. `config -p' still gives ordinary profiling. kgmon/*: Non-statistical profiling is enabled with `kgmon -B'. `kgmon -b' still enables ordinary profiling (and distables non-statistical profiling) if non-statistical profiling is configured. Revision Changes Path 1.3 +4 -0 src/usr.bin/gprof/gprof.h From owner-cvs-usrbin Sat Dec 30 10:18:03 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA28151 for cvs-usrbin-outgoing; Sat, 30 Dec 1995 10:18:03 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA28134 Sat, 30 Dec 1995 10:17:58 -0800 (PST) Date: Sat, 30 Dec 1995 10:17:58 -0800 (PST) From: Joerg Wunsch Message-Id: <199512301817.KAA28134@freefall.freebsd.org> To: CVS-committers, cvs-usrbin Subject: cvs commit: src/usr.bin/tr str.c tr.c Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk joerg 95/12/30 10:17:58 Branch: usr.bin/tr RELENG_2_1_0 Modified: usr.bin/tr str.c tr.c Log: Merge from HEAD: . fix the bug that caused ``tr a-z m-za-l'' to fail . use setlocale() while i've been here Revision Changes Path 1.2.6.1 +16 -19 src/usr.bin/tr/str.c 1.2.4.1 +3 -0 src/usr.bin/tr/tr.c