[dev] [st] [bug?] black, defaultbg, and altscreen

2013-08-14 Thread Timothy L.
Hi, I've noticed a very minor issue when the first color (black) and 'defaultbg' are not set to the same color. I've attached a diff which demonstrates the issue if you do the following: 1. open a st window 2. run 'man st' Part of the background will initially be whatever color 'black' is set to

Re: [dev] [sbase] Portability of chvt

2013-08-14 Thread sin
On Wed, Aug 14, 2013 at 05:09:42PM -0400, Calvin Morrison wrote: > On 14 August 2013 14:12, Roberto E. Vargas Caballero wrote: > > Hello, > > > > I was testing some of the tools of sbase, and after > > trying chvt I could see that it inserts directly in the code > > the ioctl values of lin

Re: [dev] [sbase] Portability of chvt

2013-08-14 Thread Calvin Morrison
On 14 August 2013 14:12, Roberto E. Vargas Caballero wrote: > Hello, > > I was testing some of the tools of sbase, and after > trying chvt I could see that it inserts directly in the code > the ioctl values of linux, without including the header of > the linux kernel. The problem comes whe

[dev] [sbase] Portability of chvt

2013-08-14 Thread Roberto E. Vargas Caballero
Hello, I was testing some of the tools of sbase, and after trying chvt I could see that it inserts directly in the code the ioctl values of linux, without including the header of the linux kernel. The problem comes when you try it with other operating system. You don't get any compilation

[dev] [sbase] [patch v2] Add strings(1)

2013-08-14 Thread sin
Hi, Fixed to use libc I/O. No manpage yet. David, what you think of my other id(1) patch? Thanks, sin >From 520d7a64cd2c40c1c63ce7ea1d954b5efb166c98 Mon Sep 17 00:00:00 2001 From: sin Date: Wed, 14 Aug 2013 10:41:55 +0100 Subject: [PATCH] Add strings(1) --- Makefile | 1 + strings.c | 65 +

Re: [dev] [sbase] [patch] Add strings(1)

2013-08-14 Thread sin
On Wed, Aug 14, 2013 at 06:40:01PM +0400, Alexander Sedov wrote: > 2013/8/14 sin : > > Hi, > > > > Added a barebones strings(1) implementation. Let me know > > if you guys want this. > > > > Thanks, > > sin > Aren't you printf() ing non-null-terminated string? This can explode. Em no, it is using

Re: [dev] [sbase] [patch] Add strings(1)

2013-08-14 Thread sin
On Wed, Aug 14, 2013 at 11:59:22AM -0400, Galos, David wrote: > >> + while ((r = read(fd, &c, 1) > 0)) { > >> + offset++; > >> + if (isprint(c)) { > >> + span++; > > > > I think is better use the buffer interface here. Calling getc > > will save a lot

Re: [dev] [sbase] [patch] Add strings(1)

2013-08-14 Thread Galos, David
>> + while ((r = read(fd, &c, 1) > 0)) { >> + offset++; >> + if (isprint(c)) { >> + span++; > > I think is better use the buffer interface here. Calling getc > will save a lot of system calls and it will improve the performace > of the application. N

[dev] [utmp][PATCH] Fix portability problems

2013-08-14 Thread Roberto E. Vargas Caballero
utmp interface is a very system dependet part in Unix. There are three different interfaces: SystemV, POSIX and BSD, and they are incompatibles between them. Utmp was using POSIX interface, but not all the systems implement it (for examle OpenBSD doesn't it), so it is desirable add the code for the

Re: [dev] [sbase] [patch] Add strings(1)

2013-08-14 Thread Roberto E. Vargas Caballero
> + while ((r = read(fd, &c, 1) > 0)) { > + offset++; > + if (isprint(c)) { > + span++; I think is better use the buffer interface here. Calling getc will save a lot of system calls and it will improve the performace of the application. -- Roberto

Re: [dev] [sbase] [patch] Add strings(1)

2013-08-14 Thread Alexander Sedov
2013/8/14 sin : > Hi, > > Added a barebones strings(1) implementation. Let me know > if you guys want this. > > Thanks, > sin Aren't you printf() ing non-null-terminated string? This can explode.

[dev] [sbase] [patch] Add strings(1)

2013-08-14 Thread sin
Hi, Added a barebones strings(1) implementation. Let me know if you guys want this. Thanks, sin >From 311992f992c040caf2347c21e35757d713ca7c8d Mon Sep 17 00:00:00 2001 From: sin Date: Wed, 14 Aug 2013 10:41:55 +0100 Subject: [PATCH] Add strings(1) --- Makefile | 1 + strings.c | 70