View | Details | Raw Unified | Return to bug 99235
Collapse All | Expand All

(-)/usr/home/db/linrad/Makefile (-15 / +20 lines)
Lines 2-38 Link Here
2
# Date created:		7 July 2004
2
# Date created:		7 July 2004
3
# Whom:			db
3
# Whom:			db
4
#
4
#
5
# $FreeBSD: ports/comms/linrad/Makefile,v 1.5 2006/05/03 23:38:36 edwin Exp $
5
# $FreeBSD: ports/comms/linrad/Makefile,v 1.1 2004/07/14 16:09:39 pav Exp $
6
#
6
#
7
7
8
PORTNAME=	linrad
8
PORTNAME=	linrad
9
PORTVERSION=	0.16a
9
PORTVERSION=	2.14
10
CATEGORIES=	comms hamradio
10
CATEGORIES=	comms
11
MASTER_SITES=	http://www.nitehawk.com/sm5bsz/linuxdsp/archive/
11
MASTER_SITES=	http://www.nitehawk.com/sm5bsz/linuxdsp/archive/
12
DISTNAME=	lir01-20
12
DISTNAME=	lir02-14
13
EXTRACT_SUFX=	.tbz
13
EXTRACT_SUFX=	.tbz
14
DIST_SUBDIR=	${PORTNAME}
14
DIST_SUBDIR=	${PORTNAME}
15
15
16
MAINTAINER=	db@db.net
16
MAINTAINER=	db@db.net
17
COMMENT=	Amateur Radio DSP utility (SDR)
17
COMMENT=	Amateur Radio DSP utility (SDR)
18
18
19
LIB_DEPENDS=	vga.1:${PORTSDIR}/graphics/svgalib
20
BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
19
BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
21
20
22
WRKSRC=		${WRKDIR}/${PORTNAME}-01.20
21
WRKSRC=		${WRKDIR}/${PORTNAME}-02.14
23
22
24
USE_AUTOTOOLS=	autoconf:253
23
USE_AUTOTOOLS=	autoconf:253
25
HAS_CONFIGURE=	yes
24
HAS_CONFIGURE=	yes
26
USE_BZIP2=	yes
25
USE_BZIP2=	yes
27
26
USE_X_PREFIX=	yes
28
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
29
27
30
post-patch:
28
post-patch:
31
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
29
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
32
		${WRKSRC}/configure.in ${WRKSRC}/Makefile.in
30
	-e 's|%%X11BASE%%|${X11BASE}|g' \
33
31
	-e 's|-pthread|${PTHREAD_LIBS}|' ${WRKSRC}/Makefile.in
32
	@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}/|' \
33
		${WRKSRC}/help.c
34
do-install:
34
do-install:
35
	${INSTALL_PROGRAM} -m04555 ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
35
	${MKDIR} ${DATADIR}
36
	${INSTALL_DATA} ${WRKSRC}/errors.lir ${DATADIR}/errors.lir
37
	${INSTALL_DATA} ${WRKSRC}/help.lir ${DATADIR}/help.lir
38
#	${INSTALL_PROGRAM} -m04555 ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
39
	${INSTALL_PROGRAM} -m04555 ${WRKSRC}/x${PORTNAME} ${PREFIX}/bin/x${PORTNAME}
40
36
.if !defined(NOPORTDOCS)
41
.if !defined(NOPORTDOCS)
37
	${MKDIR} ${DOCSDIR}
42
	${MKDIR} ${DOCSDIR}
38
	${INSTALL_DATA} ${WRKSRC}/z_APM.txt ${DOCSDIR}/z_APM.txt
43
	${INSTALL_DATA} ${WRKSRC}/z_APM.txt ${DOCSDIR}/z_APM.txt
Lines 40-50 Link Here
40
	${INSTALL_DATA} ${WRKSRC}/z_CALIBRATE.txt ${DOCSDIR}/z_CALIBRATE.txt
45
	${INSTALL_DATA} ${WRKSRC}/z_CALIBRATE.txt ${DOCSDIR}/z_CALIBRATE.txt
41
	${INSTALL_DATA} ${WRKSRC}/z_COPYRIGHT.txt ${DOCSDIR}/z_COPYRIGHT.txt
46
	${INSTALL_DATA} ${WRKSRC}/z_COPYRIGHT.txt ${DOCSDIR}/z_COPYRIGHT.txt
42
	${INSTALL_DATA} ${WRKSRC}/z_GIFINFO.txt ${DOCSDIR}/z_GIFINFO.txt
47
	${INSTALL_DATA} ${WRKSRC}/z_GIFINFO.txt ${DOCSDIR}/z_GIFINFO.txt
43
	${INSTALL_DATA} ${WRKSRC}/z_INSTALL.txt ${DOCSDIR}/z_INSTALL.txt
44
	${INSTALL_DATA} ${WRKSRC}/z_MLOCK.txt ${DOCSDIR}/z_MLOCK.txt
48
	${INSTALL_DATA} ${WRKSRC}/z_MLOCK.txt ${DOCSDIR}/z_MLOCK.txt
49
	${INSTALL_DATA} ${WRKSRC}/z_MOUSE.txt ${DOCSDIR}/z_MOUSE.txt
50
	${INSTALL_DATA} ${WRKSRC}/z_PARALLEL_PORT.txt ${DOCSDIR}/z_PARALLEL_PORT.txt
45
	${INSTALL_DATA} ${WRKSRC}/z_SETTINGS.txt ${DOCSDIR}/z_SETTINGS.txt
51
	${INSTALL_DATA} ${WRKSRC}/z_SETTINGS.txt ${DOCSDIR}/z_SETTINGS.txt
46
	${INSTALL_DATA} ${WRKSRC}/z_SPEED.txt ${DOCSDIR}/z_SPEED.txt
52
	${INSTALL_DATA} ${WRKSRC}/z_USERS_EXTRA.txt ${DOCSDIR}/z_USERS_EXTRA.txt
47
	${INSTALL_DATA} ${WRKSRC}/z_SVGALIB.txt ${DOCSDIR}/z_SVGALIB.txt
48
	${INSTALL_DATA} ${WRKSRC}/z_USERS_HWARE.txt ${DOCSDIR}/z_USERS_HWARE.txt
53
	${INSTALL_DATA} ${WRKSRC}/z_USERS_HWARE.txt ${DOCSDIR}/z_USERS_HWARE.txt
49
	${INSTALL_DATA} ${WRKSRC}/z_USLEEP.txt ${DOCSDIR}/z_USLEEP.txt
54
	${INSTALL_DATA} ${WRKSRC}/z_USLEEP.txt ${DOCSDIR}/z_USLEEP.txt
50
	@${ECHO} ""
55
	@${ECHO} ""
(-)/usr/home/db/linrad/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (linrad/lir01-20.tbz) = 34b6f5ef52adf8b9a8af444db43ddf70
1
MD5 (linrad/lir02-14.tbz) = a4e451b891459023bb9272d5fe0f590b
2
SHA256 (linrad/lir01-20.tbz) = b463cf28cf4aa462961025f1a6c6d23d4504e738e67dca0a018ca31e52fb8f12
2
SHA256 (linrad/lir02-14.tbz) = 4a95bf060c900899969e83d0e164ec5e9932ffe34cf2c2485bbea6179fb8e899
3
SIZE (linrad/lir01-20.tbz) = 330472
3
SIZE (linrad/lir02-14.tbz) = 423720
(-)/usr/home/db/linrad/files/patch-Makefile.in (-56 / +76 lines)
Lines 1-57 Link Here
1
--- Makefile.in.orig	Tue May 18 09:43:30 2004
1
--- Makefile.in.orig	Sat May 27 07:48:22 2006
2
+++ Makefile.in	Sat Nov 12 11:41:30 2005
2
+++ Makefile.in	Mon Jun 19 21:40:59 2006
3
@@ -1,11 +1,14 @@
3
@@ -4,17 +4,14 @@
4
+INCLUDE=	%%LOCALBASE%%/include
4
 # Name the output files *.ol instead of *.o 
5
+LIBS=		%%LOCALBASE%%/lib
5
 # so we definitely know it is for Linux. 
6
+
6
 # (*.o files can be present by mistake) 
7
 
7
-LCC	= gcc
8
 .c.o:
8
+LCC	= ${CC}
9
-#	gcc -I/usr/local/include -c -o $*.o $<
9
 # Use the mingw cross compiler for Windows
10
-	gcc -O -W -Wimplicit -Wreturn-type -Wformat \
10
 # Name the output files *.ow instead of *.o 
11
 # so we definitely know it is for Windows.
12
 # (*.o files can be present by mistake) 
13
 WCC	= /usr/bin/i586-mingw32msvc-gcc
14
 # Always use the same flags.
15
-CFL	= -g -O -DOSNUM=1 -W -Wimplicit -Wreturn-type -Wformat \
11
--Wunused -Wcomment -Wchar-subscripts -Wshadow -Wuninitialized \
16
--Wunused -Wcomment -Wchar-subscripts -Wshadow -Wuninitialized \
12
--Wparentheses -Wstrict-prototypes -Werror -ffast-math -fforce-mem \
17
--Wparentheses -Wstrict-prototypes -Werror -ffast-math \
13
--fomit-frame-pointer -c -o $*.o \
18
--fomit-frame-pointer -c -o
14
-$< 
19
+CFL	= ${CFLAGS} -I%%LOCALBASE%%/include -I%%X11BASE%%/include -L%%LOCALBASE%%/lib -L%%X11BASE%%/lib -DOSNUM=1 -ffast-math -fomit-frame-pointer -c -o 
15
+	${CC} -I${INCLUDE} -c -o $*.o $< 
20
 CFW	= -g -O -DOSNUM=2 -W -Wimplicit -Wreturn-type -Wformat \
16
+#	gcc -O -W -Wimplicit -Wreturn-type -Wformat \
21
 -Wunused -Wcomment -Wchar-subscripts -Wshadow -Wuninitialized \
17
+#-Wunused -Wcomment -Wchar-subscripts -Wshadow -Wuninitialized \
22
 -Wparentheses -Wstrict-prototypes -Werror -ffast-math \
