URI: 
       tdebugging - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit b4135f04f136150b27a89876d51797ba2a8a78c0
   DIR parent c619cc2cb9023d3f6ed9db515ff37b6479795245
  HTML Author: rsc <devnull@localhost>
       Date:   Fri,  7 Jan 2005 17:26:07 +0000
       
       debugging
       
       Diffstat:
         M src/cmd/samterm/io.c                |      13 +++++++------
         M src/cmd/samterm/mesg.c              |       8 ++++----
         M src/cmd/samterm/samterm.h           |       2 ++
       
       3 files changed, 13 insertions(+), 10 deletions(-)
       ---
   DIR diff --git a/src/cmd/samterm/io.c b/src/cmd/samterm/io.c
       t@@ -9,6 +9,7 @@
        #include "flayer.h"
        #include "samterm.h"
        
       +int        protodebug;
        int        cursorfd;
        int        plumbfd = -1;
        int        input;
       t@@ -126,12 +127,12 @@ again:
                if(block & (1<<RResize))
                        alts[RResize].op = CHANNOP;
        
       -if(0) print("waitforio %c%c%c%c%c\n",
       -        "h-"[alts[RHost].op == CHANNOP],
       -        "k-"[alts[RKeyboard].op == CHANNOP],
       -        "m-"[alts[RMouse].op == CHANNOP],
       -        "p-"[alts[RPlumb].op == CHANNOP],
       -        "R-"[alts[RResize].op == CHANNOP]);
       +        if(protodebug) print("waitforio %c%c%c%c%c\n",
       +                "h-"[alts[RHost].op == CHANNOP],
       +                "k-"[alts[RKeyboard].op == CHANNOP],
       +                "m-"[alts[RMouse].op == CHANNOP],
       +                "p-"[alts[RPlumb].op == CHANNOP],
       +                "R-"[alts[RResize].op == CHANNOP]);
        
                alts[NRes].op = CHANEND;
        
   DIR diff --git a/src/cmd/samterm/mesg.c b/src/cmd/samterm/mesg.c
       t@@ -38,9 +38,9 @@ rcv(void)
                static int i = 0;
                static int errs = 0;
        
       -if(0) print("rcv in\n");
       +        if(protodebug) print("rcv in\n");
                while((c=rcvchar()) != -1){
       -if(0) print(".");
       +                if(protodebug) print(".");
                        switch(state){
                        case 0:
                                h.type = c;
       t@@ -81,10 +81,10 @@ if(0) print(".");
                                }
                                break;
                        }
       -if(0) print(":");
       +                if(protodebug) print(":");
                }
        
       -if(0) print("rcv out\n");
       +        if(protodebug) print("rcv out\n");
        }
        
        Text *
   DIR diff --git a/src/cmd/samterm/samterm.h b/src/cmd/samterm/samterm.h
       t@@ -56,6 +56,8 @@ enum Resource
                NRes,
        };
        
       +extern int        protodebug;
       +
        extern Text        **text;
        extern uchar        **name;
        extern ushort        *tag;