summaryrefslogtreecommitdiff
path: root/audio/cam/patches/patch-ad
blob: 09c3abfe03099802cd3a207d9aad0c31d551747b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
$NetBSD: patch-ad,v 1.6 2000/04/27 20:44:21 mycroft Exp $

--- screens.c.orig	Mon Oct 21 14:18:25 1996
+++ screens.c	Thu Apr 27 16:41:05 2000
@@ -25,14 +25,15 @@
 #include "cam.h" 
 
 #include <strings.h>
+#include <stdlib.h>
 
 void finish(int sig)
 {
     close_mixer();
     echo();
-    endwin();
     clear();
     refresh();
+    endwin();
     if (sig != 0)
        exit(1);
 }
@@ -40,19 +41,21 @@
    
 void set_screen(void)
 {
-   char dummy[COLS];
+   char *dummy;
    int left, right;
 
-   left = ( COLS - 15 - strlen(VERSION_HIGH) - strlen(VERSION_LOW) ) / 2;
-   right = COLS - 15 - strlen(VERSION_HIGH) - strlen(VERSION_LOW) - left; 
+   left = ( COLS - 16 - strlen(VERSION_HIGH) - strlen(VERSION_LOW) ) / 2;
+   right = COLS - 16 - strlen(VERSION_HIGH) - strlen(VERSION_LOW) - left; 
    clear();
    leaveok(stdscr ,TRUE);
    attrset(COLOR_PAIR( COLOR_SCREEN ) | A_BOLD);
-   sprintf(dummy,"%*cCAM %s.%s for Linux%*c",left,' ',VERSION_HIGH,VERSION_LOW,right,' ');
+   asprintf(&dummy, "%*cCAM %s.%s for NetBSD%*c",left,' ',VERSION_HIGH,VERSION_LOW,right,' ');
    mvaddstr(0,0,dummy);
-   sprintf(dummy," Cpu's Audio Mixer %s.%s%*cauthor : Jan 'TWP' VANDENBERGHE (c)1994-1996 ",VERSION_HIGH,VERSION_LOW,COLS-20-45-strlen(VERSION_HIGH)-strlen(VERSION_LOW),' ');
-   mvaddstr(LINES-1,0,dummy );
-   attrset(A_NORMAL | A_BOLD );
+   free(dummy);
+   asprintf(&dummy, " Cpu's Audio Mixer %s.%s%*cauthor : Jan 'TWP' VANDENBERGHE (c)1994-1996 ",VERSION_HIGH,VERSION_LOW,COLS-20-45-strlen(VERSION_HIGH)-strlen(VERSION_LOW),' ');
+   mvaddstr(LINES-1,0,dummy);
+   free(dummy);
+   attrset(A_NORMAL | A_BOLD);
    mvaddstr(LINES-2,4,"Press 'h' for help");
 }
 
@@ -64,17 +67,17 @@
    mvaddstr(Y+1,X+8,"Left"); 
    mvaddstr(Y+2,X+8,"Right"); 
    attrset(COLOR_PAIR(COLOR_SLIDER) | A_ALTCHARSET);
-   mvaddstr(Y+1,X+14,"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ"); 
-   mvaddstr(Y+2,X+14,"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ"); 
+   mvhline(Y+1,X+14,ACS_HLINE,21);
+   mvhline(Y+2,X+14,ACS_HLINE,21);
    attrset(COLOR_PAIR(COLOR_VOL1) | A_ALTCHARSET);
-   mvaddstr(Y,X+14,"ù ù ù ù");
-   mvaddstr(Y+3,X+14,"ù ù ù ù");
+   mvaddstr(Y,X+14,". . . .");
+   mvaddstr(Y+3,X+14,". . . .");
    attrset(COLOR_PAIR(COLOR_VOL2) | A_ALTCHARSET);
-   mvaddstr(Y,X+22,"ù ù ù ù");
-   mvaddstr(Y+3,X+22,"ù ù ù ù");
+   mvaddstr(Y,X+22,". : . .");
+   mvaddstr(Y+3,X+22,". : . .");
    attrset(COLOR_PAIR(COLOR_VOL3) | A_ALTCHARSET);
-   mvaddstr(Y,X+30,"ù ù ù");
-   mvaddstr(Y+3,X+30,"ù ù ù");
+   mvaddstr(Y,X+30,". . .");
+   mvaddstr(Y+3,X+30,". . .");
 }
 
 /*
@@ -87,21 +90,21 @@
 {
    if ((level == 1 ) || ( level == 2 )) { 
       attrset(A_NORMAL  | A_ALTCHARSET); 
-      mvaddch(Y,X++,205); 
+      mvaddch(Y,X++,ACS_HLINE);
    } 
    if ( level != 5) { 
-      #define ACT_HANDLE COLOR_PAIR(COLOR_HANDLE) | A_BOLD | A_ALTCHARSET
-      #define NACT_HANDLE COLOR_PAIR(COLOR_HANDLE) | A_DIM | A_ALTCHARSET    
+      #define ACT_HANDLE COLOR_PAIR(COLOR_HANDLE) | A_BOLD
+      #define NACT_HANDLE COLOR_PAIR(COLOR_HANDLE) | A_DIM
       attrset(( active == TRUE  ? ACT_HANDLE : NACT_HANDLE)); 
-      mvaddch(Y,X++,178); 
+      mvaddch(Y,X++,(active ? 'O' : 'o'));
    } 
    if ((level == 3) || (level == 2)) { 
       attrset(A_NORMAL | A_ALTCHARSET); 
-      mvaddch(Y,X++,205); 
+      mvaddch(Y,X++,ACS_HLINE);
    } 
    if ( level  == 5 ) { 
       attrset(A_NORMAL | A_ALTCHARSET); 
-      mvaddch(Y,X++,205); 
+      mvaddch(Y,X++,ACS_HLINE);
    }    
 }
 
@@ -113,6 +116,7 @@
         fprintf(stderr,"The screensize has to be minimum 80x25\n");
         exit(1);
      }
+     curs_set(0);
      make_colors();
 }
 
@@ -181,9 +185,9 @@
    char ch; 
    touchwin(stdscr); 
    help_win = newwin(15,50,(LINES - 15) / 2,(COLS - 50) / 2);
-   wattrset(help_win, COLOR_PAIR( COLOR_HELP) | A_BOLD | A_ALTCHARSET); 
+   wattrset(help_win, COLOR_PAIR( COLOR_HELP) | A_BOLD );
    leaveok(help_win,TRUE); 
-   wborder(help_win,179,179,196,196,218, 191,192,217); 
+   wborder(help_win,ACS_VLINE,ACS_VLINE,ACS_HLINE,ACS_HLINE,ACS_ULCORNER,ACS_URCORNER,ACS_LLCORNER,ACS_LRCORNER);
    wattrset(help_win, A_NORMAL | A_BOLD);
    mvwaddstr(help_win,2,2," Left/Right : Lower/Higher "); 
    mvwaddstr(help_win,3,2," Up/Down    : Previous/Next ");