18
+#-Wparentheses -Wstrict-prototypes -Werror -ffast-math -fforce-mem \
23
@@ -360,7 +357,8 @@
19
+#-fomit-frame-pointer -c -o $*.o \
24
 
20
+#$< 
25
 
21
 
26
 # ---------------------- Linux console specific things ------------------
22
 .s.o:
27
-linrad: Makefile lmain.ol ui.ol uivar.ol fft1var.ol lsetad.ol hware.ol rxin.ol \
23
 	nasm -w-orphan-labels -felf -s $<
28
+all: xlinrad
24
@@ -23,7 +26,7 @@
29
+linrad: lmain.ol ui.ol uivar.ol fft1var.ol lsetad.ol hware.ol rxin.ol \
25
 tune.o txtest.o network.o mouse.o freq_control.o vgatest mousetest morse.o \
30
 wide_graph.ol getiq.ol fft0.ol fft1.ol adtest.ol screenvar.ol sigvar.ol \
26
 cwspeed.o coh_osc.o cw_carrier.o
31
 baseb_graph.ol afc_graph.ol hires_graph.ol fftasm.ol palette.ol gifsave.ol \
27
 
32
 calibrate.ol calsub.ol calsub2.ol llsqvar.ol caliq.ol hwaredriver.ol \
28
-	gcc -olinrad -lvgagl -lvga -lm \
33
@@ -374,7 +372,7 @@
29
+	${CC} -I${INCLUDE} -L${LIBS} -olinrad -lvgagl -lvga -lm \
34
 menu.ol screen.ol sdrvar.ol lsys.ol sdr14.ol keyboard_var.ol linvar.ol \
30
 -Wl,-s,-Map,linrad.map,-warn-common,--cref\
35
 fonts.ol screensub.ol membeg.ol lxsys.ol memend.ol
31
 	main.o ui.o setvga.o setad.o fft1.o buf.o mouse.o wide_graph.o \
36
 
32
 getiq.o fft0.o rxtest.o hires_graph.o fftasm.o baseb_graph.o mix2.o \
37
-	gcc -olinrad -lvgagl -lvga -lpthread -lm \
33
@@ -37,10 +40,10 @@
38
+	${CC} -olinrad -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -I%%X11BASE%%/include -L%%X11BASE%%/lib -lvgagl -lvga -lpthread -lm \
34
 cw_carrier.o fft3.o 
39
 -Wl,-Map,linrad.lmap,-warn-common,--cref \
35
 
40
 	membeg.ol lmain.ol linvar.ol ui.ol lsetad.ol fft1.ol buf.ol \
36
 vgatest: vgatest.o
41
 mouse.ol wide_graph.ol getiq.ol fft0.ol adtest.ol hires_graph.ol \
37
-	gcc -ovgatest -lvgagl -lvga -lm -Wl -s vgatest.o
42
@@ -403,7 +401,7 @@
38
+	${CC} -I${INCLUDE} -ovgatest -L${LIBS} -lvgagl -lvga -lm -Wl -s vgatest.o
43
 	$(LCC) lmain.c $(CFL) lmain.ol
39
 
44
 
40
 mousetest: mousetest.o
45
 # ---------------------- Linux X11 specific things ------------------
41
-	gcc -omousetest -lvgagl -lvga -lm -Wl -s mousetest.o
46
-xlinrad: Makefile xmain.ol ui.ol uivar.ol fft1var.ol lsetad.ol hware.ol rxin.ol \
42
+	${CC} -I${INCLUDE} -omousetest -L${LIBS} -lvgagl -lvga -lm -Wl -s mousetest.o
47
+xlinrad: xmain.ol ui.ol uivar.ol fft1var.ol lsetad.ol hware.ol rxin.ol \
43
 
48
 wide_graph.ol getiq.ol fft0.ol fft1.ol adtest.ol screenvar.ol sigvar.ol \
44
 afc_graph.o : globdef.h uidef.h fft1def.h fft2def.h screendef.h vernr.h \
49
 baseb_graph.ol afc_graph.ol hires_graph.ol fftasm.ol palette.ol gifsave.ol \
45
 	seldef.h llsqdef.h sigdef.h
50
 calibrate.ol calsub.ol calsub2.ol llsqvar.ol caliq.ol hwaredriver.ol \
46
@@ -126,3 +129,11 @@
51
@@ -420,7 +418,7 @@
47
 configure : Makefile.in conf.h.in configure.in
52
 
48
 	rm -f configure        
53
 
49
 	autoconf
54
 
50
+
55
-	gcc -oxlinrad -L/usr/X11R6/lib -lX11 -lpthread -lm \
51
+all:	vgatest mousetest linrad
56
+	${CC} -oxlinrad -L%%X11BASE%%/lib -lX11 -lpthread -lm \
52
+
57
 -Wl,-Map,linrad.xmap,-warn-common,--cref \
53
+clean:
58
 membeg.ol xmain.ol xvar.ol ui.ol lsetad.ol fft1.ol buf.ol \
54
+	rm -f vgatest mousetest linrad *.o
59
 mouse.ol wide_graph.ol getiq.ol fft0.ol adtest.ol hires_graph.ol \
55
+
60
@@ -636,13 +634,13 @@
56
+install:
61
 
57
+	install -oroot -m04566 linrad ${PREFIX}/bin/linrad	
62
 # ------------------      Tools for Linux      -----------------------
63
 vgatest: vgatest.ol
64
-	gcc -ovgatest -lvgagl -lvga -lm -Wl -s vgatest.ol
65
+	${CC} -ovgatest -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -lvgagl -lvga -lm -Wl -s vgatest.ol
66
 vgatest.ol: vgatest.c
67
-	gcc vgatest.c -c -o vgatest.ol
68
+	${CC} vgatest.c -I%%LOCALBASE%%/include -c -o vgatest.ol
69
 mousetest: mousetest.ol
70
-	gcc -omousetest -lvgagl -lvga -lm -Wl -s mousetest.ol
71
+	${CC} -omousetest -L%%LOCALBASE%%/lib -lvgagl -lvga -lm -Wl -s mousetest.ol
72
 mousetest.ol: mousetest.c
73
-	gcc mousetest.c -c -o mousetest.ol
74
+	${CC} mousetest.c -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -c -o mousetest.ol
75
 thrdef.h: rusage.h
76
 	rm -f x.x
77
 	cp thrdef.h x.x
(-)/usr/home/db/linrad/files/patch-configure.in (-31 lines)
Lines 1-31 Link Here
1
--- configure.in.orig	Tue May 18 09:43:30 2004
2
+++ configure.in	Fri Jul  9 12:49:33 2004
3
@@ -2,13 +2,13 @@
4
 rm -f conf.h
5
 AC_INIT(main.c)
6
 AC_CHECK_FILE( /usr/lib/oss/soundcard.h, OSSN="1")
7
-AC_CHECK_FILE( /usr/local/lib/oss/soundcard.h, OSSN="3")
8
+AC_CHECK_FILE( %%LOCALBASE%%/lib/oss/soundcard.h, OSSN="3")
9
 AC_CHECK_FILE( /lib/oss/soundcard.h, OSSN="5")
10
 AC_CHECK_FILE( /var/lib/oss/soundcard.h, OSSN="7")
11
 AC_CHECK_FILE( /opt/oss/soundcard.h, OSSN="9")
12
 AC_CHECK_FILE( /root/oss/soundcard.h, OSSN="11")
13
 AC_CHECK_FILE( /usr/lib/oss/include/sys/soundcard.h, OSSN="2")
14
-AC_CHECK_FILE( /usr/local/lib/oss/include/sys/soundcard.h, OSSN="4")
15
+AC_CHECK_FILE( %%LOCALBASE%%/lib/oss/include/sys/soundcard.h, OSSN="4")
16
 AC_CHECK_FILE( /lib/oss/include/sys/soundcard.h, OSSN="6")
17
 AC_CHECK_FILE( /var/lib/oss/include/sys/soundcard.h, OSSN="8")
18
 AC_CHECK_FILE( /opt/oss/include/sys/soundcard.h, OSSN="10")
19
@@ -25,10 +25,10 @@
20
 AC_SUBST(USERHWDEF)
21
 AC_CHECK_FILE( ./users_hwaredef.h, DEPS2="users_hwaredef.h")
22
 AC_SUBST(DEPS2)
