[Aboriginal] Merry christmas, I have found two bugs

David Seikel onefang at gmail.com
Thu Dec 27 04:21:21 PST 2012

On Thu, 27 Dec 2012 06:06:53 -0600 Rob Landley <rob at landley.net> wrote:

> On 12/27/2012 12:56:07 AM, David Seikel wrote:
> > On Thu, 27 Dec 2012 00:37:46 -0600 Rob Landley <rob at landley.net>  
> > wrote:
> > > Since ls isn't doiing any of that, probing would just be awkward
> > > so toysh should set COLUMNS to a sane value. The problem is,
> > > we're not using toysh yet because it's still just a stub...
> > 
> > I got some or all of that terminal sizing stuff in my editor thingy
> > already if I remember correctly.  I remember you wanted me to cut it
> > down into tiny bits to start with, so you don't have to digest the  
> > huge
> > lump I sent.
> Basically what I'd like is a self-contained line reader. More or less
> a getline variant that can handle cursoring left and right to insert  
> stuff, handle backspace past a wordwrap (which on unix requires
> knowing the screen width and your current cursor position), and one
> that lets up/down escape sequences be hooked for less/more screen
> scrolling, vi line movement, shell command history, and so on.

Which is most of an editor already, so how to break it up into bite
sized morsels?

I'll think about it later, got paying work to do, then sleep.

> There's sort of three levels here, the first is "parse raw input,  
> assembling escape sequences into cursor-left and similar as
> necessary". (That's the one I had to redo in busybox vi because they
> didn't do it right.)
> The second is "edit a line of text, handling cursoring _within_ the  
> line". That's the better/interactive getline().
> The third is handling escapes from that line triggering behavior in
> the larger command (cursor up and cursor down do different things in
> less, in vi, and in shell command history).
> The fiddly bit is that terminal_size() sort of has to integrate with  
> all of these. Possibly I need to have width and height be members of  
> struct toy_context. Or have the better_getline() take a pointer to a  
> state structure it can update, containing that info...
> > Two problems - A) I wanted to get most of it working to
> > sort out HOW I would get it all working, before cutting it down to
> > small bite sized bits later.  B) had no time to do anything with it
> > since I posted the big blob, a new contract was keeping me busy.
> I know the feeling. :)

A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/aboriginal-landley.net/attachments/20121227/581aaa39/attachment-0003.pgp>

More information about the Aboriginal mailing list