Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / sysutils / whowatch / patches / patch-ab
blobc15f72bcc2248ef3222743b350c0b1ffce58f4c5
1 $NetBSD$
3 --- screen.c.orig       Tue Jun  6 20:53:24 2000
4 +++ screen.c
5 @@ -6,6 +6,7 @@
6  struct window info_win;
7  static chtype *curs_buf;
8  extern int screen_cols;
9 +int old_cur_vis = 1; /* this is the cursor mode, set to normal as default */
11  char *help_line[] = 
12         {
13 @@ -38,7 +39,7 @@
14         }
16         wattrset(users_list.wd, A_BOLD);
17 -        printf("\033[?25l");                    /* disable cursor */
18 +        old_cur_vis = curs_set(0);                    /* disable cursor */
20          start_color();
21         init_pair(1,COLOR_CYAN,COLOR_BLACK);
22 @@ -58,6 +59,7 @@
23         
24         cbreak();
25          nodelay(stdscr,TRUE);
26 +       keypad(info_win.wd, TRUE);
27          scrollok(users_list.wd,TRUE);
28          noecho();
29  }                              
30 @@ -67,7 +69,7 @@
31         werase(help_win.wd);
32         wrefresh(help_win.wd);
33         endwin();
34 -        printf("\033[?25h");            /* enable cursor */
35 +        curs_set(old_cur_vis);            /* enable cursor */
36  }
38  void cursor_on(struct window *w, int line)
39 @@ -116,7 +118,8 @@
40                 if (i > w->cols) break;
41                 if (*p < 17){
42                         i--;
43 -                       waddnstr(w->wd, q, p - q);
44 +                       if (p - q != 0)
45 +                               waddnstr(w->wd, q, p - q);
46                         wattrset(w->wd, COLOR_PAIR(*p));
47                         q = p + 1;
48                 }