23
-AC_CHECK_HEADER(vga.h,, AC_MSG_ERROR( 
24
+AC_CHECK_HEADER(%%LOCALBASE%%/include/vga.h,, AC_MSG_ERROR( 
25
 Must have svgalib package installed to compile 
26
 vga.h missing!!!))
27
-AC_CHECK_HEADER(vgagl.h,, AC_MSG_ERROR( 
28
+AC_CHECK_HEADER(%%LOCALBASE%%/include/vgagl.h,, AC_MSG_ERROR( 
29
 Must have svgalib package installed to compile 
30
 vgagl.h missing!!!))
31
 AC_CHECK_FILE( /usr/include/png.h, IMGFMT="1")
(-)/usr/home/db/linrad/files/patch-help.c (+20 lines)
Line 0 Link Here
1
--- help.c.orig	Sat May 27 07:48:22 2006
2
+++ help.c	Tue Jun 20 20:37:14 2006
3
@@ -344,7 +344,7 @@
4
   printf("\n%s",s);
5
   DEB"\n%s",s);
6
   }  
7
-msg_filename="errors.lir";
8
+msg_filename="%%DATADIR%%errors.lir";
9
 line=3;
10
 if(screen_mode)
11
   {
12
@@ -359,7 +359,7 @@
13
 {
14
 int line;
15
 if(msg_no < 0)return;
16
-msg_filename="help.lir";
17
+msg_filename="%%DATADIR%%help.lir";
18
 line=0;
19
 settextcolor(15);
20
 clear_screen();
(-)/usr/home/db/linrad/files/patch-hwaredriver.c (-19 lines)
Lines 1-19 Link Here
1
--- hwaredriver.c.orig	Tue May 18 09:43:30 2004
2
+++ hwaredriver.c	Fri Jul  9 11:26:15 2004
3
@@ -1,6 +1,6 @@
4
 
5
 #include <vga.h>
6
-#include <sys/io.h>
7
+#include <machine/cpufunc.h>
8
 #include <ctype.h>
9
 #include "conf.h"
10
 #include "globdef.h"
11
@@ -169,7 +169,7 @@
12
 void users_open_devices(void)
13
 {
14
 // Get permission to write to the parallel port
15
-ioperm(HWARE_PORT,4,1);
16
+i386_set_ioperm(HWARE_PORT,4,1);
17
 allow_parport=1;
18
 }
19
 
(-)/usr/home/db/linrad/files/patch-lmain.c (+38 lines)
Line 0 Link Here
1
--- lmain.c.orig	Sat May 27 07:48:22 2006
2
+++ lmain.c	Sat Jun 17 23:49:10 2006
3
@@ -11,7 +11,6 @@
4
 #define MAX_MOUSE_CURSIZE 50
5
 
6
 
7
-#include <sys/io.h>
8
 #include <vga.h>
9
 #include <vgagl.h>
10
 #include <vgamouse.h>
11
@@ -97,6 +96,7 @@
12
 simd1=0;
13
 mmx_present=i&1;
14
 if(mmx_present != 0)simd_present=i/2; else simd_present=0;
15
+#if 0
16
 if(i!=0)
17
   {
18
   file = fopen("/proc/cpuinfo", "r");
19
@@ -142,9 +142,11 @@
20
     file=NULL;
21
     }
22
   }  
23
+#endif
24
 file = fopen(userint_filename, "rb");
25
 if (file == NULL)
26
   {
27
+#if 0
28
   if(xxprint != 0)
29
     {
30
     i=0;
31
@@ -170,6 +172,7 @@
32
       printf("\nwith appropriate patches.\n\n");
33
       }
34
     }
35
+#endif
36
   printf("\nSetup file %s missing.",userint_filename);
37
 full_setup:;
38
   for(i=0; i<MAX_UIPARM; i++) uiparm[i]=0;
(-)/usr/home/db/linrad/files/patch-lsetad.c (+491 lines)
Line 0 Link Here
1
--- lsetad.c.orig	Sat May 27 07:48:22 2006
2
+++ lsetad.c	Mon Jun 19 21:43:19 2006
3
@@ -36,14 +36,13 @@
4
 
5
 
6
 #define SNDLOG fprintf(sndlog,
7
-#define ABOVE_MAX_SPEED 768000
8
 #if SND_DEV == 1
9
 #define DEVNAME_SIZE 12
10
-char devname[DEVNAME_SIZE]="/dev/dsp   ";
11
+char dev_name[DEVNAME_SIZE]="/dev/dsp   ";
12
 #define DEVNAMPOS 8
13
 #else 
14
 #define DEVNAME_SIZE 18
15
-char devname[DEVNAME_SIZE]="/dev/sound/dsp   ";
16
+char dev_name[DEVNAME_SIZE]="/dev/sound/dsp   ";
17
 #define DEVNAMPOS 14
18
 #endif
19
 int devmodes[3]={O_RDONLY,O_WRONLY,O_RDWR};
20
@@ -58,6 +57,7 @@
21
                               22050,24000,48000,96000};
22
 
23
 FILE *sndlog;
24
+int tspeed;
25
 
26
 // Mod1:    Get info from OSS or ALSA sound-driver about the defined audio
27
 //          devices.
28
@@ -481,31 +481,12 @@
29
 
30
 void make_devname(int n)
31
 {
32
-int k,num,m;
33
-num=n;
34
-k=DEVNAMPOS;
35
-if(num>MAX_DEVNAMES)
36
+if(n>MAX_DEVNAMES)
37
   {
38
   lirerr(9236);
39
   return;
40
   }
41
-m=num/10;
42
-if(m > 0)
43
-  {
44
-  devname[k]=m+'0';
45
-  k++;
46
-  }
47
-devname[k]=num-m*10+'0';
48
-if(devname[k]<'0')devname[k]=0;
49
-k++;
50
-devname[k]=0;  
51
-// put /dev/dsp at the end of the list
52
-if ((n+2)==MAX_DEVNAMES){
53
-   k=DEVNAMPOS;
54
-   devname[k]=0;
55
-   k++;
56
-   devname[k]=0; 
57
-   }
58
+  sprintf(dev_name, "/dev/dspW%d", n);
59
 }
60
 // -------------------------------------------------------------
61
 // The original code was:
62
@@ -557,7 +538,7 @@
63
 if(i&AFMT_S16_LE)ui.max_output_bytes=2;
64
 ui.max_output_speed=ABOVE_MAX_SPEED;
65
 ui.min_output_speed=1;
66
-if(ioctl(audio_out, SNDCTL_DSP_SPEED, &ui.max_output_speed) == -1)
67
+if(ioctl(audio_out, SNDCTL_DSP_SPEED, &ui.min_output_speed) == -1)
68
   {
69
   lirerr(1072);
70
   return;
71
@@ -666,7 +647,7 @@
72
   return;
73
   }
74
 make_devname(ui.ad_device_no&255);
75
-audio_in=open( devname ,ui.ad_device_mode , 0);
76
+audio_in=open( dev_name ,ui.ad_device_mode , 0);
77
 if(audio_in == -1)
78
   {
79
   lirerr(1007);
80
@@ -676,7 +657,7 @@
81
   {
82
   i=ui.ad_device_no/255-1;
83
   make_devname(i);
84
-  audio_in2=open( devname ,ui.ad_device_mode , 0);
85
+  audio_in2=open( dev_name ,ui.ad_device_mode , 0);
86
   if(audio_in2 == -1)
87
     {
88
     lirerr(1174);
89
@@ -869,7 +850,7 @@
90
       return;
91
       }
92
     make_devname(ui.ad_device_no&255);
93
-    audio_out=open( devname ,O_WRONLY , 0);
94
+    audio_out=open( dev_name ,O_WRONLY , 0);
95
     if(audio_out == -1)
96
       {
97
       lirerr(1086);
98
@@ -909,7 +890,7 @@
99
 else
100
   {
101
   make_devname(ui.da_device_no);
102
-  audio_out=open( devname ,O_WRONLY , 0);
103
+  audio_out=open( dev_name ,O_WRONLY , 0);
104
   if(audio_out == -1)
105
     {
106
     if(disksave_flag==2)
107
@@ -1048,9 +1029,9 @@
108
 for(device_no=0; device_no<MAX_DEVNAMES; device_no++)
109
   {
110
   make_devname(device_no);
111
-  SNDLOG"Checking %s for output\n",devname);
112
+  SNDLOG"Checking %s for output\n",dev_name);
113
   sndlog_sync();
114
-  audio_out=open( devname, O_WRONLY|O_NONBLOCK, 0);
115
+  audio_out=open( dev_name, O_WRONLY|O_NONBLOCK, 0);
116
   if(audio_out != -1)
117
     {
118
 #ifdef SNDCTL_DSP_COOKEDMODE
119
@@ -1058,7 +1039,7 @@
120
     ioctl(audio_out, SNDCTL_DSP_COOKEDMODE, &j);
121
 #endif
122
     for(nn=0; nn<80; nn++)SNDLOG"-");
123
-    SNDLOG"\n%s opened as %s ",devname, devmode_txt[3]);
124
+    SNDLOG"\n%s opened as %s ",dev_name, devmode_txt[3]);
125
     sndlog_sync();
126
     j=AFMT_U8;
127
     if(ioctl(audio_out, SNDCTL_DSP_SETFMT, &j) == -1)
128
@@ -1110,6 +1091,7 @@
129
       {
130
       SNDLOG"\nIncorrect speed response in %d  out %d",
131
                                                    ABOVE_MAX_SPEED, j);
132
+      tspeed=j;
133
       if(ioctl(audio_out, SNDCTL_DSP_SPEED, &j)==-1)
134
        {
135
         SNDLOG"\nioctl(SPEED) failed");
136
@@ -1136,7 +1118,7 @@
137
       goto errdev;  
138
       }
139
     sprintf(s,"%02d  %s  %7d - %7d Hz   %d Chan.   %d bit WRONLY",
140
-                device_no, devname,
141
+                device_no, dev_name,
142
                 dev_min_wr_speed[device_no], 
143
                 dev_max_wr_speed[device_no], 
144
                 dev_wr_channels[device_no], 
145
@@ -1373,20 +1355,20 @@
146
   {
147
   dev_flag[device_no]=0;
148
   make_devname(device_no);
149
-  SNDLOG"Checking %s\n",devname);
150
+  SNDLOG"Checking %s\n",dev_name);
151
   sndlog_sync();
152
   for(mode=0; mode<3; mode++)
153
     {
154
     k=1<<mode;
155
     sprintf(s,
156
     "Trying to open %s %s. Device defective if system hangs here. Read %s   ",
157
-    devname, devmode_txt[mode],logfile_name);
158
+    dev_name, devmode_txt[mode],logfile_name);
159
     sndlog_sync();
160
     settextcolor(12);
161
     lir_text(0,line+1,s);
162
     lir_refresh_screen();
163
     settextcolor(7);
164
-    audio_out=open( devname, devmodes[mode]|O_NONBLOCK, 0);
165
+    audio_out=open( dev_name, devmodes[mode]|O_NONBLOCK, 0);
166
     clear_lines(line+1,line+1);
167
     if(audio_out != -1)
168
       {
169
@@ -1395,7 +1377,7 @@
170
         ioctl(audio_out, SNDCTL_DSP_COOKEDMODE, &i);
171
       #endif
172
       for(nn=0; nn<80; nn++)SNDLOG"-");
173
-      SNDLOG"\n%s opened as %s ",devname, devmode_txt[mode]);
174
+      SNDLOG"\n%s opened as %s ",dev_name, devmode_txt[mode]);
175
       sndlog_sync();
176
       rdwr_fmt=16;
177
       rdwr_channels=0;
178
@@ -1465,8 +1447,8 @@
179
       i=0;
180
       while(i<MAX_LOWSPEED)
181
         {
182
-        rdwr_min_speed=low_speeds[i];
183
-        if(ioctl(audio_out, SNDCTL_DSP_SPEED, &rdwr_min_speed)!=-1)goto minok;
184
+        tspeed=rdwr_min_speed=low_speeds[i];
185
+        if(ioctl(audio_out, SNDCTL_DSP_SPEED, &tspeed)!=-1)goto minok;
186
         i++;
187
         }
188
       lirerr(1040);
189
@@ -1577,7 +1559,7 @@
190
       if( (dev_flag[device_no]&1) == 1)
191
         {
192
         sprintf(ss,"%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit",
193
-                    device_no,devname,
194
+                    device_no,dev_name,
195
                     dev_min_rd_speed[device_no], 
196
                     dev_max_rd_speed[device_no], 
197
                     dev_max_rd_channels[device_no], 
198
@@ -1588,7 +1570,7 @@
199
         if( (dev_flag[device_no]&2) == 2)
200
           {
201
           sprintf(ss,"%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit",
202
-                     device_no,devname,
203
+                     device_no,dev_name,
204
                      dev_min_wr_speed[device_no], 
205
                      dev_max_wr_speed[device_no], 
206
                      dev_wr_channels[device_no], 
207
@@ -1637,13 +1619,13 @@
208
           color=0x17;
209
           sprintf(&ss[maxcolumn],
210
                      "%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit  %s",
211
-                      device_no,devname,
212
+                      device_no,dev_name,
213
                       dev_min_wr_speed[device_no], 
214
                       dev_max_wr_speed[device_no], 
215
                       dev_wr_channels[device_no], 
216
                       dev_wr_bits[device_no],devmode_txt[1]);
217
           sprintf(ss,"%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit  %s",
218
-                      device_no,devname,
219
+                      device_no,dev_name,
220
                       dev_min_rd_speed[device_no], 
221
                       dev_max_rd_speed[device_no], 
222
                       dev_max_rd_channels[device_no], 
223
@@ -1659,21 +1641,21 @@
224
             color=0x17;
225
             sprintf(&ss[2*maxcolumn],
226
                   "%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit  %s",
227
-                      device_no,devname,
228
+                      device_no,dev_name,
229
                       dev_min_wr_speed[device_no], 
230
                       dev_max_wr_speed[device_no], 
231
                       dev_wr_channels[device_no], 
232
                       dev_wr_bits[device_no],devmode_txt[1]);
233
             sprintf(&ss[maxcolumn],
234
                   "%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit  %s",
235
-                      device_no,devname,
236
+                      device_no,dev_name,
237
                       dev_min_rd_speed[device_no], 
238
                       dev_max_rd_speed[device_no], 
239
                       dev_max_rd_channels[device_no], 
240
                       dev_rd_bits[device_no],devmode_txt[0]);
241
             sprintf(ss,
242
                   "%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit  %s",
243
-                      device_no,devname,
244
+                      device_no,dev_name,
245
                       dev_min_rdwr_speed[device_no], 
246
                       dev_max_rdwr_speed[device_no], 
247
                       dev_rdwr_channels[device_no], 
248
@@ -1688,14 +1670,14 @@
249
               color=0x17;
250
               sprintf(&ss[maxcolumn],
251
                         "%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit  %s",
252
-                        device_no,devname,
253
+                        device_no,dev_name,
254
                         dev_min_wr_speed[device_no], 
255
                         dev_max_wr_speed[device_no], 
256
                         dev_wr_channels[device_no], 
257
                         dev_wr_bits[device_no],devmode_txt[1]);
258
               sprintf(ss,
259
                   "%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit  %s  %s",
260
-                        device_no,devname,
261
+                        device_no,dev_name,
262
                         dev_min_rd_speed[device_no], 
263
                         dev_max_rd_speed[device_no], 
264
                         dev_max_rd_channels[device_no], 
265
@@ -1707,14 +1689,14 @@
266
               color=0x1d;
267
               sprintf(&ss[maxcolumn],
268
                         "%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit  %s  %s",
269
-                        device_no,devname,
270
+                        device_no,dev_name,
271
                         dev_min_wr_speed[device_no], 
272
                         dev_max_wr_speed[device_no], 
273
                         dev_wr_channels[device_no], dev_wr_bits[device_no],
274
                         devmode_txt[1],devmode_txt[2]);
275
               sprintf(ss,
276
                   "%02d:%12s  %7d - %7d Hz   %d Chan.   %d bit  %s",
277
-                        device_no,devname,
278
+                        device_no,dev_name,
279
                         dev_min_rd_speed[device_no], 
280
                         dev_max_rd_speed[device_no], 
281
                         dev_max_rd_channels[device_no], 
282
@@ -1822,7 +1804,7 @@
283
 
284
 clear_screen();
285
 make_devname(ui.ad_device_no);
286
-SNDLOG"\n\n %s selected by user for input.",devname);
287
+SNDLOG"\n\n %s selected by user for input.",dev_name);
288
 SNDLOG"   dev_flag=%d",dev_flag[ui.ad_device_no]);
289
 sndlog_sync();
290
 // High end users might need two devices to read four A/D channels.
291
@@ -1864,7 +1846,7 @@
292
         clear_screen();
293
         SNDLOG"\nUser wants to try to open two read devices"); 
294
         make_devname(ui.ad_device_no);
295
-        audio_in=open( devname, O_RDONLY, 0);
296
+        audio_in=open( dev_name, O_RDONLY, 0);
297
         if(audio_in == -1)
298
           {
299
           lirerr(1102);
300
@@ -1899,7 +1881,7 @@
301
           }
302
         }
303
       make_devname(i);
304
-      audio_in2=open( devname, O_RDONLY|O_NONBLOCK, 0);
305
+      audio_in2=open( dev_name, O_RDONLY|O_NONBLOCK, 0);
306
       if(audio_in2 != -1)
307
         {
308
         #ifdef SNDCTL_DSP_COOKEDMODE
309
@@ -1907,9 +1889,9 @@
310
           ioctl(audio_in2, SNDCTL_DSP_COOKEDMODE, &k);
311
         #endif
312
         line++;
313
-        SNDLOG"\n%s opened as second read device",devname);
314
+        SNDLOG"\n%s opened as second read device",dev_name);
315
         sprintf(s,"%2d:%12s  %7d - %7d Hz   %d Chan.   %d bit",
316
-                i,devname,
317
+                i,dev_name,
318
                 dev_min_rd_speed[i], 
319
                 dev_max_rd_speed[i], 
320
                 dev_max_rd_channels[i], 
321
@@ -1945,7 +1927,7 @@
322
     {
323
     dev_flag[i]&=255;
324
     }    
325
-  audio_in2=open( devname, O_RDONLY|O_NONBLOCK, 0);
326
+  audio_in2=open( dev_name, O_RDONLY|O_NONBLOCK, 0);
327
   if(audio_in2 == -1)
328
     {
329
     lirerr(1172);
330
@@ -1968,7 +1950,7 @@
331
     close(audio_in2);
332
     goto skip_dual_devices;
333
     }
334
-  SNDLOG"\n %s is second input device.",devname);
335
+  SNDLOG"\n %s is second input device.",dev_name);
336
   ui.input_mode=TWO_CHANNELS+IQ_DATA;
337
   ui.rx_channels=2;
338
   ui.ad_channels=4;
339
@@ -1988,7 +1970,7 @@
340
   if( (1 & dev_flag[ui.ad_device_no]) != 0)
341
     {
342
 gt_rdo:;    
343
-    sprintf(s,"Open %s as RDONLY or RDWR? (O/W)  =>",devname);  
344
+    sprintf(s,"Open %s as RDONLY or RDWR? (O/W)  =>",dev_name);  
345
     lir_text(10,10,s);
346
     await_processed_keyboard();
347
     if(kill_all_flag) goto setad_errexit;
348
@@ -2010,9 +1992,9 @@
349
   }
350
 sndlog_sync();
351
 clear_screen();  
352
-sprintf(s,"For analog input: %s opened in %s mode",devname,devmode_txt[mode]);
353
+sprintf(s,"For analog input: %s opened in %s mode",dev_name,devmode_txt[mode]);
354
 lir_text(0,0,s);
355
-audio_in=open( devname, ui.ad_device_mode, 0);
356
+audio_in=open( dev_name, ui.ad_device_mode, 0);
357
 if(audio_in == -1)
358
   {
359
   lirerr(1038);
360
@@ -2108,13 +2090,16 @@
361
 lir_text(0,7,"to reconfigure the hardware. (Under OSS, run ossmix)");
362
 max=dev_max_rd_speed[ui.ad_device_no&255];
363
 min=dev_min_rd_speed[ui.ad_device_no&255];
364
+#if 0
365
 if(max == ABOVE_MAX_SPEED || max < 1000)
366
   {
367
   max = ABOVE_MAX_SPEED;
368
   speed_warning = 1;
369
   }
370
+#endif
371
 sprintf(s,"Select sampling speed(%d to %d)", min,max);
372
 lir_text(0,10,s);
373
+#if 0
374
 if(speed_warning != 0)
375
   {
376
   settextcolor(12);
377
@@ -2123,6 +2108,7 @@
378
    lir_text(0,13,"Incorrect (not supported) values may cause system to hang");
379
   settextcolor(7);
380
   }
381
+#endif
382
 column=0;
383
 while(s[column] != 0)column++;
384
 ui.input_speed=lir_get_integer(column+2, 10, 8, min,max);
385
@@ -2131,6 +2117,7 @@
386
 rdwr_max_speed=ui.input_speed;
387
 SNDLOG"\n%d Hz selected by user",ui.input_speed);
388
 clear_lines(5,10);
389
+ui.input_speed;
390
 if(ioctl(audio_in, SNDCTL_DSP_SPEED, &ui.input_speed)==-1)
391
   {
392
   lirerr(1041);
393
@@ -2249,7 +2236,7 @@
394
   goto setad_errexit;
395
   }
396
 settextcolor(12);
397
-sprintf(s,"Trying to read %s",devname);
398
+sprintf(s,"Trying to read %s",dev_name);
399
 lir_text(10,10,s);
400
 lir_text(0,12,"If you see this message for more than 2 seconds READ failed");
401
 lir_text(0,13,"Then try another device");
402
@@ -2313,7 +2300,7 @@
403
   }
404
 SNDLOG"\nRead test OK");
