Skip to content
Snippets Groups Projects
Commit 24c7ba70 authored by rswindell's avatar rswindell
Browse files

SAVELINE/RESTORELINE macros now save/restore current attribute (curatr)

at time of save correctly (no longer assumes LIGHTGRAY).
parent 5eea760f
No related branches found
No related tags found
No related merge requests found
......@@ -250,7 +250,8 @@ public:
long autoterm; /* Autodetected terminal type */
char slbuf[SAVE_LINES][LINE_BUFSIZE+1]; /* Saved for redisplay */
char slatr[SAVE_LINES]; /* Starting attribute of each line */
char slcnt; /* Number of lines currently saved */
char slcuratr[SAVE_LINES]; /* Ending attribute of each line */
int slcnt; /* Number of lines currently saved */
char lbuf[LINE_BUFSIZE+1];/* Temp storage for each line output */
int lbuflen; /* Number of characters in line buffer */
char latr; /* Starting attribute of line buffer */
......
......@@ -800,12 +800,14 @@ enum { /* Values of mode for userlist function */
#define CLS outchar(FF)
#define WHERE __LINE__,__FILE__
#define SAVELINE { slatr[slcnt]=latr; \
sprintf(slbuf[slcnt<SAVE_LINES ? slcnt++ : slcnt] \
,"%.*s",lbuflen,lbuf); \
slcuratr[slcnt]=curatr; \
sprintf(slbuf[slcnt],"%.*s",lbuflen,lbuf); \
if(slcnt<SAVE_LINES) slcnt++; \
lbuflen=0; }
#define RESTORELINE { lbuflen=0; attr(slatr[--slcnt]); \
#define RESTORELINE { lbuflen=0; if(slcnt) --slcnt; \
attr(slatr[slcnt]); \
rputs(slbuf[slcnt]); \
curatr=LIGHTGRAY /*lclatr(-1) */; }
curatr=slcuratr[slcnt]; }
#define RIOSYNC(x) { if(online==ON_REMOTE) riosync(x); }
#define SYNC { getnodedat(cfg.node_num,&thisnode,0); \
RIOSYNC(0); \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment