[dev] trying Stali in emulator

2016-09-16 Thread Greg Reagle
On Thu, Sep 15, 2016, at 06:25 PM, Evan Gates wrote: > There's a new make file for each package anyway (stali.mk), so it > doesn't matter if it's written in make+sh or mk+rc the amount of work > is the same. I'd like to try out Stali. I don't have and don't want a Raspberry Pi. I have an old

Re: [dev] I wrote a pager

2016-09-16 Thread Teodoro Santoni
Hi, 2016-09-16 17:40 GMT, Evan Gates : > On Fri, Sep 16, 2016 at 9:25 AM, wrote >> Thank you Greg for writing such a fantastic pager. I could increase lines >> however to something more than 22. > > char *lines = getenv("LINES"); > int page_size = lines

Re: [dev] I wrote a pager

2016-09-16 Thread Greg Reagle
On Fri, Sep 16, 2016, at 04:10 PM, Martin Kühne wrote: > a few gripes: > > atoi: personally I prefer strtol and range-checks on the result and/or > errno. > getenv(LINES) is a start, but you might also want to offer > ioctl(TIOCGWINSZ) where available. > always NULL-check the return value of

Re: [dev] I wrote a pager - errno

2016-09-16 Thread Greg Reagle
On Fri, Sep 16, 2016, at 12:26 PM, u...@netbeisser.de wrote: > > #include > > #include > > > > int main() > > { > > const int page_size = 22; > > int count = 0; > > int ch; > > FILE *tty; > > > > if ((tty = fopen("/dev/tty", "a+")) == NULL) > > return(errno); >

Re: [dev] I wrote a pager

2016-09-16 Thread Martin Kühne
a few gripes: atoi: personally I prefer strtol and range-checks on the result and/or errno. getenv(LINES) is a start, but you might also want to offer ioctl(TIOCGWINSZ) where available. always NULL-check the return value of getenv. what does your pager do on binary input and unexpected things?

Re: [dev] I wrote a pager

2016-09-16 Thread Greg Reagle
Thanks to all who gave feedback. I made a few enhancements. Hopefully they're not bloat. I think it has significantly better functionality for only several more SLOC. Once again, looking for feedback. Also, do you suckless maintainers want to put this into sbase? It tries to get the size of

Re: [dev] trying Stali in emulator

2016-09-16 Thread Greg Reagle
On Fri, Sep 16, 2016, at 08:14 AM, Kamil Cholewiński wrote: > qemu works fine I ran qemu-img create stali.img 256M then qemu-system-x86_64 -m 128 -cdrom stali.iso -hda stali.img -boot d and I get attached screen shot. I don't think I can copy and paste from qemu.

Re: [dev] trying Stali in emulator

2016-09-16 Thread Kamil Cholewiński
On Fri, 16 Sep 2016, Greg Reagle wrote: > I'd like to try out Stali. I don't have and don't want a Raspberry Pi. > I have an old desktop PC (currently running Debian) that I could use for > real hardware, or I could use an emulator. All else being equal, I > prefer an

Re: [dev] trying Stali in emulator

2016-09-16 Thread Greg Reagle
On Fri, Sep 16, 2016, at 08:51 AM, Greg Reagle wrote: > On Fri, Sep 16, 2016, at 08:14 AM, Kamil Cholewiński wrote: > > qemu works fine > > I ran > qemu-img create stali.img 256M > then > qemu-system-x86_64 -m 128 -cdrom stali.iso -hda stali.img -boot d > and I get attached screen shot. I

Re: [dev] I wrote a pager

2016-09-16 Thread Johnathan McKnight
Can you elaborate? On Fri, Sep 16, 2016 at 2:41 PM, Teodoro Santoni wrote: > Hi, > > 2016-09-16 17:40 GMT, Evan Gates : >> On Fri, Sep 16, 2016 at 9:25 AM, wrote >>> Thank you Greg for writing such a fantastic pager. I could

[dev] I wrote a pager

2016-09-16 Thread Greg Reagle
On Fri, Sep 16, 2016, at 10:01 AM, Greg Reagle wrote: > Greetings. I am running stali in qemu and and it seems to lack a pager. > Is it a goal of the suckless project to write a suckless pager for > sbase? I see that plan9port already has a pager called "p". What about > importing that into

Re: [dev] I wrote a pager

2016-09-16 Thread u
On Fri, Sep 16, 2016 at 11:43:37AM -0400, Greg Reagle wrote: > On Fri, Sep 16, 2016, at 10:01 AM, Greg Reagle wrote: > > Greetings. I am running stali in qemu and and it seems to lack a pager. > > Is it a goal of the suckless project to write a suckless pager for > > sbase? I see that

Re: [dev] I wrote a pager - errno

2016-09-16 Thread u
On Fri, Sep 16, 2016 at 11:43:37AM -0400, Greg Reagle wrote: > On Fri, Sep 16, 2016, at 10:01 AM, Greg Reagle wrote: > > Greetings. I am running stali in qemu and and it seems to lack a pager. > > Is it a goal of the suckless project to write a suckless pager for > > sbase? I see that plan9port

Re: [dev] I wrote a pager

2016-09-16 Thread Evan Gates
On Fri, Sep 16, 2016 at 9:25 AM, wrote > Thank you Greg for writing such a fantastic pager. I could increase lines > however to something more than 22. char *lines = getenv("LINES"); int page_size = lines ? atoi(lines) : 24;