405
 clear_lines(10,13);
406
-sprintf(s,"Now trying to open a second device while %s is open",devname);
407
+sprintf(s,"Now trying to open a second device while %s is open",dev_name);
408
 lir_text(0,6,s);
409
 lir_text(0,7,"This may cause your system to hang. Try ctrlC to exit (or reboot)");
410
 lir_text(0,8,"Try another input device or install another sound system."); 
411
@@ -2326,7 +2313,7 @@
412
   if(read_test_ad(testbuff)!=0)goto clr_wrdev;
413
   make_devname(i);
414
   cn=0;
415
-  sprintf(s,"%02d:%12s",i,devname);
416
+  sprintf(s,"%02d:%12s",i,dev_name);
417
   lir_text(0,line,s);
418
   column=0;
419
   while(s[column] != 0)column++;
420
@@ -2338,7 +2325,7 @@
421
       if( (ui.input_mode&DWORD_INPUT) != 0 || ui.ad_channels > 2)
422
         {
423
         sprintf(&s[column],
424
-             " RDWR  useless (too many bits or channels) %d: %s",i,devname);
425
+             " RDWR  useless (too many bits or channels) %d: %s",i,dev_name);
426
         dev_flag[i]=0;
427
         }
428
       else
429
@@ -2356,7 +2343,7 @@
430
     dev_flag[i]&=0xffff-4;
