Style fixes. - sam - An updated version of the sam text editor.
 (HTM) git clone git://vernunftzentrum.de/sam.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit c146644eea7f7b5d0e77df096ba65612ac4fe791
 (DIR) parent 6a7718b03b78265e0a434e398f5c8775d495caf0
 (HTM) Author: Rob King <jking@deadpixi.com>
       Date:   Thu,  1 Sep 2016 15:33:09 -0500
       
       Style fixes.
       
       Diffstat:
         samterm/main.c                      |       7 ++++---
       
       1 file changed, 4 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/samterm/main.c b/samterm/main.c
       @@ -536,7 +536,7 @@ cmdscrolldownline(Flayer *l, long a, Text *t)
        {
            long tot = scrtotal(l);
            long p0 = l->origin + frcharofpt(&l->f, Pt(l->f.r.min.x, l->f.r.min.y + l->f.fheight));
       -    long p1 = l->origin + frcharofpt(&l->f, Pt(l->f.r.min.x, l->f.r.max.y - l->f.fheight/2));
       +    long p1 = l->origin + frcharofpt(&l->f, Pt(l->f.r.min.x, l->f.r.max.y - l->f.fheight / 2));
        
            if (p0 < tot && p1 < tot)
                horigin(t->tag, p0);
       @@ -858,7 +858,7 @@ type(Flayer *l, int res)        /* what a bloody mess this is -- but it's getting bette
                }
        
            if (k.k == Kcommand){
       -        if (k.c < 0 || k.c >= Cmax)
       +        if (k.c < 0 || k.c >= Cmax || commands[k.c].f == NULL)
                    panic("command table miss");
        
                CommandEntry *e = &commands[k.c];
       @@ -867,7 +867,8 @@ type(Flayer *l, int res)        /* what a bloody mess this is -- but it's getting bette
                        a = e->f(l, a, t);
                    else{
                        Flayer *lt = flwhich(k.p);
       -                lt->p0 = e->f(lt, lt->p0, (Text *)lt->user1);
       +                if (lt)
       +                    lt->p0 = e->f(lt, lt->p0, (Text *)lt->user1);
                    }
                }
            }