Re: wc does not count last line if no trailing newline present

2015-11-03 Thread dan mclaughlin
On Wed, 04 Nov 2015 01:05:38 -0500 dan mclaughlin wrote: > > also wondering how to get equivalent functionality. maybe there's a better > way, but off the top of my head i can only think of: > > grep -n .* | tail -1 | sed 's/:.*//' > ack. thought of this right after sending: grep -c .*

Re: wc does not count last line if no trailing newline present

2015-11-03 Thread dan mclaughlin
On Tue, 3 Nov 2015 21:01:36 -0800 Philip Guenther wrote: > On Tue, Nov 3, 2015 at 8:35 PM, dan mclaughlin wrote > > i was writing a script when i ran across this. > > > > $ echo "hello world" | wc > >1 2 12 > > $ echo -n &quo

wc does not count last line if no trailing newline present

2015-11-03 Thread dan mclaughlin
i was writing a script when i ran across this. $ echo "hello world" | wc 1 2 12 $ echo -n "hello world" | wc 0 2 11 the following patch corrects this: --- usr.bin/wc/wc.c.origFri Oct 9 02:43:08 2015 +++ usr.bin/wc/wc.c Tue Nov 3 22:52:46 2015 @@

Re: X Server failing about libfreetype.so.24.0 with latest snapshot

2015-06-29 Thread dan mclaughlin
i saw this problem compiling. all the /usr/xenocara/distrib/sets/lists/xbase/md.* files referenced libfreetype.so.23.0 instead of ...24.0 which is what is being built, so it didn't get packaged. looks like Theo already fixed this: https://marc.info/?l=openbsd-cvs&m=143557821008977&w=2 so tomorro

Re: jail_bin_add: script to add binary and libs to chroot

2015-06-08 Thread dan mclaughlin
On Mon, 8 Jun 2015 14:59:28 +0200 Marc Espie wrote: > On Mon, Jun 08, 2015 at 01:46:17AM -0400, dan mclaughlin wrote: > > i figure this should be useful to some. > > any nits welcome. > > Unfortunately, this will become increasingly useless in > gtk-land. > > Comp

jail_bin_add: script to add binary and libs to chroot

2015-06-07 Thread dan mclaughlin
i figure this should be useful to some. any nits welcome. #!/bin/ksh #copies a binary and libs to a chroot fs MYNAME=${0##*/} USAGE="$MYNAME bin jailroot" [[ "$1" = -h ]] && { echo "USAGE $USAGE"; return 0; } isemptyv() { eval [ \${#$1} -eq 0 ]; } err() { echo "$MYNAME: ERR $*" >&2; } usage() { e

unneeded var breaks build in xenocara/driver/xf86-video-mach64

2015-05-27 Thread dan mclaughlin
someone will hit this soon enough if they haven't already, but building xerocara after recent import gave the following error: /usr/xenocara/driver/xf86-video-mach64/src/atipreinit.c: In function 'ATIPreInit': /usr/xenocara/driver/xf86-video-mach64/src/atipreinit.c:703: error: 'pInt10Info' undec

Re: [bug] console/X go blank and will not display after switching

2015-05-18 Thread dan mclaughlin
i missed a few things. On Mon, 18 May 2015 08:05:05 -0400 dan mclaughlin wrote: > i sent this to bugs@ but it didn't seem to get posted. granted that it has > only been a few hours, but that is the second time in two days, so i am > taking a chance sending it here instead. >

[bug] console/X go blank and will not display after switching

2015-05-18 Thread dan mclaughlin
i sent this to bugs@ but it didn't seem to get posted. granted that it has only been a few hours, but that is the second time in two days, so i am taking a chance sending it here instead. this is related to the first report i sent, which others experienced too. (https://marc.info/?l=openbsd-misc&m

Re: man, man.conf and /usr/ports/infrastructure/man

2015-04-18 Thread dan mclaughlin
On Sat, 18 Apr 2015 16:47:20 +0200 Ingo Schwarze wrote: > Hi, > > dan mclaughlin wrote on Mon, Apr 13, 2015 at 01:13:16AM -0400: > > > i think i found the perfect places for this in both ports(7) > > and the FAQ. i'm sure the wording can be improved, but dif

Re: man, man.conf and /usr/ports/infrastructure/man

2015-04-12 Thread dan mclaughlin
On Sun, 12 Apr 2015 23:03:17 +0200 Ingo Schwarze wrote: > Hi, > > dan mclaughlin wrote on Sun, Apr 12, 2015 at 04:43:31PM -0400: > > > it seems that /usr/ports/infrastructure/man is not searched by default, > > Correct. The reason is that that directory does not e

man, man.conf and /usr/ports/infrastructure/man

2015-04-12 Thread dan mclaughlin
it seems that /usr/ports/infrastructure/man is not searched by default, and there is no example in man.conf for it. given that some pages like dpb(1) are there, and referenced thruout a number of pages (eg bsd.port.mk), this seems an oversight. on a releated note, it also seems that ports/infrastr

wsdisplay.4: document IOCTLs

2015-03-26 Thread dan mclaughlin
there were a number of common IOCTLs that weren't documented. i read the code pretty thoroughly to make sure everything here is correct. there are some things i don't know, like what 'stride' is. currently it just mentions that it should be 1 for VGA. i read into the rasops code as far as i could,

wsdisplay.c: change variable 'no' to 'idx' for clarity/consistency

2015-03-25 Thread dan mclaughlin
--- sys/dev/wscons/wsdisplay.c.orig Mon Oct 27 16:28:53 2014 +++ sys/dev/wscons/wsdisplay.c Wed Mar 25 17:24:11 2015 @@ -1641,7 +1641,7 @@ int wsdisplay_switch3(void *arg, int error, int waitok) { struct wsdisplay_softc *sc = arg; - int no; + int idx; struct wsscr

Re: memory leak in wsdisplay.c (during WSDISPLAY_LDFONT)

2015-03-23 Thread dan mclaughlin
On Sun, 22 Mar 2015 23:45:49 +0100 (CET) Mark Kettenis wrote: > > Date: Sun, 22 Mar 2015 17:47:54 -0400 > > from: dan mclaughlin > > > > On Sun, 22 Mar 2015 14:33:36 +0100 (CET) Mark Kettenis > > wrote: > > > > Date: Sun, 22 Mar 2015 0

Re: memory leak in wsdisplay.c (during WSDISPLAY_LDFONT)

2015-03-22 Thread dan mclaughlin
On Sun, 22 Mar 2015 14:33:36 +0100 (CET) Mark Kettenis wrote: > > Date: Sun, 22 Mar 2015 04:30:54 -0400 > > from: dan mclaughlin > > > > i think i found a memory leak in wsdisplay.c. when adding a font, wsfontload > > loads the font data into a buffer, and p

memory leak in wsdisplay.c (during WSDISPLAY_LDFONT)

2015-03-22 Thread dan mclaughlin
i think i found a memory leak in wsdisplay.c. when adding a font, wsfontload loads the font data into a buffer, and passes that thru the ioctl in a wsdisplay_font struct. in wsdisplay.c where the ioctl is handled, a new buffer of kernel memory is allocated and the data is then copied there, via cop

Re: Do you need/prefer the non-DUID option in the installer?

2015-03-16 Thread dan mclaughlin
On Sun, 15 Mar 2015 21:27:41 -0600 Abel Abraham Camarillo Ojeda wrote: > On Sun, Mar 15, 2015 at 5:45 PM, Theo de Raadt > wrote: > > > DUID support was written so that we could solve a problem, without > > a question. This is a mop-up operation. The question being posed > > is not "shall we