431
     if( (dev_flag[i]&2) != 0 )
432
       {
433
-      audio_out=open( devname, O_WRONLY|O_NONBLOCK, 0);
434
+      audio_out=open( dev_name, O_WRONLY|O_NONBLOCK, 0);
435
       if(read_test_ad(testbuff)!=0)goto clr_wrdev;
436
       if(audio_out != -1)
437
         { 
438
@@ -2364,7 +2351,7 @@
439
         j=0;
440
         ioctl(audio_out, SNDCTL_DSP_COOKEDMODE, &j);
441
 #endif
442
-        SNDLOG"\n%s opened as WRONLY",devname);
443
+        SNDLOG"\n%s opened as WRONLY",dev_name);
444
         sndlog_sync();
445
         if(ioctl(audio_in, SNDCTL_DSP_GETISPACE, &ad_info) == -1)
446
           {
447
@@ -2562,20 +2549,20 @@
448
   for(i=0; i<MAX_DEVNAMES; i++)
449
     {
450
     make_devname(i);
451
-    SNDLOG"\n%s ",devname);
452
+    SNDLOG"\n%s ",dev_name);
453
     cn=0;
454
-    sprintf(s,"%02d:%12s",i,devname);
455
+    sprintf(s,"%02d:%12s",i,dev_name);
456
     lir_text(0,line,s);
457
     column=0;
458
     while(s[column] != 0)column++;
459
-    audio_out=open( devname, O_WRONLY|O_NONBLOCK, 0);
460
+    audio_out=open( dev_name, O_WRONLY|O_NONBLOCK, 0);
461
     if(audio_out != -1)
462
       { 
463
       #ifdef SNDCTL_DSP_COOKEDMODE
464
         j=0;
465
         ioctl(audio_out, SNDCTL_DSP_COOKEDMODE, &j);
466
       #endif
467
-      SNDLOG"\n%s opened as WRONLY with no input open.",devname);
468
+      SNDLOG"\n%s opened as WRONLY with no input open.",dev_name);
469
       sndlog_sync();
470
       j=AFMT_U8;
471
       if(ioctl(audio_out, SNDCTL_DSP_SETFMT, &j) == -1)
472
@@ -2727,7 +2714,7 @@
473
 // -------------------------------------------------------  
474
   }
475
 make_devname(ui.da_device_no);
476
-SNDLOG"\nUser selected %s for output.",devname);
477
+SNDLOG"\nUser selected %s for output.",dev_name);
478
 clear_sdi();
479
 clear_lines(6,line);
480
 lir_text(0,8,"Use close and reopen for D/A when a new signal is");
481
@@ -2762,8 +2749,8 @@
482
   }
483
 else
