2964322450
Also, delete some changes we don't actually need.
124 lines
4.1 KiB
Text
124 lines
4.1 KiB
Text
$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 ");
|