#define poslt(p1,p2) ( (p1).y < (p2).y || ( (p1).y == (p2).y && (p1).x < (p2).x ) )
#define posle(p1,p2) ( (p1).y < (p2).y || ( (p1).y == (p2).y && (p1).x <= (p2).x ) )
#define poseq(p1,p2) ( (p1).y == (p2).y && (p1).x == (p2).x )
-#define posdiff(p1,p2) ( ((p2).y - (p1).y) * (cols+1) + (p2).x - (p1).x )
+#define posdiff(p1,p2) ( ((p1).y - (p2).y) * (cols+1) + (p1).x - (p2).x )
#define incpos(p) ( (p).x == cols ? ((p).x = 0, (p).y++, 1) : ((p).x++, 0) )
#define decpos(p) ( (p).x == 0 ? ((p).x = cols, (p).y--, 1) : ((p).x--, 0) )
Context ctx;
ctx = get_ctx();
if (ctx) {
+ if (seen_disp_event)
+ update_sbar();
if ((seen_key_event && (cfg.scroll_on_key)) ||
(seen_disp_event && (cfg.scroll_on_disp))) {
disptop = 0; /* return to main screen */
seen_disp_event = seen_key_event = 0;
- update_sbar();
}
do_paint(ctx, TRUE);
sys_cursor(curs.x, curs.y - disptop);
*/
void term_size(int newrows, int newcols, int newsavelines)
{
- tree234 *newsb, *newscreen, *newalt;
- unsigned long *newdisp, *oldline, *line;
- int i, j, ccols;
+ tree234 *newalt;
+ unsigned long *newdisp, *line;
+ int i, j;
int sblen;
int save_alt_which = alt_which;
/*
* Perform an actual beep if we're not overloaded.
*/
- if ((!cfg.bellovl || !beep_overloaded)
- && cfg.beep != 0) {
- if (cfg.beep != 2)
- beep(cfg.beep);
- else if (cfg.beep == 2) {
+ if (!cfg.bellovl || !beep_overloaded) {
+ beep(cfg.beep);
+ if (cfg.beep == BELL_VISUAL) {
in_vbell = TRUE;
vbell_timeout = ticks + VBELL_TIMEOUT;
term_update();
case ANSI('5', '#'):
nlattr = LATTR_NORM;
break;
- case ANSI('6', '#'):
+ default: /* spiritually case ANSI('6', '#'): */
nlattr = LATTR_WIDE;
break;
}
val = c - 'A' + 10;
else if (c >= 'a' && c <= 'a' + max - 10)
val = c - 'a' + 10;
- else
+ else {
termstate = TOPLEVEL;
+ break;
+ }
osc_string[osc_strlen++] = val;
if (osc_strlen >= 7) {
palette_set(osc_string[0],
ATTR_BLINK)));
break;
#endif
+ default: break; /* placate gcc warning about enum use */
}
if (selstate != NO_SELECTION) {
pos cursplus = curs;
case MBT_WHEEL_DOWN:
encstate = 0x61;
break;
+ default: break; /* placate gcc warning about enum use */
}
switch (a) {
case MA_DRAG:
return;
is_down = b;
break;
+ default: break; /* placate gcc warning about enum use */
}
if (shift)
encstate += 0x04;