484
   {
485
-  audio_out=open( devname ,O_WRONLY , 0);
486
-  sprintf(s,"Using %s for output",devname);
487
+  audio_out=open( dev_name ,O_WRONLY , 0);
488
+  sprintf(s,"Using %s for output",dev_name);
489
   lir_text(0,6,s);
490
   if(audio_out == -1)
491
     {
(-)/usr/home/db/linrad/files/patch-lxsys.c (+65 lines)
Line 0 Link Here
1
--- lxsys.c.orig	Sat May 27 07:48:22 2006
2
+++ lxsys.c	Mon Jun 19 23:32:08 2006
3
@@ -1,5 +1,7 @@
4
-
5
-#include <sys/io.h>
6
+#include <sys/cdefs.h>
7
+#include <sys/types.h>
8
+#include <machine/cpufunc.h>
9
+#include <machine/sysarch.h>
10
 #include <unistd.h>
11
 #include <sys/mman.h>
12
 #include <sys/resource.h>
13
@@ -14,6 +16,7 @@
14
 #include "lindef.h"
15
 #include "hwaredef.h"
16
 
17
+extern int saved_euid;
18
 
19
 char *locktext[6]={"*W A R N I N G*  Read z_MLOCK.txt for info.",
20
                    "*** mlockall can cause system crashes!! ***",
21
@@ -40,11 +43,9 @@
22
 // Get permission to write to the parallel port
23
 if(ui.parport < 0x400-4)
24
   {
25
-  i=ioperm(ui.parport,4,1);
26
-  }
27
-else
28
-  {
29
-  i=iopl(3);
30
+  seteuid(saved_euid);
31
+  i=i386_set_ioperm(ui.parport,4,1);
32
+  seteuid(getuid());
33
   }
34
 if(i != 0)
35
   {
36
@@ -189,11 +190,9 @@
37
 int i;
38
 if(ui.parport < 0x400-4)
39
   {
40
-  i=ioperm(ui.parport,4,1);
41
-  }
42
-else
43
-  {
44
-  i=iopl(3);
45
+  seteuid(saved_euid);
46
+  i=i386_set_ioperm(ui.parport,4,1);
47
+  seteuid(getuid());
48
   }
49
 if(i!=0)lirerr(764921);
50
 i=1000;
51
@@ -206,11 +205,9 @@
52
 int i;
53
 if(ui.parport < 0x400-4)
54
   {
55
-  i=ioperm(ui.parport,4,1);
56
-  }
57
-else
58
-  {
59
-  i=iopl(3);
60
+  seteuid(saved_euid);
61
+  i=i386_set_ioperm(ui.parport,4,1);
62
+  seteuid(getuid());
63
   }
64
 if(i!=0)lirerr(764921);
65
 return inb(port);
(-)/usr/home/db/linrad/files/patch-main.c (-37 lines)
Lines 1-37 Link Here
1
--- main.c.orig	Thu Jul  8 18:24:25 2004
2
+++ main.c	Thu Jul  8 18:25:02 2004
3
@@ -355,7 +355,9 @@
4
   end_program(436);
5
   } 
6
 lir_errors:;
7
+#if 0
8
 if(ui.memlock == 0)munlockall();
9
+#endif
10
 close_all_except_vga();
11
 if(lir_status > LIR_OK)
12
   {
13
@@ -640,7 +642,9 @@
14
     {
15
 bufreduce:;
16
     vga_clear();
17
+#if 0
18
     if(ui.memlock == 0)munlockall();
19
+#endif
20
     settextcolor(15);
21
     switch (lir_status)
22
       {
23
@@ -854,12 +858,14 @@
24
   else
25
     {
26
     if(chr != 'Y')goto gtswap;
27
+#if 0
28
     if(mlockall(MCL_CURRENT) != 0)
29
       {
30
       if(errno == EPERM)end_program(1168);
31
       if(errno == ENOMEM)end_program(1169);
32
       end_program(1170); 
33
       }
34
+#endif
35
     }  
36
   clearscreen();
37
   printf("Use usleep when the CPU is not needed\nRead z_USLEEP.txt for info.");
(-)/usr/home/db/linrad/files/patch-modesub.c (-37 lines)
Lines 1-37 Link Here
1
--- modesub.c.orig	Tue May 18 09:43:30 2004
2
+++ modesub.c	Fri Jul  9 11:17:15 2004
3
@@ -5,7 +5,7 @@
4
 #include <unistd.h>
5
 #include <ctype.h>
6
 #include <sys/mman.h>
7
-#include <sys/io.h>
8
+#include <machine/cpufunc.h>
9
 #include "globdef.h"
10
 #include "uidef.h"
11
 #include "fft1def.h"
12
@@ -1068,6 +1068,7 @@
13
     j++;
14
     if(j > 1000)
15
       {
16
+#if 0
17
       if(mlockall(MCL_CURRENT) != 0)
18
         {
19
         handle[0]=(int)(chk_free(testbuf));
20
@@ -1075,6 +1076,7 @@
21
         return 0;
22
         }
23
       j=0;
24
+#endif
25
       }  
26
     }  
27
   }
28
@@ -1597,7 +1599,9 @@
29
 idle_start=recent_time;
30
 if(ui.memlock == 0)
31
   {
32
+#if 0
33
   if(mlockall(MCL_CURRENT) != 0)lir_status=LIR_MEMERR;
34
+#endif
35
   }
36
 work_flag=0;
37
 
(-)/usr/home/db/linrad/files/patch-setad.c (-390 lines)
Lines 1-390 Link Here
1
--- setad.c.orig	Tue May 18 09:43:30 2004
2
+++ setad.c	Thu Jul  8 14:17:52 2004
3
@@ -16,11 +16,11 @@
4
 #define ABOVE_MAX_SPEED 768000
5
 #if SND_DEV == 1
6
 #define DEVNAME_SIZE 12
7
-char devname[DEVNAME_SIZE]="/dev/dsp   ";
8
+char dev_name[DEVNAME_SIZE]="/dev/dsp   ";
9
 #define DEVNAMPOS 8
10
 #else 
11
 #define DEVNAME_SIZE 18
12
-char devname[DEVNAME_SIZE]="/dev/sound/dsp   ";
13
+char dev_name[DEVNAME_SIZE]="/dev/sound/dsp   ";
14
 #define DEVNAMPOS 14
15
 #endif
16
 
17
@@ -36,7 +36,7 @@
18
 sync();
19
 }
20
 
21
-void make_devname(int n)
22
+void make_dev_name(int n)
23
 {
24
 int k,num,m;
25
 if(n < 0)end_program(9235);
26
@@ -47,13 +47,13 @@
27
 m=num/10;
28
 if(m > 0)
29
   {
30
-  devname[k]=m+'0';
31
+  dev_name[k]=m+'0';
32
   k++;
33
   }
34
-devname[k]=num-m*10+'0';
35
-if(devname[k]<'0')devname[k]=0;
36
+dev_name[k]=num-m*10+'0';
37
+if(dev_name[k]<'0')dev_name[k]=0;
38
 k++;
39
-devname[k]=0;  
40
+dev_name[k]=0;  
41
 }
42
 
43
 void set_da_parms(void)
44
@@ -148,14 +148,14 @@
45
 if(disksave_flag == 2 || network_flag == 2)return;
46
 if( (ui.input_mode&NO_DUPLEX) != 0 && audio_out != -1)return;
47
 if(  (audio_in) != -1)end_program(1000);
48
-make_devname(ui.ad_device_no&255);
49
-audio_in=open( devname ,ui.ad_device_mode , 0);
50
+make_dev_name(ui.ad_device_no&255);
51
+audio_in=open( dev_name ,ui.ad_device_mode , 0);
52
 if(audio_in == -1)end_program(1007);
53
 if(ui.ad_device_no > 255)
54
   {
55
   i=ui.ad_device_no/255-1;
56
-  make_devname(i);
57
-  audio_in2=open( devname ,ui.ad_device_mode , 0);
58
+  make_dev_name(i);
59
+  audio_in2=open( dev_name ,ui.ad_device_mode , 0);
60
   if(audio_in2 == -1)end_program(1174);
61
   }
62
 if(ui.ad_frag != 0)
63
@@ -238,8 +238,8 @@
64
   if(disksave_flag >=2)
65
     {
66
     if(audio_in != -1)end_program(9865);
67
-    make_devname(ui.ad_device_no&255);
68
-    audio_out=open( devname ,O_WRONLY , 0);
69
+    make_dev_name(ui.ad_device_no&255);
70
+    audio_out=open( dev_name ,O_WRONLY , 0);
71
     if(audio_out == -1)end_program(1086);
72
     goto set_da;
73
     }
74
@@ -275,8 +275,8 @@
75
   }
76
 else
77
   {
78
-  make_devname(ui.da_device_no);
79
-  audio_out=open( devname ,O_WRONLY|O_NONBLOCK , 0);
80
+  make_dev_name(ui.da_device_no);
81
+  audio_out=open( dev_name ,O_WRONLY|O_NONBLOCK , 0);
82
   if(audio_out == -1)end_program(1017);
83
 set_da:;
84
 // Set a small fragment size so we can stop playing quickly.
85
@@ -397,24 +397,24 @@
86
 for(device_no=0; device_no<MAX_DEVNAMES; device_no++)
87
   {
88
   dev_flag[device_no]=0;
89
-  make_devname(device_no);
90
-  fprintf(sndlog,"Checking %s\n",devname);
91
+  make_dev_name(device_no);
92
+  fprintf(sndlog,"Checking %s\n",dev_name);
93
   flush_sync();
94
   for(mode=0; mode<3; mode++)
95
     {
96
     k=1<<mode;
97
     sprintf(s,
98
     "Trying to open %s %s. Device defective if system hangs here. Read %s   ",
99
-    devname, devmode_txt[mode],logfile_name);
100
+    dev_name, devmode_txt[mode],logfile_name);
101
     flush_sync();
102
     settextcolor(12);
103
     xytext(0,line+1,s);
104
     settextcolor(7);
105
-    audio_out=open( devname, devmodes[mode]|O_NONBLOCK, 0);
106
+    audio_out=open( dev_name, devmodes[mode]|O_NONBLOCK, 0);
107
     if(audio_out != -1)
108
       {
109
       for(nn=0; nn<80; nn++)fprintf(sndlog,"-");
110
-      fprintf(sndlog,"\n%s opened as %s ",devname, devmode_txt[mode]);
111
+      fprintf(sndlog,"\n%s opened as %s ",dev_name, devmode_txt[mode]);
112
       flush_sync();
113
       rdwr_fmt=16;
114
       rdwr_channels=0;
115
@@ -575,7 +575,7 @@
116
       if( (dev_flag[device_no]&1) == 1)
117
         {
118
         sprintf(ss,"\n%02d:%12s  %7d Hz   %d Chan.   %d bit",
119
-                    device_no,devname,dev_rd_speed[device_no], 
120
+                    device_no,dev_name,dev_rd_speed[device_no], 
121
                     dev_rd_channels[device_no], 
122
                     dev_rd_bits[device_no]);
123
         }
124
@@ -584,7 +584,7 @@
125
         if( (dev_flag[device_no]&2) == 2)
126
           {
127
           sprintf(ss,"\n%02d:%12s  %7d Hz   %d Chan.   %d bit",
128
-                     device_no,devname,dev_wr_speed[device_no], 
129
+                     device_no,dev_name,dev_wr_speed[device_no], 
130
                      dev_wr_channels[device_no], 
131
                      dev_wr_bits[device_no]);
132
           }
133
@@ -631,11 +631,11 @@
134
           color=0x17;
135
           sprintf(&ss[maxcolumn],
136
                      "\n%02d:%12s  %7d Hz   %d Chan.   %d bit  %s",
137
-                      device_no,devname,dev_wr_speed[device_no], 
138
+                      device_no,dev_name,dev_wr_speed[device_no], 
139
                       dev_wr_channels[device_no], 
140
                       dev_wr_bits[device_no],devmode_txt[1]);
141
           sprintf(ss,"\n%02d:%12s  %7d Hz   %d Chan.   %d bit  %s",
142
-                      device_no,devname,dev_rd_speed[device_no], 
143
+                      device_no,dev_name,dev_rd_speed[device_no], 
144
                       dev_rd_channels[device_no], 
145
                       dev_rd_bits[device_no],devmode_txt[0]);
146
           }
147
@@ -649,17 +649,17 @@
148
             color=0x17;
149
             sprintf(&ss[2*maxcolumn],
150
                   "\n%02d:%12s  %7d Hz   %d Chan.   %d bit  %s",
151
-                      device_no,devname,dev_wr_speed[device_no], 
152
+                      device_no,dev_name,dev_wr_speed[device_no], 
153
                       dev_wr_channels[device_no], 
154
                       dev_wr_bits[device_no],devmode_txt[1]);
155
             sprintf(&ss[maxcolumn],
156
                   "\n%02d:%12s  %7d Hz   %d Chan.   %d bit  %s",
157
-                      device_no,devname,dev_rd_speed[device_no], 
158
+                      device_no,dev_name,dev_rd_speed[device_no], 
159
                       dev_rd_channels[device_no], 
160
                       dev_rd_bits[device_no],devmode_txt[0]);
161
             sprintf(ss,
162
                   "\n%02d:%12s  %7d Hz   %d Chan.   %d bit  %s",
163
-                      device_no,devname,dev_rdwr_speed[device_no], 
164
+                      device_no,dev_name,dev_rdwr_speed[device_no], 
165
                       dev_rdwr_channels[device_no], 
166
                       dev_rdwr_bits[device_no],devmode_txt[2]);
167
             }
168
@@ -672,12 +672,12 @@
169
               color=0x17;
170
               sprintf(&ss[maxcolumn],
171
                         "\n%02d:%12s  %7d Hz   %d Chan.   %d bit  %s",
172
-                        device_no,devname,dev_wr_speed[device_no], 
173
+                        device_no,dev_name,dev_wr_speed[device_no], 
174
                         dev_wr_channels[device_no], 
175
                         dev_wr_bits[device_no],devmode_txt[1]);
176
               sprintf(ss,
177
                   "\n%02d:%12s  %7d Hz   %d Chan.   %d bit  %s  %s",
178
-                          device_no,devname,dev_rd_speed[device_no], 
179
+                          device_no,dev_name,dev_rd_speed[device_no], 
180
                         dev_rd_channels[device_no], dev_rd_bits[device_no],
181
                             devmode_txt[0],devmode_txt[2]);
182
               }
183
@@ -686,12 +686,12 @@
184
               color=0x1d;
185
               sprintf(&ss[maxcolumn],
186
                         "\n%02d:%12s  %7d Hz   %d Chan.   %d bit  %s  %s",
187
-                        device_no,devname,dev_wr_speed[device_no], 
188
+                        device_no,dev_name,dev_wr_speed[device_no], 
189
                         dev_wr_channels[device_no], dev_wr_bits[device_no],
190
                         devmode_txt[1],devmode_txt[2]);
191
               sprintf(ss,
192
                   "\n%02d:%12s  %7d Hz   %d Chan.   %d bit  %s",
193
-                          device_no,devname,dev_rd_speed[device_no], 
194
+                          device_no,dev_name,dev_rd_speed[device_no], 
195
                         dev_rd_channels[device_no], dev_rd_bits[device_no],
196
                             devmode_txt[0]);
197
               }
198
@@ -777,8 +777,8 @@
199
     }
200
   }
201
 vga_clear();
202
-make_devname(ui.ad_device_no);
203
-fprintf(sndlog,"\n\n %s selected by user for input.",devname);
204
+make_dev_name(ui.ad_device_no);
205
+fprintf(sndlog,"\n\n %s selected by user for input.",dev_name);
206
 fprintf(sndlog,"   dev_flag=%d",dev_flag[ui.ad_device_no]);
207
 flush_sync();
208
 // High end users might need two devices to read four A/D channels.
209
@@ -819,8 +819,8 @@
210
         if(vga_inkey != 'Y')goto gt_dual;  
211
         vga_clear();
212
         fprintf(sndlog,"\nUser wants to try to open two read devices"); 
213
-        make_devname(ui.ad_device_no);
214
-        audio_in=open( devname, O_RDONLY, 0);
215
+        make_dev_name(ui.ad_device_no);
216
+        audio_in=open( dev_name, O_RDONLY, 0);
217
         if(audio_in == -1)end_program(1102);
218
 // Check for DSP_CAP_TRIGGER capability
219
         if(ioctl(audio_in, SNDCTL_DSP_GETCAPS,&caps) == -1)end_program(1182);
220
@@ -834,14 +834,14 @@
221
         if(ioctl(audio_in, SNDCTL_DSP_CHANNELS, &j) == -1)end_program(1185);  
222
         if(j != 2)end_program(1186);
223
         }
224
-      make_devname(i);
225
-      audio_in2=open( devname, O_RDONLY|O_NONBLOCK, 0);
226
+      make_dev_name(i);
227
+      audio_in2=open( dev_name, O_RDONLY|O_NONBLOCK, 0);
228
       if(audio_in2 != -1)
229
         {
230
         line++;
231
-        fprintf(sndlog,"\n%s opened as second read device",devname);
232
+        fprintf(sndlog,"\n%s opened as second read device",dev_name);
233
         sprintf(s,"\n%02d:%12s  %7d Hz   %d Chan.   %d bit",
234
-                i,devname,dev_rd_speed[i], dev_rd_channels[i], 
235
+                i,dev_name,dev_rd_speed[i], dev_rd_channels[i], 
236
                 dev_rd_bits[i]);
237
         xytext(0,line,s);
238
         close(audio_in2);
239
@@ -866,13 +866,13 @@
240
     goto get_addev2;
241
     }
242
 // We store the second A/D device in the second byte of ad_device_no
243
-  make_devname(i);
244
+  make_dev_name(i);
245
   ui.ad_device_no+=256*(i+1);
246
   for(i=0; i<MAX_DEVNAMES; i++)
247
     {
248
     dev_flag[i]&=255;
249
     }    
250
-  audio_in2=open( devname, O_RDONLY|O_NONBLOCK, 0);
251
+  audio_in2=open( dev_name, O_RDONLY|O_NONBLOCK, 0);
252
   if(audio_in2 == -1)end_program(1172);
253
 // Check for DSP_CAP_TRIGGER capability
254
   if(ioctl(audio_in2, SNDCTL_DSP_GETCAPS,&caps) == -1)end_program(1182);
255
@@ -883,7 +883,7 @@
256
     close(audio_in2);
257
     goto skip_dual_devices;
258
     }
259
-  fprintf(sndlog,"\n %s is second input device.",devname);
260
+  fprintf(sndlog,"\n %s is second input device.",dev_name);
261
   ui.input_mode=TWO_CHANNELS+IQ_DATA;
262
   ui.rx_channels=2;
263
   ui.ad_channels=4;
264
@@ -894,7 +894,7 @@
265
   }
266
 // Now that we decided what device to use for input, open it and let
267
 // the user decide how to use it.
268
-make_devname(ui.ad_device_no);
269
+make_dev_name(ui.ad_device_no);
270
 flush_sync();
271
 ui.ad_device_mode=O_RDONLY;
272
 mode=0;
273
@@ -903,7 +903,7 @@
274
   if( (1 & dev_flag[ui.ad_device_no]) != 0)
275
     {
276
 gt_rdo:;    
277
-    sprintf(s,"Open %s as RDONLY or RDWR? (O/W)\n=>",devname);  
278
+    sprintf(s,"Open %s as RDONLY or RDWR? (O/W)\n=>",dev_name);  
279
     xytext(10,10,s);
280
     vga_inkey=vga_getkey();
281
     clean_vga_inkey();
282
@@ -925,9 +925,9 @@
283
   }
284
 flush_sync();
285
 vga_clear();  
286
-sprintf(s,"For analog input: %s opened in %s mode",devname,devmode_txt[mode]);
287
+sprintf(s,"For analog input: %s opened in %s mode",dev_name,devmode_txt[mode]);
288
 xytext(0,0,s);
289
-audio_in=open( devname, ui.ad_device_mode, 0);
290
+audio_in=open( dev_name, ui.ad_device_mode, 0);
291
 if(audio_in == -1)end_program(1038);
292
 j=dev_rd_channels[ui.ad_device_no];
293
 xytext(0,10,"Select radio interface:");
294
@@ -1123,7 +1123,7 @@
295
 
296
 
297
 settextcolor(12);
298
-sprintf(s,"Trying to read %s",devname);
299
+sprintf(s,"Trying to read %s",dev_name);
300
 xytext(10,10,s);
301
 xytext(0,12,"If you see this message for more than 2 seconds READ failed");
302
 xytext(0,13,"Then try another device");
303
@@ -1176,7 +1176,7 @@
304
   }
305
 fprintf(sndlog,"\nRead test OK");
306
 for(i=10; i<14; i++)xytext(0,i,ss);
307
-sprintf(s,"Now trying to open a second device while %s is open",devname);
308
+sprintf(s,"Now trying to open a second device while %s is open",dev_name);
309
 xytext(0,6,s);
310
 xytext(0,7,"This may cause your system to hang. Try ctrlC to exit (or reboot)");
311
 xytext(0,8,"Try another input device or install another sound system."); 
312
@@ -1192,9 +1192,9 @@
313
      read(audio_in, testbuff, 1024);
314
      if(ioctl(audio_in,SNDCTL_DSP_GETISPACE,&ad_info) == -1)end_program(1093);
315
      }
316
-  make_devname(i);
317
+  make_dev_name(i);
318
   cn=0;
319
-  sprintf(s,"%02d:%12s",i,devname);
320
+  sprintf(s,"%02d:%12s",i,dev_name);
321
   xytext(0,line,s);
322
   column=0;
323
   while(s[column] != 0)column++;
324
@@ -1206,7 +1206,7 @@
325
       if( (ui.input_mode&DWORD_INPUT) != 0 || ui.ad_channels > 2)
326
         {
327
         sprintf(&s[column],
328
-             " RDWR  useless (too many bits or channels) %d: %s",i,devname);
329
+             " RDWR  useless (too many bits or channels) %d: %s",i,dev_name);
330
         dev_flag[i]=0;
331
         }
332
       else
333
@@ -1224,10 +1224,10 @@
334
     dev_flag[i]&=0xffff-4;
335
     if( (dev_flag[i]&2) != 0 )
336
       {
337
-      audio_out=open( devname, O_WRONLY|O_NONBLOCK, 0);
338
+      audio_out=open( dev_name, O_WRONLY|O_NONBLOCK, 0);
339
       if(audio_out != -1)
340
         { 
341
-        fprintf(sndlog,"\n%s opened as WRONLY",devname);
342
+        fprintf(sndlog,"\n%s opened as WRONLY",dev_name);
343
         flush_sync();
344
         if(ioctl(audio_in, SNDCTL_DSP_GETISPACE, 
345
                                           &ad_info) == -1)end_program(1094);
346
@@ -1380,17 +1380,17 @@
347
   line=0;
348
   for(i=0; i<MAX_DEVNAMES; i++)
349
     {
350
-    make_devname(i);
351
-    fprintf(sndlog,"\n%s ",devname);
352
+    make_dev_name(i);
353
+    fprintf(sndlog,"\n%s ",dev_name);
354
     cn=0;
355
-    sprintf(s,"%02d:%12s",i,devname);
356
+    sprintf(s,"%02d:%12s",i,dev_name);
357
     xytext(0,line,s);
358
     column=0;
359
     while(s[column] != 0)column++;
360
-    audio_out=open( devname, O_WRONLY|O_NONBLOCK, 0);
361
+    audio_out=open( dev_name, O_WRONLY|O_NONBLOCK, 0);
362
     if(audio_out != -1)
363
       { 
364
-      fprintf(sndlog,"\n%s opened as WRONLY with no input open.",devname);
365
+      fprintf(sndlog,"\n%s opened as WRONLY with no input open.",dev_name);
366
       flush_sync();
367
       j=AFMT_U8;
368
       if(ioctl(audio_out, SNDCTL_DSP_SETFMT, &j) == -1)
369
@@ -1528,8 +1528,8 @@
370
   ui.da_device_no=j;
371
   if( (6 & dev_flag[ui.da_device_no]) == 0) goto get_dadev;
372
   }
373
-make_devname(ui.da_device_no);
374
-fprintf(sndlog,"\nUser selected %s for output.",devname);  
375
+make_dev_name(ui.da_device_no);
376
+fprintf(sndlog,"\nUser selected %s for output.",dev_name);  
377
 for(i=6; i<=line; i++)xytext(0,i,ss);  
378
 xytext(0,8,"Use close and reopen for D/A when");
379
 xytext(0,9,"a new signal is selected? (Y/N)");
380
@@ -1563,8 +1563,8 @@
381
   }
382
 else
383
   {
384
-  audio_out=open( devname ,O_WRONLY , 0);
385
-  sprintf(s,"\nUsing %s for output",devname);
386
+  audio_out=open( dev_name ,O_WRONLY , 0);
387
+  sprintf(s,"\nUsing %s for output",dev_name);
388
   xytext(0,6,s);
389
   if(audio_out == -1)end_program(1068);
390
   da_wrbuf = NULL;
(-)/usr/home/db/linrad/files/patch-settx.c (+93 lines)
Line 0 Link Here
1
--- settx.c.orig	Wed Jun  7 15:31:03 2006
2
+++ settx.c	Wed Jun  7 15:32:01 2006
3
@@ -21,7 +21,7 @@
4
 #define LEVEL_METER_X 65
5
 
6
 extern void make_devname(int device_no);
7
-extern char devname[];
8
+extern char dev_name[];
9
 extern char *devmode_txt[3];
10
 
11
 #if SND_DEV == 1
12
@@ -73,7 +73,7 @@
13
 int i,j;
14
 float t1;
15
 make_devname(tx.ad_device_no);
16
-tx_audio_in=open( devname, O_RDONLY, 0);
17
+tx_audio_in=open( dev_name, O_RDONLY, 0);
18
 if(tx_audio_in == -1)lirerr(991111);
19
 i=AFMT_S16_LE;
20
 #ifdef AFMT_S32_LE
21
@@ -107,7 +107,7 @@
22
 int i,j;
23
 float t1;
24
 make_devname(tx.da_device_no);
25
-tx_audio_out=open( devname, O_WRONLY|O_NONBLOCK, 0);
26
+tx_audio_out=open( dev_name, O_WRONLY|O_NONBLOCK, 0);
27
 if(tx_audio_out == -1)lirerr(231111);
28
 i=AFMT_S16_LE;
29
 #ifdef AFMT_S32_LE
30
@@ -300,11 +300,11 @@
31
     make_devname(device_no);
32
       {
33
       sprintf(s,"Trying to open %s %s. Device defective if system hangs here.",
34
-                                           devname, devmode_txt[1]);
35
+                                           dev_name, devmode_txt[1]);
36
       settextcolor(12);
37
       lir_text(0,line+1,s);
38
       settextcolor(7);
39
-      tx_audio_out=open( devname, O_WRONLY|O_NONBLOCK, 0);
40
+      tx_audio_out=open( dev_name, O_WRONLY|O_NONBLOCK, 0);
41
       if(tx_audio_out != -1)
42
         {
43
         line++;
44
@@ -374,7 +374,7 @@
45
           }
46
         dev_min_speed[device_no]=rdwr_speed;
47
         settextcolor(7);  
48
-        sprintf(s,"  %02d  %s     ",device_no,devname);
49
+        sprintf(s,"  %02d  %s     ",device_no,dev_name);
50
         lir_text(0,line,s);
51
         sprintf(s,"%s   ",devmode_txt[1]);
52
         if(rdwr_channels==3)
53
@@ -516,7 +516,7 @@
54
   }
55
 clear_screen();
56
 make_devname(tx.da_device_no);
57
-sprintf(s,"Tx output: %s, %d channel(s), %d bits, %d Hz",devname,
58
+sprintf(s,"Tx output: %s, %d channel(s), %d bits, %d Hz",dev_name,
59
                       tx.output_channels,tx.output_bytes<<3,tx.output_speed);
60
 settextcolor(14);
61
 lir_text(15,0,s);
62
@@ -578,11 +578,11 @@
63
     make_devname(device_no);
64
       {
65
       sprintf(s,"Trying to open %s %s. Device defective if system hangs here.",
66
-                                           devname, devmode_txt[0]);
67
+                                           dev_name, devmode_txt[0]);
68
       settextcolor(12);
69
       lir_text(0,line+1,s);
70
       settextcolor(7);
71
-      tx_audio_in=open( devname, O_RDONLY|O_NONBLOCK, 0);
72
+      tx_audio_in=open( dev_name, O_RDONLY|O_NONBLOCK, 0);
73
       if(tx_audio_in != -1)
74
         {
75
         line++;
76
@@ -652,7 +652,7 @@
77
           }
78
         dev_min_speed[device_no]=rdwr_speed;
79
         settextcolor(7);  
80
-        sprintf(s,"  %02d  %s     ",device_no,devname);
81
+        sprintf(s,"  %02d  %s     ",device_no,dev_name);
82
         lir_text(0,line,s);
83
         sprintf(s,"%s   ",devmode_txt[0]);
84
         if(rdwr_channels==3)
85
@@ -774,7 +774,7 @@
86
 clear_screen();
87
 make_devname(tx.ad_device_no);
88
 
89
-sprintf(s,"Microphone input: %s, %d channel(s), %d bits, %d Hz",devname,
90
+sprintf(s,"Microphone input: %s, %d channel(s), %d bits, %d Hz",dev_name,
91
                       tx.input_channels,tx.input_bytes<<3,tx.input_speed);
92
 settextcolor(14);
93
 lir_text(15,0,s);
(-)/usr/home/db/linrad/files/patch-tune.c (-15 lines)
Lines 1-15 Link Here
1
--- tune.c.orig	Tue May 18 09:43:30 2004
2
+++ tune.c	Fri Jul  9 12:25:02 2004
3
@@ -1,10 +1,9 @@
4
 
5
-
6
-#include <sys/io.h>
7
+#include <sys/types.h>
8
 #include <vga.h>
9
 #include <vgagl.h>
10
 #include <unistd.h>
11
-
12
+#include <machine/cpufunc.h>
13
 #include "globdef.h"
14
 #include "uidef.h"
15
 #include "fft1def.h"
(-)/usr/home/db/linrad/files/patch-uidef.h (-7 / +9 lines)
Lines 1-9 Link Here
1
--- uidef.h.orig	Tue May 18 09:43:30 2004
1
--- uidef.h.orig	Mon Jun 19 20:18:17 2006
2
+++ uidef.h	Thu Jul  8 18:27:42 2004
2
+++ uidef.h	Mon Jun 19 20:18:24 2006
3
@@ -1,4 +1,5 @@
3
@@ -5,7 +5,7 @@
4
-#include <arpa/inet.h>
4
 
5
+#include <sys/types.h>
6
+#include <netinet/in.h>
7
 
5
 
8
 #define MAX_FLOWCNT 31
6
 #define MAX_FLOWCNT 31
9
  
7
-#define MAX_DEVNAMES 65
8
+#define MAX_DEVNAMES 10
9
 #define MAX_LOWSPEED 10
10
 #define ABOVE_MAX_SPEED 768000
11
 
(-)/usr/home/db/linrad/files/patch-uivar.c (-11 lines)
Lines 1-11 Link Here
1
--- uivar.c.orig	Tue May 18 09:43:30 2004
2
+++ uivar.c	Thu Jul  8 14:17:52 2004
3
@@ -2,7 +2,7 @@
4
 #include "globdef.h"
5
 #include "uidef.h"
6
 #include "conf.h"
7
-
8
+#include <netinet/in.h>
9
 
10
 
11
 ROUTINE par_from_keyboard_routine;
(-)/usr/home/db/linrad/files/patch-wcw.c (-28 lines)
Lines 1-28 Link Here
1
--- wcw.c.orig	Thu Jul  8 18:22:12 2004
2
+++ wcw.c	Thu Jul  8 18:22:55 2004
3
@@ -116,10 +116,12 @@
4
 int syncflag, baseb_graph_time;
5
 audio_buf_info ad_info, ad_info2;
6
 touch_stack();
7
+#if 0
8
 if(ui.memlock == 0)
9
   {
10
   if(mlockall(MCL_CURRENT) != 0)end_program(1165);
11
   }
12
+#endif
13
 baseb_graph_time=0;
14
 get_buffers(0);
15
 if(lir_status != LIR_OK)return;
16
@@ -181,10 +183,12 @@
17
 diskread_timer=recent_time;
18
 latest_idle_time=recent_time;
19
 lirsta=RX_LOW_PRIO;
20
+#if 0
21
 if(ui.memlock == 0)
22
   {
23
   if(mlockall(MCL_CURRENT) != 0)lir_status=LIR_MEMERR;
24
   }
25
+#endif
26
 if(lir_status != LIR_OK)goto wcw_exit;
27
 // *******************************************************
28
 //                   MAIN RECEIVE LOOP
(-)/usr/home/db/linrad/files/patch-xmain.c (+20 lines)
Line 0 Link Here
1
--- xmain.c.orig	Mon Jun 19 22:40:14 2006
2
+++ xmain.c	Mon Jun 19 23:33:03 2006
3
@@ -38,7 +38,7 @@
4
 float total;
5
 }PIXINFO;
6
 
7
-
8
+int saved_euid=-1;
9
  
10
 int main(int argc, char **argv)
11
 {
12
@@ -58,6 +58,8 @@
13
 XTextProperty window_title_property;
14
 unsigned short int *ipalette;
15
 XColor xco;
16
+saved_euid=geteuid();
17
+setuid(getuid());	/* XXX drop perms! */
18
 if(UNINIT_MEMDATA != 0)
19
   {
20
   memptr=(void*)(&uninit_mem_begin);
(-)/usr/home/db/linrad/pkg-plist (-4 / +7 lines)
Lines 1-14 Link Here
1
bin/linrad
1
bin/xlinrad
2
%%DATADIR%%/errors.lir
3
%%DATADIR%%/help.lir
2
%%PORTDOCS%%%%DOCSDIR%%/z_APM.txt
4
%%PORTDOCS%%%%DOCSDIR%%/z_APM.txt
3
%%PORTDOCS%%%%DOCSDIR%%/z_BUFFERS.txt
5
%%PORTDOCS%%%%DOCSDIR%%/z_BUFFERS.txt
4
%%PORTDOCS%%%%DOCSDIR%%/z_CALIBRATE.txt
6
%%PORTDOCS%%%%DOCSDIR%%/z_CALIBRATE.txt
5
%%PORTDOCS%%%%DOCSDIR%%/z_COPYRIGHT.txt
7
%%PORTDOCS%%%%DOCSDIR%%/z_COPYRIGHT.txt
6
%%PORTDOCS%%%%DOCSDIR%%/z_GIFINFO.txt
8
%%PORTDOCS%%%%DOCSDIR%%/z_GIFINFO.txt
7
%%PORTDOCS%%%%DOCSDIR%%/z_INSTALL.txt
8
%%PORTDOCS%%%%DOCSDIR%%/z_MLOCK.txt
9
%%PORTDOCS%%%%DOCSDIR%%/z_MLOCK.txt
10
%%PORTDOCS%%%%DOCSDIR%%/z_MOUSE.txt
11
%%PORTDOCS%%%%DOCSDIR%%/z_PARALLEL_PORT.txt
9
%%PORTDOCS%%%%DOCSDIR%%/z_SETTINGS.txt
12
%%PORTDOCS%%%%DOCSDIR%%/z_SETTINGS.txt
10
%%PORTDOCS%%%%DOCSDIR%%/z_SPEED.txt
13
%%PORTDOCS%%%%DOCSDIR%%/z_USERS_EXTRA.txt
11
%%PORTDOCS%%%%DOCSDIR%%/z_SVGALIB.txt
12
%%PORTDOCS%%%%DOCSDIR%%/z_USERS_HWARE.txt
14
%%PORTDOCS%%%%DOCSDIR%%/z_USERS_HWARE.txt
13
%%PORTDOCS%%%%DOCSDIR%%/z_USLEEP.txt
15
%%PORTDOCS%%%%DOCSDIR%%/z_USLEEP.txt
14
%%PORTDOCS%%@dirrm %%DOCSDIR%%
16
%%PORTDOCS%%@dirrm %%DOCSDIR%%
17
@dirrm %%DATADIR%%

Return to bug 99235