aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:38 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:38 +0200
commita4a3e6b21da7d11e66364ab9ab67795a3f78020a (patch)
tree4ab98e8339361b8a4c89bedbe8888055292746b6
parentf53a049ec82b6e1d0877a93387ed4d15797749a2 (diff)
v3.74
-rw-r--r--Changes20
-rw-r--r--Make.config.in43
-rw-r--r--Makefile21
-rw-r--r--Makefile.clean21
-rw-r--r--Makefile.in176
-rw-r--r--Programming-FAQ109
-rw-r--r--README.lirc6
-rw-r--r--README.translate12
-rw-r--r--UPDATE_TO_v3.033
-rw-r--r--acconfig.h3
-rw-r--r--cc/Makefile25
-rw-r--r--cc/Makefile.in25
-rw-r--r--common/Makefile2
-rw-r--r--common/RegEdit.c (renamed from src/RegEdit.c)0
-rw-r--r--common/RegEdit.h (renamed from src/RegEdit.h)0
-rw-r--r--common/RegEditI.h (renamed from src/RegEditI.h)0
-rw-r--r--common/Subdir.mk19
-rw-r--r--common/capture.c (renamed from src/capture.c)0
-rw-r--r--common/capture.h (renamed from src/capture.h)0
-rw-r--r--common/channel.c (renamed from src/channel.c)0
-rw-r--r--common/channel.h (renamed from src/channel.h)0
-rw-r--r--common/commands.c (renamed from src/commands.c)3
-rw-r--r--common/commands.h (renamed from src/commands.h)0
-rw-r--r--common/event.c (renamed from src/event.c)2
-rw-r--r--common/event.h (renamed from src/event.h)0
-rw-r--r--common/frequencies.c (renamed from src/frequencies.c)0
-rw-r--r--common/frequencies.h (renamed from src/frequencies.h)0
-rw-r--r--common/joystick.c (renamed from src/joystick.c)0
-rw-r--r--common/joystick.h (renamed from src/joystick.h)0
-rw-r--r--common/lirc.c (renamed from src/lirc.c)0
-rw-r--r--common/lirc.h (renamed from src/lirc.h)0
-rw-r--r--common/midictrl.c (renamed from src/midictrl.c)6
-rw-r--r--common/midictrl.h (renamed from src/midictrl.h)0
-rw-r--r--common/parseconfig.c (renamed from src/parseconfig.c)0
-rw-r--r--common/parseconfig.h (renamed from src/parseconfig.h)0
-rw-r--r--common/sound.c (renamed from src/sound.c)0
-rw-r--r--common/sound.h (renamed from src/sound.h)0
-rw-r--r--common/webcam.c (renamed from src/webcam.c)0
-rw-r--r--common/webcam.h (renamed from src/webcam.h)0
-rw-r--r--config.h.in12
-rwxr-xr-xconfigure686
-rw-r--r--configure.ac82
-rw-r--r--console/Makefile2
-rw-r--r--console/Subdir.mk103
-rw-r--r--console/aa.c (renamed from src/aa.c)0
-rw-r--r--console/dump-mixers.c (renamed from tools/dump-mixers.c)0
-rw-r--r--console/fbtools.c (renamed from src/fbtools.c)0
-rw-r--r--console/fbtools.h (renamed from src/fbtools.h)0
-rw-r--r--console/fbtv.c (renamed from src/fbtv.c)1
-rw-r--r--console/font-6x11.h (renamed from webcam/font_6x11.h)0
-rw-r--r--console/fs.c (renamed from src/fs.c)0
-rw-r--r--console/fs.h (renamed from src/fs.h)0
-rw-r--r--console/ftp.c (renamed from webcam/ftp.c)0
-rw-r--r--console/ftp.h (renamed from webcam/ftp.h)0
-rw-r--r--console/matrox.c (renamed from src/matrox.c)7
-rw-r--r--console/matrox.h (renamed from src/matrox.h)0
-rw-r--r--console/radio.c (renamed from radio/radio.c)0
-rw-r--r--console/record.c (renamed from tools/record.c)0
-rw-r--r--console/scantv.c (renamed from src/scantv.c)6
-rw-r--r--console/showriff.c (renamed from tools/showriff.c)3
-rw-r--r--console/streamer.c (renamed from src/streamer.c)0
-rw-r--r--console/v4l-conf.c (renamed from src/v4l-conf.c)11
-rw-r--r--console/webcam.c (renamed from webcam/webcam.c)29
-rw-r--r--contrib/dot.lircrc92
-rw-r--r--debian/changelog2
-rw-r--r--debian/fbtv.files1
-rw-r--r--debian/rules7
-rw-r--r--debian/scantv.files1
-rw-r--r--debian/xawtv.files2
-rw-r--r--debug/Makefile2
-rw-r--r--debug/Subdir.mk48
-rw-r--r--debug/gl.ad (renamed from src/gl.ad)0
-rw-r--r--debug/gl.c (renamed from src/gl.c)8
-rw-r--r--debug/gl.h (renamed from src/gl.h)0
-rw-r--r--debug/hwscan.c (renamed from src/hwscan.c)33
-rw-r--r--debug/vbi-debug.c (renamed from src/vbi-debug.c)6
-rw-r--r--debug/xvideo.c (renamed from src/xvideo.c)0
-rw-r--r--fb/config.log481
-rw-r--r--font/Makefile.in49
-rw-r--r--fonts/Subdir.mk27
-rw-r--r--fonts/led-iso8859-1.bdf (renamed from font/led-iso8859-1.bdf)0
-rw-r--r--fonts/led-iso8859-15.bdf (renamed from font/led-iso8859-15.bdf)0
-rw-r--r--fonts/led-iso8859-2.bdf (renamed from font/led-iso8859-2.bdf)0
-rw-r--r--fonts/led-koi8-r.bdf (renamed from font/led-koi8-r.bdf)0
-rw-r--r--http/Makefile.in42
-rw-r--r--http/devices.c93
-rw-r--r--http/devices.h14
-rw-r--r--i2c/Makefile17
-rw-r--r--i2c/Makefile.in17
-rw-r--r--i2c/detect.c76
-rw-r--r--i2c/eeprom.c280
-rw-r--r--i2c/ir.c227
-rw-r--r--i2c/scan.c79
-rw-r--r--jwz/Makefile2
-rw-r--r--jwz/remote.c591
-rw-r--r--jwz/remote.h (renamed from src/xscreensaver.h)4
-rw-r--r--jwz/vroot.h126
-rw-r--r--libng/Makefile2
-rw-r--r--libng/Makefile.in31
-rw-r--r--libng/OVERVIEW10
-rw-r--r--libng/Subdir.mk16
-rw-r--r--libng/byteswap.h2
-rw-r--r--libng/color_common.c5
-rw-r--r--libng/color_lut.c5
-rw-r--r--libng/color_packed.c6
-rw-r--r--libng/color_yuv2rgb.c6
-rw-r--r--libng/grab-ng.c20
-rw-r--r--libng/grab-ng.h20
-rw-r--r--libng/plugins/Makefile2
-rw-r--r--libng/plugins/Makefile.in40
-rw-r--r--libng/plugins/Subdir.mk66
-rw-r--r--libng/plugins/conv-mjpeg.c3
-rw-r--r--libng/plugins/drv0-bsd.c7
-rw-r--r--libng/plugins/drv0-v4l2.c7
-rw-r--r--libng/plugins/drv1-v4l.c7
-rw-r--r--libng/plugins/flt-debug.c6
-rw-r--r--libng/plugins/flt-gamma.c5
-rw-r--r--libng/plugins/flt-invert.c5
-rw-r--r--libng/plugins/snd-oss.c138
-rw-r--r--libng/plugins/write-avi.c8
-rw-r--r--libng/plugins/write-qt.c5
-rw-r--r--libng/writefile.c6
-rw-r--r--libvbi/Makefile2
-rw-r--r--libvbi/Makefile.in31
-rw-r--r--libvbi/Subdir.mk18
-rw-r--r--man/Makefile.in22
-rw-r--r--man/Subdir.mk40
-rw-r--r--man/alevtd.1 (renamed from http/alevtd.man)0
-rw-r--r--man/dump-mixers.1 (renamed from tools/dump-mixers.man)0
-rw-r--r--man/es/fbtv.1157
-rw-r--r--man/es/scantv.154
-rw-r--r--man/es/xawtv.1243
-rw-r--r--man/es/xawtvrc.5297
-rw-r--r--man/motv.123
-rw-r--r--man/ntsc-cc.1 (renamed from cc/ntsc-cc.man)0
-rw-r--r--man/propwatch.1 (renamed from tools/propwatch.man)0
-rw-r--r--man/radio.1 (renamed from radio/radio.man)0
-rw-r--r--man/record.1 (renamed from tools/record.man)0
-rw-r--r--man/rootv.158
-rw-r--r--man/showriff.1 (renamed from tools/showriff.man)0
-rw-r--r--man/webcam.1 (renamed from webcam/webcam.man)0
-rw-r--r--man/xawtv-remote.13
-rw-r--r--man/xawtv.123
-rw-r--r--oldstuff/kraxel-tvee.h44
-rw-r--r--oldstuff/set-tv.c126
-rw-r--r--oldstuff/set-tv.man25
-rw-r--r--oldstuff/streamer-old.c702
-rw-r--r--oldstuff/vtx/Makefile14
-rw-r--r--oldstuff/vtx/README28
-rw-r--r--oldstuff/vtx/cct.h38
-rw-r--r--oldstuff/vtx/fileio.c163
-rw-r--r--oldstuff/vtx/fileio.h47
-rw-r--r--oldstuff/vtx/main.c160
-rw-r--r--oldstuff/vtx/misc.h41
-rw-r--r--oldstuff/vtx/sys/vtx.h151
-rw-r--r--oldstuff/vtx/vtx.cgi146
-rw-r--r--oldstuff/vtx/vtx.sh64
-rw-r--r--oldstuff/vtx/vtx_assert.h46
-rw-r--r--oldstuff/vtx/vtxdecode.c209
-rw-r--r--oldstuff/vtx/vtxdecode.h45
-rw-r--r--oldstuff/vtx/vtxtools.c140
-rw-r--r--oldstuff/vtx/vtxtools.h23
-rw-r--r--radio/Makefile.in30
-rw-r--r--radio/radio-old.c381
-rw-r--r--radio/x21
-rw-r--r--scripts/Subdir.mk3
-rw-r--r--scripts/bigfont.pl (renamed from font/bigfont.pl)0
-rw-r--r--scripts/fallback.pl (renamed from src/fallback.pl)0
-rw-r--r--scripts/subtitles (renamed from src/subtitles)0
-rw-r--r--scripts/webcam.cgi (renamed from webcam/webcam.cgi)0
-rw-r--r--src/Makefile.in180
-rw-r--r--src/MoTV.de.ad599
-rw-r--r--src/MoTV.it.ad605
-rw-r--r--src/rootv.c190
-rw-r--r--src/xscreensaver.c454
-rw-r--r--tools/Makefile.in49
-rw-r--r--tools/README36
-rw-r--r--vbistuff/Makefile2
-rw-r--r--vbistuff/Subdir.mk42
-rw-r--r--vbistuff/about.html.in (renamed from http/about.html.in)0
-rw-r--r--vbistuff/alevt.css.in (renamed from http/alevt.css.in)0
-rw-r--r--vbistuff/bottom.html.in (renamed from http/bottom.html.in)0
-rw-r--r--vbistuff/httpd.h (renamed from http/httpd.h)1
-rw-r--r--vbistuff/main.c (renamed from http/main.c)10
-rw-r--r--vbistuff/ntsc-cc.c (renamed from cc/ntsc-cc.c)0
-rw-r--r--vbistuff/page.c (renamed from http/page.c)0
-rw-r--r--vbistuff/request.c (renamed from http/request.c)7
-rw-r--r--vbistuff/response.c (renamed from http/response.c)0
-rw-r--r--vbistuff/top.html.in (renamed from http/top.html.in)0
-rw-r--r--webcam/Makefile.in36
-rw-r--r--webcam/parseconfig.c216
-rw-r--r--webcam/parseconfig.h7
-rw-r--r--webcam/webcam-old.c577
-rw-r--r--x11/Makefile2
-rw-r--r--x11/MoTV-de (renamed from src/MoTV-de)6
-rw-r--r--x11/MoTV-default (renamed from src/MoTV-default)6
-rw-r--r--x11/MoTV-fixed (renamed from src/MoTV-fixed)29
-rw-r--r--x11/MoTV-it (renamed from src/MoTV-it)6
-rw-r--r--x11/Subdir.mk137
-rw-r--r--x11/Xawtv.ad (renamed from src/Xawtv.ad)3
-rw-r--r--x11/complete.c (renamed from src/complete.c)0
-rw-r--r--x11/complete.h (renamed from src/complete.h)0
-rw-r--r--x11/conf.c (renamed from src/conf.c)0
-rw-r--r--x11/conf.h (renamed from src/conf.h)0
-rw-r--r--x11/icons.c (renamed from src/icons.c)14
-rw-r--r--x11/icons.h (renamed from src/icons.h)0
-rw-r--r--x11/man.c (renamed from src/man.c)0
-rw-r--r--x11/man.h (renamed from src/man.h)0
-rw-r--r--x11/motv.c (renamed from src/motif.c)76
-rw-r--r--x11/propwatch.c (renamed from tools/propwatch.c)0
-rw-r--r--x11/rootv.c445
-rw-r--r--x11/rootv.xml18
-rw-r--r--x11/toolbox.c (renamed from src/toolbox.c)0
-rw-r--r--x11/toolbox.h (renamed from src/toolbox.h)0
-rw-r--r--x11/v4lctl.c (renamed from src/v4lctl.c)6
-rw-r--r--x11/wmhooks.c (renamed from src/wmhooks.c)0
-rw-r--r--x11/wmhooks.h (renamed from src/wmhooks.h)0
-rw-r--r--x11/x11.c (renamed from src/x11.c)5
-rw-r--r--x11/x11.h (renamed from src/x11.h)0
-rw-r--r--x11/xawtv-remote.c (renamed from src/xawtv-remote.c)0
-rw-r--r--x11/xawtv.c (renamed from src/main.c)11
-rw-r--r--x11/xpm/exit.xpm (renamed from xpm/exit.xpm)0
-rw-r--r--x11/xpm/movie.xpm (renamed from xpm/movie.xpm)0
-rw-r--r--x11/xpm/mute.xpm (renamed from xpm/mute.xpm)0
-rw-r--r--x11/xpm/next.xpm (renamed from xpm/next.xpm)0
-rw-r--r--x11/xpm/prev.xpm (renamed from xpm/prev.xpm)0
-rw-r--r--x11/xpm/snap.xpm (renamed from xpm/snap.xpm)0
-rw-r--r--x11/xpm/tv.xpm (renamed from xpm/tv.xpm)0
-rw-r--r--x11/xt.c (renamed from src/xt.c)77
-rw-r--r--x11/xt.h (renamed from src/xt.h)3
-rw-r--r--x11/xv.c (renamed from src/xv.c)38
-rw-r--r--x11/xv.h (renamed from src/xv.h)0
-rw-r--r--xawtv.spec12
-rw-r--r--xawtv.spec.in10
234 files changed, 4045 insertions, 7711 deletions
diff --git a/Changes b/Changes
index 9de8dba..64c79b8 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,24 @@
+3.73 => 3.74
+============
+
+ * rewrote Makefiles. No recursive make any more. Faster now,
+ has sane dependences. Parallelizes (make -j) very good.
+ Really needs GNU make now.
+ * shuffled around source files.
+ * xscreensaver support. xawtv/motv will prevent xscreensaver kick in
+ when in fullscreen mode, and rootv can be used as xscreensaver
+ hack now.
+ * Changed the naming of the Xvideo extention command line switches,
+ hope they are a bit less confusing now.
+ * Changed motv mixer config, moved detection code to the oss sound
+ plugin.
+ * some spanish man pages (Ricardo Villalba <rvm@escomposlinux.org>).
+ * MoTV.ad: move <Key>osf* entries to the bottom of the translation
+ tables.
+ * minor alevtd fix (merge from webfsd).
+
+
3.72 => 3.73
============
diff --git a/Make.config.in b/Make.config.in
deleted file mode 100644
index 9780bb9..0000000
--- a/Make.config.in
+++ /dev/null
@@ -1,43 +0,0 @@
-
-# paths
-DESTDIR=
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=$(DESTDIR)@bindir@
-mandir=$(DESTDIR)@mandir@
-libdir=$(DESTDIR)@libdir@/xawtv
-resdir=$(DESTDIR)@resdir@
-fontdir=$(DESTDIR)/usr/X11R6/lib/X11/fonts/misc
-config=@x11conf@/xawtvrc
-
-# programs
-CC=@CC@
-DEPEND=@DEPEND@
-INSTALL=@INSTALL@
-INSTALL_PROGRAM=@INSTALL_PROGRAM@
-INSTALL_DATA=@INSTALL_DATA@
-INSTALL_DIR=@INSTALL@ -d -m 755
-SUID_ROOT=-m4755 -o root
-
-# misc
-OS:=$(shell uname -s | tr "A-Z" "a-z")
-VERSION=@VERSION@
-
-# for CFLAGS
-WARN_FLAGS=-Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
-LFS_FLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-X11_FLAGS=@X_CFLAGS@ -I/usr/X11R6/include/X11/fonts
-LIB_FLAGS=-I$(srcdir)/../libng -I$(srcdir)/../libvbi -L../libvbi -L../libng
-
-# libraries
-ATHENA_LIBS=@X_LIBS@ @LIBS@ @ATHENA@
-MOTIF_LIBS=@X_LIBS@ @LIBS@ -lXm -lXmu -lXt \
- @X_PRE_LIBS@ -lXp -lXpm -lXext -lX11 @X_EXTRA_LIBS@
-THREAD_LIBS=@LIBPTHREAD@
-CURSES_LIBS=@LIBCURSES@
-LIRC_LIBS=@LIRC@
-OSS_LIBS=@LIBOSS@
-ALSA_LIBS=@LIBALSA@
-AA_LIBS=@AALIBS@
-QT_LIBS=@QTLIBS@
-DLFLAGS=@DLFLAGS@
diff --git a/Makefile b/Makefile
index 9fcda38..7181ff3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,22 @@
-all checkit diff release port tarball rpm snapshot auto:
+
+# passed to configure
+prefix = /usr/local
+
+# arch name -- for build directory
+arch := $(shell echo "arch-`uname -m`-`uname -s`" | tr "A-Z" "a-z")
+
+# targets
+build all install: $(arch)/Makefile
+ $(MAKE) -C $(arch) $@
+
+clean distclean:
+ -test -d "$(arch)" && rm -rf "$(arch)"
+
+tarball rpm checkit release port:
./configure
$(MAKE) $@
+
+$(arch)/Makefile:
+ mkdir -p $(arch)
+ (cd $(arch); ../configure \
+ --prefix=$(prefix) )
diff --git a/Makefile.clean b/Makefile.clean
index 9fcda38..7181ff3 100644
--- a/Makefile.clean
+++ b/Makefile.clean
@@ -1,3 +1,22 @@
-all checkit diff release port tarball rpm snapshot auto:
+
+# passed to configure
+prefix = /usr/local
+
+# arch name -- for build directory
+arch := $(shell echo "arch-`uname -m`-`uname -s`" | tr "A-Z" "a-z")
+
+# targets
+build all install: $(arch)/Makefile
+ $(MAKE) -C $(arch) $@
+
+clean distclean:
+ -test -d "$(arch)" && rm -rf "$(arch)"
+
+tarball rpm checkit release port:
./configure
$(MAKE) $@
+
+$(arch)/Makefile:
+ mkdir -p $(arch)
+ (cd $(arch); ../configure \
+ --prefix=$(prefix) )
diff --git a/Makefile.in b/Makefile.in
index a2394a8..584e732 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,51 +1,161 @@
+srcdir := @srcdir@
+VPATH := $(srcdir)
+
+# for package builds (buildroot install + no root privs needed)
+DESTDIR=
+SUID_ROOT=-m4755 -o root
+
+# install paths
+prefix := @prefix@
+exec_prefix := @exec_prefix@
+bindir := $(DESTDIR)@bindir@
+mandir := $(DESTDIR)@mandir@
+libdir := $(DESTDIR)@libdir@/xawtv
+resdir := $(DESTDIR)@resdir@
+fontdir := $(DESTDIR)/usr/X11R6/lib/X11/fonts/misc
+config := @x11conf@/xawtvrc
+
+# programs
+CC := @CC@
+INSTALL := @INSTALL@
+INSTALL_PROGRAM := @INSTALL_PROGRAM@ -s
+INSTALL_DATA := @INSTALL_DATA@
+INSTALL_DIR := @INSTALL@ -d -m 755
+
+# misc
+VERSION := @VERSION@
+
+# for CFLAGS
+WARN_FLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
+LFS_FLAGS := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+X11_FLAGS := @X_CFLAGS@ -I/usr/X11R6/include/X11/fonts
+LIB_FLAGS := -I. -I./vbistuff -I./x11 \
+ -I$(srcdir)/jwz -I$(srcdir)/common \
+ -I$(srcdir)/libng -I$(srcdir)/libvbi -Llibvbi -Llibng
+
+# various libraries
+ATHENA_LIBS := @X_LIBS@ @LIBS@ @ATHENA@
+MOTIF_LIBS := @X_LIBS@ @LIBS@ -lXm -lXmu -lXt @X_PRE_LIBS@ \
+ -lXp -lXpm -lXext -lX11 @X_EXTRA_LIBS@
+THREAD_LIBS := @LIBPTHREAD@
+CURSES_LIBS := @LIBCURSES@
+LIRC_LIBS := @LIRC@
+OSS_LIBS := @LIBOSS@
+ALSA_LIBS := @LIBALSA@
+AA_LIBS := @AALIBS@
+QT_LIBS := @QTLIBS@
+FS_LIBS := -L@x_libraries@ @FSLIB@
+DLFLAGS := @DLFLAGS@
+
+# stuff configure has found
+FOUND_AALIB := @FOUND_AALIB@
+FOUND_ALSA := @FOUND_ALSA@
+FOUND_LQT := @FOUND_LQT@
+FOUND_MOTIF := @FOUND_MOTIF@
+FOUND_OS := @FOUND_OS@
+FOUND_X11 := @FOUND_X11@
+
+# build final cflags
+CFLAGS := @CFLAGS@
+CFLAGS += $(WARN_FLAGS)
+CFLAGS += $(LFS_FLAGS)
+CFLAGS += $(X11_FLAGS)
+CFLAGS += $(LIB_FLAGS)
+CFLAGS += -DCONFIGFILE='"$(config)"'
+CFLAGS += -DLIBDIR='"$(libdir)"'
+CFLAGS += -DVERSION='"$(VERSION)"'
+
#########################################################
-# build stuff
+# targets
-SUBDIRS=src http webcam libvbi libng libng/plugins radio tools cc man @SUBS@
+build: all
-all build: $(SUBDIRS)
-.PHONY: $(SUBDIRS)
+Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
+ $(srcdir)/configure
+install:: all
+ $(INSTALL_DIR) $(bindir)
-src: libvbi libng .havedeps
- (cd $@; $(MAKE) build)
+clean::
+ find . -name \*~ -print | xargs rm -f
+ find . -name \*.o -print | xargs rm -f
+ find . -name \*.a -print | xargs rm -f
+ find . -name \*.d -print | xargs rm -f
+ find . -name \*.pic -print | xargs rm -f
+ find . -name \*.dep -print | xargs rm -f
-http: libvbi .havedeps
- (cd $@; $(MAKE) build)
+distclean:: clean
+ -rm -f Makefile Make.config
+ -rm -f config.cache config.h config.log config.status
+ cp Makefile.clean Makefile
-webcam: libng .havedeps
- (cd $@; $(MAKE) build)
+realclean:: distclean
+ find . -name snap0*.ppm -print | xargs -i rm -f
+ find . -name snap0*.jpeg -print | xargs -i rm -f
+ find . -name .nfs* -print | xargs -i rm -f
+ find . -name core.* -print | xargs -i rm -f
-libvbi libng libng/plugins radio font tools cc man: .havedeps
- (cd $@; $(MAKE) build)
+#########################################################
+# some rules ...
-.havedeps dep depend:
- set -ex; for dir in $(SUBDIRS); do \
- (cd $$dir; $(MAKE) depend) \
- done
- touch .havedeps
+.SUFFIXES: .c .h .o .pic .in .ad .bdf .pcf.gz
-install clean distclean realclean::
- set -ex; for dir in $(SUBDIRS); do \
- (cd $$dir; $(MAKE) $@) \
- done
+.c.o:
+ $(CC) $(CFLAGS) -Wp,-MD,$*.dep -c -o $@ $<
+ @sed -e "s|.*\.o:|$@::|" < $*.dep > $*.d && rm -f $*.dep
-distclean realclean::
- -rm -f *~ debian/*~ xpm/*~ Makefile Make.config .havedeps
- -rm -f config.cache config.h config.log config.status
- cp Makefile.clean Makefile
+.c.pic:
+ $(CC) $(CFLAGS) -fPIC -Wp,-MD,$*.dep -c -o $@ $<
+ @sed -e "s|.*\.o:|$@::|" < $*.dep > $*.d && rm -f $*.dep
+
+.in.h:
+ perl -ne 's/\"/\\\"/g; chop; print "\"$$_\\n\"\n"' $< > $@
+
+.ad.h:
+ perl $(srcdir)/scripts/fallback.pl < $< > $@
+
+.bdf.pcf.gz:
+ bdftopcf -o $*.pcf $<
+ gzip $*.pcf
#########################################################
-# just for me, some maintaining jobs. Don't use them
+# include stuff
+
+# must come first
+include $(srcdir)/common/Subdir.mk
+
+# subdirs
+include $(srcdir)/console/Subdir.mk
+include $(srcdir)/debug/Subdir.mk
+include $(srcdir)/fonts/Subdir.mk
+include $(srcdir)/libng/Subdir.mk
+include $(srcdir)/libng/plugins/Subdir.mk
+include $(srcdir)/libvbi/Subdir.mk
+include $(srcdir)/man/Subdir.mk
+include $(srcdir)/scripts/Subdir.mk
+include $(srcdir)/vbistuff/Subdir.mk
+include $(srcdir)/x11/Subdir.mk
+
+# dependences
+-include common/*.d
+-include console/*.d
+-include debug/*.d
+-include jwz/*.d
+-include libng/*.d
+-include libng/plugins/*.d
+-include libvbi/*.d
+-include vbistuff/*.d
+-include x11/*.d
+
-VERSION=@VERSION@
+#########################################################
+# just for me, some maintaining jobs. Don't use them
checkit: distclean
dpkg-buildpackage -tc -us -uc -rfakeroot
-# rpm -ta ../xawtv_*.tar.gz
lintian ../xawtv_*.changes
release: distclean
@@ -65,17 +175,9 @@ snapshot: distclean
(cd ..; tar cvzf xawtv-snap-`date +%Y-%m-%d`.tar.gz \
xawtv-$(VERSION))
-auto:
+auto: distclean
rm -f config.cache
autoconf
autoheader
./configure
- make distclean
make
-
-realclean::
- find . -name snap0*.ppm -print | xargs -i rm -f
- find . -name snap0*.jpeg -print | xargs -i rm -f
- find . -name .nfs* -print | xargs -i rm -f
- set -e; for dir in i2c; do make -C $$dir distclean; done
-
diff --git a/Programming-FAQ b/Programming-FAQ
deleted file mode 100644
index f3a0377..0000000
--- a/Programming-FAQ
+++ /dev/null
@@ -1,109 +0,0 @@
-
-mostly for bttv currently, also a bit outdated and incomplete...
-
-
-Initialisation
-==============
-
-Grabbing does'nt work if the bt848 chip can't sync, you'll get errno
-== EAGAIN then (Overlay does work and gives snow). You have to make
-sure:
-
- * The driver uses the correct Video Input (VIDIOCSCHAN)
- * The driver uses the correct TV norm (VIDIOCSCHAN,VIDIOCSTUNER)
- * For TV input: There is some station tuned in.
-
-With VIDIOCGCHAN you can ask for available input channels and
-informations about these.
-
-
-Simple grabbing with mmap()
-===========================
-
-With bttv you can mmap() the bttv memory. There is room for two
-frames, therefore you can get 2*BTTV_MAX_FBUF bytes mapped.
-
- fd = open("/dev/video", ...);
- /* ... initialisation ... */
- map = mmap(0,BTTV_MAX_FBUF*2,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);
-
-Frame 0 starts at map, frame 1 at map+BTTV_MAX_FBUF.
-
-Ok, that's the preparation, now let's start grabbing. You have to
-fill the parameters (size, format, frame) into a struct video_mmap,
-and then do
-
- ioctl(fd,VIDIOCMCAPTURE,&video_mmap);
-
-This instructs the driver to capture a frame. The ioctl will return
-immedantly, the driver will process your request asyncron (interrupt
-driven). If you want to get the result, you have to wait for it using
-
- ioctl(fd,VIDIOCSYNC,&video_mmap.frame);
-
-If your request is still in progress, the ioctl will block until it is
-done. Otherwise it will return. That's all, now you have the result
-in the mmap()ed area.
-
-
-Advanced grabbing
-=================
-
-The scheme outlined above works fine for single frames. If you want
-do continuous grabbing and keep up with the full frame rate (25 fps
-for PAL), it is'nt that simple. As mentioned above, the driver has
-room for two frames. There is room for two grabbing requests too.
-
-The basic idea for handling full speed is to let work the bttv driver
-and the application in parallel. The application processes the
-picture in one of the frames, while the driver captures the next
-picture to the other one. Works this way:
-
- /* ... initialisation ... */
-
- ioctl(capture frame 0)
-
-loop:
- ioctl(capture frame 1)
- ioctl(sync frame 0)
- /*
- * this sync returns if the first request (for frame 0) is done
- * the driver will continue with the next one (for frame 1),
- * while the application can proccess frame 0. If the
- * application is done, we reuse frame 0 for the next request ...
- */
- ioctl(capture frame 0)
- ioctl(sync frame 1)
- /*
- * same procedure, but the other way around: driver captures
- * to frame 0, application proccesses frame 1
- */
- goto loop;
-
-
-Pitfalls / driver changes
-=========================
-
-video4linux is work-in-progress, and there still some interface
-changes from time to time due to design bugs.
-
-One problem is that the TV norm (PAL/NTSC/...) is in struct
-video_tuner, not struct video_channel. That's bad if you have a board
-without tuner at all and a PAL video recorder connected to Composite1
-and a NTSC Camera to Composite2...
-Fixing this required changes in both structs and the VIDIOCSCHAN
-ioctl.
-
-Another one is that the VIDIOCSYNC ioctl had no argument at all, newer
-versions take the frame number as argument. The new scheme is more
-stable.
-
-The hard-coded frame size (BTTV_MAX_FBUF) is gone in newer versions,
-you should use the VIDIOCGMBUF ioctl to figure out the size at runtime.
-
-Happy hacking,
-
- Gerd
-
---
-Gerd Knorr <kraxel@goldbach.in-berlin.de>
diff --git a/README.lirc b/README.lirc
index 0e5f0f2..c4251c6 100644
--- a/README.lirc
+++ b/README.lirc
@@ -19,14 +19,14 @@ The main difference between using no config file at all and one with
"config = eventmap" is that the later allows you to filter the
keypresses depending on the current mode. The simpliest way to make
xawtv use the default eventmap configuration, but respond to key
-presses in tv mode only looks like this:
+presses in xawtv mode only looks like this:
-begin tv
+begin xawtv
begin
prog = xawtv
config = eventmap
end
-end tv
+end xawtv
You probably need this if you are going to control multiple
applications with your IR remote, check out the lirc documentation for
diff --git a/README.translate b/README.translate
index 84b859f..d4bf49b 100644
--- a/README.translate
+++ b/README.translate
@@ -8,21 +8,19 @@ the strings are in the MoTV-<lang> files. MoTV-default is the english
version. MoTV-fixed has the other (language-independant) app-default
settings. The Makefile merges these into MoTV.<lang>.ad files.
-To add another language you just need to create a new MoTV-<lang> file,
-edit src/Makefile.in and add the language to the LANG= line. Then rerun
-the configure script. Now the make targets (in src/) include the new
-language. You can test the translations without "make install" this way
-(bash):
+To add another language you just need to create a new MoTV-<lang>
+file, edit x11/Subdir.mk and add the language to the LANGUAGES= line.
+You can test the translations without "make install" this way (bash):
once at start:
-$ cd src
+$ cd x11
$ export XUSERFILESEARCHPATH="./%N.%l.ad:./%N.ad"
$ export LC_ALL=<lang>
every time after editing MoTV-<lang>:
-$ make i18n
+$ make
$ ./motv
diff --git a/UPDATE_TO_v3.0 b/UPDATE_TO_v3.0
deleted file mode 100644
index a67930e..0000000
--- a/UPDATE_TO_v3.0
+++ /dev/null
@@ -1,33 +0,0 @@
-
-Incompatible changes in 3.0
-===========================
-
- * The config file format has changed. There are three new sections:
- [global], [defaults] and [launch]. Global settings go to the [global]
- section, the default settings for the channels to [defaults]. Tools
- which should be started from xawtv go to the [launch] section now.
- Check the xawtv man page for more details.
-
- * The command line options all have one dash only ('-debug'). Thats X11
- style (like '-geometry' and '-font'), I will not switch to GNU style
- options. xawtv uses the Xt options parser, this has the nice side
- effect that there are X11 ressources now for all options, i.e. you
- can turn them on permantly by adding entries to your .Xdefaults file.
- [ FIXME: add them to the xawtv manpage ]
-
- * The frequency tables are all renamed. I've removed the TV norm from
- the name to avoid confusion. They are now named after regions,
- optionally with "-bcast" or "-cable" appended to indicate if the table
- is for cable TV or for broadcast.
-
- * set-tv is gone, there is the more powerfull tool v4lctl instead.
- Check the v4lctl man page for details.
-
- * I've unbundled kradio and moved it (with a improved configure script)
- into another tarball. It caused compile trouble often becauce it
- requires KDE devel packages and a C++ compiler. People often hav'nt
- found the '--disable-kradio' switch which fixes these problems :-(
- The ncurses-based radio tool is still included.
-
-This file lists only changes which are not backward-compatible to the
-2.x versions. Check the Changes file for a more complete list.
diff --git a/acconfig.h b/acconfig.h
index 0ebb61f..b9d3833 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,3 +1,6 @@
+/* no comment */
+#undef HAVE_XMU
+
/* lirc lib */
#undef HAVE_LIBLIRC_CLIENT
diff --git a/cc/Makefile b/cc/Makefile
deleted file mode 100644
index 20b5993..0000000
--- a/cc/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-
-srcdir=.
-
-
-include ../Make.config
-
-CFLAGS=-g -g -O2 $(WARN_FLAGS) $(X11_FLAGS) -I..
-LDLIBS=$(ATHENA_LIBS)
-
-all build: ntsc-cc
-
-ntsc-cc: ntsc-cc.o
- $(CC) $(CFLAGS) -o $@ ntsc-cc.o $(LDLIBS)
-
-install: all
- $(INSTALL_DIR) $(bindir)
- $(INSTALL_DIR) $(mandir)
- $(INSTALL_PROGRAM) -s ntsc-cc $(bindir)
- $(INSTALL_DATA) $(srcdir)/ntsc-cc.man $(mandir)/man1/ntsc-cc.1
-
-clean distclean realclean:
- -rm -f ntsc-cc ntsc-cc.o *~
-
-depend dep:
-
diff --git a/cc/Makefile.in b/cc/Makefile.in
deleted file mode 100644
index e4bb62b..0000000
--- a/cc/Makefile.in
+++ /dev/null
@@ -1,25 +0,0 @@
-
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../Make.config
-
-CFLAGS=-g @CFLAGS@ $(WARN_FLAGS) $(X11_FLAGS) -I..
-LDLIBS=$(ATHENA_LIBS)
-
-all build: ntsc-cc
-
-ntsc-cc: ntsc-cc.o
- $(CC) $(CFLAGS) -o $@ ntsc-cc.o $(LDLIBS)
-
-install: all
- $(INSTALL_DIR) $(bindir)
- $(INSTALL_DIR) $(mandir)
- $(INSTALL_PROGRAM) -s ntsc-cc $(bindir)
- $(INSTALL_DATA) $(srcdir)/ntsc-cc.man $(mandir)/man1/ntsc-cc.1
-
-clean distclean realclean:
- -rm -f ntsc-cc ntsc-cc.o *~
-
-depend dep:
-
diff --git a/common/Makefile b/common/Makefile
new file mode 100644
index 0000000..4e33e30
--- /dev/null
+++ b/common/Makefile
@@ -0,0 +1,2 @@
+default:
+ cd ..; $(MAKE)
diff --git a/src/RegEdit.c b/common/RegEdit.c
index fa01b88..fa01b88 100644
--- a/src/RegEdit.c
+++ b/common/RegEdit.c
diff --git a/src/RegEdit.h b/common/RegEdit.h
index 5274151..5274151 100644
--- a/src/RegEdit.h
+++ b/common/RegEdit.h
diff --git a/src/RegEditI.h b/common/RegEditI.h
index 4608593..4608593 100644
--- a/src/RegEditI.h
+++ b/common/RegEditI.h
diff --git a/common/Subdir.mk b/common/Subdir.mk
new file mode 100644
index 0000000..58aba3d
--- /dev/null
+++ b/common/Subdir.mk
@@ -0,0 +1,19 @@
+
+OBJS-common-capture := \
+ common/sound.o \
+ common/webcam.o \
+ common/frequencies.o \
+ common/commands.o \
+ common/parseconfig.o \
+ common/capture.o \
+ common/event.o \
+ libng/libng.a
+
+OBJS-common-input := \
+ common/lirc.o \
+ common/joystick.o \
+ common/midictrl.o
+
+common/channel-no-x11.o:: common/channel.c
+ $(CC) $(CFLAGS) -DNO_X11=1 -Wp,-MD,$*.dep -c -o $@ $<
+ @sed -e "s|.*\.o:|$@::|" < $*.dep > $*.d && rm -f $*.dep
diff --git a/src/capture.c b/common/capture.c
index a309bf2..a309bf2 100644
--- a/src/capture.c
+++ b/common/capture.c
diff --git a/src/capture.h b/common/capture.h
index 55eba30..55eba30 100644
--- a/src/capture.h
+++ b/common/capture.h
diff --git a/src/channel.c b/common/channel.c
index 57c3750..57c3750 100644
--- a/src/channel.c
+++ b/common/channel.c
diff --git a/src/channel.h b/common/channel.h
index b5b04f1..b5b04f1 100644
--- a/src/channel.h
+++ b/common/channel.h
diff --git a/src/commands.c b/common/commands.c
index b78df0e..846c782 100644
--- a/src/commands.c
+++ b/common/commands.c
@@ -112,7 +112,6 @@ static struct COMMANDS {
{ "show", 0, show_handler },
{ "list", 0, list_handler },
- { "mute", 0, volume_handler },
{ "volume", 0, volume_handler },
{ "attr", 0, dattr_handler },
@@ -1040,7 +1039,7 @@ static int snap_handler(char *hname, int argc, char **argv)
sprintf(message,"saved jpeg: %s",filename);
}
} else {
- if (-1 == write_ppm(filename, buf)) {
+ if (-1 == write_ppm(tmpfilename, buf)) {
sprintf(message,"open %s: %s\n",tmpfilename,strerror(errno));
} else {
sprintf(message,"saved ppm: %s",filename);
diff --git a/src/commands.h b/common/commands.h
index 20b4229..20b4229 100644
--- a/src/commands.h
+++ b/common/commands.h
diff --git a/src/event.c b/common/event.c
index 36bfed6..cdf584c 100644
--- a/src/event.c
+++ b/common/event.c
@@ -103,7 +103,7 @@ void event_writeconfig(FILE *fp)
fprintf(fp,"[eventmap]\n");
for (entry = event_conf_list; NULL != entry; entry = entry->next)
- fprintf(stderr,"%s = %s\n",entry->event,entry->action);
+ fprintf(fp,"%s = %s\n",entry->event,entry->action);
fprintf(fp,"\n");
}
diff --git a/src/event.h b/common/event.h
index 8f14e57..8f14e57 100644
--- a/src/event.h
+++ b/common/event.h
diff --git a/src/frequencies.c b/common/frequencies.c
index 4863736..4863736 100644
--- a/src/frequencies.c
+++ b/common/frequencies.c
diff --git a/src/frequencies.h b/common/frequencies.h
index 8f62e75..8f62e75 100644
--- a/src/frequencies.h
+++ b/common/frequencies.h
diff --git a/src/joystick.c b/common/joystick.c
index 69ed3fe..69ed3fe 100644
--- a/src/joystick.c
+++ b/common/joystick.c
diff --git a/src/joystick.h b/common/joystick.h
index ccf627e..ccf627e 100644
--- a/src/joystick.h
+++ b/common/joystick.h
diff --git a/src/lirc.c b/common/lirc.c
index a39f5ab..a39f5ab 100644
--- a/src/lirc.c
+++ b/common/lirc.c
diff --git a/src/lirc.h b/common/lirc.h
index 9906c81..9906c81 100644
--- a/src/lirc.h
+++ b/common/lirc.h
diff --git a/src/midictrl.c b/common/midictrl.c
index 5617c4e..42f33c0 100644
--- a/src/midictrl.c
+++ b/common/midictrl.c
@@ -309,9 +309,3 @@ void midi_translate(struct midi_handle *h)
#endif /* STANDALONE */
#endif /* HAVE_ALSA */
-
-/*
- * Local variables:
- * compile-command: "(cd ..; make)"
- * End:
- */
diff --git a/src/midictrl.h b/common/midictrl.h
index ecd29e2..ecd29e2 100644
--- a/src/midictrl.h
+++ b/common/midictrl.h
diff --git a/src/parseconfig.c b/common/parseconfig.c
index 7a0dd66..7a0dd66 100644
--- a/src/parseconfig.c
+++ b/common/parseconfig.c
diff --git a/src/parseconfig.h b/common/parseconfig.h
index e3b609d..e3b609d 100644
--- a/src/parseconfig.h
+++ b/common/parseconfig.h
diff --git a/src/sound.c b/common/sound.c
index 490d3f2..490d3f2 100644
--- a/src/sound.c
+++ b/common/sound.c
diff --git a/src/sound.h b/common/sound.h
index 7eb767f..7eb767f 100644
--- a/src/sound.h
+++ b/common/sound.h
diff --git a/src/webcam.c b/common/webcam.c
index ab86b1b..ab86b1b 100644
--- a/src/webcam.c
+++ b/common/webcam.c
diff --git a/src/webcam.h b/common/webcam.h
index e3ec4af..e3ec4af 100644
--- a/src/webcam.h
+++ b/common/webcam.h
diff --git a/config.h.in b/config.h.in
index f216167..45439a7 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,4 +1,7 @@
/* config.h.in. Generated automatically from configure.ac by autoheader. */
+/* no comment */
+#undef HAVE_XMU
+
/* lirc lib */
#undef HAVE_LIBLIRC_CLIENT
@@ -23,9 +26,6 @@
/* Define if you have the `dlopen' function. */
#undef HAVE_DLOPEN
-/* Define if you have the <endian.h> header file. */
-#undef HAVE_ENDIAN_H
-
/* Define if you have the `fseeko' function. */
#undef HAVE_FSEEKO
@@ -71,8 +71,14 @@
/* Define if you have the `strcasestr' function. */
#undef HAVE_STRCASESTR
+/* Define if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
/* Define if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
/* Define if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
diff --git a/configure b/configure
index 04bdc49..2ea69dc 100755
--- a/configure
+++ b/configure
@@ -2007,35 +2007,34 @@ fi
done
test -n "$DEPEND" || DEPEND="true"
-VBIFLAGS=""
-PROGS=""
-INST=""
-RADIO=""
-PLUGINS=""
+FOUND_AALIB="no"
+FOUND_ALSA="no"
+FOUND_LQT="no"
+FOUND_MOTIF="no"
+FOUND_OS="unknown"
+FOUND_X11="no"
+FOUND_GL="no"
+
case "`uname -s`" in
Linux)
- PLUGINS="drv0-v4l2.so drv1-v4l.so snd-oss.so"
- PROGS="v4l-conf fbtv"
- INST="install-v4l-conf install-fbtv"
- RADIO="radio"
+ FOUND_OS="linux"
;;
OpenBSD | FreeBSD | NetBSD)
- # *BSD has important stuff (from ports) in
- # /usr/local ...
+ # *BSD has important stuff (from ports)
+ # in /usr/local ...
CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib"
- PLUGINS="drv0-bsd.so snd-oss.so"
- VBIFLAGS="-DBSD"
+ FOUND_OS="bsd"
;;
*)
- echo "$as_me:2030: checking if xawtv will build on \`uname -s\`" >&5
+ echo "$as_me:2029: checking if xawtv will build on \`uname -s\`" >&5
echo $ECHO_N "checking if xawtv will build on \`uname -s\`... $ECHO_C" >&6
- echo "$as_me:2032: result: maybe" >&5
+ echo "$as_me:2031: result: maybe" >&5
echo "${ECHO_T}maybe" >&6
;;
esac
cat >conftest.$ac_ext <<_ACEOF
-#line 2038 "configure"
+#line 2037 "configure"
#include "confdefs.h"
#include <sys/socket.h>
@@ -2049,26 +2048,26 @@ EOF
fi
rm -f conftest*
-for ac_header in endian.h getopt.h soundcard.h sys/soundcard.h alsa/asoundlib.h linux/joystick.h dev/ic/bt8xx.h machine/ioctl_bt848.h
+for ac_header in getopt.h soundcard.h unistd.h sys/select.h sys/soundcard.h alsa/asoundlib.h linux/joystick.h dev/ic/bt8xx.h machine/ioctl_bt848.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:2055: checking for $ac_header" >&5
+echo "$as_me:2054: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2061 "configure"
+#line 2060 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:2065: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2064: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2071: \$? = $ac_status" >&5
+ echo "$as_me:2070: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2087,7 +2086,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:2090: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:2089: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -2100,13 +2099,13 @@ done
for ac_func in ftello fseeko getpt getnameinfo getopt_long strcasestr dlopen
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:2103: checking for $ac_func" >&5
+echo "$as_me:2102: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2109 "configure"
+#line 2108 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -2137,16 +2136,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2140: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2139: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2143: \$? = $ac_status" >&5
+ echo "$as_me:2142: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2146: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2145: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2149: \$? = $ac_status" >&5
+ echo "$as_me:2148: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -2156,7 +2155,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:2159: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:2158: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -2168,7 +2167,7 @@ done
DLFLAGS=""
if test "$ac_cv_func_dlopen" = "no"; then
- echo "$as_me:2171: checking for dlopen in -ldl" >&5
+ echo "$as_me:2170: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2176,7 +2175,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2179 "configure"
+#line 2178 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -2195,16 +2194,16 @@ dlopen ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2198: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2197: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2201: \$? = $ac_status" >&5
+ echo "$as_me:2200: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2204: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2203: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2207: \$? = $ac_status" >&5
+ echo "$as_me:2206: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dl_dlopen=yes
else
@@ -2215,25 +2214,25 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:2218: result: $ac_cv_lib_dl_dlopen" >&5
+echo "$as_me:2217: result: $ac_cv_lib_dl_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
DLFLAGS="-ldl"
fi
fi
-echo "$as_me:2225: checking for ELF" >&5
+echo "$as_me:2224: checking for ELF" >&5
echo $ECHO_N "checking for ELF... $ECHO_C" >&6
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
- echo "$as_me:2228: result: yes" >&5
+ echo "$as_me:2227: result: yes" >&5
echo "${ECHO_T}yes" >&6
DLFLAGS="$DLFLAGS -Wl,-E"
else
- echo "$as_me:2232: result: no" >&5
+ echo "$as_me:2231: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-echo "$as_me:2236: checking for pthread_create in -lpthread" >&5
+echo "$as_me:2235: checking for pthread_create in -lpthread" >&5
echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2241,7 +2240,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2244 "configure"
+#line 2243 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -2260,16 +2259,16 @@ pthread_create ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2263: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2262: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2266: \$? = $ac_status" >&5
+ echo "$as_me:2265: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2269: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2268: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2272: \$? = $ac_status" >&5
+ echo "$as_me:2271: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pthread_pthread_create=yes
else
@@ -2280,14 +2279,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:2283: result: $ac_cv_lib_pthread_pthread_create" >&5
+echo "$as_me:2282: result: $ac_cv_lib_pthread_pthread_create" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
if test $ac_cv_lib_pthread_pthread_create = yes; then
LIBPTHREAD="-lpthread"
fi
if test "$LIBPTHREAD" = ""; then
- echo "$as_me:2290: checking for pthread_create in -lc_r" >&5
+ echo "$as_me:2289: checking for pthread_create in -lc_r" >&5
echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2295,7 +2294,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lc_r $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2298 "configure"
+#line 2297 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -2314,16 +2313,16 @@ pthread_create ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2317: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2316: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2320: \$? = $ac_status" >&5
+ echo "$as_me:2319: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2323: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2322: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2326: \$? = $ac_status" >&5
+ echo "$as_me:2325: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_c_r_pthread_create=yes
else
@@ -2334,14 +2333,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:2337: result: $ac_cv_lib_c_r_pthread_create" >&5
+echo "$as_me:2336: result: $ac_cv_lib_c_r_pthread_create" >&5
echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
if test $ac_cv_lib_c_r_pthread_create = yes; then
LIBPTHREAD="-lc_r"
fi
fi
-echo "$as_me:2344: checking for main in -lossaudio" >&5
+echo "$as_me:2343: checking for main in -lossaudio" >&5
echo $ECHO_N "checking for main in -lossaudio... $ECHO_C" >&6
if test "${ac_cv_lib_ossaudio_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2349,7 +2348,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lossaudio $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2352 "configure"
+#line 2351 "configure"
#include "confdefs.h"
int
@@ -2361,16 +2360,16 @@ main ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2364: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2363: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2367: \$? = $ac_status" >&5
+ echo "$as_me:2366: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2370: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2369: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2373: \$? = $ac_status" >&5
+ echo "$as_me:2372: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ossaudio_main=yes
else
@@ -2381,13 +2380,13 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:2384: result: $ac_cv_lib_ossaudio_main" >&5
+echo "$as_me:2383: result: $ac_cv_lib_ossaudio_main" >&5
echo "${ECHO_T}$ac_cv_lib_ossaudio_main" >&6
if test $ac_cv_lib_ossaudio_main = yes; then
LIBOSS="-lossaudio"
fi
-echo "$as_me:2390: checking for initscr in -lncurses" >&5
+echo "$as_me:2389: checking for initscr in -lncurses" >&5
echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6
if test "${ac_cv_lib_ncurses_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2395,7 +2394,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2398 "configure"
+#line 2397 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -2414,16 +2413,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2417: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2416: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2420: \$? = $ac_status" >&5
+ echo "$as_me:2419: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2423: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2422: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2426: \$? = $ac_status" >&5
+ echo "$as_me:2425: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ncurses_initscr=yes
else
@@ -2434,14 +2433,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:2437: result: $ac_cv_lib_ncurses_initscr" >&5
+echo "$as_me:2436: result: $ac_cv_lib_ncurses_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6
if test $ac_cv_lib_ncurses_initscr = yes; then
LIBCURSES="-lncurses"
fi
if test "$LIBCURSES" = ""; then
- echo "$as_me:2444: checking for initscr in -lcurses" >&5
+ echo "$as_me:2443: checking for initscr in -lcurses" >&5
echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
if test "${ac_cv_lib_curses_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2449,7 +2448,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2452 "configure"
+#line 2451 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -2468,16 +2467,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2471: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2470: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2474: \$? = $ac_status" >&5
+ echo "$as_me:2473: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2477: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2476: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2480: \$? = $ac_status" >&5
+ echo "$as_me:2479: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_curses_initscr=yes
else
@@ -2488,7 +2487,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:2491: result: $ac_cv_lib_curses_initscr" >&5
+echo "$as_me:2490: result: $ac_cv_lib_curses_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
if test $ac_cv_lib_curses_initscr = yes; then
LIBCURSES="-lcurses"
@@ -2502,7 +2501,7 @@ if test "$LIBCURSES" = ""; then
exit 1
fi
-echo "$as_me:2505: checking for X" >&5
+echo "$as_me:2504: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6
# Check whether --with-x or --without-x was given.
@@ -2599,17 +2598,17 @@ if test "$ac_x_includes" = no; then
# Guess where to find include files, by looking for Intrinsic.h.
# First, try using that file with no special directory specified.
cat >conftest.$ac_ext <<_ACEOF
-#line 2602 "configure"
+#line 2601 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
_ACEOF
-if { (eval echo "$as_me:2606: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2605: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2612: \$? = $ac_status" >&5
+ echo "$as_me:2611: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2642,7 +2641,7 @@ if test "$ac_x_libraries" = no; then
ac_save_LIBS=$LIBS
LIBS="-lXt $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2645 "configure"
+#line 2644 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
int
@@ -2654,16 +2653,16 @@ XtMalloc (0)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2657: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2656: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2660: \$? = $ac_status" >&5
+ echo "$as_me:2659: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2663: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2662: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2666: \$? = $ac_status" >&5
+ echo "$as_me:2665: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
@@ -2701,7 +2700,7 @@ fi
fi # $with_x != no
if test "$have_x" != yes; then
- echo "$as_me:2704: result: $have_x" >&5
+ echo "$as_me:2703: result: $have_x" >&5
echo "${ECHO_T}$have_x" >&6
no_x=yes
else
@@ -2711,7 +2710,7 @@ else
# Update the cache value to reflect the command line values.
ac_cv_have_x="have_x=yes \
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
- echo "$as_me:2714: result: libraries $x_libraries, headers $x_includes" >&5
+ echo "$as_me:2713: result: libraries $x_libraries, headers $x_includes" >&5
echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
fi
@@ -2735,11 +2734,11 @@ else
# others require no space. Words are not sufficient . . . .
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*)
- echo "$as_me:2738: checking whether -R must be followed by a space" >&5
+ echo "$as_me:2737: checking whether -R must be followed by a space" >&5
echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
cat >conftest.$ac_ext <<_ACEOF
-#line 2742 "configure"
+#line 2741 "configure"
#include "confdefs.h"
int
@@ -2751,16 +2750,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2754: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2753: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2757: \$? = $ac_status" >&5
+ echo "$as_me:2756: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2760: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2759: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2763: \$? = $ac_status" >&5
+ echo "$as_me:2762: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_R_nospace=yes
else
@@ -2770,13 +2769,13 @@ ac_R_nospace=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test $ac_R_nospace = yes; then
- echo "$as_me:2773: result: no" >&5
+ echo "$as_me:2772: result: no" >&5
echo "${ECHO_T}no" >&6
X_LIBS="$X_LIBS -R$x_libraries"
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat >conftest.$ac_ext <<_ACEOF
-#line 2779 "configure"
+#line 2778 "configure"
#include "confdefs.h"
int
@@ -2788,16 +2787,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2791: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2790: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2794: \$? = $ac_status" >&5
+ echo "$as_me:2793: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2797: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2796: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2800: \$? = $ac_status" >&5
+ echo "$as_me:2799: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_R_space=yes
else
@@ -2807,11 +2806,11 @@ ac_R_space=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test $ac_R_space = yes; then
- echo "$as_me:2810: result: yes" >&5
+ echo "$as_me:2809: result: yes" >&5
echo "${ECHO_T}yes" >&6
X_LIBS="$X_LIBS -R $x_libraries"
else
- echo "$as_me:2814: result: neither works" >&5
+ echo "$as_me:2813: result: neither works" >&5
echo "${ECHO_T}neither works" >&6
fi
fi
@@ -2831,7 +2830,7 @@ echo "${ECHO_T}neither works" >&6
# the Alpha needs dnet_stub (dnet does not exist).
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
cat >conftest.$ac_ext <<_ACEOF
-#line 2834 "configure"
+#line 2833 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -2850,22 +2849,22 @@ XOpenDisplay ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2853: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2852: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2856: \$? = $ac_status" >&5
+ echo "$as_me:2855: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2859: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2858: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2862: \$? = $ac_status" >&5
+ echo "$as_me:2861: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:2868: checking for dnet_ntoa in -ldnet" >&5
+echo "$as_me:2867: checking for dnet_ntoa in -ldnet" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2873,7 +2872,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2876 "configure"
+#line 2875 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -2892,16 +2891,16 @@ dnet_ntoa ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2895: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2894: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2898: \$? = $ac_status" >&5
+ echo "$as_me:2897: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2901: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2900: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2904: \$? = $ac_status" >&5
+ echo "$as_me:2903: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dnet_dnet_ntoa=yes
else
@@ -2912,14 +2911,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:2915: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+echo "$as_me:2914: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
- echo "$as_me:2922: checking for dnet_ntoa in -ldnet_stub" >&5
+ echo "$as_me:2921: checking for dnet_ntoa in -ldnet_stub" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2927,7 +2926,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet_stub $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 2930 "configure"
+#line 2929 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -2946,16 +2945,16 @@ dnet_ntoa ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2949: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2948: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2952: \$? = $ac_status" >&5
+ echo "$as_me:2951: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2955: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2954: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2958: \$? = $ac_status" >&5
+ echo "$as_me:2957: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
@@ -2966,7 +2965,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:2969: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+echo "$as_me:2968: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
@@ -2985,13 +2984,13 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
# on Irix 5.2, according to T.E. Dickey.
# The functions gethostbyname, getservbyname, and inet_addr are
# in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
- echo "$as_me:2988: checking for gethostbyname" >&5
+ echo "$as_me:2987: checking for gethostbyname" >&5
echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2994 "configure"
+#line 2993 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname (); below. */
@@ -3022,16 +3021,16 @@ f = gethostbyname;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3025: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3024: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3028: \$? = $ac_status" >&5
+ echo "$as_me:3027: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3031: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3030: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3034: \$? = $ac_status" >&5
+ echo "$as_me:3033: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_gethostbyname=yes
else
@@ -3041,11 +3040,11 @@ ac_cv_func_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:3044: result: $ac_cv_func_gethostbyname" >&5
+echo "$as_me:3043: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
if test $ac_cv_func_gethostbyname = no; then
- echo "$as_me:3048: checking for gethostbyname in -lnsl" >&5
+ echo "$as_me:3047: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3053,7 +3052,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3056 "configure"
+#line 3055 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3072,16 +3071,16 @@ gethostbyname ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3075: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3074: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3078: \$? = $ac_status" >&5
+ echo "$as_me:3077: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3081: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3080: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3084: \$? = $ac_status" >&5
+ echo "$as_me:3083: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_nsl_gethostbyname=yes
else
@@ -3092,14 +3091,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3095: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "$as_me:3094: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi
if test $ac_cv_lib_nsl_gethostbyname = no; then
- echo "$as_me:3102: checking for gethostbyname in -lbsd" >&5
+ echo "$as_me:3101: checking for gethostbyname in -lbsd" >&5
echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3107,7 +3106,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3110 "configure"
+#line 3109 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3126,16 +3125,16 @@ gethostbyname ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3129: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3128: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3132: \$? = $ac_status" >&5
+ echo "$as_me:3131: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3135: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3134: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3138: \$? = $ac_status" >&5
+ echo "$as_me:3137: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_bsd_gethostbyname=yes
else
@@ -3146,7 +3145,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3149: result: $ac_cv_lib_bsd_gethostbyname" >&5
+echo "$as_me:3148: result: $ac_cv_lib_bsd_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
if test $ac_cv_lib_bsd_gethostbyname = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
@@ -3162,13 +3161,13 @@ fi
# variants that don't use the nameserver (or something). -lsocket
# must be given before -lnsl if both are needed. We assume that
# if connect needs -lnsl, so does gethostbyname.
- echo "$as_me:3165: checking for connect" >&5
+ echo "$as_me:3164: checking for connect" >&5
echo $ECHO_N "checking for connect... $ECHO_C" >&6
if test "${ac_cv_func_connect+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3171 "configure"
+#line 3170 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect (); below. */
@@ -3199,16 +3198,16 @@ f = connect;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3202: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3201: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3205: \$? = $ac_status" >&5
+ echo "$as_me:3204: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3208: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3207: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3211: \$? = $ac_status" >&5
+ echo "$as_me:3210: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_connect=yes
else
@@ -3218,11 +3217,11 @@ ac_cv_func_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:3221: result: $ac_cv_func_connect" >&5
+echo "$as_me:3220: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6
if test $ac_cv_func_connect = no; then
- echo "$as_me:3225: checking for connect in -lsocket" >&5
+ echo "$as_me:3224: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3230,7 +3229,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3233 "configure"
+#line 3232 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3249,16 +3248,16 @@ connect ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3252: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3251: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3255: \$? = $ac_status" >&5
+ echo "$as_me:3254: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3258: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3257: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3261: \$? = $ac_status" >&5
+ echo "$as_me:3260: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_socket_connect=yes
else
@@ -3269,7 +3268,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3272: result: $ac_cv_lib_socket_connect" >&5
+echo "$as_me:3271: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
@@ -3278,13 +3277,13 @@ fi
fi
# Guillermo Gomez says -lposix is necessary on A/UX.
- echo "$as_me:3281: checking for remove" >&5
+ echo "$as_me:3280: checking for remove" >&5
echo $ECHO_N "checking for remove... $ECHO_C" >&6
if test "${ac_cv_func_remove+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3287 "configure"
+#line 3286 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove (); below. */
@@ -3315,16 +3314,16 @@ f = remove;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3318: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3317: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3321: \$? = $ac_status" >&5
+ echo "$as_me:3320: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3324: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3323: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3327: \$? = $ac_status" >&5
+ echo "$as_me:3326: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_remove=yes
else
@@ -3334,11 +3333,11 @@ ac_cv_func_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:3337: result: $ac_cv_func_remove" >&5
+echo "$as_me:3336: result: $ac_cv_func_remove" >&5
echo "${ECHO_T}$ac_cv_func_remove" >&6
if test $ac_cv_func_remove = no; then
- echo "$as_me:3341: checking for remove in -lposix" >&5
+ echo "$as_me:3340: checking for remove in -lposix" >&5
echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
if test "${ac_cv_lib_posix_remove+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3346,7 +3345,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lposix $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3349 "configure"
+#line 3348 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3365,16 +3364,16 @@ remove ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3368: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3367: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3371: \$? = $ac_status" >&5
+ echo "$as_me:3370: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3374: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3373: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3377: \$? = $ac_status" >&5
+ echo "$as_me:3376: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_posix_remove=yes
else
@@ -3385,7 +3384,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3388: result: $ac_cv_lib_posix_remove" >&5
+echo "$as_me:3387: result: $ac_cv_lib_posix_remove" >&5
echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
if test $ac_cv_lib_posix_remove = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
@@ -3394,13 +3393,13 @@ fi
fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
- echo "$as_me:3397: checking for shmat" >&5
+ echo "$as_me:3396: checking for shmat" >&5
echo $ECHO_N "checking for shmat... $ECHO_C" >&6
if test "${ac_cv_func_shmat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 3403 "configure"
+#line 3402 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat (); below. */
@@ -3431,16 +3430,16 @@ f = shmat;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3434: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3433: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3437: \$? = $ac_status" >&5
+ echo "$as_me:3436: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3440: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3439: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3443: \$? = $ac_status" >&5
+ echo "$as_me:3442: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_shmat=yes
else
@@ -3450,11 +3449,11 @@ ac_cv_func_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:3453: result: $ac_cv_func_shmat" >&5
+echo "$as_me:3452: result: $ac_cv_func_shmat" >&5
echo "${ECHO_T}$ac_cv_func_shmat" >&6
if test $ac_cv_func_shmat = no; then
- echo "$as_me:3457: checking for shmat in -lipc" >&5
+ echo "$as_me:3456: checking for shmat in -lipc" >&5
echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
if test "${ac_cv_lib_ipc_shmat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3462,7 +3461,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lipc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3465 "configure"
+#line 3464 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3481,16 +3480,16 @@ shmat ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3484: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3483: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3487: \$? = $ac_status" >&5
+ echo "$as_me:3486: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3490: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3489: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3493: \$? = $ac_status" >&5
+ echo "$as_me:3492: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ipc_shmat=yes
else
@@ -3501,7 +3500,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3504: result: $ac_cv_lib_ipc_shmat" >&5
+echo "$as_me:3503: result: $ac_cv_lib_ipc_shmat" >&5
echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
if test $ac_cv_lib_ipc_shmat = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
@@ -3519,7 +3518,7 @@ fi
# These have to be linked with before -lX11, unlike the other
# libraries we check for below, so use a different variable.
# John Interrante, Karl Berry
- echo "$as_me:3522: checking for IceConnectionNumber in -lICE" >&5
+ echo "$as_me:3521: checking for IceConnectionNumber in -lICE" >&5
echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3527,7 +3526,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3530 "configure"
+#line 3529 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3546,16 +3545,16 @@ IceConnectionNumber ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3549: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3548: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3552: \$? = $ac_status" >&5
+ echo "$as_me:3551: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3555: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3554: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3558: \$? = $ac_status" >&5
+ echo "$as_me:3557: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ICE_IceConnectionNumber=yes
else
@@ -3566,7 +3565,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3569: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+echo "$as_me:3568: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
@@ -3577,19 +3576,15 @@ fi
fi
if test "$no_x" != "yes"; then
- PROGS="$PROGS xawtv xawtv-remote xvideo rootv"
+ FOUND_X11="yes"
ATHENA="-lXaw -lXmu -lXt $X_PRE_LIBS -lXpm -lXext -lX11 $X_EXTRA_LIBS"
FSLIB="-lFS"
- SUBS="font"
- TOOLS="propwatch"
else
ATHENA=""
FSLIB=""
- SUBS=""
- TOOLS=""
fi
-echo "$as_me:3592: checking for jpeg_start_compress in -ljpeg" >&5
+echo "$as_me:3587: checking for jpeg_start_compress in -ljpeg" >&5
echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3597,7 +3592,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ljpeg $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3600 "configure"
+#line 3595 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3616,16 +3611,16 @@ jpeg_start_compress ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3619: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3614: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3622: \$? = $ac_status" >&5
+ echo "$as_me:3617: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3625: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3620: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3628: \$? = $ac_status" >&5
+ echo "$as_me:3623: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_jpeg_jpeg_start_compress=yes
else
@@ -3636,7 +3631,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3639: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
+echo "$as_me:3634: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
JPEG="found"
@@ -3651,7 +3646,7 @@ fi
LIBALSA=""
if test "$enable_alsa" != "no"; then
- echo "$as_me:3654: checking for snd_seq_open in -lasound" >&5
+ echo "$as_me:3649: checking for snd_seq_open in -lasound" >&5
echo $ECHO_N "checking for snd_seq_open in -lasound... $ECHO_C" >&6
if test "${ac_cv_lib_asound_snd_seq_open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3659,7 +3654,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lasound $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3662 "configure"
+#line 3657 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3678,16 +3673,16 @@ snd_seq_open ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3681: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3676: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3684: \$? = $ac_status" >&5
+ echo "$as_me:3679: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3687: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3682: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3690: \$? = $ac_status" >&5
+ echo "$as_me:3685: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_asound_snd_seq_open=yes
else
@@ -3698,13 +3693,13 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3701: result: $ac_cv_lib_asound_snd_seq_open" >&5
+echo "$as_me:3696: result: $ac_cv_lib_asound_snd_seq_open" >&5
echo "${ECHO_T}$ac_cv_lib_asound_snd_seq_open" >&6
if test $ac_cv_lib_asound_snd_seq_open = yes; then
cat >>confdefs.h <<\EOF
#define HAVE_ALSA 1
EOF
- PROGS="$PROGS mididump"; LIBALSA="-lasound"
+ FOUND_ALSA="yes"; LIBALSA="-lasound"
fi
else
@@ -3713,7 +3708,7 @@ fi
LIRC=""
if test "$enable_lirc" != "no"; then
- echo "$as_me:3716: checking for lirc_init in -llirc_client" >&5
+ echo "$as_me:3711: checking for lirc_init in -llirc_client" >&5
echo $ECHO_N "checking for lirc_init in -llirc_client... $ECHO_C" >&6
if test "${ac_cv_lib_lirc_client_lirc_init+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3721,7 +3716,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-llirc_client $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3724 "configure"
+#line 3719 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3740,16 +3735,16 @@ lirc_init ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3743: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3738: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3746: \$? = $ac_status" >&5
+ echo "$as_me:3741: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3749: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3744: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3752: \$? = $ac_status" >&5
+ echo "$as_me:3747: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_lirc_client_lirc_init=yes
else
@@ -3760,7 +3755,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3763: result: $ac_cv_lib_lirc_client_lirc_init" >&5
+echo "$as_me:3758: result: $ac_cv_lib_lirc_client_lirc_init" >&5
echo "${ECHO_T}$ac_cv_lib_lirc_client_lirc_init" >&6
if test $ac_cv_lib_lirc_client_lirc_init = yes; then
cat >>confdefs.h <<\EOF
@@ -3775,7 +3770,7 @@ fi
AALIBS=""
if test "$enable_aa" != "no"; then
- echo "$as_me:3778: checking for aa_autoinit in -laa" >&5
+ echo "$as_me:3773: checking for aa_autoinit in -laa" >&5
echo $ECHO_N "checking for aa_autoinit in -laa... $ECHO_C" >&6
if test "${ac_cv_lib_aa_aa_autoinit+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3783,7 +3778,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-laa $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3786 "configure"
+#line 3781 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3802,16 +3797,16 @@ aa_autoinit ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3805: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3800: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3808: \$? = $ac_status" >&5
+ echo "$as_me:3803: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3811: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3806: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3814: \$? = $ac_status" >&5
+ echo "$as_me:3809: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_aa_aa_autoinit=yes
else
@@ -3822,13 +3817,13 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3825: result: $ac_cv_lib_aa_aa_autoinit" >&5
+echo "$as_me:3820: result: $ac_cv_lib_aa_aa_autoinit" >&5
echo "${ECHO_T}$ac_cv_lib_aa_aa_autoinit" >&6
if test $ac_cv_lib_aa_aa_autoinit = yes; then
- PROGS="$PROGS ttv"; INST="$INST install-ttv"; AA="found"
+ FOUND_AALIB="yes"
fi
- if test "$AA" = "found"; then
+ if test "$FOUND_AALIB" = "yes"; then
AALIBS=-laa
if test -x "`which aalib-config 2>/dev/null`"; then
AALIBS=`aalib-config --libs`
@@ -3839,7 +3834,7 @@ else
fi
if test "$enable_quicktime" != "no"; then
- echo "$as_me:3842: checking for lqt_query_registry in -lquicktime" >&5
+ echo "$as_me:3837: checking for lqt_query_registry in -lquicktime" >&5
echo $ECHO_N "checking for lqt_query_registry in -lquicktime... $ECHO_C" >&6
if test "${ac_cv_lib_quicktime_lqt_query_registry+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3847,7 +3842,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lquicktime -ldl -lglib $LIBPTHREAD $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3850 "configure"
+#line 3845 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3866,16 +3861,16 @@ lqt_query_registry ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3869: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3864: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3872: \$? = $ac_status" >&5
+ echo "$as_me:3867: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3875: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3870: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3878: \$? = $ac_status" >&5
+ echo "$as_me:3873: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_quicktime_lqt_query_registry=yes
else
@@ -3886,10 +3881,10 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3889: result: $ac_cv_lib_quicktime_lqt_query_registry" >&5
+echo "$as_me:3884: result: $ac_cv_lib_quicktime_lqt_query_registry" >&5
echo "${ECHO_T}$ac_cv_lib_quicktime_lqt_query_registry" >&6
if test $ac_cv_lib_quicktime_lqt_query_registry = yes; then
- QUICKTIME="found";cat >>confdefs.h <<\EOF
+ FOUND_LQT="yes"; cat >>confdefs.h <<\EOF
#define HAVE_LIBQUICKTIME 1
EOF
@@ -3898,16 +3893,14 @@ fi
else
echo "*** quicktime disabled"
fi
-if test "$QUICKTIME" = "found"; then
+QTLIBS=""
+if test "$FOUND_LQT" = "yes"; then
QTLIBS="-lquicktime -ldl -lglib -lm"
- PLUGINS="$PLUGINS write-qt.so"
-else
- QTLIBS=""
fi
if test "$enable_xfree_ext" != "no"; then
-echo "$as_me:3910: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
+echo "$as_me:3903: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
echo $ECHO_N "checking for XF86DGAQueryExtension in -lXxf86dga... $ECHO_C" >&6
if test "${ac_cv_lib_Xxf86dga_XF86DGAQueryExtension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3915,7 +3908,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXxf86dga $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3918 "configure"
+#line 3911 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3934,16 +3927,16 @@ XF86DGAQueryExtension ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3937: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3930: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3940: \$? = $ac_status" >&5
+ echo "$as_me:3933: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:3943: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3936: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3946: \$? = $ac_status" >&5
+ echo "$as_me:3939: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xxf86dga_XF86DGAQueryExtension=yes
else
@@ -3954,7 +3947,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:3957: result: $ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" >&5
+echo "$as_me:3950: result: $ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" >&6
if test $ac_cv_lib_Xxf86dga_XF86DGAQueryExtension = yes; then
cat >>confdefs.h <<EOF
@@ -3965,7 +3958,7 @@ EOF
fi
-echo "$as_me:3968: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5
+echo "$as_me:3961: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5
echo $ECHO_N "checking for XF86VidModeQueryExtension in -lXxf86vm... $ECHO_C" >&6
if test "${ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3973,7 +3966,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXxf86vm $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 3976 "configure"
+#line 3969 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -3992,16 +3985,16 @@ XF86VidModeQueryExtension ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:3995: \"$ac_link\"") >&5
+if { (eval echo "$as_me:3988: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:3998: \$? = $ac_status" >&5
+ echo "$as_me:3991: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4001: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3994: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4004: \$? = $ac_status" >&5
+ echo "$as_me:3997: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension=yes
else
@@ -4012,7 +4005,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:4015: result: $ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" >&5
+echo "$as_me:4008: result: $ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" >&6
if test $ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension = yes; then
cat >>confdefs.h <<EOF
@@ -4023,7 +4016,7 @@ EOF
fi
-echo "$as_me:4026: checking for DPMSQueryExtension in -lXdpms" >&5
+echo "$as_me:4019: checking for DPMSQueryExtension in -lXdpms" >&5
echo $ECHO_N "checking for DPMSQueryExtension in -lXdpms... $ECHO_C" >&6
if test "${ac_cv_lib_Xdpms_DPMSQueryExtension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4031,7 +4024,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXdpms $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 4034 "configure"
+#line 4027 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -4050,16 +4043,16 @@ DPMSQueryExtension ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4053: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4046: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4056: \$? = $ac_status" >&5
+ echo "$as_me:4049: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4059: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4052: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4062: \$? = $ac_status" >&5
+ echo "$as_me:4055: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xdpms_DPMSQueryExtension=yes
else
@@ -4070,7 +4063,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:4073: result: $ac_cv_lib_Xdpms_DPMSQueryExtension" >&5
+echo "$as_me:4066: result: $ac_cv_lib_Xdpms_DPMSQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSQueryExtension" >&6
if test $ac_cv_lib_Xdpms_DPMSQueryExtension = yes; then
cat >>confdefs.h <<EOF
@@ -4082,7 +4075,7 @@ EOF
fi
if test "$ac_cv_lib_Xdpms_DPMSQueryExtension" = "no"; then
- echo "$as_me:4085: checking for DPMSQueryExtension in -lXext" >&5
+ echo "$as_me:4078: checking for DPMSQueryExtension in -lXext" >&5
echo $ECHO_N "checking for DPMSQueryExtension in -lXext... $ECHO_C" >&6
if test "${ac_cv_lib_Xext_DPMSQueryExtension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4090,7 +4083,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXext $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 4093 "configure"
+#line 4086 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -4109,16 +4102,16 @@ DPMSQueryExtension ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4112: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4105: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4115: \$? = $ac_status" >&5
+ echo "$as_me:4108: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4118: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4111: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4121: \$? = $ac_status" >&5
+ echo "$as_me:4114: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xext_DPMSQueryExtension=yes
else
@@ -4129,7 +4122,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:4132: result: $ac_cv_lib_Xext_DPMSQueryExtension" >&5
+echo "$as_me:4125: result: $ac_cv_lib_Xext_DPMSQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xext_DPMSQueryExtension" >&6
if test $ac_cv_lib_Xext_DPMSQueryExtension = yes; then
cat >>confdefs.h <<\EOF
@@ -4140,7 +4133,7 @@ fi
fi
-echo "$as_me:4143: checking for XineramaQueryExtension in -lXinerama" >&5
+echo "$as_me:4136: checking for XineramaQueryExtension in -lXinerama" >&5
echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6
if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4148,7 +4141,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXinerama $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 4151 "configure"
+#line 4144 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -4167,16 +4160,16 @@ XineramaQueryExtension ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4170: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4163: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4173: \$? = $ac_status" >&5
+ echo "$as_me:4166: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4176: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4169: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4179: \$? = $ac_status" >&5
+ echo "$as_me:4172: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xinerama_XineramaQueryExtension=yes
else
@@ -4187,7 +4180,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:4190: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
+echo "$as_me:4183: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6
if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
cat >>confdefs.h <<EOF
@@ -4204,7 +4197,7 @@ fi
if test "$enable_xvideo" != "no"; then
-echo "$as_me:4207: checking for XvQueryExtension in -lXv" >&5
+echo "$as_me:4200: checking for XvQueryExtension in -lXv" >&5
echo $ECHO_N "checking for XvQueryExtension in -lXv... $ECHO_C" >&6
if test "${ac_cv_lib_Xv_XvQueryExtension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4212,7 +4205,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXv $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 4215 "configure"
+#line 4208 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -4231,16 +4224,16 @@ XvQueryExtension ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4234: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4227: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4237: \$? = $ac_status" >&5
+ echo "$as_me:4230: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4240: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4233: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4243: \$? = $ac_status" >&5
+ echo "$as_me:4236: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xv_XvQueryExtension=yes
else
@@ -4251,7 +4244,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:4254: result: $ac_cv_lib_Xv_XvQueryExtension" >&5
+echo "$as_me:4247: result: $ac_cv_lib_Xv_XvQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xv_XvQueryExtension" >&6
if test $ac_cv_lib_Xv_XvQueryExtension = yes; then
cat >>confdefs.h <<EOF
@@ -4267,7 +4260,7 @@ else
fi
if test "$enable_motif" != "no"; then
- echo "$as_me:4270: checking for XmStringGenerate in -lXm" >&5
+ echo "$as_me:4263: checking for XmStringGenerate in -lXm" >&5
echo $ECHO_N "checking for XmStringGenerate in -lXm... $ECHO_C" >&6
if test "${ac_cv_lib_Xm_XmStringGenerate+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4275,7 +4268,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXm $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 4278 "configure"
+#line 4271 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -4294,16 +4287,16 @@ XmStringGenerate ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4297: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4290: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4300: \$? = $ac_status" >&5
+ echo "$as_me:4293: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4303: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4296: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4306: \$? = $ac_status" >&5
+ echo "$as_me:4299: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xm_XmStringGenerate=yes
else
@@ -4314,37 +4307,94 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:4317: result: $ac_cv_lib_Xm_XmStringGenerate" >&5
+echo "$as_me:4310: result: $ac_cv_lib_Xm_XmStringGenerate" >&5
echo "${ECHO_T}$ac_cv_lib_Xm_XmStringGenerate" >&6
if test $ac_cv_lib_Xm_XmStringGenerate = yes; then
- PROGS="$PROGS motv"; INST="$INST install-motv"
+ FOUND_MOTIF="yes"
fi
else
echo "*** motif support disabled"
fi
+echo "$as_me:4320: checking for glXChooseVisual in -lGL" >&5
+echo $ECHO_N "checking for glXChooseVisual in -lGL... $ECHO_C" >&6
+if test "${ac_cv_lib_GL_glXChooseVisual+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGL $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4328 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char glXChooseVisual ();
+int
+main ()
+{
+glXChooseVisual ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4347: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4350: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4353: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4356: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_GL_glXChooseVisual=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_GL_glXChooseVisual=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:4367: result: $ac_cv_lib_GL_glXChooseVisual" >&5
+echo "${ECHO_T}$ac_cv_lib_GL_glXChooseVisual" >&6
+if test $ac_cv_lib_GL_glXChooseVisual = yes; then
+ FOUND_GL="yes"
+fi
+
VERSION="`(cd $srcdir; pwd) | sed -e 's/.*-//'`"
-echo "$as_me:4329: checking for X11 config directory" >&5
+echo "$as_me:4375: checking for X11 config directory" >&5
echo $ECHO_N "checking for X11 config directory... $ECHO_C" >&6
x11conf=/usr/X11R6/lib/X11
if test -d /etc/X11; then
x11conf=/etc/X11
fi
-echo "$as_me:4335: result: $x11conf" >&5
+echo "$as_me:4381: result: $x11conf" >&5
echo "${ECHO_T}$x11conf" >&6
-echo "$as_me:4338: checking for X11 app-defaults directory" >&5
+echo "$as_me:4384: checking for X11 app-defaults directory" >&5
echo $ECHO_N "checking for X11 app-defaults directory... $ECHO_C" >&6
resdir=/usr/X11R6/lib/X11
if test -d /etc/X11/app-defaults; then
resdir=/etc/X11
fi
-echo "$as_me:4344: result: $resdir/app-defaults" >&5
+echo "$as_me:4390: result: $resdir/app-defaults" >&5
echo "${ECHO_T}$resdir/app-defaults" >&6
-ac_config_files="$ac_config_files Make.config Makefile src/Makefile tools/Makefile radio/Makefile man/Makefile i2c/Makefile font/Makefile webcam/Makefile http/Makefile libvbi/Makefile libng/Makefile libng/plugins/Makefile cc/Makefile xawtv.spec"
+cat >>confdefs.h <<\EOF
+#define HAVE_XMU 1
+EOF
+
+ac_config_files="$ac_config_files Makefile xawtv.spec"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -4424,7 +4474,7 @@ DEFS=-DHAVE_CONFIG_H
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:4427: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:4477: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@@ -4597,7 +4647,7 @@ cat >>$CONFIG_STATUS <<\EOF
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:4600: error: ambiguous option: $1
+ { { echo "$as_me:4650: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
@@ -4616,7 +4666,7 @@ Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:4619: error: unrecognized option: $1
+ -*) { { echo "$as_me:4669: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
@@ -4651,23 +4701,10 @@ for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
# Handling of arguments.
- "Make.config" ) CONFIG_FILES="$CONFIG_FILES Make.config" ;;
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
- "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
- "radio/Makefile" ) CONFIG_FILES="$CONFIG_FILES radio/Makefile" ;;
- "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
- "i2c/Makefile" ) CONFIG_FILES="$CONFIG_FILES i2c/Makefile" ;;
- "font/Makefile" ) CONFIG_FILES="$CONFIG_FILES font/Makefile" ;;
- "webcam/Makefile" ) CONFIG_FILES="$CONFIG_FILES webcam/Makefile" ;;
- "http/Makefile" ) CONFIG_FILES="$CONFIG_FILES http/Makefile" ;;
- "libvbi/Makefile" ) CONFIG_FILES="$CONFIG_FILES libvbi/Makefile" ;;
- "libng/Makefile" ) CONFIG_FILES="$CONFIG_FILES libng/Makefile" ;;
- "libng/plugins/Makefile" ) CONFIG_FILES="$CONFIG_FILES libng/plugins/Makefile" ;;
- "cc/Makefile" ) CONFIG_FILES="$CONFIG_FILES cc/Makefile" ;;
"xawtv.spec" ) CONFIG_FILES="$CONFIG_FILES xawtv.spec" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
- *) { { echo "$as_me:4670: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:4707: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@@ -4760,11 +4797,13 @@ s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@DEPEND@,$DEPEND,;t t
-s,@VBIFLAGS@,$VBIFLAGS,;t t
-s,@PROGS@,$PROGS,;t t
-s,@INST@,$INST,;t t
-s,@RADIO@,$RADIO,;t t
-s,@PLUGINS@,$PLUGINS,;t t
+s,@FOUND_AALIB@,$FOUND_AALIB,;t t
+s,@FOUND_ALSA@,$FOUND_ALSA,;t t
+s,@FOUND_LQT@,$FOUND_LQT,;t t
+s,@FOUND_MOTIF@,$FOUND_MOTIF,;t t
+s,@FOUND_OS@,$FOUND_OS,;t t
+s,@FOUND_X11@,$FOUND_X11,;t t
+s,@FOUND_GL@,$FOUND_GL,;t t
s,@DLFLAGS@,$DLFLAGS,;t t
s,@LIBPTHREAD@,$LIBPTHREAD,;t t
s,@LIBOSS@,$LIBOSS,;t t
@@ -4900,7 +4939,7 @@ done; }
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:4903: creating $ac_file" >&5
+ { echo "$as_me:4942: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@@ -4918,7 +4957,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:4921: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:4960: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -4931,7 +4970,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:4934: error: cannot find input file: $f" >&5
+ { { echo "$as_me:4973: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -4992,7 +5031,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:4995: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:5034: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@@ -5003,7 +5042,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:5006: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:5045: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -5016,7 +5055,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:5019: error: cannot find input file: $f" >&5
+ { { echo "$as_me:5058: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -5133,7 +5172,7 @@ cat >>$CONFIG_STATUS <<\EOF
rm -f $tmp/in
if test x"$ac_file" != x-; then
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
- { echo "$as_me:5136: $ac_file is unchanged" >&5
+ { echo "$as_me:5175: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
@@ -5200,3 +5239,10 @@ if test "$no_create" != yes; then
$ac_cs_success || { (exit 1); exit 1; }
fi
+for dir in \
+ common console debug fonts jwz \
+ libng/plugins libvbi vbistuff x11
+do
+ test -d $dir && continue
+ mkdir -p $dir
+done
diff --git a/configure.ac b/configure.ac
index e570787..1b71f4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,42 +36,43 @@ AC_CHECK_PROGS(DEPEND,gccmakedep makedepend,true)
dnl ---------------------------------------------------------------------
dnl do some OS specific stuff here
-VBIFLAGS=""
-PROGS=""
-INST=""
-RADIO=""
-PLUGINS=""
+AC_SUBST(FOUND_AALIB)
+AC_SUBST(FOUND_ALSA)
+AC_SUBST(FOUND_LQT)
+AC_SUBST(FOUND_MOTIF)
+AC_SUBST(FOUND_OS)
+AC_SUBST(FOUND_X11)
+AC_SUBST(FOUND_GL)
+FOUND_AALIB="no"
+FOUND_ALSA="no"
+FOUND_LQT="no"
+FOUND_MOTIF="no"
+FOUND_OS="unknown"
+FOUND_X11="no"
+FOUND_GL="no"
+
case "`uname -s`" in
Linux)
- PLUGINS="drv0-v4l2.so drv1-v4l.so snd-oss.so"
- PROGS="v4l-conf fbtv"
- INST="install-v4l-conf install-fbtv"
- RADIO="radio"
+ FOUND_OS="linux"
;;
OpenBSD | FreeBSD | NetBSD)
- # *BSD has important stuff (from ports) in
- # /usr/local ...
+ # *BSD has important stuff (from ports)
+ # in /usr/local ...
CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib"
- PLUGINS="drv0-bsd.so snd-oss.so"
- VBIFLAGS="-DBSD"
+ FOUND_OS="bsd"
;;
*)
AC_MSG_CHECKING(if xawtv will build on `uname -s`)
AC_MSG_RESULT(maybe)
;;
esac
-AC_SUBST(VBIFLAGS)
-AC_SUBST(PROGS)
-AC_SUBST(INST)
-AC_SUBST(RADIO)
-AC_SUBST(PLUGINS)
dnl ---------------------------------------------------------------------
dnl Checks for functions
AC_EGREP_HEADER(sockaddr_storage,sys/socket.h,AC_DEFINE(HAVE_SOCKADDR_STORAGE))
-AC_CHECK_HEADERS(endian.h getopt.h soundcard.h sys/soundcard.h alsa/asoundlib.h linux/joystick.h dev/ic/bt8xx.h machine/ioctl_bt848.h)
+AC_CHECK_HEADERS(getopt.h soundcard.h unistd.h sys/select.h sys/soundcard.h alsa/asoundlib.h linux/joystick.h dev/ic/bt8xx.h machine/ioctl_bt848.h)
AC_CHECK_FUNCS(ftello fseeko getpt getnameinfo getopt_long strcasestr dlopen)
AC_SUBST(DLFLAGS)
@@ -112,16 +113,12 @@ dnl X11 checks
AC_PATH_XTRA
if test "$no_x" != "yes"; then
- PROGS="$PROGS xawtv xawtv-remote xvideo rootv"
+ FOUND_X11="yes"
ATHENA="-lXaw -lXmu -lXt $X_PRE_LIBS -lXpm -lXext -lX11 $X_EXTRA_LIBS"
FSLIB="-lFS"
- SUBS="font"
- TOOLS="propwatch"
else
ATHENA=""
FSLIB=""
- SUBS=""
- TOOLS=""
fi
AC_SUBST(X_CFLAGS)
AC_SUBST(X_PRE_LIBS)
@@ -146,7 +143,7 @@ AC_SUBST(LIBALSA)
LIBALSA=""
if test "$enable_alsa" != "no"; then
AC_CHECK_LIB(asound, snd_seq_open,
- AC_DEFINE(HAVE_ALSA) PROGS="$PROGS mididump"; LIBALSA="-lasound",,)
+ AC_DEFINE(HAVE_ALSA) FOUND_ALSA="yes"; LIBALSA="-lasound",,)
else
echo "*** alsa disabled"
fi
@@ -163,9 +160,8 @@ fi
AC_SUBST(AALIBS)
AALIBS=""
if test "$enable_aa" != "no"; then
- AC_CHECK_LIB(aa,aa_autoinit,
- [ PROGS="$PROGS ttv"; INST="$INST install-ttv"; AA="found" ],,)
- if test "$AA" = "found"; then
+ AC_CHECK_LIB(aa,aa_autoinit, [ FOUND_AALIB="yes" ],,)
+ if test "$FOUND_AALIB" = "yes"; then
AALIBS=-laa
if test -x "`which aalib-config 2>/dev/null`"; then
AALIBS=`aalib-config --libs`
@@ -177,16 +173,14 @@ fi
if test "$enable_quicktime" != "no"; then
AC_CHECK_LIB(quicktime, lqt_query_registry,
- QUICKTIME="found";AC_DEFINE(HAVE_LIBQUICKTIME),,
+ FOUND_LQT="yes"; AC_DEFINE(HAVE_LIBQUICKTIME),,
-ldl -lglib $LIBPTHREAD)
else
echo "*** quicktime disabled"
fi
-if test "$QUICKTIME" = "found"; then
+QTLIBS=""
+if test "$FOUND_LQT" = "yes"; then
QTLIBS="-lquicktime -ldl -lglib -lm"
- PLUGINS="$PLUGINS write-qt.so"
-else
- QTLIBS=""
fi
AC_SUBST(QTLIBS)
@@ -215,13 +209,15 @@ else
fi
if test "$enable_motif" != "no"; then
- AC_CHECK_LIB(Xm,XmStringGenerate,
- [ PROGS="$PROGS motv"; INST="$INST install-motv" ],,
+ AC_CHECK_LIB(Xm,XmStringGenerate, [ FOUND_MOTIF="yes" ],,
$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
else
echo "*** motif support disabled"
fi
+AC_CHECK_LIB(GL, glXChooseVisual, [ FOUND_GL="yes" ],,
+ $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
+
VERSION="`(cd $srcdir; pwd) | sed -e 's/.*-//'`"
AC_SUBST(VERSION)
@@ -242,10 +238,16 @@ fi
AC_MSG_RESULT($resdir/app-defaults)
AC_SUBST(resdir)
-
dnl ---------------------------------------------------------------------
-AC_OUTPUT(Make.config Makefile src/Makefile tools/Makefile radio/Makefile
- man/Makefile i2c/Makefile font/Makefile webcam/Makefile
- http/Makefile libvbi/Makefile libng/Makefile libng/plugins/Makefile
- cc/Makefile xawtv.spec)
+dnl for screenlock
+AC_DEFINE(HAVE_XMU)
+dnl ---------------------------------------------------------------------
+AC_OUTPUT(Makefile xawtv.spec)
+for dir in \
+ common console debug fonts jwz \
+ libng/plugins libvbi vbistuff x11
+do
+ test -d $dir && continue
+ mkdir -p $dir
+done
diff --git a/console/Makefile b/console/Makefile
new file mode 100644
index 0000000..4e33e30
--- /dev/null
+++ b/console/Makefile
@@ -0,0 +1,2 @@
+default:
+ cd ..; $(MAKE)
diff --git a/console/Subdir.mk b/console/Subdir.mk
new file mode 100644
index 0000000..016ef0f
--- /dev/null
+++ b/console/Subdir.mk
@@ -0,0 +1,103 @@
+
+# variables
+TARGETS-console := \
+ console/dump-mixers \
+ console/record \
+ console/scantv \
+ console/showriff \
+ console/streamer \
+ console/webcam
+TARGETS-v4l-conf :=
+
+ifeq ($(FOUND_AALIB),yes)
+TARGETS-console += \
+ console/ttv
+endif
+ifeq ($(FOUND_OS),linux)
+TARGETS-console += \
+ console/radio \
+ console/fbtv
+TARGETS-v4l-conf += \
+ console/v4l-conf
+endif
+
+OBJS-fbtv := \
+ console/fbtv.o \
+ console/fbtools.o \
+ console/fs.o \
+ console/matrox.o \
+ common/channel-no-x11.o \
+ $(OBJS-common-input) \
+ $(OBJS-common-capture)
+LIBS-fbtv := \
+ $(THREAD_LIBS) $(CURSES_LIBS) $(LIRC_LIBS) $(ALSA_LIBS) \
+ $(FS_LIBS) -ljpeg -lm
+
+OBJS-ttv := \
+ console/aa.o \
+ common/channel-no-x11.o \
+ $(OBJS-common-capture)
+LIBS-ttv := \
+ $(THREAD_LIBS) $(AA_LIBS) -ljpeg -lm
+
+OBJS-scantv := \
+ console/scantv.o \
+ common/channel-no-x11.o \
+ $(OBJS-common-capture) \
+ libvbi/libvbi.a
+OBJS-streamer := \
+ console/streamer.o \
+ common/channel-no-x11.o \
+ $(OBJS-common-capture)
+LIBS-capture := \
+ $(THREAD_LIBS) -ljpeg -lm
+
+OBJS-webcam := \
+ console/webcam.o \
+ console/ftp.o \
+ common/parseconfig.o \
+ libng/libng.a
+LIBS-webcam := \
+ $(THREAD_LIBS) -ljpeg
+
+# local targets
+console/dump-mixers: console/dump-mixers.o
+console/showriff: console/showriff.o
+
+console/radio: console/radio.o
+ $(CC) $(CFLAGS) -o $@ $< $(CURSES_LIBS)
+
+console/record: console/record.o
+ $(CC) $(CFLAGS) -o $@ $< $(CURSES_LIBS)
+
+console/v4l-conf: console/v4l-conf.o
+ $(CC) $(CFLAGS) -o $@ $< $(ATHENA_LIBS)
+
+console/fbtv: $(OBJS-fbtv)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-fbtv) $(LIBS-fbtv) $(DLFLAGS)
+
+console/scantv: $(OBJS-scantv)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-scantv) $(LIBS-capture) $(DLFLAGS)
+
+console/streamer: $(OBJS-streamer)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-streamer) $(LIBS-capture) $(DLFLAGS)
+
+console/webcam: $(OBJS-webcam)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-webcam) $(LIBS-webcam) $(DLFLAGS)
+
+console/ttv: $(OBJS-ttv)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-ttv) $(LIBS-ttv) $(DLFLAGS)
+
+
+# global targets
+all:: $(TARGETS-console) $(TARGETS-v4l-conf)
+
+install::
+ $(INSTALL_PROGRAM) $(TARGETS-console) $(bindir)
+ifeq ($(FOUND_OS),linux)
+ $(INSTALL_PROGRAM) $(SUID_ROOT) $(TARGETS-v4l-conf) $(bindir)
+endif
+
+distclean::
+ rm -f $(TARGETS-console) $(TARGETS-v4l-conf)
+
diff --git a/src/aa.c b/console/aa.c
index 4c1e86f..4c1e86f 100644
--- a/src/aa.c
+++ b/console/aa.c
diff --git a/tools/dump-mixers.c b/console/dump-mixers.c
index b28dc38..b28dc38 100644
--- a/tools/dump-mixers.c
+++ b/console/dump-mixers.c
diff --git a/src/fbtools.c b/console/fbtools.c
index b6a53a8..b6a53a8 100644
--- a/src/fbtools.c
+++ b/console/fbtools.c
diff --git a/src/fbtools.h b/console/fbtools.h
index 090fa01..090fa01 100644
--- a/src/fbtools.h
+++ b/console/fbtools.h
diff --git a/src/fbtv.c b/console/fbtv.c
index b56b230..95e8b6f 100644
--- a/src/fbtv.c
+++ b/console/fbtv.c
@@ -23,7 +23,6 @@
#include <sys/mman.h>
#include <curses.h>
#include <math.h>
-#include <endian.h>
#include <pthread.h>
#include <linux/kd.h>
diff --git a/webcam/font_6x11.h b/console/font-6x11.h
index 844ff4f..844ff4f 100644
--- a/webcam/font_6x11.h
+++ b/console/font-6x11.h
diff --git a/src/fs.c b/console/fs.c
index c5008a2..c5008a2 100644
--- a/src/fs.c
+++ b/console/fs.c
diff --git a/src/fs.h b/console/fs.h
index 2ac7228..2ac7228 100644
--- a/src/fs.h
+++ b/console/fs.h
diff --git a/webcam/ftp.c b/console/ftp.c
index 29c8f59..29c8f59 100644
--- a/webcam/ftp.c
+++ b/console/ftp.c
diff --git a/webcam/ftp.h b/console/ftp.h
index f11bfdb..f11bfdb 100644
--- a/webcam/ftp.h
+++ b/console/ftp.h
diff --git a/src/matrox.c b/console/matrox.c
index 7f6dff9..4e17f1a 100644
--- a/src/matrox.c
+++ b/console/matrox.c
@@ -7,15 +7,12 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
-#include "byteswap.h"
#include <asm/page.h> /* PAGE_SIZE */
-
#include <linux/fb.h>
+#include "byteswap.h"
+
#include "fbtools.h"
#include "matrox.h"
diff --git a/src/matrox.h b/console/matrox.h
index 5323316..5323316 100644
--- a/src/matrox.h
+++ b/console/matrox.h
diff --git a/radio/radio.c b/console/radio.c
index 1a66605..1a66605 100644
--- a/radio/radio.c
+++ b/console/radio.c
diff --git a/tools/record.c b/console/record.c
index c5a686b..c5a686b 100644
--- a/tools/record.c
+++ b/console/record.c
diff --git a/src/scantv.c b/console/scantv.c
index 8cfd327..118704a 100644
--- a/src/scantv.c
+++ b/console/scantv.c
@@ -393,9 +393,3 @@ main(int argc, char **argv)
exit(0);
}
-
-/*
- * Local variables:
- * compile-command: "(cd ..; make)"
- * End:
- */
diff --git a/tools/showriff.c b/console/showriff.c
index 83a072f..e069fd8 100644
--- a/tools/showriff.c
+++ b/console/showriff.c
@@ -22,9 +22,6 @@
#include <errno.h>
#include <sys/types.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
#if BYTE_ORDER == BIG_ENDIAN
# define SWAP2(x) (((x>>8) & 0x00ff) |\
((x<<8) & 0xff00))
diff --git a/src/streamer.c b/console/streamer.c
index 601833f..601833f 100644
--- a/src/streamer.c
+++ b/console/streamer.c
diff --git a/src/v4l-conf.c b/console/v4l-conf.c
index 170fd0d..1012d29 100644
--- a/src/v4l-conf.c
+++ b/console/v4l-conf.c
@@ -16,6 +16,7 @@
#include <string.h>
#include <errno.h>
#include <fcntl.h>
+#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <linux/vt.h>
@@ -24,9 +25,6 @@
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#endif
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
#ifndef X_DISPLAY_MISSING
# include <X11/Xlib.h>
@@ -601,10 +599,3 @@ main(int argc, char *argv[])
close(fd);
return 0;
}
-
-/* ---------------------------------------------------------------- */
-/*
- * Local variables:
- * compile-command: "(cd ..; make)"
- * End:
- */
diff --git a/webcam/webcam.c b/console/webcam.c
index 51da219..9a2d600 100644
--- a/webcam/webcam.c
+++ b/console/webcam.c
@@ -2,7 +2,7 @@
* (c) 1998-2002 Gerd Knorr
*
* capture a image, compress as jpeg and upload to the webserver
- * using the ftp utility
+ * using the ftp utility or ssh
*
*/
@@ -40,9 +40,10 @@ char *ftp_dir = "public_html/images";
char *ftp_file = "webcam.jpeg";
char *ftp_tmp = "uploading.jpeg";
char *ssh_cmd;
-int ftp_passive = 1;
-int ftp_auto = 0;
+int ftp_passive = 1;
+int ftp_auto = 0;
enum mode ftp_mode = FTP;
+int daemonize = 0;
char *grab_text = "webcam %Y-%m-%d %H:%M:%S"; /* strftime */
char *grab_infofile = NULL;
@@ -200,7 +201,7 @@ grab_one(int *width, int *height)
#define CHAR_HEIGHT 11
#define CHAR_WIDTH 6
#define CHAR_START 4
-#include "font_6x11.h"
+#include "font-6x11.h"
static char*
get_message(void)
@@ -477,15 +478,15 @@ main(int argc, char *argv[])
ftp_connect(ftp_host,ftp_user,ftp_pass,ftp_dir);
break;
case SSH:
- ssh_cmd = malloc(strlen(ftp_user)+strlen(ftp_host)+
- strlen(ftp_tmp)*2+strlen(ftp_dir)+strlen(ftp_file)+32);
+ ssh_cmd = malloc(strlen(ftp_user)+strlen(ftp_host)+strlen(ftp_tmp)*2+
+ strlen(ftp_dir)+strlen(ftp_file)+32);
sprintf(ssh_cmd, "ssh %s@%s \"cat >%s && mv %s %s/%s\"",
ftp_user,ftp_host,ftp_tmp,ftp_tmp,ftp_dir,ftp_file);
break;
}
/* print config */
- fprintf(stderr,"video4linux webcam v1.3 - (c) 1998-2001 Gerd Knorr\n");
+ fprintf(stderr,"video4linux webcam v1.4 - (c) 1998-2002 Gerd Knorr\n");
fprintf(stderr,"grabber config:\n size %dx%d [%s]\n",
fmt.width,fmt.height,ng_vfmt_to_desc[gfmt.fmtid]);
fprintf(stderr," input %s, norm %s, jpeg quality %d\n",
@@ -507,6 +508,20 @@ main(int argc, char *argv[])
break;
}
+ /* run as daemon - detach from terminal */
+ if (!ftp_debug && daemonize) {
+ switch (fork()) {
+ case -1:
+ perror("fork");
+ exit(1);
+ case 0:
+ close(0); close(1); close(2); setsid();
+ break;
+ default:
+ exit(0);
+ }
+ }
+
/* main loop */
for (;;) {
/* grab a new one */
diff --git a/contrib/dot.lircrc b/contrib/dot.lircrc
deleted file mode 100644
index cb779c8..0000000
--- a/contrib/dot.lircrc
+++ /dev/null
@@ -1,92 +0,0 @@
-begin
- prog = xawtv
- button = CH+
- config = setstation next
-end
-begin
- prog = xawtv
- button = CH-
- config = setstation prev
-end
-begin
- prog = xawtv
- button = VOL+
- config = volume inc
-end
-begin
- prog = xawtv
- button = VOL-
- config = volume dec
-end
-begin
- prog = xawtv
- button = MUTE
- config = volume mute
-end
-begin
- prog = xawtv
- button = FULL_SCREEN
- config = fullscreen toggle
-end
-begin
- prog = xawtv
- button = SOURCE
- config = setinput next
-end
-begin
- prog = xawtv
- button = RESERVED
- config = quit
-end
-
-
-begin
- prog = xawtv
- button = 1
- config = keypad 1
-end
-begin
- prog = xawtv
- button = 2
- config = keypad 2
-end
-begin
- prog = xawtv
- button = 3
- config = keypad 3
-end
-begin
- prog = xawtv
- button = 4
- config = keypad 4
-end
-begin
- prog = xawtv
- button = 5
- config = keypad 5
-end
-begin
- prog = xawtv
- button = 6
- config = keypad 6
-end
-begin
- prog = xawtv
- button = 7
- config = keypad 7
-end
-begin
- prog = xawtv
- button = 8
- config = keypad 8
-end
-begin
- prog = xawtv
- button = 9
- config = keypad 9
-end
-begin
- prog = xawtv
- button = 0
- config = keypad 0
-end
diff --git a/debian/changelog b/debian/changelog
index 0a8a5c7..cbf0f37 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xawtv (3.73) unstable; urgency=low
+xawtv (3.74) unstable; urgency=low
* new release (closes: #135393).
diff --git a/debian/fbtv.files b/debian/fbtv.files
index eb6259f..ed04878 100644
--- a/debian/fbtv.files
+++ b/debian/fbtv.files
@@ -1,2 +1,3 @@
usr/bin/fbtv
usr/share/man/man1/fbtv.1
+usr/share/man/*/man1/fbtv.1
diff --git a/debian/rules b/debian/rules
index 741b86e..bb658ea 100644
--- a/debian/rules
+++ b/debian/rules
@@ -11,7 +11,6 @@ build:
--disable-motif \
--prefix=/usr \
--mandir=/usr/share/man
- make depend
$(MAKE) $@
clean::
@@ -32,10 +31,8 @@ binary-indep: install
# nop
binary-arch: install
- dh_installdocs README* Changes UPDATE_TO_v3.0 \
- Programming-FAQ contrib/dot.lircrc contrib/frequencies*
- dh_installdocs -p xawtv-tools tools/README
- dh_installdocs -p webcam webcam/webcam.cgi
+ dh_installdocs README* Changes contrib/frequencies*
+ dh_installdocs -p webcam scripts/webcam.cgi
# dh_installexamples
dh_installmenu
# dh_installemacsen
diff --git a/debian/scantv.files b/debian/scantv.files
index b3981cc..779a631 100644
--- a/debian/scantv.files
+++ b/debian/scantv.files
@@ -1,2 +1,3 @@
/usr/bin/scantv
/usr/share/man/man1/scantv.1
+/usr/share/man/*/man1/scantv.1
diff --git a/debian/xawtv.files b/debian/xawtv.files
index 9e81bce..50d32d8 100644
--- a/debian/xawtv.files
+++ b/debian/xawtv.files
@@ -6,10 +6,12 @@
/usr/bin/subtitles
/usr/share/man/man1/v4lctl.1
/usr/share/man/man1/xawtv.1
+/usr/share/man/*/man1/xawtv.1
/usr/share/man/man1/rootv.1
/usr/share/man/man1/xawtv-remote.1
/usr/share/man/man1/ntsc-cc.1
/usr/share/man/man1/subtitles.1
/usr/share/man/man5/xawtvrc.5
+/usr/share/man/*/man5/xawtvrc.5
/usr/X11R6/lib/X11/fonts/misc/*
/etc/X11/app-defaults/Xawtv
diff --git a/debug/Makefile b/debug/Makefile
new file mode 100644
index 0000000..4e33e30
--- /dev/null
+++ b/debug/Makefile
@@ -0,0 +1,2 @@
+default:
+ cd ..; $(MAKE)
diff --git a/debug/Subdir.mk b/debug/Subdir.mk
new file mode 100644
index 0000000..d9f6d16
--- /dev/null
+++ b/debug/Subdir.mk
@@ -0,0 +1,48 @@
+
+# variables
+TARGETS-debug := \
+ debug/xvideo \
+ debug/vbi-debug
+ifeq ($(FOUND_ALSA),yes)
+TARGETS-debug += \
+ debug/hwscan
+endif
+ifeq ($(FOUND_MOTIF)$(FOUND_GL),yesyes)
+TARGETS-debug += \
+ debug/gl
+endif
+
+OBJS-vbi-debug := \
+ debug/vbi-debug.o \
+ libvbi/libvbi.a
+LIBS-vbi-debug :=
+
+OBJS-gl := \
+ debug/gl.o \
+ common/RegEdit.o \
+ libng/libng.a
+LIBS-gl := $(THREADLIB) $(MOTIF_LIBS) -lGLU -lGL -ljpeg -lm
+
+OBJS-hwscan := \
+ debug/hwscan.o \
+ libng/libng.a
+LIBS-hwscan := $(ALSA_LIBS) -ljpeg
+
+# local targets
+debug/xvideo: debug/xvideo.o
+ $(CC) $(CFLAGS) -o $@ $< $(ATHENA_LIBS)
+
+debug/hwscan: $(OBJS-hwscan)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-hwscan) $(LIBS-hwscan) $(DLFLAGS)
+
+debug/vbi-debug: $(OBJS-vbi-debug)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-vbi-debug) $(LIBS-vbi-debug) $(DLFLAGS)
+
+debug/gl: $(OBJS-gl)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-gl) $(LIBS-gl) $(DLFLAGS)
+
+# global targets
+all:: $(TARGETS-debug)
+
+distclean::
+ rm -f $(TARGETS-debug)
diff --git a/src/gl.ad b/debug/gl.ad
index 738641e..738641e 100644
--- a/src/gl.ad
+++ b/debug/gl.ad
diff --git a/src/gl.c b/debug/gl.c
index c62f6d9..e86375e 100644
--- a/src/gl.c
+++ b/debug/gl.c
@@ -11,6 +11,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include <pthread.h>
#include <sys/time.h>
#include <X11/Xlib.h>
@@ -569,10 +570,3 @@ main(int argc, char *argv[])
XtAppMainLoop(app_context);
return 0;
}
-
-/* --------------------------------------------------------------------- */
-/*
- * Local variables:
- * compile-command: "make gl"
- * End:
- */
diff --git a/src/gl.h b/debug/gl.h
index fb5ba97..fb5ba97 100644
--- a/src/gl.h
+++ b/debug/gl.h
diff --git a/src/hwscan.c b/debug/hwscan.c
index 7c90c36..bc2e2a8 100644
--- a/src/hwscan.c
+++ b/debug/hwscan.c
@@ -8,9 +8,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
#include <alsa/asoundlib.h>
+#include "grab-ng.h"
+
#define ALSAERR(func,args...) \
if ((err = func(## args)) < 0) { \
fprintf(stderr,"fixme: %s\n",snd_strerror(err)); \
@@ -109,13 +110,29 @@ static int scan_alsa(void)
int main(int argc, char *argv[])
{
+ struct ng_devinfo *info,*i2;
+ int i,j,k;
+
+ ng_init();
+ for (i = 0; ng_mix_drivers && ng_mix_drivers[i]; i++) {
+ info = ng_mix_drivers[i]->probe();
+ if (NULL == info)
+ continue;
+ fprintf(stderr,"%s mixers\n",ng_mix_drivers[i]->name);
+ for (j = 0; strlen(info[j].device) > 0; j++) {
+ fprintf(stderr," %s: %s\n",info[j].device,info[j].name);
+ i2 = ng_mix_drivers[i]->channels(info[j].device);
+ if (NULL == i2)
+ continue;
+ fprintf(stderr," ");
+ for (k = 0; strlen(i2[k].device) > 0; k++) {
+ fprintf(stderr," %s",i2[k].device);
+ }
+ fprintf(stderr,"\n");
+ }
+ free(info);
+ }
+
scan_alsa();
return 0;
}
-
-/* --------------------------------------------------------------------- */
-/*
- * Local variables:
- * compile-command: "make hwscan"
- * End:
- */
diff --git a/src/vbi-debug.c b/debug/vbi-debug.c
index d016002..6b67264 100644
--- a/src/vbi-debug.c
+++ b/debug/vbi-debug.c
@@ -105,9 +105,3 @@ main(int argc, char **argv)
exit(0);
}
-
-/*
- * Local variables:
- * compile-command: "(cd ..; make)"
- * End:
- */
diff --git a/src/xvideo.c b/debug/xvideo.c
index 00ea087..00ea087 100644
--- a/src/xvideo.c
+++ b/debug/xvideo.c
diff --git a/fb/config.log b/fb/config.log
new file mode 100644
index 0000000..1d626d9
--- /dev/null
+++ b/fb/config.log
@@ -0,0 +1,481 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by configure, which was
+generated by GNU Autoconf 2.52. Invocation command line was
+
+ $ ../configure
+
+## ---------- ##
+## Platform. ##
+## ---------- ##
+
+hostname = vmware.masq.in-berlin.de
+uname -m = i386
+uname -r = 4.2-RELEASE
+uname -s = FreeBSD
+uname -v = FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000 jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC
+
+/usr/bin/uname -p = i386
+/bin/uname -X = unknown
+
+/bin/arch = unknown
+/usr/bin/arch -k = unknown
+/usr/convex/getsysinfo = unknown
+hostinfo = unknown
+/bin/machine = unknown
+/usr/bin/oslevel = unknown
+/bin/universe = unknown
+
+PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/kraxel/bin
+
+## ------------ ##
+## Core tests. ##
+## ------------ ##
+
+configure:929: PATH=".;."; conftest.sh
+conftest.sh: not found
+configure:932: $? = 127
+configure:1022: checking for gcc
+configure:1037: found /usr/bin/gcc
+configure:1045: result: gcc
+configure:1273: checking for C compiler version
+configure:1276: gcc --version </dev/null >&5
+2.95.3
+configure:1279: $? = 0
+configure:1281: gcc -v </dev/null >&5
+Using builtin specs.
+gcc version 2.95.3 20010315 (release) [FreeBSD]
+configure:1284: $? = 0
+configure:1286: gcc -V </dev/null >&5
+gcc: argument to `-V' is missing
+configure:1289: $? = 1
+configure:1309: checking for C compiler default output
+configure:1312: gcc conftest.c >&5
+configure:1315: $? = 0
+configure:1344: result: a.out
+configure:1349: checking whether the C compiler works
+configure:1355: ./a.out
+configure:1358: $? = 0
+configure:1373: result: yes
+configure:1380: checking whether we are cross compiling
+configure:1382: result: no
+configure:1385: checking for executable suffix
+configure:1387: gcc -o conftest conftest.c >&5
+configure:1390: $? = 0
+configure:1412: result:
+configure:1418: checking for object suffix
+configure:1436: gcc -c conftest.c >&5
+configure:1439: $? = 0
+configure:1458: result: o
+configure:1462: checking whether we are using the GNU C compiler
+configure:1483: gcc -c conftest.c >&5
+configure:1486: $? = 0
+configure:1489: test -s conftest.o
+configure:1492: $? = 0
+configure:1504: result: yes
+configure:1510: checking whether gcc accepts -g
+configure:1528: gcc -c -g conftest.c >&5
+configure:1531: $? = 0
+configure:1534: test -s conftest.o
+configure:1537: $? = 0
+configure:1547: result: yes
+configure:1574: gcc -c -g -O2 conftest.c >&5
+conftest.c:2: syntax error before `me'
+configure:1577: $? = 1
+configure: failed program was:
+#ifndef __cplusplus
+ choke me
+#endif
+configure:1680: checking how to run the C preprocessor
+configure:1706: gcc -E conftest.c
+configure:1712: $? = 0
+configure:1739: gcc -E conftest.c
+configure:1736: ac_nonexistent.h: No such file or directory
+configure:1745: $? = 1
+configure: failed program was:
+#line 1735 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+configure:1782: result: gcc -E
+configure:1797: gcc -E conftest.c
+configure:1803: $? = 0
+configure:1830: gcc -E conftest.c
+configure:1827: ac_nonexistent.h: No such file or directory
+configure:1836: $? = 1
+configure: failed program was:
+#line 1826 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+configure:1912: checking for a BSD compatible install
+configure:1961: result: /usr/bin/install -c
+configure:1976: checking for gccmakedep
+configure:2002: result: no
+configure:1976: checking for makedepend
+configure:2002: result: no
+configure:2053: checking for endian.h
+configure:2063: gcc -E conftest.c
+configure:2060: endian.h: No such file or directory
+configure:2069: $? = 1
+configure: failed program was:
+#line 2059 "configure"
+#include "confdefs.h"
+#include <endian.h>
+configure:2088: result: no
+configure:2053: checking for getopt.h
+configure:2063: gcc -E conftest.c
+configure:2060: getopt.h: No such file or directory
+configure:2069: $? = 1
+configure: failed program was:
+#line 2059 "configure"
+#include "confdefs.h"
+#include <getopt.h>
+configure:2088: result: no
+configure:2053: checking for soundcard.h
+configure:2063: gcc -E conftest.c
+configure:2060: soundcard.h: No such file or directory
+configure:2069: $? = 1
+configure: failed program was:
+#line 2059 "configure"
+#include "confdefs.h"
+#include <soundcard.h>
+configure:2088: result: no
+configure:2053: checking for sys/soundcard.h
+configure:2063: gcc -E conftest.c
+configure:2069: $? = 0
+configure:2088: result: yes
+configure:2053: checking for alsa/asoundlib.h
+configure:2063: gcc -E conftest.c
+configure:2060: alsa/asoundlib.h: No such file or directory
+configure:2069: $? = 1
+configure: failed program was:
+#line 2059 "configure"
+#include "confdefs.h"
+#include <alsa/asoundlib.h>
+configure:2088: result: no
+configure:2053: checking for linux/joystick.h
+configure:2063: gcc -E conftest.c
+configure:2060: linux/joystick.h: No such file or directory
+configure:2069: $? = 1
+configure: failed program was:
+#line 2059 "configure"
+#include "confdefs.h"
+#include <linux/joystick.h>
+configure:2088: result: no
+configure:2053: checking for dev/ic/bt8xx.h
+configure:2063: gcc -E conftest.c
+configure:2060: dev/ic/bt8xx.h: No such file or directory
+configure:2069: $? = 1
+configure: failed program was:
+#line 2059 "configure"
+#include "confdefs.h"
+#include <dev/ic/bt8xx.h>
+configure:2088: result: no
+configure:2053: checking for machine/ioctl_bt848.h
+configure:2063: gcc -E conftest.c
+configure:2069: $? = 0
+configure:2088: result: yes
+configure:2101: checking for ftello
+configure:2138: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c >&5
+configure:2141: $? = 0
+configure:2144: test -s conftest
+configure:2147: $? = 0
+configure:2157: result: yes
+configure:2101: checking for fseeko
+configure:2138: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c >&5
+configure:2141: $? = 0
+configure:2144: test -s conftest
+configure:2147: $? = 0
+configure:2157: result: yes
+configure:2101: checking for getpt
+configure:2138: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c >&5
+/tmp/ccrOzzhZ.o: In function `main':
+/home/kraxel/debian/xawtv-3.74/fb/configure(.text+0x9): undefined reference to `getpt'
+configure:2141: $? = 1
+configure: failed program was:
+#line 2107 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getpt (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getpt ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getpt) || defined (__stub___getpt)
+choke me
+#else
+f = getpt;
+#endif
+
+ ;
+ return 0;
+}
+configure:2157: result: no
+configure:2101: checking for getnameinfo
+configure:2138: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c >&5
+configure:2141: $? = 0
+configure:2144: test -s conftest
+configure:2147: $? = 0
+configure:2157: result: yes
+configure:2101: checking for getopt_long
+configure:2138: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c >&5
+/tmp/ccM4iIme.o: In function `main':
+/home/kraxel/debian/xawtv-3.74/fb/configure(.text+0x9): undefined reference to `getopt_long'
+configure:2141: $? = 1
+configure: failed program was:
+#line 2107 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getopt_long (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getopt_long ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
+choke me
+#else
+f = getopt_long;
+#endif
+
+ ;
+ return 0;
+}
+configure:2157: result: no
+configure:2101: checking for strcasestr
+configure:2138: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c >&5
+/tmp/ccVGr2Sj.o: In function `main':
+/home/kraxel/debian/xawtv-3.74/fb/configure(.text+0x9): undefined reference to `strcasestr'
+configure:2141: $? = 1
+configure: failed program was:
+#line 2107 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char strcasestr (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strcasestr ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_strcasestr) || defined (__stub___strcasestr)
+choke me
+#else
+f = strcasestr;
+#endif
+
+ ;
+ return 0;
+}
+configure:2157: result: no
+configure:2101: checking for dlopen
+configure:2138: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c >&5
+configure:2141: $? = 0
+configure:2144: test -s conftest
+configure:2147: $? = 0
+configure:2157: result: yes
+configure:2223: checking for ELF
+configure:2226: result: yes
+configure:2234: checking for pthread_create in -lpthread
+configure:2261: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c -lpthread >&5
+/usr/libexec/elf/ld: cannot find -lpthread
+configure:2264: $? = 1
+configure: failed program was:
+#line 2242 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pthread_create ();
+int
+main ()
+{
+pthread_create ();
+ ;
+ return 0;
+}
+configure:2281: result: no
+configure:2288: checking for pthread_create in -lc_r
+configure:2315: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c -lc_r >&5
+/usr/lib/libc.so: WARNING! setkey(3) not present in the system!
+/usr/lib/libc.so: warning: this program uses gets(), which is unsafe.
+/usr/lib/libc.so: warning: mktemp() possibly used unsafely; consider using mkstemp()
+/usr/lib/libc.so: WARNING! des_setkey(3) not present in the system!
+/usr/lib/libc.so: WARNING! encrypt(3) not present in the system!
+/usr/lib/libc.so: warning: tmpnam() possibly used unsafely; consider using mkstemp()
+/usr/lib/libc.so: warning: this program uses f_prealloc(), which is not recommended.
+/usr/lib/libc.so: WARNING! des_cipher(3) not present in the system!
+/usr/lib/libc.so: warning: tempnam() possibly used unsafely; consider using mkstemp()
+configure:2318: $? = 0
+configure:2321: test -s conftest
+configure:2324: $? = 0
+configure:2335: result: yes
+configure:2342: checking for main in -lossaudio
+configure:2362: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c -lossaudio >&5
+/usr/libexec/elf/ld: cannot find -lossaudio
+configure:2365: $? = 1
+configure: failed program was:
+#line 2350 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+configure:2382: result: no
+configure:2388: checking for initscr in -lncurses
+configure:2415: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c -lncurses >&5
+configure:2418: $? = 0
+configure:2421: test -s conftest
+configure:2424: $? = 0
+configure:2435: result: yes
+configure:2503: checking for X
+configure:2604: gcc -E conftest.c
+configure:2601: X11/Intrinsic.h: No such file or directory
+configure:2610: $? = 1
+configure: failed program was:
+#line 2600 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+configure:2655: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c -lXt >&5
+configure:2644: X11/Intrinsic.h: No such file or directory
+configure:2658: $? = 1
+configure: failed program was:
+#line 2643 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+int
+main ()
+{
+XtMalloc (0)
+ ;
+ return 0;
+}
+configure:2702: result: no
+configure:3586: checking for jpeg_start_compress in -ljpeg
+configure:3613: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c -ljpeg >&5
+/usr/libexec/elf/ld: cannot find -ljpeg
+configure:3616: $? = 1
+configure: failed program was:
+#line 3594 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char jpeg_start_compress ();
+int
+main ()
+{
+jpeg_start_compress ();
+ ;
+ return 0;
+}
+configure:3633: result: no
+
+## ----------------- ##
+## Cache variables. ##
+## ----------------- ##
+
+ac_cv_func_fseeko='yes'
+ac_cv_func_getopt_long='no'
+ac_cv_func_dlopen='yes'
+ac_cv_prog_cc_g='yes'
+ac_cv_env_LDFLAGS_set=''
+ac_cv_path_install='/usr/bin/install -c'
+ac_cv_c_compiler_gnu='yes'
+ac_cv_env_CFLAGS_set=''
+ac_cv_lib_ossaudio_main='no'
+ac_cv_func_ftello='yes'
+ac_cv_env_CPP_value=''
+ac_cv_env_CPPFLAGS_set=''
+ac_cv_header_soundcard_h='no'
+ac_cv_env_host_alias_set=''
+ac_cv_lib_jpeg_jpeg_start_compress='no'
+ac_cv_header_alsa_asoundlib_h='no'
+ac_cv_env_build_alias_set=''
+ac_cv_lib_ncurses_initscr='yes'
+ac_cv_env_LDFLAGS_value=''
+ac_cv_env_target_alias_set=''
+ac_cv_header_getopt_h='no'
+ac_cv_env_CFLAGS_value=''
+ac_cv_env_CC_set=''
+ac_cv_have_x='have_x=no'
+ac_cv_func_getnameinfo='yes'
+ac_cv_header_machine_ioctl_bt848_h='yes'
+ac_cv_header_endian_h='no'
+ac_cv_lib_c_r_pthread_create='yes'
+ac_cv_env_CPPFLAGS_value=''
+ac_cv_env_host_alias_value=''
+ac_cv_func_getpt='no'
+ac_cv_header_sys_soundcard_h='yes'
+ac_cv_lib_pthread_pthread_create='no'
+ac_cv_prog_CPP='gcc -E'
+ac_cv_env_build_alias_value=''
+ac_cv_prog_ac_ct_CC='gcc'
+ac_cv_env_target_alias_value=''
+ac_cv_env_CC_value=''
+ac_cv_env_CPP_set=''
+ac_cv_func_strcasestr='no'
+ac_cv_header_dev_ic_bt8xx_h='no'
+ac_cv_header_linux_joystick_h='no'
+ac_cv_objext='o'
+
+## ------------ ##
+## confdefs.h. ##
+## ------------ ##
+
+#define HAVE_SOCKADDR_STORAGE 1
+#define HAVE_SYS_SOUNDCARD_H 1
+#define HAVE_MACHINE_IOCTL_BT848_H 1
+#define HAVE_FTELLO 1
+#define HAVE_FSEEKO 1
+#define HAVE_GETNAMEINFO 1
+#define HAVE_DLOPEN 1
+#define X_DISPLAY_MISSING 1
+
+
+configure: exit 1
diff --git a/font/Makefile.in b/font/Makefile.in
deleted file mode 100644
index 0b59a35..0000000
--- a/font/Makefile.in
+++ /dev/null
@@ -1,49 +0,0 @@
-
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../Make.config
-
-FONTSERVER := unix/:7100
-FONTSPEC := -misc-fixed-medium-r-semicondensed-*-13-120-75-75-c-60
-
-PCF := led-iso8859-1.pcf led-iso8859-2.pcf led-iso8859-15.pcf \
- led-koi8-r.pcf
-BDF := $(PCF:pcf=bdf)
-
-all build: $(PCF)
- mkfontdir
-
-install: all
- mkdir -p $(fontdir)
- for file in $(PCF); do \
- install -m 644 $$file $(fontdir); \
- gzip $(fontdir)/$$file; \
- done
- if test "$(DESTDIR)" = ""; then \
- (cd $(fontdir); mkfontdir); \
- xset fp rehash || true; \
- fi
-
-
-.SUFFIXES: .bdf .pcf
-.bdf.pcf:
- bdftopcf -o $@ $<
-
-$(BDF):
- FONTSERVER=$(FONTSERVER); export FONTSERVER; \
- charset=`echo $@ | sed -e 's|led-||' -e 's|.bdf||'`; \
- perl ./bigfont.pl -fn "$(FONTSPEC)-$$charset" > $@
-
-
-dep depend:
-
-clean:
- rm -f *.pcf
-
-distclean: clean
- rm -f Makefile *~ *.bak fonts.dir
-
-realclean: distclean
- rm -f *.bdf
-
diff --git a/fonts/Subdir.mk b/fonts/Subdir.mk
new file mode 100644
index 0000000..02624ee
--- /dev/null
+++ b/fonts/Subdir.mk
@@ -0,0 +1,27 @@
+FONTSERVER := unix/:7100
+FONTSPEC := -misc-fixed-medium-r-semicondensed-*-13-120-75-75-c-60
+
+export FONTSERVER
+
+PCF := fonts/led-iso8859-1.pcf.gz \
+ fonts/led-iso8859-2.pcf.gz \
+ fonts/led-iso8859-15.pcf.gz \
+ fonts/led-koi8-r.pcf.gz
+BDF := $(PCF:pcf.gz=bdf)
+
+$(BDF):
+ charset=`echo $@ | sed -e 's|.*led-||' -e 's|.bdf||'`; \
+ perl $(srcdir)/scripts/bigfont.pl -fn "$(FONTSPEC)-$$charset" > $@
+
+all:: $(PCF)
+
+install::
+ $(INSTALL_DIR) $(fontdir)
+ $(INSTALL_DATA) $(PCF) $(fontdir)
+
+clean::
+ rm -f fonts/*.pcf.gz
+
+realclean::
+ rm -f fonts/*.bdf
+
diff --git a/font/led-iso8859-1.bdf b/fonts/led-iso8859-1.bdf
index 5c34c90..5c34c90 100644
--- a/font/led-iso8859-1.bdf
+++ b/fonts/led-iso8859-1.bdf
diff --git a/font/led-iso8859-15.bdf b/fonts/led-iso8859-15.bdf
index 874b4e3..874b4e3 100644
--- a/font/led-iso8859-15.bdf
+++ b/fonts/led-iso8859-15.bdf
diff --git a/font/led-iso8859-2.bdf b/fonts/led-iso8859-2.bdf
index 534f6be..534f6be 100644
--- a/font/led-iso8859-2.bdf
+++ b/fonts/led-iso8859-2.bdf
diff --git a/font/led-koi8-r.bdf b/fonts/led-koi8-r.bdf
index 046776c..046776c 100644
--- a/font/led-koi8-r.bdf
+++ b/fonts/led-koi8-r.bdf
diff --git a/http/Makefile.in b/http/Makefile.in
deleted file mode 100644
index c3c891a..0000000
--- a/http/Makefile.in
+++ /dev/null
@@ -1,42 +0,0 @@
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../Make.config
-
-CFLAGS=-g @CFLAGS@ $(WARN_FLAGS) $(LIB_FLAGS) -I.
-LDLIBS=-lvbi
-
-PROG=alevtd
-OBJS=main.o request.o response.o page.o devices.o
-HTML=alevt.css.h top.html.h bottom.html.h about.html.h
-
-.SUFFIXES: .in .h
-.in.h:
- perl -ne 's/\"/\\\"/g; chop; print "\"$$_\\n\"\n"' $< > $@
-
-all build: $(PROG)
-
-$(PROG): $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDLIBS)
-
-#main.o: httpd.h
-#request.o: httpd.h
-#response.o: httpd.h
-#page.o: httpd.h $(HTML)
-
-install: all
- $(INSTALL_DIR) $(bindir) $(mandir)/man1
- $(INSTALL_PROGRAM) -s alevtd $(bindir)
- $(INSTALL_DATA) -m 644 $(srcdir)/alevtd.man $(mandir)/man1/alevtd.1
-
-clean:
- rm -f $(OBJS) $(HTML)
-
-realclean distclean: clean
- rm -f $(PROG) Makefile *~ *.bak
-
-dep depend: $(HTML)
- $(DEPEND) -- $(CFLAGS) -- *.c
-
-#-------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/http/devices.c b/http/devices.c
deleted file mode 100644
index 8a86867..0000000
--- a/http/devices.c
+++ /dev/null
@@ -1,93 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "devices.h"
-/*
- * default devices names
- */
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
-struct ng_device_config ng_dev = {
- video: "/dev/bktr0",
- radio: NULL,
- vbi: "/dev/vbi0",
- dsp: "/dev/dsp",
- mixer: "/dev/mixer",
- video_scan: {
- "/dev/bktr0",
- "/dev/bktr1",
- NULL
- },
- mixer_scan: {
- "/dev/mixer",
- "/dev/mixer1",
- "/dev/mixer2",
- "/dev/mixer3",
- NULL
- }
-};
-#endif
-#if defined(__linux__)
-struct ng_device_config ng_dev = {
- video: "/dev/video0", /* <rant>thank you redhat breaking
- * /dev/video as symbolic link to the
- * default video device ... </rant> */
- radio: "/dev/radio",
- vbi: "/dev/vbi",
- dsp: "/dev/dsp",
- mixer: "/dev/mixer",
- video_scan: {
- "/dev/video0",
- "/dev/video1",
- "/dev/video2",
- "/dev/video3",
- NULL
- },
- mixer_scan: {
- "/dev/mixer",
- "/dev/mixer1",
- "/dev/mixer2",
- "/dev/mixer3",
- NULL
- }
-};
-
-struct ng_device_config ng_dev_devfs = {
- video: "/dev/v4l/video0",
- radio: "/dev/v4l/radio0",
- vbi: "/dev/v4l/vbi0",
- dsp: "/dev/sound/dsp",
- mixer: "/dev/sound/mixer",
- video_scan: {
- "/dev/v4l/video0",
- "/dev/v4l/video1",
- "/dev/v4l/video2",
- "/dev/v4l/video3",
- NULL
- },
- mixer_scan: {
- "/dev/sound/mixer",
- "/dev/sound/mixer1",
- "/dev/sound/mixer2",
- "/dev/sound/mixer3",
- NULL
- }
-};
-#endif
-
-void
-ng_device_init(void)
-{
-#if defined(__linux__)
- struct stat st;
-
- if (-1 == lstat("/dev/.devfsd",&st))
- return;
- if (!S_ISCHR(st.st_mode))
- return;
- ng_dev = ng_dev_devfs;
-#endif
-}
diff --git a/http/devices.h b/http/devices.h
deleted file mode 100644
index c4a2959..0000000
--- a/http/devices.h
+++ /dev/null
@@ -1,14 +0,0 @@
-
-struct ng_device_config {
- char *video;
- char *radio;
- char *vbi;
- char *dsp;
- char *mixer;
- char *video_scan[32];
- char *mixer_scan[32];
-};
-extern struct ng_device_config ng_dev;
-
-void ng_device_init(void);
-
diff --git a/i2c/Makefile b/i2c/Makefile
deleted file mode 100644
index 9d64022..0000000
--- a/i2c/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-srcdir=.
-
-
-PROGS=detect eeprom #scan
-
-CC=gcc
-CFLAGS=-Wall
-
-all: $(PROGS)
-
-clean:
- rm -f $(PROGS)
-
-distclean realclean: clean
- rm -f Makefile *~ *.bak
-
-dep depend install:
diff --git a/i2c/Makefile.in b/i2c/Makefile.in
deleted file mode 100644
index 151e1bd..0000000
--- a/i2c/Makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-PROGS=detect eeprom #scan
-
-CC=gcc
-CFLAGS=-Wall
-
-all: $(PROGS)
-
-clean:
- rm -f $(PROGS)
-
-distclean realclean: clean
- rm -f Makefile *~ *.bak
-
-dep depend install:
diff --git a/i2c/detect.c b/i2c/detect.c
deleted file mode 100644
index 142d6b1..0000000
--- a/i2c/detect.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* ------------------------------------------------------------------------- */
-/* detect -- look who's there. Gets address acks from all devices on the bus.*/
-/* It should not change any values in the peripherals. */
-/* ------------------------------------------------------------------------- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <linux/types.h>
-#include <linux/i2c.h>
-
-
-/* some common i2c chip addresses on bt848 grabber boards */
-static struct BTTV_LIST {
- int addr;
- char *name;
-} known[] = {
- { 0x22, "saa5249 videotext" },
- { 0x80, "msp34xx sound processor" },
- { 0x82, "TDA8425 audio chip" },
- { 0xa0, "eeprom (Hauppauge boards)" },
- { 0xb6, "TDA9850 audio chip" },
- { 0xc0, "tuner" },
- { 0xc2, "tuner" },
- { 0xee, "eeprom (STB boards)" },
- { 0, NULL }
-};
-
-int
-main(int argc, char *argv[])
-{
- int i,j,f,c;
- char b[40];
- char *device = "/dev/i2c-0";
-
- /* parse options */
- while (-1 != (c=getopt(argc,argv,"hd:"))) {
- switch (c){
- case 'd':
- if (optarg)
- device = optarg;
- break;
- case 'h':
- default:
- printf("This tool tries to detect devices on the i2c-bus\n");
- printf("usage: %s [ -d device ]\n",argv[0]);
- exit(1);
- }
- }
-
- if (-1 == (f = open(device,O_RDWR))) {
- fprintf(stderr,"open %s: %s\n",device,strerror(errno));
- exit(1);
- }
- for (i=0; i < 256; i += 2){
- ioctl(f,I2C_SLAVE,i>>1);
- fprintf(stderr,"0x%x\r",i);
- if (-1 != read(f,b,0)) {
- printf("0x%x: ",i);
- for (j = 0; known[j].name != NULL; j++) {
- if (known[j].addr == i) {
- printf("%s\n",known[j].name);
- break;
- }
- }
- if (known[j].name == NULL)
- printf("???\n");
- }
- }
- close(f);
- exit(0);
-}
diff --git a/i2c/eeprom.c b/i2c/eeprom.c
deleted file mode 100644
index 435067b..0000000
--- a/i2c/eeprom.c
+++ /dev/null
@@ -1,280 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <linux/types.h>
-#include <linux/i2c.h>
-
-char *dev="/dev/i2c-0";
-int wr=0, x=0, adr=0xa0;
-
-/* ---------------------------------------------------------------------- */
-
-void usage(char *name)
-{
- fprintf(stderr,"This is a i2c EEPROM tool\n");
- fprintf(stderr," read data: %s [ options ] > file\n",name);
- fprintf(stderr," write data: %s [ options ] -w < file\n",name);
- fprintf(stderr,"\n");
- fprintf(stderr,"File format is a hex dump. Without \"-w\" switch\n");
- fprintf(stderr,"only parsing (and printing) of the data is done,\n");
- fprintf(stderr,"writing is skipped.\n");
- fprintf(stderr,"\n");
- fprintf(stderr,"options:\n");
- fprintf(stderr," -d device device to use [%s]\n",dev);
- fprintf(stderr," -a addr set slave address [0x%02x]\n",adr);
- fprintf(stderr," -x print some hauppauge data decoded\n");
- fprintf(stderr,"\n");
- exit(1);
-}
-
-/* ---------------------------------------------------------------------- */
-/* Hauppauge boards */
-
-#define VENDOR_AVER_MEDIA 0x1461
-#define VENDOR_HAUPPAUGE 0x0070
-#define VENDOR_FLYVIDEO 0x1851
-#define VENDOR_STB 0x10B4
-
-#define STR(array,i) (i < sizeof(array)/sizeof(char*) ? array[i] : "unknown")
-
-static char *chiptype[] = {
- "Reserved", "BT815", "BT817", "BT819", "BT815A", "BT817A", "BT819A",
- "BT827", "BT829", "BT848", "BT848A", "BT849A", "BT829A", "BT827A",
- "BT878", "BT879", "BT880"
-};
-
-static char *sndtype[] = {
- "None", "TEA6300", "TEA6320", "TDA9850", "MSP3400C", "MSP3410D",
- "MSP3415", "MSP3430"};
-
-static char *sndout[] = {
- "None", "Internal", "BackPanel", "Internal and BackPanel"};
-
-static char *teletext[] = { "None", "SAA5246", "SAA5284", "Yes (Software)"};
-
-static char *h_tuner [] = {
- "",
- "External",
- "Unspecified",
- "Phillips FI1216",
- "Phillips FI1216MF",
- "Phillips FI1236",
- "Phillips FI1246",
- "Phillips FI1256",
- "Phillips FI1216 MK2",
- "Phillips FI1216MF MK2",
- "Phillips FI1236 MK2",
- "Phillips FI1246 MK2",
- "Phillips FI1256 MK2",
- "Temic 4032FY5",
- "Temic 4002FH5",
- "Temic 4062FY5",
- "Phillips FR1216 MK2",
- "Phillips FR1216MF MK2",
- "Phillips FR1236 MK2",
- "Phillips FR1246 MK2",
- "Phillips FR1256 MK2",
- "Phillips FM1216",
- "Phillips FM1216MF",
- "Phillips FM1236",
-};
-
-void dump_hauppauge(unsigned char *tvee)
-{
- unsigned int model;
- unsigned int revision;
- unsigned int serial;
- unsigned int vendor_id;
- unsigned int id;
- int i, b1, b2, b3;
-
- id = (tvee[252] << 8) | tvee[253];
- vendor_id = (tvee[254] << 8) | tvee[255];
- printf("Card Vendor: 0x%04x, Model: 0x%04x\n", vendor_id, id);
- if (1 /* vendor_id == VENDOR_HAUPPAUGE */) {
- b1 = 2 + tvee[1];
- b2 = 2 + tvee[b1 + 2];
- b3 = 2 + tvee[b1 + 2 + b2 + 1]; /* Blocklängen */
- model = (tvee[12] << 8 | tvee[11]);
- revision = (tvee[15] << 16 | tvee[14] << 8 | tvee[13]);
- serial = (tvee[b1 + 12] << 16 | tvee[b1 + 11] << 8 | tvee[b1 + 10]);
- printf("Hauppauge Model %d Rev. %c%c%c%c\n",
- model,
- ((revision >> 18) & 0x3f) + 32,
- ((revision >> 12) & 0x3f) + 32,
- ((revision >> 6) & 0x3f) + 32,
- ((revision >> 0) & 0x3f) + 32);
- printf("Serial: %d\n", serial);
- printf("Tuner: %s\n", h_tuner[tvee[9]]);
- printf("Audio: %s\n", sndtype[tvee[b1 + 2 + b2 + 3]]);
-// printf("Radio:\n");
-// printf("Teletext: %s\n",teletext[tvee[38]]); /* ?????? */
- printf("Decoder: %s\n", chiptype[tvee[6]]);
- printf("EEPROM:\n");
- for (i = 0; i <= 40; i++) {
- if (i == (b1 + 1) || i == (b1 + b2 + 2)
- || i == (b1 + b2 + b3 + 3))
- printf("\n");
- printf("%02x ", tvee[i]);
- }
- printf("\n");
- }
-}
-
-/* ---------------------------------------------------------------------- */
-
-void dump_buf(unsigned char *buf)
-{
- int i,j;
-
- for (i = 0; i < 256; i += 16) {
- printf("%04x ",i);
- for (j = i; j < i+16; j++) {
- if (!(j%4))
- printf(" ");
- printf("%02x ",buf[j]);
- }
- printf(" ");
- for (j = i; j < i+16; j++)
- printf("%c",isalnum(buf[j]) ? buf[j] : '.');
- printf("\n");
- }
-}
-
-int parse_buf(unsigned char *buf)
-{
- int i,j,n,pos,count;
- char line[100];
-
- for (i = 0; i < 256; i += 16) {
- if (NULL == fgets(line,99,stdin)) {
- fprintf(stderr,"unexpected EOF\n");
- return -1;
- }
- if ('#' == line[0] || '\n' == line[0]) {
- i -= 16;
- continue;
- }
- if (1 != sscanf(line,"%x%n",&n,&pos)) {
- fprintf(stderr,"addr parse error (%d)\n",i>>4);
- return -1;
- }
- if (n != i) {
- fprintf(stderr,"addr mismatch\n");
- return -1;
- }
- for (j = i; j < i+16; j++) {
- if (1 != sscanf(line+pos,"%x%n",&n,&count)) {
- fprintf(stderr,"value parse error\n");
- return -1;
- }
- buf[j] = n;
- pos += count;
- }
- }
- return 0;
-}
-
-/* ---------------------------------------------------------------------- */
-
-void
-read_buf(int fd, unsigned char *buf)
-{
- int i,n=8;
- unsigned char addr;
-
- for (i = 0; i < 256; i += n) {
- addr = i;
- if (-1 == (write(fd,&addr,1))) {
- fprintf(stderr,"write addr %s: %s\n",dev,strerror(errno));
- exit(1);
- }
- if (-1 == (read(fd,buf+i,n))) {
- fprintf(stderr,"read data %s: %s\n",dev,strerror(errno));
- exit(1);
- }
- }
-}
-
-void
-write_buf(int fd, unsigned char *buf)
-{
- int i,j,n = 8;
- unsigned char tmp[17];
-
- for (i = 0; i < 256; i += n) {
- tmp[0] = i;
- for (j = 0; j < n; j++)
- tmp[j+1] = buf[i+j];
- if (-1 == (write(fd,tmp,n+1))) {
- fprintf(stderr," write data %s: %s\n",dev,strerror(errno));
- exit(1);
- }
- fprintf(stderr,"*");
- usleep(100000); /* 0.1 sec */
- }
-}
-
-/* ---------------------------------------------------------------------- */
-
-int main(int argc, char *argv[])
-{
- int f,c;
- unsigned char buf[256];
-
- /* parse options */
- opterr=1;
- while ( (c=getopt(argc,argv,"hwxa:d:")) != -1) {
- switch (c){
- case 'w':
- wr=1;
- break;
- case 'x':
- x=1;
- break;
- case 'd':
- dev = optarg;
- break;
- case 'a':
- adr = strtol(optarg,NULL,0);
- break;
- case 'h':
- default:
- usage(argv[0]);
- }
- }
-
- if (-1 == (f = open(dev,O_RDWR))) {
- fprintf(stderr,"open %s: %s\n",dev,strerror(errno));
- exit(1);
- }
- ioctl(f,I2C_SLAVE,adr>>1);
- memset(buf,0,256);
-
- if (isatty(fileno(stdin))) {
- /* read */
- read_buf(f,buf);
- dump_buf(buf);
- if (x)
- dump_hauppauge(buf);
- } else {
- /* write */
- if (-1 == parse_buf(buf))
- exit(1);
- dump_buf(buf);
- if (wr) {
- fprintf(stderr,"writing to eeprom now... ");
- write_buf(f,buf);
- fprintf(stderr," ok\n");
- }
- }
-
- close(f);
- exit(0);
-}
diff --git a/i2c/ir.c b/i2c/ir.c
deleted file mode 100644
index 9cf1dcf..0000000
--- a/i2c/ir.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * programm for the ir control connected
- * to the svhs input on the hauppauge wintv
- * card (87X chip)
- *
- * (c) 1999 Mathias Kuester <mkuester@fh-stralsund.de>
- *
- * Version 0.01 18.05.1999
- *
- * before use :
- * mknod /dev/ir 127 0
- *
- * client for xawtv & kde at :
- * http://www.user.fh-stralsund.de/~mkuester
- *
- * how can i use this programm ?:
- *
- * 1) open /dev/ir
- * 2) read 2 !!! bytes
- * 3) check returned size when 0 no key pressed or error
- * 4) check the first byte when 0 no key pressed
- * 5) when != 0 check the second byte as (unsigned char) for the key
- *
- * KEYTABLE:
- *
- * TV 60
- * CH+ 128
- * RADIO 48
- * VOL- 68
- * FULL SCREEN 184
- * VOL+ 64
- * MUTE 52
- * CH- 132
- * SOURCE 136
- * 1 4
- * 2 8
- * 3 12
- * 4 16
- * 5 20
- * 6 24
- * 7 28
- * 8 32
- * 9 36
- * RESERVED 120
- * 0 0
- * MINIMIZE 152
- *
- */
-
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
-#include <linux/delay.h>
-#include <linux/errno.h>
-#include <linux/malloc.h>
-#include <linux/fs.h>
-#include <linux/wrapper.h>
-
-#include "i2c.h"
-
-struct ir
-{
- struct i2c_bus *bus; /* where is our chip */
- int addr;
-};
-
-#define dprintk if (debug) printk
-
-#if LINUX_VERSION_CODE > 0x020100
-MODULE_PARM(debug,"i");
-MODULE_PARM(type,"i");
-#endif
-
-#define I2C_INFRAROT 0x34
-
-struct ir *mk_ir = NULL;
-
-static int ir_read (struct inode * node, struct file * filep, char * buf, int count)
-{
-
- unsigned char *tmp = buf, a;
-
- if ( count < 2 )
- return 0;
-
- i2c_start(mk_ir->bus);
- if ( 0 != i2c_sendbyte(mk_ir->bus,0x34,2000) ||
- 0 != i2c_sendbyte(mk_ir->bus,0,0) ||
- 0 != i2c_sendbyte(mk_ir->bus,mk_ir->addr>>8 ,0) ||
- 0 != i2c_sendbyte(mk_ir->bus,mk_ir->addr&0xff,0) ) {
- return 0;
- } else {
- i2c_stop(mk_ir->bus);
- udelay(1000*2);
- i2c_start(mk_ir->bus);
- if (0 != i2c_sendbyte(mk_ir->bus,0x34+1,2000) )
- return 0;
- else {
- /* wenn Taste gedrueckt > 0 */
- a = i2c_readbyte(mk_ir->bus,0);
- put_user(a,(tmp++));
- /* Tastencode */
- a = i2c_readbyte(mk_ir->bus,1);
- put_user(a,(tmp++));
- }
- }
-
- i2c_stop(mk_ir->bus);
-
- /* read to clear LED ??? */
-
- a = i2c_read(mk_ir->bus,mk_ir->addr);
- a = i2c_read(mk_ir->bus,mk_ir->addr);
- a = i2c_read(mk_ir->bus,mk_ir->addr);
-
- return(2);
-}
-
-static int ir_open ( struct inode * i, struct file * f )
-{
- return 0;
-}
-
-static void ir_close (struct inode * i, struct file * f )
-{
- return;
-}
-
-/* ---------------------------------------------------------------------- */
-
-static struct file_operations ir = {
- NULL,
- ir_read,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- ir_open,
- ir_close,
- NULL
-};
-
-/* ---------------------------------------------------------------------- */
-
-static int ir_attach(struct i2c_device *device)
-{
- struct ir *t;
- int n;
-
- if ( mk_ir != NULL ) {
- printk("infrarot: sorry\n");
- return -1;
- }
-
- if ( (n=register_chrdev(127,"ir",&ir)) < 0 ) {
- printk("unable to get major (register_chrdev)\n");
- return -1;
- }
-
- if(device->bus->id!=I2C_BUSID_BT848)
- return -EINVAL;
-
- device->data = t = kmalloc(sizeof(struct ir),GFP_KERNEL);
- if (NULL == t)
- return -ENOMEM;
-
- memset(t,0,sizeof(struct ir));
- strcpy(device->name,"infrarot");
- t->bus = device->bus;
- t->addr = device->addr;
-
- mk_ir = t;
-
- MOD_INC_USE_COUNT;
- return 0;
-
-}
-
-static int ir_detach(struct i2c_device *device)
-{
- struct ir *t = (struct ir*)device->data;
- kfree(t);
- MOD_DEC_USE_COUNT;
- unregister_chrdev(127,"ir");
- return 0;
-}
-
-/* ----------------------------------------------------------------------- */
-
-static int ir_command(struct i2c_device *device,
- unsigned int cmd, void *arg)
-{
- return 0;
-}
-
-/* ----------------------------------------------------------------------- */
-
-struct i2c_driver i2c_driver_ir =
-{
- "infrarot", /* name */
- 4, /* ID */
- I2C_INFRAROT, I2C_INFRAROT, /* addr range */
-
- ir_attach,
- ir_detach,
- ir_command
-};
-
-#ifdef MODULE
-int init_module(void)
-#else
-int i2c_ir_init(void)
-#endif
-{
- i2c_register_driver(&i2c_driver_ir);
- return 0;
-}
-
-#ifdef MODULE
-void cleanup_module(void)
-{
- i2c_unregister_driver(&i2c_driver_ir);
-}
-#endif
diff --git a/i2c/scan.c b/i2c/scan.c
deleted file mode 100644
index 7991f90..0000000
--- a/i2c/scan.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * scan.c - (c) 1998 Gerd Knorr <kraxel@goldbach.in-berlin.de>
- *
- * test tool radio station scan
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-
-#include <asm/types.h> /* XXX glibc */
-#include "../videodev.h"
-#include "i2c.h"
-
-#define DEVICE "/dev/radio" /* major=81, minor=64 */
-
-struct video_tuner t;
-
-int
-radio_setfreq(int fd, float freq)
-{
- int ifreq = (freq+1.0/32)*16;
- return ioctl(fd, VIDIOCSFREQ, &ifreq);
-}
-
-int
-main(int argc, char *argv[])
-{
- unsigned char buf[16];
- int freq,sfreq;
- int fd,i2c,i,s,max;
-
- printf("bttv radio - station scan test (plays every station 10 sec)\n");
- if (-1 == (fd = open(DEVICE, O_RDONLY))) {
- perror("open " DEVICE);
- exit(1);
- }
- if (-1 == (i2c = open("/dev/i2c0",O_RDWR))) {
- perror("open /dev/i2c0");
- exit(1);
- }
- ioctl(i2c,I2C_SLAVE,0xc2>>1);
-
- for (freq = 8790, i = 0, max = 0; freq < 10800; freq += 5, i++) {
- radio_setfreq(fd,(float)freq/100);
- usleep(10*1000);
- read(i2c,buf+i%16,1);
- ioctl(fd,VIDIOCGTUNER,&t);
- printf(" *** scan %6.2f %5d 0x%02x %*.*s\n",(float)freq/100,
- t.signal,
- buf[i%16],(buf[i%16]&7)+1,(buf[i%16]&7)+1,"--*++");
- fflush(stdout);
- buf[i%16] &= 7;
-
- if (buf[max%16] <= buf[i%16])
- max = i;
- if (buf[i%16] > buf[(i+15)%16])
- max = i;
- if (4 == buf[max%16]-buf[i%16]) {
- for (s = i; buf[s%16] < 2; s--)
- ;
- sfreq = (freq-5*(i-s));
- if (sfreq%10) /* adjust xx.x5 */
- sfreq -= 5;
- max = i;
-
- printf(" >>> found %5.1f \n",(float)sfreq/100);
- radio_setfreq(fd,(float)sfreq/100);
- sleep(10);
- }
- }
- close(fd);
- return 0;
-}
diff --git a/jwz/Makefile b/jwz/Makefile
new file mode 100644
index 0000000..4e33e30
--- /dev/null
+++ b/jwz/Makefile
@@ -0,0 +1,2 @@
+default:
+ cd ..; $(MAKE)
diff --git a/jwz/remote.c b/jwz/remote.c
new file mode 100644
index 0000000..f103477
--- /dev/null
+++ b/jwz/remote.c
@@ -0,0 +1,591 @@
+/* xscreensaver-command, Copyright (c) 1991-1998
+ * by Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif /* HAVE_SYS_SELECT_H */
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include <X11/Xproto.h> /* for CARD32 */
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h> /* for XGetClassHint() */
+#include <X11/Xos.h>
+
+/* for xawtv */
+#include <X11/Intrinsic.h>
+extern XtAppContext app_context;
+
+#include "remote.h"
+
+#ifdef _VROOT_H_
+ERROR! you must not include vroot.h in this file
+#endif
+
+static char *progname = "fixme";
+static Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_RESPONSE;
+static Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_EXIT;
+static Atom XA_VROOT, XA_SELECT, XA_DEMO, XA_BLANK, XA_LOCK;
+
+
+static XErrorHandler old_handler = 0;
+static Bool got_badwindow = False;
+static int
+BadWindow_ehandler (Display *dpy, XErrorEvent *error)
+{
+ if (error->error_code == BadWindow)
+ {
+ got_badwindow = True;
+ return 0;
+ }
+ else
+ {
+ fprintf (stderr, "%s: ", progname);
+ if (!old_handler) abort();
+ return (*old_handler) (dpy, error);
+ }
+}
+
+
+
+static Window
+find_screensaver_window (Display *dpy, char **version)
+{
+ int i;
+ Window root = RootWindowOfScreen (DefaultScreenOfDisplay (dpy));
+ Window root2, parent, *kids;
+ unsigned int nkids;
+
+ if (version) *version = 0;
+
+ if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids))
+ abort ();
+ if (root != root2)
+ abort ();
+ if (parent)
+ abort ();
+ if (! (kids && nkids))
+ return 0;
+ for (i = 0; i < nkids; i++)
+ {
+ Atom type;
+ int format;
+ unsigned long nitems, bytesafter;
+ char *v;
+ int status;
+
+ /* We're walking the list of root-level windows and trying to find
+ the one that has a particular property on it. We need to trap
+ BadWindows errors while doing this, because it's possible that
+ some random window might get deleted in the meantime. (That
+ window won't have been the one we're looking for.)
+ */
+ XSync (dpy, False);
+ if (old_handler) abort();
+ got_badwindow = False;
+ old_handler = XSetErrorHandler (BadWindow_ehandler);
+ status = XGetWindowProperty (dpy, kids[i],
+ XA_SCREENSAVER_VERSION,
+ 0, 200, False, XA_STRING,
+ &type, &format, &nitems, &bytesafter,
+ (unsigned char **) &v);
+ XSync (dpy, False);
+ XSetErrorHandler (old_handler);
+ old_handler = 0;
+
+ if (got_badwindow)
+ {
+ status = BadWindow;
+ got_badwindow = False;
+ }
+
+ if (status == Success && type != None)
+ {
+ if (version)
+ *version = v;
+ return kids[i];
+ }
+ }
+ return 0;
+}
+
+
+static int
+send_xscreensaver_command (Display *dpy, Atom command, long arg,
+ Window *window_ret, char **error_ret)
+{
+ char *v = 0;
+ Window window = find_screensaver_window (dpy, &v);
+ XWindowAttributes xgwa;
+ char err[2048];
+
+ if (window_ret)
+ *window_ret = window;
+
+ if (!window)
+ {
+ sprintf (err, "no screensaver is running on display %s",
+ DisplayString (dpy));
+
+ if (error_ret)
+ {
+ *error_ret = strdup (err);
+ return -1;
+ }
+
+ if (command == XA_EXIT)
+ /* Don't print an error if xscreensaver is already dead. */
+ return 1;
+
+ fprintf (stderr, "%s: %s\n", progname, err);
+ return -1;
+ }
+
+ /* Select for property change events, so that we can read the response. */
+ XGetWindowAttributes (dpy, window, &xgwa);
+ XSelectInput (dpy, window, xgwa.your_event_mask | PropertyChangeMask);
+
+ if (command == XA_SCREENSAVER_STATUS ||
+ command == XA_SCREENSAVER_VERSION)
+ {
+ XClassHint hint;
+ memset (&hint, 0, sizeof(hint));
+ if (!v || !*v)
+ {
+ sprintf (err, "version property not set on window 0x%x?",
+ (unsigned int) window);
+ if (error_ret)
+ *error_ret = strdup (err);
+ else
+ fprintf (stderr, "%s: %s\n", progname, err);
+ return -1;
+ }
+
+ XGetClassHint(dpy, window, &hint);
+ if (!hint.res_class)
+ {
+ sprintf (err, "class hints not set on window 0x%x?",
+ (unsigned int) window);
+ if (error_ret)
+ *error_ret = strdup (err);
+ else
+ fprintf (stderr, "%s: %s\n", progname, err);
+ return -1;
+ }
+
+ fprintf (stdout, "%s %s", hint.res_class, v);
+
+ if (command != XA_SCREENSAVER_STATUS)
+ {
+ fprintf (stdout, "\n");
+ }
+ else
+ {
+ Atom type;
+ int format;
+ unsigned long nitems, bytesafter;
+ CARD32 *data = 0;
+
+ if (XGetWindowProperty (dpy,
+ RootWindow (dpy, 0),
+ XA_SCREENSAVER_STATUS,
+ 0, 999, False, XA_INTEGER,
+ &type, &format, &nitems, &bytesafter,
+ (unsigned char **) &data)
+ == Success
+ && type
+ && data)
+ {
+ Atom blanked;
+ time_t tt;
+ char *s;
+
+ if (type != XA_INTEGER || nitems < 3)
+ {
+ STATUS_LOSE:
+ if (data) free (data);
+ fprintf (stdout, "\n");
+ fflush (stdout);
+ fprintf (stderr, "bad status format on root window.\n");
+ return -1;
+ }
+
+ blanked = (Atom) data[0];
+ tt = (time_t) data[1];
+
+ if (tt <= (time_t) 666000000L) /* early 1991 */
+ goto STATUS_LOSE;
+
+ if (blanked == XA_BLANK)
+ fputs (": screen blanked since ", stdout);
+ else if (blanked == XA_LOCK)
+ fputs (": screen locked since ", stdout);
+ else if (blanked == 0)
+ /* suggestions for a better way to phrase this are welcome. */
+ fputs (": screen non-blanked since ", stdout);
+ else
+ /* `blanked' has an unknown value - fail. */
+ goto STATUS_LOSE;
+
+ s = ctime(&tt);
+ if (s[strlen(s)-1] == '\n')
+ s[strlen(s)-1] = 0;
+ fputs (s, stdout);
+
+ {
+ int nhacks = nitems - 2;
+ Bool any = False;
+ int i;
+ for (i = 0; i < nhacks; i++)
+ if (data[i + 2] > 0)
+ {
+ any = True;
+ break;
+ }
+
+ if (any && nhacks == 1)
+ fprintf (stdout, " (hack #%ld)\n", data[2]);
+ else if (any)
+ {
+ fprintf (stdout, " (hacks: ");
+ for (i = 0; i < nhacks; i++)
+ {
+ fprintf (stdout, "#%ld", data[2 + i]);
+ if (i != nhacks-1)
+ fputs (", ", stdout);
+ }
+ fputs (")\n", stdout);
+ }
+ else
+ fputs ("\n", stdout);
+ }
+
+ if (data) free (data);
+ }
+ else
+ {
+ if (data) free (data);
+ fprintf (stdout, "\n");
+ fflush (stdout);
+ fprintf (stderr, "no saver status on root window.\n");
+ return -1;
+ }
+ }
+
+ /* No need to read a response for these commands. */
+ return 1;
+ }
+ else
+ {
+ XEvent event;
+ long arg1 = arg;
+ long arg2 = 0;
+
+ if (arg < 0)
+ abort();
+ else if (arg == 0 && command == XA_SELECT)
+ abort();
+ else if (arg != 0 && command == XA_DEMO)
+ {
+ arg1 = 300; /* version number of the XA_DEMO protocol, */
+ arg2 = arg; /* since it didn't use to take an argument. */
+ }
+
+ event.xany.type = ClientMessage;
+ event.xclient.display = dpy;
+ event.xclient.window = window;
+ event.xclient.message_type = XA_SCREENSAVER;
+ event.xclient.format = 32;
+ memset (&event.xclient.data, 0, sizeof(event.xclient.data));
+ event.xclient.data.l[0] = (long) command;
+ event.xclient.data.l[1] = arg1;
+ event.xclient.data.l[2] = arg2;
+ if (! XSendEvent (dpy, window, False, 0L, &event))
+ {
+ sprintf (err, "XSendEvent(dpy, 0x%x ...) failed.\n",
+ (unsigned int) window);
+ if (error_ret)
+ *error_ret = strdup (err);
+ else
+ fprintf (stderr, "%s: %s\n", progname, err);
+ return -1;
+ }
+ }
+ XSync (dpy, 0);
+ return 0;
+}
+
+
+static int
+xscreensaver_command_response (Display *dpy, Window window,
+ Bool verbose_p, Bool exiting_p,
+ char **error_ret)
+{
+ int fd = ConnectionNumber (dpy);
+ int timeout = 10;
+ int status;
+ fd_set fds;
+ struct timeval tv;
+ char err[2048];
+
+ while (1)
+ {
+ FD_ZERO(&fds);
+ FD_SET(fd, &fds);
+ memset(&tv, 0, sizeof(tv));
+ tv.tv_sec = timeout;
+ status = select (fd+1, &fds, 0, &fds, &tv);
+
+ if (status < 0)
+ {
+ char buf[1024];
+ if (error_ret)
+ {
+ sprintf (buf, "error waiting for reply");
+ *error_ret = strdup (buf);
+ }
+ else
+ {
+ sprintf (buf, "%s: error waiting for reply", progname);
+ perror (buf);
+ }
+ return status;
+ }
+ else if (status == 0)
+ {
+ sprintf (err, "no response to command.");
+ if (error_ret)
+ *error_ret = strdup (err);
+ else
+ fprintf (stderr, "%s: %s\n", progname, err);
+ return -1;
+ }
+ else
+ {
+ XEvent event;
+ XtAppNextEvent(app_context,&event);
+ if (event.xany.type == PropertyNotify &&
+ event.xproperty.state == PropertyNewValue &&
+ event.xproperty.atom == XA_SCREENSAVER_RESPONSE)
+ {
+ Status st2;
+ Atom type;
+ int format;
+ unsigned long nitems, bytesafter;
+ char *msg = 0;
+
+ XSync (dpy, False);
+ if (old_handler) abort();
+ old_handler = XSetErrorHandler (BadWindow_ehandler);
+ st2 = XGetWindowProperty (dpy, window,
+ XA_SCREENSAVER_RESPONSE,
+ 0, 1024, True,
+ AnyPropertyType,
+ &type, &format, &nitems, &bytesafter,
+ (unsigned char **) &msg);
+ XSync (dpy, False);
+ XSetErrorHandler (old_handler);
+ old_handler = 0;
+
+ if (got_badwindow)
+ {
+ if (exiting_p)
+ return 0;
+
+ sprintf (err, "xscreensaver window unexpectedly deleted.");
+
+ if (error_ret)
+ *error_ret = strdup (err);
+ else
+ fprintf (stderr, "%s: %s\n", progname, err);
+
+ return -1;
+ }
+
+ if (st2 == Success && type != None)
+ {
+ if (type != XA_STRING || format != 8)
+ {
+ sprintf (err, "unrecognized response property.");
+
+ if (error_ret)
+ *error_ret = strdup (err);
+ else
+ fprintf (stderr, "%s: %s\n", progname, err);
+
+ if (msg) XFree (msg);
+ return -1;
+ }
+ else if (!msg || (msg[0] != '+' && msg[0] != '-'))
+ {
+ sprintf (err, "unrecognized response message.");
+
+ if (error_ret)
+ *error_ret = strdup (err);
+ else
+ fprintf (stderr, "%s: %s\n", progname, err);
+
+ if (msg) XFree (msg);
+ return -1;
+ }
+ else
+ {
+ int ret = (msg[0] == '+' ? 0 : -1);
+ sprintf (err, "%s: %s\n", progname, msg+1);
+
+ if (error_ret)
+ *error_ret = strdup (err);
+ else if (verbose_p || ret != 0)
+ fprintf ((ret < 0 ? stderr : stdout), "%s\n", err);
+
+ XFree (msg);
+ return ret;
+ }
+ }
+ } else {
+ XtDispatchEvent(&event);
+ }
+ }
+ }
+}
+
+
+int
+xscreensaver_command (Display *dpy, Atom command, long arg, Bool verbose_p,
+ char **error_ret)
+{
+ Window w = 0;
+ int status = send_xscreensaver_command (dpy, command, arg, &w, error_ret);
+ if (status == 0)
+ status = xscreensaver_command_response (dpy, w, verbose_p,
+ (command == XA_EXIT),
+ error_ret);
+
+ fflush (stdout);
+ fflush (stderr);
+ return (status < 0 ? status : 0);
+}
+
+
+void
+server_xscreensaver_version (Display *dpy,
+ char **version_ret,
+ char **user_ret,
+ char **host_ret)
+{
+ Window window = find_screensaver_window (dpy, 0);
+
+ Atom type;
+ int format;
+ unsigned long nitems, bytesafter;
+
+ if (version_ret)
+ *version_ret = 0;
+ if (user_ret)
+ *user_ret = 0;
+ if (host_ret)
+ *host_ret = 0;
+
+ if (!window)
+ return;
+
+ if (version_ret)
+ {
+ char *v = 0;
+ XGetWindowProperty (dpy, window, XA_SCREENSAVER_VERSION, 0, 1,
+ False, XA_STRING, &type, &format, &nitems,
+ &bytesafter, (unsigned char **) &v);
+ if (v)
+ {
+ *version_ret = strdup (v);
+ XFree (v);
+ }
+ }
+
+ if (user_ret || host_ret)
+ {
+ char *id = 0;
+ const char *user = 0;
+ const char *host = 0;
+
+ XGetWindowProperty (dpy, window, XA_SCREENSAVER_ID, 0, 512,
+ False, XA_STRING, &type, &format, &nitems,
+ &bytesafter, (unsigned char **) &id);
+ if (id && *id)
+ {
+ const char *old_tag = " on host ";
+ const char *s = strstr (id, old_tag);
+ if (s)
+ {
+ /* found ID of the form "1234 on host xyz". */
+ user = 0;
+ host = s + strlen (old_tag);
+ }
+ else
+ {
+ char *o = 0, *p = 0, *c = 0;
+ o = strchr (id, '(');
+ if (o) p = strchr (o, '@');
+ if (p) c = strchr (p, ')');
+ if (c)
+ {
+ /* found ID of the form "1234 (user@host)". */
+ user = o+1;
+ host = p+1;
+ *p = 0;
+ *c = 0;
+ }
+ }
+
+ }
+
+ if (user && *user && *user != '?')
+ *user_ret = strdup (user);
+ else
+ *user_ret = 0;
+
+ if (host && *host && *host != '?')
+ *host_ret = strdup (host);
+ else
+ *host_ret = 0;
+
+ if (id)
+ XFree (id);
+ }
+}
+
+void xscreensaver_init(Display *dpy)
+{
+ XA_VROOT = XInternAtom (dpy, "__SWM_VROOT", False);
+ XA_SCREENSAVER = XInternAtom (dpy, "SCREENSAVER", False);
+ XA_SCREENSAVER_ID = XInternAtom (dpy, "_SCREENSAVER_ID", False);
+ XA_SCREENSAVER_VERSION = XInternAtom (dpy, "_SCREENSAVER_VERSION",False);
+ XA_SCREENSAVER_STATUS = XInternAtom (dpy, "_SCREENSAVER_STATUS", False);
+ XA_SCREENSAVER_RESPONSE = XInternAtom (dpy, "_SCREENSAVER_RESPONSE", False);
+ XA_SELECT = XInternAtom (dpy, "SELECT", False);
+ XA_EXIT = XInternAtom (dpy, "EXIT", False);
+ XA_DEMO = XInternAtom (dpy, "DEMO", False);
+ XA_LOCK = XInternAtom (dpy, "LOCK", False);
+ XA_BLANK = XInternAtom (dpy, "BLANK", False);
+}
diff --git a/src/xscreensaver.h b/jwz/remote.h
index d368e43..7248e9f 100644
--- a/src/xscreensaver.h
+++ b/jwz/remote.h
@@ -14,11 +14,13 @@
#define _XSCREENSAVER_REMOTE_H_
extern int xscreensaver_command (Display *dpy, Atom command, long arg,
- Bool verbose_p);
+ Bool verbose_p, char **error_ret);
extern void server_xscreensaver_version (Display *dpy,
char **version_ret,
char **user_ret,
char **host_ret);
+extern void xscreensaver_init(Display *dpy);
+
#endif /* _XSCREENSAVER_REMOTE_H_ */
diff --git a/jwz/vroot.h b/jwz/vroot.h
new file mode 100644
index 0000000..ba3e5d2
--- /dev/null
+++ b/jwz/vroot.h
@@ -0,0 +1,126 @@
+/*****************************************************************************/
+/** Copyright 1991 by Andreas Stolcke **/
+/** Copyright 1990 by Solbourne Computer Inc. **/
+/** Longmont, Colorado **/
+/** **/
+/** All Rights Reserved **/
+/** **/
+/** Permission to use, copy, modify, and distribute this software and **/
+/** its documentation for any purpose and without fee is hereby **/
+/** granted, provided that the above copyright notice appear in all **/
+/** copies and that both that copyright notice and this permis- **/
+/** sion notice appear in supporting documentation, and that the **/
+/** name of Solbourne not be used in advertising **/
+/** in publicity pertaining to distribution of the software without **/
+/** specific, written prior permission. **/
+/** **/
+/** ANDREAS STOLCKE AND SOLBOURNE COMPUTER INC. DISCLAIMS ALL WARRANTIES **/
+/** WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF **/
+/** MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ANDREAS STOLCKE **/
+/** OR SOLBOURNE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL **/
+/** DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
+/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
+/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
+/** OR PERFORMANCE OF THIS SOFTWARE. **/
+/*****************************************************************************/
+/*
+ * vroot.h -- Virtual Root Window handling header file
+ *
+ * This header file redefines the X11 macros RootWindow and DefaultRootWindow,
+ * making them look for a virtual root window as provided by certain `virtual'
+ * window managers like swm and tvtwm. If none is found, the ordinary root
+ * window is returned, thus retaining backward compatibility with standard
+ * window managers.
+ * The function implementing the virtual root lookup remembers the result of
+ * its last invocation to avoid overhead in the case of repeated calls
+ * on the same display and screen arguments.
+ * The lookup code itself is taken from Tom LaStrange's ssetroot program.
+ *
+ * Most simple root window changing X programs can be converted to using
+ * virtual roots by just including
+ *
+ * #include <X11/vroot.h>
+ *
+ * after all the X11 header files. It has been tested on such popular
+ * X clients as xphoon, xfroot, xloadimage, and xaqua.
+ * It also works with the core clients xprop, xwininfo, xwd, and editres
+ * (and is necessary to get those clients working under tvtwm).
+ * It does NOT work with xsetroot; get the xsetroot replacement included in
+ * the tvtwm distribution instead.
+ *
+ * Andreas Stolcke <stolcke@ICSI.Berkeley.EDU>, 9/7/90
+ * - replaced all NULL's with properly cast 0's, 5/6/91
+ * - free children list (suggested by Mark Martin <mmm@cetia.fr>), 5/16/91
+ * - include X11/Xlib.h and support RootWindowOfScreen, too 9/17/91
+ */
+
+#ifndef _VROOT_H_
+#define _VROOT_H_
+
+#if !defined(lint) && !defined(SABER)
+static const char vroot_rcsid[] = "#Id: vroot.h,v 1.4 1991/09/30 19:23:16 stolcke Exp stolcke #";
+#endif
+
+#include <X11/X.h>
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+
+static Window
+#ifdef __STDC__ /* ANSIfication added by jwz, to avoid superfluous warnings. */
+VirtualRootWindowOfScreen(Screen *screen)
+#else /* !__STDC__ */
+VirtualRootWindowOfScreen(screen) Screen *screen;
+#endif /* !__STDC__ */
+{
+ static Screen *save_screen = (Screen *)0;
+ static Window root = (Window)0;
+
+ if (screen != save_screen) {
+ Display *dpy = DisplayOfScreen(screen);
+ Atom __SWM_VROOT = None;
+ int i;
+ Window rootReturn, parentReturn, *children;
+ unsigned int numChildren;
+
+ root = RootWindowOfScreen(screen);
+
+ /* go look for a virtual root */
+ __SWM_VROOT = XInternAtom(dpy, "__SWM_VROOT", False);
+ if (XQueryTree(dpy, root, &rootReturn, &parentReturn,
+ &children, &numChildren)) {
+ for (i = 0; i < numChildren; i++) {
+ Atom actual_type;
+ int actual_format;
+ unsigned long nitems, bytesafter;
+ Window *newRoot = (Window *)0;
+
+ if (XGetWindowProperty(dpy, children[i],
+ __SWM_VROOT, 0, 1, False, XA_WINDOW,
+ &actual_type, &actual_format,
+ &nitems, &bytesafter,
+ (unsigned char **) &newRoot) == Success
+ && newRoot) {
+ root = *newRoot;
+ break;
+ }
+ }
+ if (children)
+ XFree((char *)children);
+ }
+
+ save_screen = screen;
+ }
+
+ return root;
+}
+
+#undef RootWindowOfScreen
+#define RootWindowOfScreen(s) VirtualRootWindowOfScreen(s)
+
+#undef RootWindow
+#define RootWindow(dpy,screen) VirtualRootWindowOfScreen(ScreenOfDisplay(dpy,screen))
+
+#undef DefaultRootWindow
+#define DefaultRootWindow(dpy) VirtualRootWindowOfScreen(DefaultScreenOfDisplay(dpy))
+
+#endif /* _VROOT_H_ */
diff --git a/libng/Makefile b/libng/Makefile
new file mode 100644
index 0000000..4e33e30
--- /dev/null
+++ b/libng/Makefile
@@ -0,0 +1,2 @@
+default:
+ cd ..; $(MAKE)
diff --git a/libng/Makefile.in b/libng/Makefile.in
deleted file mode 100644
index 7eddf11..0000000
--- a/libng/Makefile.in
+++ /dev/null
@@ -1,31 +0,0 @@
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../Make.config
-
-CFLAGS=-g @CFLAGS@ $(WARN_FLAGS) $(LFS_FLAGS) -I.. \
- -DNG_PRIVATE -DLIBDIR='"$(libdir)"'
-OBJS=grab-ng.o devices.o writefile.o \
- color_common.o color_packed.o color_lut.o \
- color_yuv2rgb.o
-
-all build: libng.a
-
-libng.a: $(OBJS)
- rm -f $@
- ar -r $@ $(OBJS)
- ranlib $@
-
-clean:
- rm -f libng.a $(OBJS)
-
-distclean realclean: clean
- rm -f Makefile *~ *.bak
-
-install:
-
-depend dep:
- $(DEPEND) -- $(CFLAGS) -- *.c
-
-#-------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/libng/OVERVIEW b/libng/OVERVIEW
index c192407..6485c60 100644
--- a/libng/OVERVIEW
+++ b/libng/OVERVIEW
@@ -11,8 +11,8 @@ give a overview and explain the design of the library. Have a look at
grab-ng.h, this is the header file where everything is defined.
If you are looking for some simple sample code check out
-webcam/webcam.c. More complex usages of libng can be found everythere
-in the xawtv source code: In src/capture.c for example, where most of
+console/webcam.c. More complex usages of libng can be found everythere
+in the xawtv source code: In common/capture.c for example, where most of
the threaded movie recording code for xawtv+streamer is.
There are two types of structs: Those which carrying some data (like
@@ -66,7 +66,7 @@ ones exist:
(3) bktr (bt848/878 driver for FreeBSD + OpenBSD, see
plugins/drv0-bsd.c).
-xawtv uses struct ng_vid_driver for Xvideo support too (see src/xv.c).
+xawtv uses struct ng_vid_driver for Xvideo support too (see x11/xv.c).
open()/close() should be clear. The capabilities() function returns a
bitfield which specifies the capabilities of the driver. The *attr*
@@ -91,7 +91,7 @@ output drivers (struct ng_writer)
This is a interface for movie writer code. Four different ones exist:
(1) Microsoft's AVI
- (2) Apple Quicktime (using the quicktime4linux library).
+ (2) Apple Quicktime (using the libquicktime library).
(3) raw, uncompressed data (one big file).
(4) one image file/frame (jpeg or ppm).
@@ -129,7 +129,7 @@ ng_mix_driver) and a implementation for the OSS API (in
plugins/snd-oss.c).
I'm not that happy with the current design of the mixer stuff, it
-might change in the future.
+likely will change in the future.
color space conversion and compression
diff --git a/libng/Subdir.mk b/libng/Subdir.mk
new file mode 100644
index 0000000..c39de91
--- /dev/null
+++ b/libng/Subdir.mk
@@ -0,0 +1,16 @@
+OBJS-libng := \
+ libng/grab-ng.o \
+ libng/devices.o \
+ libng/writefile.o \
+ libng/color_common.o \
+ libng/color_packed.o \
+ libng/color_lut.o \
+ libng/color_yuv2rgb.o
+
+libng/libng.a: $(OBJS-libng)
+ rm -f $@
+ ar -r $@ $(OBJS-libng)
+ ranlib $@
+
+clean::
+ rm -f libng.a
diff --git a/libng/byteswap.h b/libng/byteswap.h
index 5e1c24a..fcb0dd0 100644
--- a/libng/byteswap.h
+++ b/libng/byteswap.h
@@ -1,6 +1,8 @@
#ifndef BYTEORDER_H
#define BYTEORDER_H
+#include <sys/types.h>
+
#ifndef BYTE_ORDER
# error "Aiee: BYTE_ORDER not defined\n";
#endif
diff --git a/libng/color_common.c b/libng/color_common.c
index 9f001ba..0380db1 100644
--- a/libng/color_common.c
+++ b/libng/color_common.c
@@ -1,3 +1,4 @@
+#define NG_PRIVATE
#include "config.h"
#include <stdio.h>
@@ -5,9 +6,7 @@
#include <unistd.h>
#include <pthread.h>
#include <sys/time.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
+#include <sys/types.h>
#include "grab-ng.h"
diff --git a/libng/color_lut.c b/libng/color_lut.c
index e04dd73..ce4856b 100644
--- a/libng/color_lut.c
+++ b/libng/color_lut.c
@@ -6,6 +6,7 @@
*
*/
+#define NG_PRIVATE
#include "config.h"
#include <stdio.h>
@@ -13,9 +14,7 @@
#include <unistd.h>
#include <pthread.h>
#include <sys/time.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
+#include <sys/types.h>
#include "grab-ng.h"
#include "byteswap.h"
diff --git a/libng/color_packed.c b/libng/color_packed.c
index 1b07b00..faad23b 100644
--- a/libng/color_packed.c
+++ b/libng/color_packed.c
@@ -6,6 +6,7 @@
*
*/
+#define NG_PRIVATE
#include "config.h"
#include <stdio.h>
@@ -13,9 +14,8 @@
#include <unistd.h>
#include <pthread.h>
#include <sys/time.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
+#include <sys/types.h>
+
#include "grab-ng.h"
/* ------------------------------------------------------------------- */
diff --git a/libng/color_yuv2rgb.c b/libng/color_yuv2rgb.c
index 6926c9c..629643a 100644
--- a/libng/color_yuv2rgb.c
+++ b/libng/color_yuv2rgb.c
@@ -6,6 +6,7 @@
*
*/
+#define NG_PRIVATE
#include "config.h"
#include <stdio.h>
@@ -13,9 +14,8 @@
#include <unistd.h>
#include <pthread.h>
#include <sys/time.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
+#include <sys/types.h>
+
#include "grab-ng.h"
/* ------------------------------------------------------------------- */
diff --git a/libng/grab-ng.c b/libng/grab-ng.c
index cf2935d..48ce8c3 100644
--- a/libng/grab-ng.c
+++ b/libng/grab-ng.c
@@ -4,6 +4,8 @@
* (c) 2001 Gerd Knorr <kraxel@bytesex.org>
*
*/
+
+#define NG_PRIVATE
#include "config.h"
#include <stdio.h>
@@ -16,9 +18,7 @@
#include <errno.h>
#include <ctype.h>
#include <sys/time.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
+#include <sys/types.h>
#include <dlfcn.h>
#ifndef RTLD_NOW
@@ -532,6 +532,7 @@ struct ng_attribute*
ng_mix_init(char *device, char *channel)
{
struct ng_attribute *attrs = NULL;
+ void *handle;
int i;
/* check all mixer drivers */
@@ -543,8 +544,11 @@ ng_mix_init(char *device, char *channel)
if (ng_debug)
fprintf(stderr,"mix-init: trying: %s... \n",
ng_mix_drivers[i]->name);
- if (NULL != (attrs = ng_mix_drivers[i]->init(device,channel)))
- break;
+ if (NULL != (handle = ng_mix_drivers[i]->open(device))) {
+ if (NULL != (attrs = ng_mix_drivers[i]->volctl(handle,channel)))
+ break;
+ ng_mix_drivers[i]->close(handle);
+ }
if (ng_debug)
fprintf(stderr,"mix-init: failed: %s\n",ng_mix_drivers[i]->name);
}
@@ -749,9 +753,3 @@ ng_init(void)
if (0 == count)
fprintf(stderr,"WARNING: no plugins found [%s]\n",LIBDIR);
}
-
-/*
- * Local variables:
- * compile-command: "(cd ..; make)"
- * End:
- */
diff --git a/libng/grab-ng.h b/libng/grab-ng.h
index 36f2a41..1bf4b7c 100644
--- a/libng/grab-ng.h
+++ b/libng/grab-ng.h
@@ -5,6 +5,9 @@
*
*/
+#include <pthread.h>
+#include <sys/types.h>
+
#include "devices.h"
extern int ng_debug;
@@ -224,6 +227,15 @@ void ng_ratio_fixup2(int *width, int *height, int *xoff, int *yoff,
int ratio_x, int ratio_y, int up);
/* --------------------------------------------------------------------- */
+/* device informations */
+
+struct ng_devinfo {
+ char device[32];
+ char name[64];
+ int flags;
+};
+
+/* --------------------------------------------------------------------- */
/* capture/overlay interface driver */
struct ng_vid_driver {
@@ -271,7 +283,11 @@ struct ng_dsp_driver {
struct ng_mix_driver {
const char *name;
- struct ng_attribute* (*init)(char *device, char *channel);
+ struct ng_devinfo* (*probe)(void);
+ struct ng_devinfo* (*channels)(char *device);
+ void* (*open)(char *device);
+ struct ng_attribute* (*volctl)(void *handle, char *channel);
+ void (*close)(void *handle);
};
@@ -306,7 +322,7 @@ struct ng_filter {
/* --------------------------------------------------------------------- */
/* must be changed if we break compatibility */
-#define NG_PLUGIN_MAGIC 20020118
+#define NG_PLUGIN_MAGIC 0x20020322
extern struct ng_video_conv **ng_conv;
extern struct ng_filter **ng_filters;
diff --git a/libng/plugins/Makefile b/libng/plugins/Makefile
new file mode 100644
index 0000000..2a57478
--- /dev/null
+++ b/libng/plugins/Makefile
@@ -0,0 +1,2 @@
+default:
+ cd ../..; $(MAKE)
diff --git a/libng/plugins/Makefile.in b/libng/plugins/Makefile.in
deleted file mode 100644
index 4b75236..0000000
--- a/libng/plugins/Makefile.in
+++ /dev/null
@@ -1,40 +0,0 @@
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../../Make.config
-
-CFLAGS=-g -fPIC @CFLAGS@ $(WARN_FLAGS) $(LFS_FLAGS) -I../.. -I..
-PLUGINS=flt-invert.so flt-gamma.so conv-mjpeg.so write-avi.so \
- @PLUGINS@
-GONE=invert.so nop.so flt-nop.so
-
-all build: $(PLUGINS)
-
-.SUFFIXES: .so .o .c
-.o.so:
- gcc $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $<
-.c.o:
- gcc $(CFLAGS) -DPLUGNAME='"$<"' -c -o $@ $<
-
-flt-gamma.so: flt-gamma.o
- gcc $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $< -lm
-
-write-qt.so: write-qt.o
- gcc $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $< $(QT_LIBS)
-
-clean:
- rm -f $(PLUGINS) flt-debug.so *.o
-
-distclean realclean: clean
- rm -f Makefile *~ *.bak
-
-install: all
- $(INSTALL_DIR) $(libdir)
- $(INSTALL_PROGRAM) -s $(PLUGINS) $(libdir)
- for f in $(GONE); do rm -f $(libdir)/$$f; done
-
-depend dep:
- $(DEPEND) -- $(CFLAGS) -- *.c
-
-#-------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/libng/plugins/Subdir.mk b/libng/plugins/Subdir.mk
new file mode 100644
index 0000000..ec126ab
--- /dev/null
+++ b/libng/plugins/Subdir.mk
@@ -0,0 +1,66 @@
+
+TARGETS-plugins := \
+ libng/plugins/flt-invert.so \
+ libng/plugins/flt-gamma.so \
+ libng/plugins/conv-mjpeg.so \
+ libng/plugins/write-avi.so
+ifeq ($(FOUND_LQT),yes)
+TARGETS-plugins += \
+ libng/plugins/write-qt.so
+endif
+ifeq ($(FOUND_OS),linux)
+TARGETS-plugins += \
+ libng/plugins/drv0-v4l2.so \
+ libng/plugins/drv1-v4l.so \
+ libng/plugins/snd-oss.so
+endif
+ifeq ($(FOUND_OS),bsd)
+TARGETS-plugins += \
+ libng/plugins/drv0-bsd.so \
+ libng/plugins/snd-oss.so
+endif
+
+GONE-plugins := \
+ $(libdir)/invert.so \
+ $(libdir)/nop.so \
+ $(libdir)/flt-nop.so
+
+# local targets
+libng/plugins/flt-invert.so: libng/plugins/flt-invert.pic
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $<
+
+libng/plugins/conv-mjpeg.so: libng/plugins/conv-mjpeg.pic
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $<
+
+libng/plugins/write-avi.so: libng/plugins/write-avi.pic
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $<
+
+libng/plugins/flt-gamma.so: libng/plugins/flt-gamma.pic
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $< -lm
+
+libng/plugins/write-qt.so: libng/plugins/write-qt.pic
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $< $(QT_LIBS)
+
+libng/plugins/drv0-v4l2.so: libng/plugins/drv0-v4l2.pic
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $<
+
+libng/plugins/drv1-v4l.so: libng/plugins/drv1-v4l.pic
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $<
+
+libng/plugins/drv0-bsd.so: libng/plugins/drv0-bsd.pic
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $<
+
+libng/plugins/snd-oss.so: libng/plugins/snd-oss.pic
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $<
+
+# global targets
+all:: $(TARGETS-plugins)
+
+install::
+ $(INSTALL_DIR) $(libdir)
+ $(INSTALL_PROGRAM) -s $(TARGETS-plugins) $(libdir)
+ rm -f $(GONE-plugins)
+
+clean::
+ rm -f $(TARGETS-plugins)
+
diff --git a/libng/plugins/conv-mjpeg.c b/libng/plugins/conv-mjpeg.c
index d2d3af4..34cee64 100644
--- a/libng/plugins/conv-mjpeg.c
+++ b/libng/plugins/conv-mjpeg.c
@@ -5,7 +5,6 @@
#include <unistd.h>
#include <string.h>
#include <pthread.h>
-#include <sys/types.h>
#include <jpeglib.h>
#include "grab-ng.h"
@@ -399,5 +398,5 @@ static const int nconv = sizeof(mjpg_list)/sizeof(struct ng_video_conv);
extern void ng_plugin_init(void);
void ng_plugin_init(void)
{
- ng_conv_register(NG_PLUGIN_MAGIC,PLUGNAME,mjpg_list,nconv);
+ ng_conv_register(NG_PLUGIN_MAGIC,__FILE__,mjpg_list,nconv);
}
diff --git a/libng/plugins/drv0-bsd.c b/libng/plugins/drv0-bsd.c
index fa24abf..46395b7 100644
--- a/libng/plugins/drv0-bsd.c
+++ b/libng/plugins/drv0-bsd.c
@@ -14,15 +14,12 @@
#include <fcntl.h>
#include <string.h>
#include <signal.h>
+#include <pthread.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/mman.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
-#include <pthread.h>
#ifdef HAVE_DEV_IC_BT8XX_H
# include <dev/ic/bt8xx.h>
@@ -815,5 +812,5 @@ static struct ng_video_buf* bsd_getimage(void *handle)
extern void ng_plugin_init(void);
void ng_plugin_init(void)
{
- ng_vid_driver_register(NG_PLUGIN_MAGIC,PLUGNAME,&bsd_driver);
+ ng_vid_driver_register(NG_PLUGIN_MAGIC,__FILE__,&bsd_driver);
}
diff --git a/libng/plugins/drv0-v4l2.c b/libng/plugins/drv0-v4l2.c
index 02ace54..5313012 100644
--- a/libng/plugins/drv0-v4l2.c
+++ b/libng/plugins/drv0-v4l2.c
@@ -20,9 +20,6 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include <pthread.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
#include <asm/types.h> /* XXX glibc */
#include "videodev2.h"
@@ -1002,7 +999,7 @@ v4l2_waiton(struct v4l2_handle *h)
/* wait for the next frame */
again:
- tv.tv_sec = 1;
+ tv.tv_sec = 5;
tv.tv_usec = 0;
FD_ZERO(&rdset);
FD_SET(h->fd, &rdset);
@@ -1262,5 +1259,5 @@ v4l2_getimage(void *handle)
extern void ng_plugin_init(void);
void ng_plugin_init(void)
{
- ng_vid_driver_register(NG_PLUGIN_MAGIC,PLUGNAME,&v4l2_driver);
+ ng_vid_driver_register(NG_PLUGIN_MAGIC,__FILE__,&v4l2_driver);
}
diff --git a/libng/plugins/drv1-v4l.c b/libng/plugins/drv1-v4l.c
index 144c139..d025466 100644
--- a/libng/plugins/drv1-v4l.c
+++ b/libng/plugins/drv1-v4l.c
@@ -14,15 +14,12 @@
#include <fcntl.h>
#include <string.h>
#include <signal.h>
+#include <pthread.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/mman.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
-#include <pthread.h>
#include <linux/videodev.h>
#include "grab-ng.h"
@@ -1279,5 +1276,5 @@ v4l_getimage(void *handle)
extern void ng_plugin_init(void);
void ng_plugin_init(void)
{
- ng_vid_driver_register(NG_PLUGIN_MAGIC,PLUGNAME,&v4l_driver);
+ ng_vid_driver_register(NG_PLUGIN_MAGIC,__FILE__,&v4l_driver);
}
diff --git a/libng/plugins/flt-debug.c b/libng/plugins/flt-debug.c
index e7d2c08..55f224d 100644
--- a/libng/plugins/flt-debug.c
+++ b/libng/plugins/flt-debug.c
@@ -116,9 +116,3 @@ void ng_plugin_init(void)
{
ng_filter_register(NG_PLUGIN_MAGIC,PLUGNAME,&filter);
}
-
-/*
- * Local variables:
- * compile-command: "make flt-debug.so"
- * End:
- */
diff --git a/libng/plugins/flt-gamma.c b/libng/plugins/flt-gamma.c
index 00b47ed..35090ef 100644
--- a/libng/plugins/flt-gamma.c
+++ b/libng/plugins/flt-gamma.c
@@ -11,9 +11,6 @@
#include <stdlib.h>
#include <math.h>
#include <pthread.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
#include "grab-ng.h"
@@ -176,5 +173,5 @@ extern void ng_plugin_init(void);
void ng_plugin_init(void)
{
calc_lut();
- ng_filter_register(NG_PLUGIN_MAGIC,PLUGNAME,&filter);
+ ng_filter_register(NG_PLUGIN_MAGIC,__FILE__,&filter);
}
diff --git a/libng/plugins/flt-invert.c b/libng/plugins/flt-invert.c
index 8621a86..87c2289 100644
--- a/libng/plugins/flt-invert.c
+++ b/libng/plugins/flt-invert.c
@@ -10,9 +10,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
#include "grab-ng.h"
@@ -131,5 +128,5 @@ static struct ng_filter filter = {
extern void ng_plugin_init(void);
void ng_plugin_init(void)
{
- ng_filter_register(NG_PLUGIN_MAGIC,PLUGNAME,&filter);
+ ng_filter_register(NG_PLUGIN_MAGIC,__FILE__,&filter);
}
diff --git a/libng/plugins/snd-oss.c b/libng/plugins/snd-oss.c
index 2546976..0e3e277 100644
--- a/libng/plugins/snd-oss.c
+++ b/libng/plugins/snd-oss.c
@@ -27,7 +27,7 @@ static void mixer_write_attr(struct ng_attribute *attr, int val);
struct mixer_handle {
int mix;
- int dev;
+ int volctl;
int volume;
int muted;
};
@@ -52,48 +52,67 @@ static struct ng_attribute mixer_attrs[] = {
}
};
-static struct ng_attribute*
-mixer_open(char *device, char *channel)
+static void
+mixer_close(void *handle)
+{
+ struct mixer_handle *h = handle;
+
+ if (-1 != h->mix)
+ close(h->mix);
+ free(h);
+}
+
+static void*
+mixer_open(char *device)
{
struct mixer_handle *h;
- struct ng_attribute *attrs;
- int i, devmask;
h = malloc(sizeof(*h));
memset(h,0,sizeof(*h));
- h->mix = -1;
- h->dev = -1;
+ h->mix = -1;
+ h->volctl = -1;
if (-1 == (h->mix = open(device,O_RDONLY))) {
fprintf(stderr,"open %s: %s\n",device,strerror(errno));
goto err;
}
fcntl(h->mix,F_SETFD,FD_CLOEXEC);
+ return h;
+
+ err:
+ mixer_close(h);
+ return NULL;
+}
+
+static struct ng_attribute*
+mixer_volctl(void *handle, char *channel)
+{
+ struct mixer_handle *h = handle;
+ struct ng_attribute *attrs;
+ int i, devmask;
if (-1 == ioctl(h->mix,MIXER_READ(SOUND_MIXER_DEVMASK),&devmask)) {
- fprintf(stderr,"%s: read devmask: %s",device,strerror(errno));
- goto err;
+ fprintf(stderr,"oss mixer read devmask: %s",strerror(errno));
+ return NULL;
}
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
if ((1<<i) & devmask && strcasecmp(names[i],channel) == 0) {
if (-1 == ioctl(h->mix,MIXER_READ(i),&h->volume)) {
- fprintf(stderr,"%s: read volume: %s",
- device,strerror(errno));
- goto err;
+ fprintf(stderr,"oss mixer read volume: %s",strerror(errno));
+ return NULL;
} else {
- h->dev = i;
+ h->volctl = i;
}
}
}
- if (-1 == h->dev) {
- fprintf(stderr,"%s: '%s' not found.\n%s: available: ",
- device,channel,device);
+ if (-1 == h->volctl) {
+ fprintf(stderr,"oss mixer: '%s' not found, available:", channel);
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++)
if ((1<<i) & devmask)
fprintf(stderr," '%s'",names[i]);
fprintf(stderr,"\n");
- goto err;
+ return NULL;
}
attrs = malloc(sizeof(mixer_attrs));
@@ -102,14 +121,6 @@ mixer_open(char *device, char *channel)
attrs[i].handle = h;
return attrs;
-
- err:
- if (h) {
- if (-1 != h->mix)
- close(h->mix);
- free(h);
- }
- return NULL;
}
static int
@@ -120,7 +131,7 @@ mixer_read_attr(struct ng_attribute *attr)
switch (attr->id) {
case ATTR_ID_VOLUME:
- if (-1 == ioctl(h->mix,MIXER_READ(h->dev),&h->volume))
+ if (-1 == ioctl(h->mix,MIXER_READ(h->volctl),&h->volume))
perror("oss mixer read volume");
vol = h->volume & 0x7f;
return vol;
@@ -140,7 +151,7 @@ mixer_write_attr(struct ng_attribute *attr, int val)
case ATTR_ID_VOLUME:
val &= 0x7f;
h->volume = val | (val << 8);
- if (-1 == ioctl(h->mix,MIXER_WRITE(h->dev),&h->volume))
+ if (-1 == ioctl(h->mix,MIXER_WRITE(h->volctl),&h->volume))
perror("oss mixer write volume");
h->muted = 0;
break;
@@ -148,21 +159,80 @@ mixer_write_attr(struct ng_attribute *attr, int val)
h->muted = val;
if (h->muted) {
int zero = 0;
- if (-1 == ioctl(h->mix,MIXER_READ(h->dev),&h->volume))
+ if (-1 == ioctl(h->mix,MIXER_READ(h->volctl),&h->volume))
perror("oss mixer read volume");
- if (-1 == ioctl(h->mix,MIXER_WRITE(h->dev),&zero))
+ if (-1 == ioctl(h->mix,MIXER_WRITE(h->volctl),&zero))
perror("oss mixer write volume");
} else {
- if (-1 == ioctl(h->mix,MIXER_WRITE(h->dev),&h->volume))
+ if (-1 == ioctl(h->mix,MIXER_WRITE(h->volctl),&h->volume))
perror("oss mixer write volume");
}
break;
}
}
+static struct ng_devinfo* mixer_probe(void)
+{
+ struct ng_devinfo *info = NULL;
+ int i,n,fd;
+#ifdef SOUND_MIXER_INFO
+ mixer_info minfo;
+#endif
+
+ n = 0;
+ for (i = 0; NULL != ng_dev.mixer_scan[i]; i++) {
+ fd = open(ng_dev.mixer_scan[i],O_RDONLY);
+ if (-1 == fd)
+ continue;
+ info = realloc(info,sizeof(*info) * (n+2));
+ memset(info+n,0,sizeof(*info)*2);
+ strcpy(info[n].device,ng_dev.mixer_scan[i]);
+#ifdef SOUND_MIXER_INFO
+ ioctl(fd,SOUND_MIXER_INFO,&minfo);
+ strcpy(info[n].name,minfo.name);
+#else
+ strcpy(info[n].name,ng_dev.mixer_scan[i]);
+#endif
+ close(fd);
+ n++;
+ }
+ return info;
+}
+
+static struct ng_devinfo*
+mixer_channels(char *device)
+{
+ struct ng_devinfo *info = NULL;
+ static char *names[] = SOUND_DEVICE_NAMES;
+ static char *labels[] = SOUND_DEVICE_LABELS;
+ int fd,i,n,devmask;
+
+ if (-1 == (fd = open(device,O_RDONLY))) {
+ fprintf(stderr,"open %s: %s\n",device,strerror(errno));
+ return NULL;
+ }
+ n = 0;
+ ioctl(fd,MIXER_READ(SOUND_MIXER_DEVMASK),&devmask);
+ for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
+ if (!((1<<i) & devmask))
+ continue;
+ info = realloc(info,sizeof(*info) * (n+2));
+ memset(info+n,0,sizeof(*info)*2);
+ strcpy(info[n].device,names[i]);
+ strcpy(info[n].name,labels[i]);
+ n++;
+ }
+ close(fd);
+ return info;
+}
+
struct ng_mix_driver oss_mixer = {
- name: "oss",
- init: mixer_open,
+ name: "oss",
+ probe: mixer_probe,
+ channels: mixer_channels,
+ open: mixer_open,
+ volctl: mixer_volctl,
+ close: mixer_close,
};
/* ------------------------------------------------------------------- */
@@ -465,6 +535,6 @@ static struct ng_dsp_driver oss_dsp = {
extern void ng_plugin_init(void);
void ng_plugin_init(void)
{
- ng_dsp_driver_register(NG_PLUGIN_MAGIC,PLUGNAME,&oss_dsp);
- ng_mix_driver_register(NG_PLUGIN_MAGIC,PLUGNAME,&oss_mixer);
+ ng_dsp_driver_register(NG_PLUGIN_MAGIC,__FILE__,&oss_dsp);
+ ng_mix_driver_register(NG_PLUGIN_MAGIC,__FILE__,&oss_mixer);
}
diff --git a/libng/plugins/write-avi.c b/libng/plugins/write-avi.c
index 0c10e46..a596dc1 100644
--- a/libng/plugins/write-avi.c
+++ b/libng/plugins/write-avi.c
@@ -8,12 +8,8 @@
#include <errno.h>
#include <sys/param.h>
#include <sys/uio.h>
-#include <pthread.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
-#include "byteswap.h"
+#include "byteswap.h"
#include "grab-ng.h"
#if BYTE_ORDER == BIG_ENDIAN
@@ -667,5 +663,5 @@ struct ng_writer avi_writer = {
extern void ng_plugin_init(void);
void ng_plugin_init(void)
{
- ng_writer_register(NG_PLUGIN_MAGIC,PLUGNAME,&avi_writer);
+ ng_writer_register(NG_PLUGIN_MAGIC,__FILE__,&avi_writer);
}
diff --git a/libng/plugins/write-qt.c b/libng/plugins/write-qt.c
index d463a78..3700d7a 100644
--- a/libng/plugins/write-qt.c
+++ b/libng/plugins/write-qt.c
@@ -7,9 +7,6 @@
#include <quicktime/quicktime.h>
#include <quicktime/colormodels.h>
#include <quicktime/lqt.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
#include "grab-ng.h"
@@ -467,5 +464,5 @@ void ng_plugin_init(void)
{
qt_writer.video = video_list();
qt_writer.audio = audio_list();
- ng_writer_register(NG_PLUGIN_MAGIC,PLUGNAME,&qt_writer);
+ ng_writer_register(NG_PLUGIN_MAGIC,__FILE__,&qt_writer);
}
diff --git a/libng/writefile.c b/libng/writefile.c
index b8fe2f2..abd8679 100644
--- a/libng/writefile.c
+++ b/libng/writefile.c
@@ -4,6 +4,8 @@
* (c) 1998-2000 Gerd Knorr <kraxel@bytesex.org>
*
*/
+
+#define NG_PRIVATE
#include "config.h"
#include <stdio.h>
@@ -16,10 +18,8 @@
#include <fcntl.h>
#include <jpeglib.h>
#include <pthread.h>
+#include <sys/types.h>
#include <sys/param.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
#include "byteswap.h"
#include "grab-ng.h"
diff --git a/libvbi/Makefile b/libvbi/Makefile
new file mode 100644
index 0000000..4e33e30
--- /dev/null
+++ b/libvbi/Makefile
@@ -0,0 +1,2 @@
+default:
+ cd ..; $(MAKE)
diff --git a/libvbi/Makefile.in b/libvbi/Makefile.in
deleted file mode 100644
index 0718048..0000000
--- a/libvbi/Makefile.in
+++ /dev/null
@@ -1,31 +0,0 @@
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../Make.config
-
-CFLAGS=-g @CFLAGS@ @VBIFLAGS@
-
-# from alevt
-OBJS=vbi.o fdset.o misc.o hamm.o lang.o cache.o \
- font.o export.o exp-gfx.o exp-html.o exp-txt.o
-
-all build: libvbi.a
-
-libvbi.a: $(OBJS)
- rm -f $@
- ar -r $@ $(OBJS)
- ranlib $@
-
-clean:
- rm -f libvbi.a $(OBJS)
-
-distclean realclean: clean
- rm -f Makefile *~ *.bak
-
-install:
-
-depend dep:
- $(DEPEND) -- $(CFLAGS) -- *.c
-
-#-------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/libvbi/Subdir.mk b/libvbi/Subdir.mk
new file mode 100644
index 0000000..e76a6f1
--- /dev/null
+++ b/libvbi/Subdir.mk
@@ -0,0 +1,18 @@
+# from alevt
+OBJS-libvbi := \
+ libvbi/vbi.o \
+ libvbi/fdset.o \
+ libvbi/misc.o \
+ libvbi/hamm.o \
+ libvbi/lang.o \
+ libvbi/cache.o \
+ libvbi/font.o \
+ libvbi/export.o \
+ libvbi/exp-gfx.o \
+ libvbi/exp-html.o \
+ libvbi/exp-txt.o
+
+libvbi/libvbi.a: $(OBJS-libvbi)
+ rm -f $@
+ ar -r $@ $(OBJS-libvbi)
+ ranlib $@
diff --git a/man/Makefile.in b/man/Makefile.in
deleted file mode 100644
index c2d09cc..0000000
--- a/man/Makefile.in
+++ /dev/null
@@ -1,22 +0,0 @@
-srcdir=@srcdir@
-
-include ../Make.config
-
-all build:
-
-install:
- for sec in 1 5 8; do \
- $(INSTALL_DIR) $(mandir)/man$$sec; \
- for page in $(srcdir)/*.$$sec; do \
- $(INSTALL_DATA) $$page $(mandir)/man$$sec; \
- done; \
- done
-
-clean:
- -rm -f *.o core* TAGS
-
-distclean realclean: clean
- -rm -f Makefile *~ *.bak
-
-dep depend:
-
diff --git a/man/Subdir.mk b/man/Subdir.mk
new file mode 100644
index 0000000..7885a43
--- /dev/null
+++ b/man/Subdir.mk
@@ -0,0 +1,40 @@
+man1 := $(wildcard $(srcdir)/man/*.1)
+man5 := $(wildcard $(srcdir)/man/*.5)
+man8 := $(wildcard $(srcdir)/man/*.8)
+
+install::
+ $(INSTALL_DIR) $(mandir)/man1
+ $(INSTALL_DIR) $(mandir)/man5
+ $(INSTALL_DIR) $(mandir)/man8
+ $(INSTALL_DATA) $(man1) $(mandir)/man1
+ $(INSTALL_DATA) $(man5) $(mandir)/man5
+ $(INSTALL_DATA) $(man8) $(mandir)/man8
+
+lang-all := $(wildcard $(srcdir)/man/*/*.[0-9])
+lang-all := $(patsubst $(srcdir)/man/%,%,$(lang-all))
+lang-man1 := $(filter %.1,$(lang-all))
+lang-man5 := $(filter %.5,$(lang-all))
+lang-man8 := $(filter %.8,$(lang-all))
+langs-1 := $(patsubst %/,inst1-%,$(sort $(dir $(lang-man1))))
+langs-5 := $(patsubst %/,inst5-%,$(sort $(dir $(lang-man5))))
+langs-8 := $(patsubst %/,inst8-%,$(sort $(dir $(lang-man8))))
+
+install:: $(langs-1) $(langs-5) $(langs-8)
+
+inst1-%:
+ $(INSTALL_DIR) $(mandir)/$*/man1
+ $(INSTALL_DATA) \
+ $(patsubst %,$(srcdir)/man/%,$(filter $*/%,$(lang-man1))) \
+ $(mandir)/$*/man1
+
+inst5-%:
+ $(INSTALL_DIR) $(mandir)/$*/man5
+ $(INSTALL_DATA) \
+ $(patsubst %,$(srcdir)/man/%,$(filter $*/%,$(lang-man5))) \
+ $(mandir)/$*/man5
+
+inst8-%:
+ $(INSTALL_DIR) $(mandir)/$*/man8
+ $(INSTALL_DATA) \
+ $(patsubst %,$(srcdir)/man/%,$(filter $*/%,$(lang-man8))) \
+ $(mandir)/$*/man8
diff --git a/http/alevtd.man b/man/alevtd.1
index 671335f..671335f 100644
--- a/http/alevtd.man
+++ b/man/alevtd.1
diff --git a/tools/dump-mixers.man b/man/dump-mixers.1
index 310472b..310472b 100644
--- a/tools/dump-mixers.man
+++ b/man/dump-mixers.1
diff --git a/man/es/fbtv.1 b/man/es/fbtv.1
new file mode 100644
index 0000000..0c9d125
--- /dev/null
+++ b/man/es/fbtv.1
@@ -0,0 +1,157 @@
+.TH fbtv 1 "(c) 1998 Gerd Knorr"
+.SH NOMBRE
+fbtv - un programa para ver la tele en la consola
+.SH SINOPSIS
+.B fbtv [ opciones ] [ nombre cadena ]
+.SH DESCRIPCIÓN
+.B fbtv
+es un programa para ver la tele en su equipo linux. Se ejecuta sobre
+el dispositivo del framebuffer gráfico (/dev/fb0). Necesitará un
+kernel 2.1.x para poder usarlo.
+.B fbtv
+comparte el fichero de configuración ($HOME/.xawtv) con el programa
+.B xawtv.
+Mire la página del xawtv(1) para más detalles sobre el formato del
+fichero de configuración.
+.SH OPCIONES
+.TP
+.B -o base
+establece la cadena base para los ficheros de capturas. El nombre del
+fichero será "base-fecha-nr.ext".
+.TP
+.B -v
+Mostrar más información.
+.TP
+.B -c dispositivo
+dispositivo video4linux (por defecto /dev/video0).
+.TP
+.B -d dispositivo
+dispositivo framebuffer (por defecto $FRAMEBUFFER; o /dev/fb0 si
+esa variable de entorno no está establecida)
+.TP
+.B -g
+imagen en escala de grises (sólo funciona en modo de 256 colores)
+.TP
+.B -s anchoxalto
+muestra la imagen de TV de tamaño
+.B ancho
+x
+.B alto
+en la esquina superior derecha.
+.TP
+.B -f fuente
+fuente para el texto. Por defecto buscará lat1-16.psf en
+/usr/lib/kbd/consolefonts y /usr/share/consolefonts. Si tiene un
+servidor de fuentes X11 local ejecutándose (o la variable de entorno
+FONTSERVER apuntando a algún servidor en funcionamiento),
+puede dar aquí una especificación de fuentes X11.
+.TP
+.B -m modo
+modo de video para la televisión. fbtv buscará el modo en /etc/fb.modes.
+.TP
+.B -j joydev
+dispositivo de joystick para controlar a fbtv.
+.TP
+.B -k
+mantiene la captura al cambiar de consola. Puede ser útil junto
+con la opción -s, tendrá la imagen de video mientras trabaja en otra
+consola. Esto es más o menos un truco feo. Sólo funciona si todas
+las consolas tienen el mismo modo de video y fbcon no usa "panning"
+para acelerar el scroll. También es útil para una configuración
+multi-pantalla.
+.TP
+.B -q
+modo silencioso. No reserva espacio para la línea de estado en la
+parte superior, no muestra los mensajes de estado ni el reloj.
+Se puede cambiar esta opción en tiempo de ejecución ('F').
+.TP
+.B -M
+EXPERIMENTAL: Activa el modo de escalado (escribe yuv en la memoria
+fuera de la pantalla y le permite a la tarjeta gráfica escalar el video).
+Hardware soportado:
+Matrox G200/G400 (con matroxfb) y ATI Mach64 VT/GT (con atyfb,
+sólo a 16bpp). Necesita al menos bttv-0.7.16 y kernel 2.3.50.
+.SH MODO DE USO
+fbtv funciona más o menos como el xawtv desde el punto de vista del usuario.
+Habrá notado que el xawtv tiene un montón de atajos de teclado.
+También funcionan en fbtv (si son de utilidad). Aquí va la lista:
+
+.nf
+G Capturar (\fBG\fPrab) imagen (tamaño completo, ppm)
+J Capturar imagen (tamaño completo, \fBj\fPpeg)
+F Pantalla completa. Selecciona modo silencioso (ver arriba).
+
+arr./abaj. sintoniza el anterior/siguiente canal
+izq./der. ajuste fino
+repag/avpag anterior/siguiente cadena
+
+ESC,Q \fBQ\fPuitar
+X \fBQ\fPuitar, pero dejando el sonido activado.
+
++/- Subir o bajar volumen
+Intro silencio
+.fi
+
+Las teclas asignadas a canales, definidas en $HOME/.xawtv funcionan
+también, con una excepción: las teclas modificadoras (algo como
+"key = Ctrl+F1") no funcionan.
+
+.SH TV A PANTALLA COMPLETA
+Algunos truquillos de Dag Bakke <dag.bakke@riksnett.no>:
+.P
+Las tarjetas BT8xx pueden producir imágenes de hasta 768x576 pixels.
+Para que el fbtv pueda hacer uso de todo el tamaño del monitor
+y obtener la mejor calidad de imagen, necesita crear una
+consola framebuffer de 768x576 pixels. Se puede conseguir esto con
+la utilidad fbset(1), que está disponible en varios sitios.
+Mire en: http://www.cs.kuleuven.ac.be/~geert/bin/
+.P
+O, puede dejar a fbtv que realice los cambios de modo con la opción -m.
+Esto requiere de una pequeña base de datos con los modos de video
+disponibles. El fichero que contiene los modos de video es
+normalmente /etc/fb.modes. Por ejemplo, la siguiente entrada produce
+un modo 768x576x32bpp, con 75Hz de refresco en una Matrox G200.
+
+.nf
+mode "tv"
+ # D: 49.188 MHz, H: 46.580 kHz, V: 75.008 Hz
+ geometry 768 576 768 576 32
+ timings 20330 128 32 32 8 128 5
+endmode
+.fi
+
+El comando "fbtv -q -mtv" da por tanto una imagen clara de TV (bueno,
+dependiendo de la señal recibida, claro) en toda la pantalla. Ponga el
+alias 'tv' a este comando, y ya está.
+.P
+.B ¡OJO!
+Por favor tenga en cuenta que su monitor puede soportar, o puede que no, esa
+resolución "personalizada". Y que un mal uso de la mencionada utilidad
+fbset puede tostar su monitor. Es mucho más fácil sacar humo de un
+componente electrónico, que meterlo dentro.
+.P
+Se puede conseguir una base de datos de modos estándar VESA en:
+ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/fb.modes.vesa60.gz
+
+.SH VEA TAMBIÉN
+xawtv(1)
+.SH AUTOR
+Gerd Knorr <kraxel@goldbach.in-berlin.de>
+.SH COPYRIGHT
+Copyright (C) 1997,98 Gerd Knorr <kraxel@goldbach.in-berlin.de>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+.SH TRADUCCIÓN
+Página traducida al español por Ricardo Villalba <rvm@escomposlinux.org>
diff --git a/man/es/scantv.1 b/man/es/scantv.1
new file mode 100644
index 0000000..8fb8d0b
--- /dev/null
+++ b/man/es/scantv.1
@@ -0,0 +1,54 @@
+.TH scantv 1 "(c) 2000 Gerd Knorr"
+.SH NOMBRE
+scantv - escanea un dispositivo v4l en busca de canales de TV.
+.SH SINOPSIS
+.B scantv [ opciones ]
+.SH DESCRIPCIÓN
+.B scantv
+escanea un dispositivo v4l en busca de canales de TV en emisión
+y escribe un fichero de configuración para xawtv/fbtv.
+.SH OPCIONES
+.TP
+.B -n norma
+establece la \fBn\fPorma de tv. scantv preguntará interactivamente
+si no se le da ninguna.
+.TP
+.B -f tabla
+establece la tabla de \fBf\fPrecuencias. scantv preguntará interactivamente
+si no se le da ninguna.
+.TP
+.B -o fichero
+especifica el fichero de salida. Si no se especifica ninguno scantv lo
+escribirá por la salida estándar.
+.TP
+.B -c dispositivo
+especifica el fichero de dispositivo de video. Por defecto /dev/video0.
+.TP
+.B -C dispositivo
+especifica el fichero de dispositivo vbi. Por defecto /dev/vbi.
+.TP
+.B -s
+saltar el e\fBs\fPcaneo de canales, simplemente escribe la norma y
+tabla de frecuencias en el fichero de configuración.
+.SH VEA TAMBIÉN
+xawtv(1), fbtv(1)
+.SH AUTOR
+Gerd Knorr <kraxel@bytesex.org>
+.SH COPYRIGHT
+Copyright (C) 2000 Gerd Knorr <kraxel@bytesex.org>
+.P
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+.P
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+.P
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+.SH TRADUCCIÓN
+Página traducida al español por Ricardo Villalba <rvm@escomposlinux.org>
diff --git a/man/es/xawtv.1 b/man/es/xawtv.1
new file mode 100644
index 0000000..6af8cde
--- /dev/null
+++ b/man/es/xawtv.1
@@ -0,0 +1,243 @@
+.TH xawtv 1 "(c) 1997-2001 Gerd Knorr"
+.SH NOMBRE
+xawtv - un programa X11 para ver la tele
+.SH SINOPSIS
+.B xawtv [ opciones ] [ nombre cadena ]
+.SH DESCRIPCIÓN
+.B xawtv
+es un programa para X11 para ver la tele en su equipo unix. Usa los widgets
+Athena.
+.SH OPCIONES
+Todas las opciones de la línea de comandos tienen un recurso, por tanto puede
+ponerlas también en el fichero .Xdefaults.
+.TP
+\fB-h\fP, \fB-help\fP
+Muestra una breve descripción de todas las opciones de línea de comandos.
+.TP
+\fB-hwscan\fP
+Muestra una lista de los dispositivos disponibles.
+.TP
+\fB-f\fP, \fB-fullscreen\fP
+arranca en modo de pantalla completa.
+.br
+Recurso: xawtv.fullscreen (bool).
+.TP
+\fB-n\fP, \fB-noconf\fP
+no lee el fichero de configuración ($HOME/.xawtv).
+.br
+Recurso: xawtv.readconfig (bool).
+.TP
+\fB-o\fP, \fB-outfile\fP base
+establece la cadena base para los ficheros de capturas. El nombre del fichero
+será "base-fecha-nr.ext".
+.br
+Recurso: xawtv.basename (string).
+.TP
+\fB-c\fP, \fB-device\fP dispositivo
+establece el dispositivo video4linux (por defecto /dev/video0). Esta opción
+también deshabilita Xvideo.
+.br
+Recurso: xawtv.device (string).
+.TP
+\fB-C\fP, \fB-dspdev\fP dispositivo
+establece el dispositivo de audio (por defecto /dev/dsp).
+.br
+Recurso: xawtv.dspdev (string).
+.TP
+\fB-vbidev\fP dispositivo
+establece el dispositivo vbi (por defecto /dev/vbi).
+.br
+Recurso: xawtv.vbidev (string).
+.TP
+\fB-c\fP, \fB-xvport\fP número
+establece el puerto Xvideo (por defecto el primero que sea usable si Xvideo
+está disponible).
+Esta opción también habilita el soporte Xvideo.
+.br
+Recurso: xawtv.xvport (int).
+.TP
+\fB-joydev\fP dispositivo
+dispositivo del joystick a usar para controlar xawtv.
+.br
+Recurso: xawtv.joydev (string).
+.TP
+\fB-v\fP, \fB-debug\fP nivel
+Aporta mayor nivel de información,
+.B nivel
+puede ser 0 (por defecto), 1 o 2. Existe sólo para depuración y en caso
+de problemas.
+.br
+Recurso: xawtv.debug (int).
+.TP
+\fB-remote\fP
+el display X11 es remoto. Esto básicamente deshabilita el modo overlay, lo
+puede necesitar si xawtv no consigue detectar un display X11 remoto.
+.br
+Recurso: xawtv.remote (bool).
+.TP
+\fB-b\fP, \fB-bpp\fP n
+obliga a xawtv a usar un color de profundidad
+.B n.
+Funciona para seleccionar entre 15/16 y 24/32 bpp.
+Simplemente se le pasa la opción a v4l-conf(1).
+.br
+Recurso: xawtv.bpp (int).
+.TP
+\fB-shift\fP n
+Desplaza la imagen de video
+.B n
+bytes. Puede usar esta opción si la imagen de video no está dentro de la
+ventana del xawtv, algunas tarjetas antiguas matrox muestran este problema.
+Simplemente se le pasa la opción a v4l-conf(1).
+.br
+Recurso: xawtv.shift (int).
+.TP
+\fB-fb\fP
+Usa el dispositivo framebuffer para determinar la dirección del buffer de
+video (en lugar de la extensión DGA). De nuevo un simple paso de opciones.
+.br
+Recurso: xawtv.fbdev (bool).
+.TP
+\fB-xv/-noxv \fP
+habilita/deshabilita el uso de la extensión Xvideo (para overlay),
+por defecto está activado.
+.br
+Recurso: xawtv.xvideo (bool).
+.TP
+\fB-scale/-noscale \fP
+habilita/deshabilita el uso de la extensión Xvideo (para escalada por
+hardware en modo grabdisplay), por defecto está activado.
+.br
+Recurso: xawtv.hwscale (bool).
+.TP
+\fB-vm/-novm\fP
+habilita/deshabilita el uso de la extensión VidMode, por defecto desactivado.
+Si hay un modo a pantalla completa configurado en el fichero de configuración,
+entonces se habilitará automáticamente la extensión vidmode.
+.br
+Recurso: xawtv.vidmode (bool).
+.TP
+\fB-dga/-nodga\fP
+habilita/deshabilita el uso de la extensión DGA, por defecto activada.
+.br
+Recurso: xawtv.dga (bool).
+.TP
+\fB-parallel\fP n
+usa n hilos de compresión (por defecto: uno).
+.br
+Recurso: xawtv.parallel (int).
+.P
+Se soportan también las opciones habituales del toolkit como \fB-geometry\fP.
+.SH HARDWARE / INTERFACES SOPORTADOS
+.TP
+.B v4l
+video4linux - \fBel\fP API de captura de video de linux.
+.TP
+.B v4l2
+video4linux dos - el nuevo y mejorado interfaz de captura que corrige un
+número de errores de diseño del v4l.
+.TP
+.B bktr
+Driver para tarjetas bt848/878 para FreeBSD / OpenBSD.
+.TP
+.B Xvideo
+Extensión X11 para dispositivos de video. Tenga en cuenta que la extensión
+Xvideo sólo soporta overlay, no puede capturar imágenes o películas si
+se usa la extensión Xvideo. Por otra parte es la única manera para escalar
+video en overlay (por ejemplo, pantalla completa sin bordes negros a 1024x748)
+en el caso de que tanto el hardware como el driver xfree86 lo soporten. Mire
+el fichero README.xfree4 para más detalles y pistas para configurar Xvideo.
+.SH EMPEZANDO
+Arranque xawtv. Entonces verifique las opciones del menú (botón derecho
+del ratón) y ajuste las opciones (norma de TV, fuente de video, tabla de
+frecuencias). Con las teclas del cursor puede controlar el sintonizador
+y buscar cadenas de TV. Otras teclas útiles se listan a continuación.
+.P
+La tecla 'E' mostrará el editor de canales donde puede crear/editar
+entradas para sus cadenas de TV. No olvide pulsar en "save" para grabar
+el fichero de configuración. También puede crear o editar un fichero
+de configuración con cualquier editor de textos, vea xawtvrc(5)
+para la descripción de la sintaxis del fichero de configuración.
+Hay unas cuantas opciones de configuración que sólo se pueden establecer
+editando el fichero de configuración.
+.P
+También puede probar scantv. Se trata de una herramienta de línea de
+comandos que realizará una búsqueda de canales y escribirá un fichero
+de configuración para el xawtv con todos los canales que haya encontrado.
+.SS Funciones del ratón
+El botón izquierdo del ratón mostrará un menú con todas las cadenas de TV
+encontradas en el fichero de configuración. El botón central cambia a
+la siguiente cadena. El botón derecho mostrará una ventana con un
+montón de opciones y funciones.
+.SS Atajos de teclado
+.nf
+V Captura de \fIV\fPideo on/off
+A \fIA\fPudio on/off
+F Pantalla completa (\fIF\fPullscreen) on/off
+G Capturar (\fIG\fPrab) imagen (tamaño completo, ppm)
+J Capturar imagen (tamaño completo, \fIj\fPpeg)
+Ctrl+G Capturar (\fIG\fPrab) imagen (tamaño ventana, ppm)
+Ctrl+J Capturar imagen (tamaño ventana, \fIj\fPpeg)
+O Muestra ventana de \fIO\fPpciones
+C Muestra ventana de \fIC\fPanales
+E Muestra \fIE\fPditor de canales
+R Muestra ventana de grabación AVI (\fIR\fPecording)
+Z Salto de canales (\fIz\fPapping, sintoniza cada cadena
+ unos cuantos segundos)
+Ctrl+Z Salto rápido de canales (captura las imágenes para los
+ botones de los canales)
+
+arr./abaj. sintoniza el anterior/siguiente canal
+izq./der. ajuste fino
+repag/avpag anterior/siguiente cadena (las del fichero de configuración)
+espacio siguiente cadena (lo mismo que repag.)
+retroceso cadena sintonizada anteriormente
+Ctrl+arr. busca la siguiente cadena
+F5-F12 ajusta brillo/tonalidad/contraste/color
+
+ESC,Q \fIQ\fPuitar
+
++/- Subir o bajar volumen (en el teclado numérico)
+Intro silencio (teclado numérico)
+.fi
+.SH BUGS
+.B Los informes de bugs con imágenes adjuntas van a /dev/null sin ser vistos.
+.P
+xawtv depende de una correcta configuración del driver. Si no puede
+sintonizar cadenas de TV incluso si los ajustes en la ventana de opciones
+son correctos, es muy posible que se trate de un asunto del driver.
+.P
+La indicación mono/estéreo \fBno\fP es fiable debido a restricciones en el
+API del v4l. El API no informa del modo actual del audio, sino que
+devuelve una lista de los modos disponibles en ese momento.
+xawtv simplemente hace una suposición basándose en que el driver
+usa el mejor modo disponible.
+Dependiendo de su hardware puede que esto no sea cierto. Si duda de
+si \fBde verdad\fP el modo estéreo funciona, sintonice la MTV y escuche,
+no se fie en lo que le diga xawtv.
+.SH VEA TAMBIÉN
+xawtvrc(5), fbtv(1), v4l-conf(1), scantv(1)
+.br
+http://bytesex.org/xawtv/ (homepage)
+.SH AUTOR
+Gerd Knorr <kraxel@bytesex.org>
+.SH COPYRIGHT
+Copyright (C) 1997-2001 Gerd Knorr <kraxel@bytesex.org>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+.SH MISC
+Eres el visitante 4711 de esta página.
+.SH TRADUCCIÓN
+Página traducida al español por Ricardo Villalba <rvm@escomposlinux.org>
diff --git a/man/es/xawtvrc.5 b/man/es/xawtvrc.5
new file mode 100644
index 0000000..67fc758
--- /dev/null
+++ b/man/es/xawtvrc.5
@@ -0,0 +1,297 @@
+.TH xawtvrc 5
+.SH NOMBRE
+xawtvrc -- fichero de configuración de programas de TV
+.SH SINOPSIS
+/etc/X11/xawtvrc
+.br
+$HOME/.xawtv
+.SH DESCRIPCIÓN
+.B xawtvrc
+es el fichero de configuración que originalmente usaba sólamente el xawtv
+(de ahí el nombre xawtvrc). Ahora hay otros programas y utilidades de TV
+que lo leen también para obtener información de configuración.
+.P
+Estos programas usan tanto un fichero global (/etc/X11/xawtvrc) como
+uno personal ($HOME/.xawtv). Las opciones establecidas en el fichero
+personal tendrán preferencias sobre las globales.
+.SS Programas
+Los siguientes programas usan estos ficheros de configuración:
+.TP
+.B xawtv
+El programa de TV clásico de X11.
+.TP
+.B motv
+Un mejorado GUI, basado en motif del xawtv ...
+.TP
+.B fbtv
+El programa para ver la tele en linux para la consola con framebuffer.
+.TP
+.B ttv
+Aplicación basada en aalib para ver la tele en cualquier terminal.
+.TP
+.B v4lctl
+Herramienta de línea de comandos para controlar dispositivos video4linux.
+.SS Crear el fichero de configuración
+Tanto
+.B xawtv
+como
+.B motv
+disponen de funciones para editar los canales y guardar la configuración.
+Pero la función para grabarla \fBno\fP conservará los comentarios
+que hubiera en el fichero de configuración ...
+.P
+También puede usar su editor de textos favorito y modificar el fichero
+de configuración directamente.
+.P
+También es posible usar la utilidad de línea de comandos
+.B scantv
+para crear un fichero de configuración inicial. scantv escaneará
+automáticamente todos los canales en busca de cadenas con emisión y
+escribirá las que encuentre en el fichero de configuración.
+.SH SINTAXIS
+.B xawtvrc
+usa una sintaxis similar a la de smb.conf: las secciones empiezan con
+[nombre], seguida de líneas con parejas opción = valor.
+.P
+Hay cuatro secciones especiales: [global], [launch], [eventmap] y
+[default]. Todas las demás secciones describen una cadena de TV cada una.
+.SS Opciones de cadenas de TV.
+Las siguientes opciones son válidas para cadenas de TV y la sección
+[default]. Las opciones de la sección [default] se usan -- como su
+nombre sugiere -- como valores por defecto para todoslos demás canales.
+Puede poner todo lo que es común para todos los canales (como la
+norma de TV que se usa en su país) en la sección [default], de modo que
+ya no deberá especificarla para cada canal.
+.P
+Con una sección [defaults] razonable, sólo necesitará especificar
+el canal para cada cadena de TV de esta manera:
+
+.nf
+[TVE]
+channel = 27
+.fi
+
+El resto de opciones son:
+.TP
+.B fine = n
+ajuste fino (lo mismo que las teclas cursor izq.+cursor der. hacen en el xawtv),
+por defecto: 0
+.TP
+.B norm = pal | ntsc | secam
+la norma de TV, la opción por defecto es pal
+.TP
+.B key = keysym
+Tecla para el canal. Se permiten todas las teclas keysyms de X11.
+Puede preceder una tecla con Modificador+, por ejemplo "Ctrl+F".
+.TP
+.B capture = off | overlay | grabdisplay
+modo de captura: off, overlay (por defecto, tarjeta de TV => video, 0% cpu) o
+grabdisplay (tarjeta de TV => memoria principal => Servidor X => video,
+la proporción de cuadros por segundo depende de la carga y tamaño de la
+imagen). Por defecto se usa overlay. Si no es posible usar el modo
+overlay por alguna razón (display remoto, no soportado por el hardware,
+lo que sea) las aplicaciones seleccionarán automáticamente el modo
+grabdisplay.
+.TP
+.B input = Television | Composite1 | Composite2 | SVHS
+fuente de entrada. Los valores válidos dependen del driver del hardware,
+los valores de arriba son sólo ejemplos. Puede usar "v4lctl list"
+para obtener una lista con las opciones válidas.
+.TP
+.B color = n
+.TP
+.B bright = n
+.TP
+.B hue = n
+.TP
+.B contrast = n
+El rango válido va de 0 a 65535, siendo 32768 el valor por defecto.
+Añadiendo el símbolo del tanto por ciento cambia el rango de 0 a 100,
+por ejemplo "50%" es lo mismo que "32768".
+.TP
+.B audio = mono | stereo | lang1 | lang2
+Establece el modo de audio para un determinado canal.
+.TP
+.B freq = n
+Especifica la frecuencia para un determinado canal (en MHz, el transportador
+de video). No debería necesitar esto para un uso normal, todos los
+canales deberían estar listado en la tabla de frecuencia de su zona
+(si no, envíeme un parche).
+A no ser que quizás viva cerca de la frontera y el país vecino use
+un esquema de canales diferente.
+.TP
+.B midi = nota
+Establece el evento midi de <nota> como tecla para el canal.
+.P
+.SS Opciones globales
+Un número de opciones sin relación a los canales van en la sección "[global]":
+.TP
+.B fullscreen = ancho x alto
+especifica el modo de video que se debe usar para el modo de pantalla
+completa. Sólamente funciona con XFree, y por supuest es necesario
+un modeline válido para este modo en su fichero XF86Config.
+También debe habilitar la extensión VidMode (opción -vm, mire abajo)
+para que funcione.
+.TP
+.B wm-off-by = [+-]x[+-]y
+Algunos gestores de ventanas no manejan correctamente la gravedad estática
+(que yo sepa mwm y kwm). Esto es algo fastidioso en el modo a
+pantalla completa. Con esta opción puede corregirlo mediante un
+desplazamiento para mover las ventanas. Por ejemplo, wm-off-by = -4-24
+soluciona el problema en el kwm (el window manager del KDE1).
+.TP
+.B freqtab =
+selecciona el mapeo de canal a frecuencia. La tabla de
+"Options window->Frequency" (en el xawtv) muestra un menú con todas las
+entradas válidas (y permite cambiar de tabla en tiempo de ejecución).
+.TP
+.B pixsize = ancho x alto
+tamaño de los pixmaps de los canales (dentro de la ventana de canales).
+0x0 deshabilita esta opción.
+.TP
+.B pixcols = n
+número de columnas que se usarán en la ventana de canales. Por defecto: 1.
+.TP
+.B mixer = ctl | device:ctl
+Esta opción permite controlar el volumen por medio del mezclador de la
+tarjeta de sonido. ctl es el control del mezclador, como por ejemplo
+"vol" para el volumen maestro. "line1" puede ser un buen candidato
+para la tarjeta de TV. device es el dispositivo mezclador (sino se
+especifica se usará /dev/mixer). El volumen se controla con las
+teclas del teclado numérico: + sube el volumen, - lo baja, Intro lo
+silencia.
+.TP
+.B jpeg-quality = n
+establece el nivel de calidad para imágenes o cuadros (M)JPEG.
+El rango válido es para n es [0 .. 100] siendo 75 el valor por defecto.
+.TP
+.B keypad-ntsc = on | off
+Configura el modo del teclado numérico. Por defecto off.
+Cuando se pone a on, los números que se tecleen en el teclado
+numérico serán interpretados como número de canales (así es como
+funciona el NTSC TV). De otro modo serán interpretados como canales
+programados, es decir, 1 es el primer canal del $HOME/.xawtv, ...
+.TP
+.B keypad-partial = on | off
+Otro modo de configuración del teclado numérico. Por defectos on.
+Cuando se pone a off, teclear un dígito en el teclado numérico no
+cambia el canal si hay canales de dos dígitos que empiezan por ese
+número.
+.TP
+.B osd = on | off
+Habilita o deshabilita los textos en pantalla en el modo
+de pantalla completa. Por defecto on.
+.TP
+.B ratio = x:y
+Establece un aspect ratio fijo para la imagen de TV. El valor
+por defecto es 4:3. Use 0:0 si no quiere un aspect ratio fijo.
+.TP
+.B mov-driver = files | raw | avi | mov
+.TP
+.B mov-video = ppm | pgm | jpeg | rgb | gray | 422 | 422p | rgb15 | rgb24 | mjpeg | jpeg | raw | mjpa | png
+.TP
+.B mov-fps = fps
+.TP
+.B mov-audio = mono8 | mono16 | stereo
+.TP
+.B mov-rate = rate
+Establece los valores para grabaciones. No todas las combinaciones son
+posibles. "streamer -h" mostrará una lista.
+.TP
+.B midi = puerto
+Puede especificar un puerto ALSA por el cual xawtv recibirá eventos
+midi. Configurado de este modo, puede programar las teclas de su
+teclado midi como teclas asignadas a canales y usar eventos del
+controlador midi para controlar los ajustes de volumen, brillo, etc.
+Mire la descripción de la sección [eventmap] que hay más abajo para más
+detalles.
+.SS La sección [launch]
+Es posible arrancar otros programas desde el xawtv. Se configura
+con entradas en la sección "[launch]":
+.TP
+.B label = tecla, línea de comandos
+La tecla especificada ejecutará el programa. También vale llamar
+la acción como "Launch(label)". Si quiere jugar con las tablas
+de traducción de Xt, siéntase libre de hacerlo. Pero no se queje
+si rompe algo...
+.SS La sección [eventmap]
+La sección eventmap consiste simplemente en un número de líneas
+"evento = acción". "acción" puede ser cualquier comando que el xawtv
+entienda (mire la página man del xawtv-remote para una lista).
+"evento" es un evento generado por cualquier dispositivo de entrada
+de los que escucha el xawtv. Un evento puede tener algún argumento,
+por ejemplo los eventos del midi-ctrl tienen uno. Si está presente
+el argumento será añadido a la acción.
+.P
+Hay mapeos por defecto para eventos de entrada del lirc y del joystick,
+por tanto no será necesario que cree un eventmap para poder usarlos.
+Pero en caso de que no le guste los valores por defecto puede
+cambiarlos fácilmente.
+.P
+A continuación hay una lista de eventos válidos:
+.TP
+.B lirc-key-<nombre>
+Se ha pulsado la tecla <nombre> en el mando a distancia IR.
+.TP
+.B joy-button-<n>
+Se pulsó el botón <n> del joystick.
+.TP
+.B joy-axis-<left|right|up|down>
+El joystick se ha movido en la dirección especificada.
+.TP
+.B midi-note-<n>
+Se ha recibido un evento de nota <n> (porque se ha pulsado una
+tecla en el teclado midi).
+.TP
+.B midi-ctrl-<n>
+Se ha recibido un mensaje del controlador midi para el control <n>.
+Este evento tiene un argumento (el valor actual del control).
+.TP
+.B kbd-key-<nombre>
+La tecla <nombre> se ha pulsado en el teclado. Sólamente fbtv
+soporta esta opción.
+.SS Ejemplo de fichero de configuración
+.nf
+# esto es un comentario
+# las línea vacías también se ignoran
+
+[global]
+freqtab = europe-west
+#mixer = line
+jpeg-quality = 75
+midi = 64:0
+fullscreen = 768x576
+
+# para el /etc/XF86Config
+# Modeline "pal" 50.00 768 832 856 1000 576 590 595 630 -hsync -vsync
+
+[launch]
+mixer = M, gtkaumix
+AleVT = Ctrl+A, alevt
+
+[eventmap]
+midi-ctrl-7 = volume
+
+[defaults]
+input = television
+norm = pal
+
+[TVE 1]
+channel=E11
+key=F1
+
+[La 2]
+channel = 43
+key = F2
+
+# las demás cadenas van aquí
+
+[Cámara]
+input = Composite1
+key = K
+.fi
+
+.SH VEA TAMBIÉN
+scantv(1), xawtv(1), motv(1), fbtv(1), ttv(1), v4lctl(1)
+.SH TRADUCCIÓN
+Página traducida al español por Ricardo Villalba <rvm@escomposlinux.org>
diff --git a/man/motv.1 b/man/motv.1
index c066daf..bb982e7 100644
--- a/man/motv.1
+++ b/man/motv.1
@@ -102,16 +102,23 @@ Use the framebuffer device to determine the video framebuffer address
Resource: motv.fbdev (bool).
.TP
\fB-xv/-noxv \fP
-enable/disable the usage of the Xvideo extention (for overlay),
-default is on.
+enable/disable the usage of the Xvideo extention altogether,
+i.e. -noxv has the same effect as both -noxv-video and -noxv-image
+switches (see below).
.br
-Resource: motv.xvideo (bool).
+Resource: xawtv.xv (bool).
.TP
-\fB-scale/-noscale \fP
-enable/disable the usage of the Xvideo extention (for hardware scaling
-in grabdisplay mode), default is on.
+\fB-xv-video/-noxv-video \fP
+enable/disable the usage of the Xvideo extention for video overlay
+(i.e. XvPutVideo). overlay mode uses this. default is on.
.br
-Resource: motv.hwscale (bool).
+Resource: xawtv.xvVideo (bool).
+.TP
+\fB-xv-image/-noxv-image \fP
+enable/disable the usage of the Xvideo extention for image scaling
+(i.e. XvPutImage). grabdisplay mode uses this. default is on.
+.br
+Resource: xawtv.xvImage (bool).
.TP
\fB-vm/-novm\fP
enable/disable the usage of the VidMode extention, default is off.
@@ -130,7 +137,7 @@ use n compression threads (default: one).
.br
Resource: xawtv.parallel (int).
.P
-The usual Toolkit options like \fB-geometry\fP are supported too.
+The usual toolkit options like \fB-geometry\fP are supported too.
.SH SUPPORTED HARDWARE / INTERFACES
.TP
.B v4l
diff --git a/cc/ntsc-cc.man b/man/ntsc-cc.1
index 5c60b63..5c60b63 100644
--- a/cc/ntsc-cc.man
+++ b/man/ntsc-cc.1
diff --git a/tools/propwatch.man b/man/propwatch.1
index c524272..c524272 100644
--- a/tools/propwatch.man
+++ b/man/propwatch.1
diff --git a/radio/radio.man b/man/radio.1
index 8fc4904..8fc4904 100644
--- a/radio/radio.man
+++ b/man/radio.1
diff --git a/tools/record.man b/man/record.1
index e6ec887..e6ec887 100644
--- a/tools/record.man
+++ b/man/record.1
diff --git a/man/rootv.1 b/man/rootv.1
index 8a84ddd..3b8b903 100644
--- a/man/rootv.1
+++ b/man/rootv.1
@@ -1,23 +1,59 @@
-.TH rootv 1 "(c) 2000 Gerd Knorr"
+.TH rootv 1 "(c) 2000-2002 Gerd Knorr"
.SH NAME
-rootv - display TV/video as root window background
+rootv - display TV using the Xvideo extention
.SH SYNOPSIS
-.B rootv [ -stop | -wm ]
+.B rootv [ options ]
.SH DESCRIPTION
.B rootv
-puts a video to the root window of your display. Requires the Xvideo
-extention. If started with -stop the video will be stopped.
+puts a video to some window. By default it creates its own window,
+but you can also ask it to use the root window (thus the name) or any
+other window.
+.B rootv
+needs the Xvideo extention.
.P
-rootv itself provides no way to control video/audio/tuner. You can
-use v4lctl to do this. You can stick v4lctl calls into your window
-manager menus for example. "rootv -wm" will build a WindowMaker
-menu with all TV stations from the ~/.xawtv config file.
+.B rootv
+itself provides no way to control video/audio/tuner. You can use
+v4lctl to do this.
+.SH OPTIONS
+.B rootv
+knows a number of command line options to modify the behaviour.
+.TP
+.B -help
+Print a short description of all command line options.
+.TP
+.B -verbose
+Be verbose. That will dump some debug messages to stderr.
+.TP
+.B -root
+Put the video onto the root window instead of creating a new window.
+.TP
+.B -id <win>
+Put the video into the window <win> instead of creating a new window.
+.TP
+.B -station <st>
+Tune station <st>. This just calls v4lctl, which in turn will look up
+the station in your ~/.xawtv config file.
+.TP
+.B -no-mute
+Don't toggle mute. By default rootv will unmute the TV card when it
+starts and mute it on exit. It does this using the XV_MUTE attribute
+(if available).
+.TP
+.B -port <n>
+Use Xvideo port <n>. Try the -verbose switch if you want to know
+which ones are available.
+.TP
+.B -bg
+Fork into background.
+.TP
+.B -wm
+Print WindowMaker menu (set stations using v4lctl).
.SH SEE ALSO
xawtv(1), fbtv(1), v4lctl(1)
.SH AUTHOR
-Gerd Knorr <kraxel@goldbach.in-berlin.de>
+Gerd Knorr <kraxel@bytesex.org>
.SH COPYRIGHT
-Copyright (C) 2000 Gerd Knorr <kraxel@goldbach.in-berlin.de>
+Copyright (C) 2000-2002 Gerd Knorr <kraxel@bytesex.org>
.P
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tools/showriff.man b/man/showriff.1
index de9c398..de9c398 100644
--- a/tools/showriff.man
+++ b/man/showriff.1
diff --git a/webcam/webcam.man b/man/webcam.1
index 14354d8..14354d8 100644
--- a/webcam/webcam.man
+++ b/man/webcam.1
diff --git a/man/xawtv-remote.1 b/man/xawtv-remote.1
index c198827..d800822 100644
--- a/man/xawtv-remote.1
+++ b/man/xawtv-remote.1
@@ -66,6 +66,9 @@ Set the video input (Television/Composite1/...)
.B capture [ on | off | overlay | grabdisplay ]
Set capture mode.
.TP
+.B volume mute on | off
+mute / unmute audio.
+.TP
.B volume <arg>
.TP
.B color <arg>
diff --git a/man/xawtv.1 b/man/xawtv.1
index d950a6f..3cd1250 100644
--- a/man/xawtv.1
+++ b/man/xawtv.1
@@ -98,16 +98,23 @@ Use the framebuffer device to determine the video framebuffer address
Resource: xawtv.fbdev (bool).
.TP
\fB-xv/-noxv \fP
-enable/disable the usage of the Xvideo extention (for overlay),
-default is on.
+enable/disable the usage of the Xvideo extention altogether,
+i.e. -noxv has the same effect as both -noxv-video and -noxv-image
+switches (see below).
.br
-Resource: xawtv.xvideo (bool).
+Resource: xawtv.xv (bool).
.TP
-\fB-scale/-noscale \fP
-enable/disable the usage of the Xvideo extention (for hardware scaling
-in grabdisplay mode), default is on.
+\fB-xv-video/-noxv-video \fP
+enable/disable the usage of the Xvideo extention for video overlay
+(i.e. XvPutVideo). overlay mode uses this. default is on.
.br
-Resource: xawtv.hwscale (bool).
+Resource: xawtv.xvVideo (bool).
+.TP
+\fB-xv-image/-noxv-image \fP
+enable/disable the usage of the Xvideo extention for image scaling
+(i.e. XvPutImage). grabdisplay mode uses this. default is on.
+.br
+Resource: xawtv.xvImage (bool).
.TP
\fB-vm/-novm\fP
enable/disable the usage of the VidMode extention, default is off.
@@ -126,7 +133,7 @@ use n compression threads (default: one).
.br
Resource: xawtv.parallel (int).
.P
-The usual Toolkit options like \fB-geometry\fP are supported too.
+The usual toolkit options like \fB-geometry\fP are supported too.
.SH SUPPORTED HARDWARE / INTERFACES
.TP
.B v4l
diff --git a/oldstuff/kraxel-tvee.h b/oldstuff/kraxel-tvee.h
deleted file mode 100644
index 53acc40..0000000
--- a/oldstuff/kraxel-tvee.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * WinNT says about by card:
- *
- * WinTVpci
- * tuner PAL B/G / Philips FM1216
- * audio msp3400c
- * teletext saa5284
- * radio FM
- * infrared no
- */
-unsigned char tvee[256] = {
-0x84, 0x12, 0x00, 0x00, 0x05, 0x48, 0x09, 0x36,
-0x04, 0x15, 0x13, 0xa4, 0xeb, 0x36, 0x10, 0x85,
-0x0c, 0x00, 0x00, 0x00, 0x01, 0x84, 0x0a, 0x00,
-0x01, 0x01, 0x20, 0x77, 0x00, 0x40, 0x75, 0x89,
-0x06, 0x00, 0x74, 0x02, 0x01, 0x04, 0x02, 0x79,
-0xea, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-};
diff --git a/oldstuff/set-tv.c b/oldstuff/set-tv.c
deleted file mode 100644
index 78f9a49..0000000
--- a/oldstuff/set-tv.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * set-tv.c
- * tune in some TV station
- *
- * (c) 1998 Gerd Knorr <kraxel@goldbach.in-berlin.de>
- *
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
-#include <X11/Intrinsic.h>
-
-#include "config.h"
-
-#include "channel.h"
-#include "frequencies.h"
-#include "grab.h"
-
-int debug = 0;
-int have_dga = 0;
-int x11_is_remote = 1;
-char v4l_conf[] = "";
-
-/*------------------------------------------------------------------------*/
-
-void set_norm(int j)
-{
- cur_norm = j;
- grabber->grab_input(-1,cur_norm);
-}
-
-void set_source(int j)
-{
- cur_input = j;
- grabber->grab_input(cur_input,-1);
-}
-
-void
-set_channel(struct CHANNEL *channel)
-{
- /* image parameters */
- cur_color = channel->color;
- cur_bright = channel->bright;
- cur_hue = channel->hue;
- cur_contrast = channel->contrast;
- grabber->grab_picture(cur_color,cur_bright,cur_hue,cur_contrast);
-
- /* input source */
- if (cur_input != channel->input)
- set_source(channel->input);
- if (cur_norm != channel->norm)
- set_norm(channel->norm);
-
- /* station */
- cur_channel = channel->channel;
- cur_fine = channel->fine;
- grabber->grab_tune(channel->freq);
-
- printf("tuned in \"%s\": channel %s (%+d), freq %.3f, source %s\n",
- channel->name, chanlist[channel->channel].name,
- channel->fine,
- (float)channel->freq/16,
- grabber->inputs[cur_input].str);
-}
-
-/*--- main ---------------------------------------------------------------*/
-
-static void
-grabber_init()
-{
- grabber_open(0,0,0,0,0);
-}
-
-
-int main(int argc, char *argv[])
-{
- int c,i,audio=0;
-
- for (;;) {
- if (-1 == (c = getopt(argc, argv, "hav:c:")))
- break;
- switch (c) {
- case 'a':
- audio = 1;
- break;
- case 'v':
- debug = atoi(optarg);
- break;
- case 'c':
- device = optarg;
- break;
- case 'h':
- default:
- fprintf(stderr,"usage: %s [ -v debuglevel ] [ -c device ] channel\n",argv[0]);
- exit(1);
- }
- }
- if (optind+1 != argc) {
- fprintf(stderr,"usage: %s [ -v debuglevel ] [ -c device ] channel\n",argv[0]);
- exit(1);
- }
-
- grabber_init();
- read_config();
-
- cur_sender = -1;
- for (i = 0; i < count; i++)
- if (0 == strcasecmp(channels[i]->name,argv[optind]))
- cur_sender = i;
- if (cur_sender == -1) {
- fprintf(stderr,"%s: channel \"%s\" not found in $HOME/.xawtv\n",
- argv[0],argv[optind]);
- exit(1);
- }
- channels[cur_sender]->freq =
- get_freq(channels[cur_sender]->channel) + channels[cur_sender]->fine;
- set_channel(channels[cur_sender]);
- if (!audio && grabber->grab_close)
- grabber->grab_close();
-
- return 0;
-}
diff --git a/oldstuff/set-tv.man b/oldstuff/set-tv.man
deleted file mode 100644
index 5b68a47..0000000
--- a/oldstuff/set-tv.man
+++ /dev/null
@@ -1,25 +0,0 @@
-.TH set-tv 1 "(c) 1997,98 Gerd Knorr"
-.SH NAME
-set-tv - tune in some TV station
-.SH SYNOPSIS
-.B set-tv [ options ] station name
-.SH DESCRIPTION
-.B set-tv
-is a command line tool which can tune in some TV station. It takes
-the name of some TV station as argument. It reads the configuration
-from the xawtv config file ($HOME/.xawtv), every station listed there
-can be used.
-.SH OPTIONS
-.B -v level
-Be verbose,
-.B level
-may be 0 (default), 1 or 2. It exists just for debugging.
-.TP
-.B -c device
-video4linux device (default is /dev/video).
-.SH SEE ALSO
-xawtv(1)
-.SH AUTHOR
-Gerd Knorr <kraxel@goldbach.in-berlin.de>
-.SH COPYRIGHT
-Copyright (C) 1997,98 Gerd Knorr <kraxel@goldbach.in-berlin.de>
diff --git a/oldstuff/streamer-old.c b/oldstuff/streamer-old.c
deleted file mode 100644
index fb2ffce..0000000
--- a/oldstuff/streamer-old.c
+++ /dev/null
@@ -1,702 +0,0 @@
-/*
- * (c) 1997 Gerd Knorr <kraxel@goldbach.in-berlin.de>
- *
- */
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <math.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <ctype.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <sys/shm.h>
-#include <sys/ipc.h>
-#include <sys/wait.h>
-
-
-#include <asm/types.h> /* XXX glibc */
-#include "videodev.h"
-
-#include "colorspace.h"
-#include "writefile.h"
-#include "writeavi.h"
-#include "sound.h"
-
-#define DEVNAME "/dev/video"
-
-#define POST_NOTHING 0
-#define POST_RGB_SWAP 1
-#define POST_UNPACK422 2
-#define POST_UNPACK411 3
-#define POST_RAW 4
-
-struct GRAB_FORMAT {
- char *name;
- int bt848;
- int mul,div;
- int post;
- int can_stdout;
- int can_singlefile;
- int can_multiplefile;
-};
-
-static struct GRAB_FORMAT formats[] = {
- /* file formats */
- { "ppm", VIDEO_PALETTE_RGB24, 3, 1, POST_RGB_SWAP, 0,0,1 },
- { "pgm", VIDEO_PALETTE_GREY, 1, 1, POST_NOTHING, 0,0,1 },
- { "jpeg", VIDEO_PALETTE_RGB24, 3, 1, POST_RGB_SWAP, 0,0,1 },
-
- /* video */
- { "avi15",VIDEO_PALETTE_RGB555, 2, 1, POST_NOTHING, 0,1,0 },
- { "avi24",VIDEO_PALETTE_RGB24, 3, 1, POST_NOTHING, 0,1,0 },
-
- /* raw data */
- { "rgb", VIDEO_PALETTE_RGB24, 3, 1, POST_RGB_SWAP, 1,1,1 },
- { "gray", VIDEO_PALETTE_GREY, 1, 1, POST_NOTHING, 1,1,1 },
- { "411", VIDEO_PALETTE_YUV422, 3, 2, POST_UNPACK411, 1,1,1 },
- { "422", VIDEO_PALETTE_YUV422, 2, 1, POST_UNPACK422, 1,1,1 },
- { "raw", VIDEO_PALETTE_RAW, 1, 1, POST_NOTHING, 1,1,1 },
-
- /* end of table */
- { NULL, 0, 0, 0, 0 },
-};
-
-/* ---------------------------------------------------------------------- */
-
-static struct video_capability capability;
-static struct video_channel channel;
-#if 0
-static struct video_audio audio;
-static struct video_tuner tuner;
-static struct video_picture pict;
-#endif
-
-static unsigned char *map = NULL;
-static struct video_mmap gb1,gb2;
-static struct video_mbuf gb_buffers = { 2*0x151000, 0, {0,0x151000 }};
-
-static unsigned char *buffers;
-static int bufsize;
-static int bfirst = 0;
-static int blast = 0;
-static int bufcount = 6;
-static int wtalk,rtalk;
-static int wsync,rsync,synctime = 500;
-static struct timeval start;
-static int tvnorm = -1;
-static int input = -1;
-
-static char *device = DEVNAME;
-static char *filename = NULL;
-
-static int single = 1, format = -1, absframes = 1, with_audio = 0;
-static int fd = -1, width = 320, height = 240, quiet = 0, fps = 30;
-
-static int signaled = 0;
-
-/* ---------------------------------------------------------------------- */
-
-void
-usage(char *prog)
-{
- char *h;
-
- if (NULL != (h = strrchr(prog,'/')))
- prog = h+1;
-
- fprintf(stderr,
- "%s grabs image(s) from a bt848 card\n"
- "\n"
- "usage: %s [ options ]\n"
- "\n"
- "options:\n"
- " -q quiet operation\n"
- " -a m|s audio recording mono/stereo [off]\n"
- " (avi movies only). Check the record source with\n"
- " some mixer tool if you get silence.\n"
- " -c device specify device [%s]\n"
- " -f format specify output format [%s]\n"
- " -s size specify size [%dx%d]\n"
- " -b buffers specify # of buffers [%d]\n"
- " -t times number of frames [%d]\n"
- " -r fps frame rate [%d]\n"
- " -o file output file name [%s]\n"
- " -n tvnorm set pal/ntsc/secam [no change]\n"
- " -i input set input source (int) [no change]\n"
- "\n"
- "If the filename has some digits, %s will write multiple files,\n"
- "otherwise one huge file. Writing to one file works with raw\n"
- "data only. %s will switch the default format depending on the\n"
- "filename extention (ppm, pgm, jpg, jpeg, avi)\n"
- "\n"
- "funny chars:\n"
- " + grabbed picture queued to fifo\n"
- " o grabbed picture not queued (fifo full)\n"
- " - picture written to disk and dequeued from fifo\n"
- " s sync\n"
- " xx/yy (at end of line) xx frames queued, yy frames grabbed\n"
- "\n"
- "formats:\n"
- " raw data: rgb, gray, 411, 422, raw\n"
- " file formats: ppm, pgm, jpeg\n"
- " movie formats: avi15, avi24\n"
- "\n"
- "examples:\n"
- " %s -o image.ppm write single ppm file\n"
- " %s -f 411 | display -size 320x240 yuv:- yuv raw data to stdout\n"
- " %s -s 320x240 -t 5 -o frame000.jpeg write 5 jpeg files\n"
- " %s -s 320x240 -am -r 10 -t 600 -o movie.avi record movie with sound\n"
- "\n"
- "--\n"
- "(c) 1998 Gerd Knorr <kraxel@goldbach.in-berlin.de>\n",
- prog, prog, device,
- (format == -1) ? "none" : formats[format].name,
- width, height, bufcount, absframes, fps,
- filename ? filename : "stdout",
- prog, prog, prog, prog, prog, prog);
-}
-
-/* ---------------------------------------------------------------------- */
-
-void
-writer()
-{
- struct MOVIE_PARAMS params;
- char buffer, *sound_data;
- int fd = -1, sound = -1, sound_size=0, n=0;
- fd_set set;
-
- signal(SIGINT,SIG_IGN);
- if (format >= 3 && format <= 4) {
- memset(&params,0,sizeof(params));
-#define VIDEO_RGB15 2 /* host byte order */
-#define VIDEO_BGR24 4 /* bgrbgrbgrbgr */
-#define VIDEO_RGB24 7 /* rgbrgbrgbrgb */
- switch (formats[format].bt848) {
- case VIDEO_PALETTE_RGB555:
- params.video_format = VIDEO_RGB15;
- break;
- case VIDEO_PALETTE_RGB24:
- params.video_format = VIDEO_BGR24;
- break;
- }
- params.width = width;
- params.height = height;
- params.fps = fps;
- if (with_audio) {
- params.bits = 16;
- params.channels = with_audio;
- params.rate = 44100;
- if (-1 != (sound = sound_open(&params))) {
- sound_size = sound_bufsize();
- n = (rtalk>sound) ? rtalk+1 : sound+1;
- }
- }
- avi_open(filename,&params);
- } else if (single) {
- if (filename) {
- if (-1 == (fd = open(filename,O_RDWR | O_CREAT,0666))) {
- fprintf(stderr,"writer: open %s: %s\n",filename,strerror(errno));
- exit(1);
- }
- } else {
- filename = "stdout";
- fd = 1;
- }
- }
-
- for (;;) {
- if (sound != -1) {
- FD_ZERO(&set);
- FD_SET(rtalk,&set);
- FD_SET(sound,&set);
- select(n,&set,NULL,NULL,NULL);
- if (FD_ISSET(sound,&set)) {
- sound_data = sound_read();
- avi_writesound(sound_data, sound_size);
- }
- if (!FD_ISSET(rtalk,&set))
- continue;
- }
-
- /* wait for frame */
- switch (read(rtalk,&buffer,1)) {
- case -1:
- perror("writer: read socket");
- exit(1);
- case 0:
- if (!quiet)
- fprintf(stderr,"writer: done\n");
- if (format >= 3 && format <= 4)
- avi_close();
- exit(0);
- return;
- }
-
- /* write out */
- switch (format) {
- case 0:
- write_ppm(filename, buffers + buffer*bufsize, width, height);
- patch_up(filename);
- break;
- case 1:
- write_pgm(filename, buffers + buffer*bufsize, width, height);
- patch_up(filename);
- break;
- case 2:
-#ifdef HAVE_LIBJPEG
- write_jpeg(filename, buffers + buffer*bufsize, width, height,75,0);
- patch_up(filename);
-#else
- fprintf(stderr,"sorry, no jpeg support compiled in\n");
- exit(1);
-#endif
- break;
- case 3:
- case 4:
- avi_writeframe(buffers + buffer*bufsize);
- break;
- default:
- if (!single) {
- if (-1 == (fd = open(filename,O_RDWR | O_CREAT,0666))) {
- fprintf(stderr,"writer: open %s: %s\n",filename,strerror(errno));
- exit(1);
- }
- }
- if (bufsize != write(fd,buffers + buffer*bufsize, bufsize)) {
- fprintf(stderr,"writer: write %s: %s\n",filename,strerror(errno));
- exit(1);
- }
- if (!single) {
- close(fd);
- patch_up(filename);
- }
- break;
- }
-
- /* free buffer */
- if (1 != write(wtalk,&buffer,1)) {
- perror("writer: write socket");
- exit(1);
- }
- if (!quiet)
- fprintf(stderr,"-");
- }
-}
-
-/* ---------------------------------------------------------------------- */
-
-void
-syncer()
-{
- char dummy;
-
- signal(SIGINT,SIG_IGN);
- for (;;) {
- switch (read(rsync,&dummy,1)) {
- case -1:
- perror("syncer: read socket");
- exit(1);
- case 0:
- if (!quiet)
- fprintf(stderr,"syncer: done\n");
- exit(0);
- default:
- if (!quiet)
- fprintf(stderr,"s");
- sync();
- }
- }
-}
-
-/* ---------------------------------------------------------------------- */
-
-int
-putbuffer(char *src)
-{
- static int lastsec,lastsync,secframes,secqueued,absqueued,timediff;
- char buffer;
- unsigned char *dest;
- struct timeval tv;
-
- gettimeofday(&tv,NULL);
- timediff = (tv.tv_sec - start.tv_sec) * 1000;
- timediff += (tv.tv_usec - start.tv_usec) / 1000;
- if (absqueued * 1000 / fps > timediff)
- return absqueued;
-
- if (timediff > lastsync+synctime) {
- /* sync */
- lastsync = timediff - timediff % synctime;
- if (1 != write(wsync,&bfirst,1)) {
- perror("grabber: write socket");
- exit(1);
- }
- }
-
- if (timediff > lastsec+1000) {
- /* statistics */
- if (!quiet && secframes)
- fprintf(stderr," %2d/%2d\n",secqueued,secframes);
- lastsec = timediff - timediff % 1000;
- secqueued = 0;
- secframes = 0;
- }
-
- /* check for free buffers */
- switch(read(rtalk,&buffer,1)) {
- case -1:
- if (errno != EAGAIN) {
- perror("grabber: read socket");
- exit(1);
- }
- break;
- case 0:
- /* nothing */
- break;
- default:
- blast++;
- if (blast == bufcount)
- blast = 0;
- break;
- }
-
- secframes++;
- if ((bfirst+1) % bufcount == blast) {
- /* no buffer free */
- if (!quiet)
- fprintf(stderr,"o");
- return absqueued;
- }
-
- /* copy / convert */
- dest = buffers + bufsize*bfirst;
- switch (formats[format].post) {
- case POST_RGB_SWAP:
- rgb24_to_bgr24(dest,src,width*height);
- break;
- case POST_UNPACK422:
- packed422_to_planar422(dest,src,width,height);
- break;
- case POST_UNPACK411:
- packed422_to_planar411(dest,src,width,height);
- break;
- default:
- memcpy(dest,src,bufsize);
- break;
- }
-
- /* queue buffer */
- if (1 != write(wtalk,&bfirst,1)) {
- perror("grabber: write socket");
- exit(1);
- }
- secqueued++;
- absqueued++;
- bfirst++;
- if (bfirst == bufcount)
- bfirst = 0;
- if (!quiet)
- fprintf(stderr,"+");
- return absqueued;
-}
-
-/* ---------------------------------------------------------------------- */
-
-void
-ctrlc(int signal)
-{
- static char text[] = "^C - one moment please\n";
- write(2,text,strlen(text));
- signaled=1;
-}
-
-int
-main(int argc, char **argv)
-{
- int shm_id,c,s,count=0,i,n,p1[2],p2[2], queued=0;
-
- /* parse options */
- for (;;) {
- if (-1 == (c = getopt(argc, argv, "hqa:f:s:c:o:b:t:r:n:i:y:")))
- break;
- switch (c) {
- case 'q':
- quiet = 1;
- break;
- case 'a':
- with_audio = (optarg[0] == 's') ? 2 : 1;
- break;
- case 'f':
- for (i = 0; formats[i].name != NULL; i++)
- if (0 == strcasecmp(formats[i].name,optarg)) {
- format = i;
- break;
- }
- if (formats[i].name == NULL) {
- fprintf(stderr,"unknown format %s (available:",optarg);
- for (i = 0; formats[i].name != NULL; i++)
- fprintf(stderr," %s",formats[i].name);
- fprintf(stderr,")\n");
- exit(1);
- }
- break;
- case 's':
- if (2 != sscanf(optarg,"%dx%d",&width,&height))
- width = height = 0;
- break;
- case 'c':
- device = optarg;
- break;
- case 'o':
- filename = optarg;
- for (i = 0, n = strlen(filename); i < n; i++) {
- if (isdigit(filename[i]))
- single = 0;
- }
- if (format == -1) {
- if (strstr(filename,"ppm"))
- format = 0;
- if (strstr(filename,"pgm"))
- format = 1;
- if (strstr(filename,"jpeg"))
- format = 2;
- if (strstr(filename,"jpg"))
- format = 2;
- if (strstr(filename,"avi"))
- format = 3;
- }
- break;
- case 'n':
- if (0 == strcasecmp(optarg,"pal"))
- tvnorm = VIDEO_MODE_PAL;
- else if (0 == strcasecmp(optarg,"ntsc"))
- tvnorm = VIDEO_MODE_NTSC;
- else if (0 == strcasecmp(optarg,"secam"))
- tvnorm = VIDEO_MODE_SECAM;
- else {
- fprintf(stderr,"unknown tv norm %s\n",optarg);
- exit(1);
- }
- break;
- case 'i':
- input = atoi(optarg);
- break;
- case 't':
- absframes = atoi(optarg);
- break;
- case 'b':
- bufcount = atoi(optarg);
- break;
- case 'r':
- fps = atoi(optarg);
- break;
- case 'y':
- fd = atoi(optarg);
- break;
- case 'h':
- default:
- usage(argv[0]);
- exit(1);
- }
- }
- if (format == -1) {
- fprintf(stderr,"no format specified\n");
- exit(1);
- }
- if (filename == NULL && !formats[format].can_stdout) {
- fprintf(stderr,"writing to stdout is not supported for %s\n",
- formats[format].name);
- exit(1);
- }
- if (absframes > 1 && !single && !formats[format].can_multiplefile) {
-#if 0
- fprintf(stderr,"writing to multiple files is not supported for %s\n",
- formats[format].name);
- exit(1);
-#else
- single = 1;
-#endif
- }
- if (absframes > 1 && single && !formats[format].can_singlefile) {
- fprintf(stderr,"writing to a single file is not supported for %s\n",
- formats[format].name);
- exit(1);
- }
-
- /* open */
- if (-1 == fd && -1 == (fd = open(device,O_RDWR))) {
- fprintf(stderr,"open %s: %s\n",device,strerror(errno));
- exit(1);
- }
-
- /* get settings */
- if (-1 == ioctl(fd,VIDIOCGCAP,&capability)) {
- perror("ioctl VIDIOCGCAP");
- exit(1);
- }
- if (-1 == ioctl(fd,VIDIOCGCHAN,&channel))
- perror("ioctl VIDIOCGCHAN");
-#if 0
- if (-1 == ioctl(fd,VIDIOCGAUDIO,&audio))
- perror("ioctl VIDIOCGAUDIO");
- if (-1 == ioctl(fd,VIDIOCGTUNER,&tuner))
- perror("ioctl VIDIOCGTUNER");
- if (-1 == ioctl(fd,VIDIOCGPICT,&pict))
- perror("ioctl VIDIOCGPICT");
-#endif
-
- /* modify settings */
- if (tvnorm != -1 || input != -1) {
- if (tvnorm != -1)
- channel.norm = tvnorm;
- if (input != -1)
- channel.channel = input;
- if (-1 == ioctl(fd,VIDIOCSCHAN,&channel))
- perror("ioctl VIDIOCSCHAN");
- }
-
- /* mmap() buffer */
- if (-1 == ioctl(fd,VIDIOCGMBUF,&gb_buffers)) {
- perror("ioctl VIDIOCGMBUF");
- }
- map = mmap(0,gb_buffers.size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);
- if ((unsigned char*)-1 == map) {
- perror("mmap");
- } else {
- if (!quiet)
- fprintf(stderr,"v4l: mmap()'ed buffer size = 0x%x\n",
- gb_buffers.size);
- }
-
- /* buffer initialisation */
- if (absframes < bufcount)
- bufcount = absframes+1;
- bufsize = width*height*formats[format].mul/formats[format].div;
- if (-1 == (shm_id = shmget(IPC_PRIVATE, bufsize * bufcount, IPC_CREAT | 0700))) {
- perror("shmget");
- exit(1);
- }
- buffers = shmat(shm_id, 0, 0);
- if ((void *) -1 == buffers) {
- perror("shmat");
- exit(1);
- }
- shmctl(shm_id, IPC_RMID, 0);
-
- /* start up writer */
- if (-1 == pipe(p1) || -1 == pipe(p2)) {
- perror("pipe");
- exit(1);
- }
- switch(fork()) {
- case -1:
- perror("fork");
- exit(1);
- case 0:
- close(p1[0]);
- close(p2[1]);
- wtalk = p1[1];
- rtalk = p2[0];
- fcntl(rtalk,F_SETFL,0);
- nice(5);
- writer();
- exit(0);
- default:
- close(p2[0]);
- close(p1[1]);
- wtalk = p2[1];
- rtalk = p1[0];
- fcntl(rtalk,F_SETFL,O_NONBLOCK);
- break;
- }
-
- /* start up syncer */
- if (-1 == pipe(p1)) {
- perror("pipe");
- exit(1);
- }
- switch(fork()) {
- case -1:
- perror("fork");
- exit(1);
- case 0:
- close(p1[1]);
- rsync = p1[0];
- fcntl(rsync,F_SETFL,0);
- nice(10);
- syncer();
- exit(0);
- default:
- close(p1[0]);
- wsync = p1[1];
- break;
- }
-
- /* catch ^C */
- signal(SIGINT,ctrlc);
-
- /* prepare for grabbing */
- gb1.format = formats[format].bt848;
- gb1.frame = 0;
- gb1.width = width;
- gb1.height = height;
-
- gb2.format = formats[format].bt848;
- gb2.frame = 1;
- gb2.width = width;
- gb2.height = height;
-
- if (-1 == ioctl(fd,VIDIOCMCAPTURE,&gb1)) {
- if (errno == EAGAIN)
- fprintf(stderr,"grabber chip can't sync (no station tuned in?)\n");
- else
- perror("ioctl VIDIOCMCAPTURE");
- exit(1);
- }
- count++;
-
- /* main loop */
- gettimeofday(&start,NULL);
- for (;queued < absframes && !signaled; count++) {
-
- if (-1 == ioctl(fd,VIDIOCMCAPTURE,(count%2) ? &gb2 : &gb1)) {
- if (errno == EAGAIN)
- fprintf(stderr,"grabber chip can't sync (no station tuned in?)\n");
- else
- perror("ioctl VIDIOCMCAPTURE");
- exit(1);
- }
-
- if (-1 == ioctl(fd,VIDIOCSYNC,(count%2) ? &gb1.frame : &gb2.frame)) {
- perror("ioctl VIDIOCSYNC");
- exit(1);
- }
- queued = putbuffer(map + gb_buffers.offsets[(count%2) ? 0 : 1]);
- }
-
- if (-1 == ioctl(fd,VIDIOCSYNC,(count%2) ? &gb1.frame : &gb2.frame)) {
- perror("ioctl VIDIOCSYNC");
- exit(1);
- }
-
- /* done */
- if (!quiet)
- fprintf(stderr,"\n");
- close(fd);
- close(wtalk);
- close(wsync);
- wait(&s);
- wait(&s);
- return 0;
-}
diff --git a/oldstuff/vtx/Makefile b/oldstuff/vtx/Makefile
deleted file mode 100644
index 783d9b0..0000000
--- a/oldstuff/vtx/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-
-CC=gcc
-CFLAGS=-Wall -g -O2 -I.
-
-PROG=vtx2ascii
-
-$(PROG): main.o fileio.o vtxtools.o vtxdecode.o
- $(CC) $(CFLAGS) -o $@ $^
-
-clean:
- rm -f *.o *~
-
-distclean: clean
- rm -f $(PROG)
diff --git a/oldstuff/vtx/README b/oldstuff/vtx/README
deleted file mode 100644
index 9ea12d4..0000000
--- a/oldstuff/vtx/README
+++ /dev/null
@@ -1,28 +0,0 @@
-
-'make' should build the whole thing.
-
-vtx2ascii is a simple converter, build out of the videotext sources.
-In fact only the main.c is my work, all other C code is just copyed
-from the videotext package. Start it without arguments to get help.
-
-vtx.cgi is a cgi script for converting vtx-pages on-the-fly. Lynx
-approved, with netscape 4 (style sheets required) you'll get colors.
-Uses vtx2ascii. You have to adjust two config lines at the top of
-the script. Usage is very simple, just copy it to your server's
-cgi-bin directory and point your browser to it. If you want, you
-can hide it with a Alias like this one:
- ScriptAlias /videotext /home/www/cgi/vtx.cgi # in srm.conf
-
-vtx.cgi delivers a correct last-modified header (=> cacheable pages)
-for fast browsing. For script hacking you probably want to turn this
-off...
-
-vtx.sh is a quite simple terminal browser. Expects to find vtx2ascii
-in $PATH. Terminal should understand ansi-colors (both linux-console
-and xterm do). Needs more than 25 lines...
-
-Known issues: can't show hidden text, 8-bit chars don't work (wrong
-mapping), probably more. It is'nt tested much, sort of prototype.
-
- Gerd
-
diff --git a/oldstuff/vtx/cct.h b/oldstuff/vtx/cct.h
deleted file mode 100644
index 6846771..0000000
--- a/oldstuff/vtx/cct.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef CCT_H_INCLUDED
-#define CCT_H_INCLUDED
-
-/* $Id: cct.h,v 1.1 1996/09/22 22:37:43 mb Exp mb $
- *
- * Copyright (c) 1994-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- */
-
-
-#include <sys/vtx.h>
-
-
-#define CCTOK 0
-#define CCTNOTFOUND 1
-#define CCTERR -1
-#define CCTEINVAL -2
-#define CCTEOPEN -3
-#define CCTEVERSION -4
-#define CCTENOTOPEN -5
-
-
-extern char *cct_device;
-
-int cct_open(int major, int minor, vtx_info_t *prg_info);
-void cct_close(void);
-int cct_clearpgbuf(int pgbuf);
-int cct_checkpage(int pgbuf);
-int cct_stop_dau(int pgbuf);
-int cct_reset_pgfound(int pgbuf);
-int cct_searchpage(int page, int hour, int minute, int pagemask, int pgbuf);
-int cct_getpage(int pgbuf, int x1, int y1, int x2, int y2, byte_t *buffer, vtx_pageinfo_t *info);
-int cct_putpage(int x1, int y1, int x2, int y2, const byte_t *buffer, const vtx_pageinfo_t *info);
-int cct_set_display(vtxdisp_t disp);
-int cct_clear_cache(void);
-int cct_set_virtual(int virtual);
-
-#endif /* CCT_H_INCLUDED */
diff --git a/oldstuff/vtx/fileio.c b/oldstuff/vtx/fileio.c
deleted file mode 100644
index 5c59237..0000000
--- a/oldstuff/vtx/fileio.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * fileio.c: Read font-bitmaps, write GIF-, PPM-, ASCII- & VTX-files
- *
- * $Id: fileio.c,v 1.5 1997/08/14 22:59:42 mb Exp mb $
- *
- * Copyright (c) 1995-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <dirent.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include "vtx_assert.h"
-#include "vtxdecode.h"
-#include "vtxtools.h"
-#include "misc.h"
-#include "fileio.h"
-
-#define VTXFONT_EXT ".vtxfont"
-typedef enum { FP_ARG, FP_ENV, FP_DEFAULT } fp_src_t;
-
-
-char *vtx_fontpath;
-
-
-static const int vtx_img_red[8] = { 0, 255, 0, 255, 0, 255, 0, 255 };
-static const int vtx_img_green[8] = { 0, 0, 255, 255, 0, 0, 255, 255 };
-static const int vtx_img_blue[8] = { 0, 0, 0, 0, 255, 255, 255, 255 };
-
-static const vtxpage_t *vtxpage;
-static const vtxbmfont_t *vtxfont;
-static int reveal;
-
-
-
-void
-export_ascii(FILE *file, const vtxpage_t *page, int show_hidden) {
- int pos;
-
- for (pos = 0; pos < VTX_PAGESIZE; pos++) {
- if (!(page->attrib[pos] & VTX_HIDDEN) || show_hidden) {
- fputc(vtx2iso_table[page->chr[pos]], file);
- } else {
- fputc(' ', file);
- }
- if (pos % 40 == 39)
- fputc('\n', file);
- }
-}
-
-
-void
-save_vtx(FILE *file, const byte_t *buffer, const vtx_pageinfo_t *info, int virtual) {
- fputs("VTXV4", file);
- fputc(info->pagenum & 0xff, file);
- fputc(info->pagenum / 0x100, file);
- fputc(info->hour & 0xff, file);
- fputc(info->minute & 0xff, file);
- fputc(info->charset & 0xff, file);
- fputc(info->delete << 7 | info->headline << 6 | info->subtitle << 5 | info->supp_header << 4 |
- info->update << 3 | info->inter_seq << 2 | info->dis_disp << 1 | info->serial << 0, file);
- fputc(info->notfound << 7 | info->pblf << 6 | info->hamming << 5 | (!!virtual) << 4 |
- 0 << 3, file);
- fwrite(buffer, 1, virtual ? VTX_VIRTUALSIZE : VTX_PAGESIZE, file);
-}
-
-
-int
-load_vtx(FILE *file, byte_t *buffer, vtx_pageinfo_t *info, int *virtual) {
- byte_t tmp_buffer[VTX_VIRTUALSIZE];
- vtx_pageinfo_t tmp_inf;
- unsigned char tmpstr[256];
- struct stat st;
- int pos, tmpbits, is_virtual = FALSE, is_sevenbit = FALSE;
-
- memset(tmp_buffer, ' ', sizeof(tmp_buffer));
- if (fscanf(file, "VTXV%c", tmpstr) != 1) {
- if (fstat(fileno(file), &st) < 0) {
- return LOADERR;
- /* The stupid INtv format doesn't use a signature, so we have to use the file-length instead */
- } else if (st.st_size != 1008) {
- return LOADEMAGIC;
- }
- memset(&tmp_inf, 0, sizeof(tmp_inf)); /* Read ITV-file */
- rewind(file);
- for (pos = 0; pos <= 23; pos++) {
- fseek(file, 2, SEEK_CUR);
- fread(tmp_buffer + pos * 40, 40, 1, file);
- }
- /* The first 8 bytes in the INtv-format usually contain garbage (or data I don't understand) */
- memset(tmp_buffer, vtx_mkparity(' '), 8 * sizeof(byte_t));
- for (pos = 0; pos <= 2; pos++) {
- tmpstr[pos] = tmp_buffer[8 + pos];
- vtx_chkparity(&tmpstr[pos]);
- }
- tmpstr[3] = '\0';
- sscanf(tmpstr, "%3x", &tmp_inf.pagenum);
- if (!vtx_chkpgnum(tmp_inf.pagenum, TRUE)) {
- tmp_inf.pagenum = 0;
- }
- if (virtual) {
- *virtual = FALSE;
- }
- } else {
- if (tmpstr[0] != '2' && tmpstr[0] != '3' && tmpstr[0] != '4') {
- return LOADEVERSION;
- }
- tmp_inf.pagenum = fgetc(file) + 0x100 * fgetc(file); /* Read VTX-file */
- tmp_inf.hour = fgetc(file);
- tmp_inf.minute = fgetc(file);
- tmp_inf.charset = fgetc(file);
- tmpbits = fgetc(file);
- tmp_inf.delete = !!(tmpbits & 0x80);
- tmp_inf.headline = !!(tmpbits & 0x40);
- tmp_inf.subtitle = !!(tmpbits & 0x20);
- tmp_inf.supp_header = !!(tmpbits & 0x10);
- tmp_inf.update = !!(tmpbits & 8);
- tmp_inf.inter_seq = !!(tmpbits & 4);
- tmp_inf.dis_disp = !!(tmpbits & 2);
- tmp_inf.serial = (tmpbits & 1);
- tmpbits = fgetc(file);
- tmp_inf.notfound = !!(tmpbits & 0x80);
- tmp_inf.pblf = !!(tmpbits & 0x40);
- tmp_inf.hamming = !!(tmpbits & 0x20);
- if (tmpstr[0] == '3') {
- is_virtual = TRUE;
- } else if (tmpstr[0] == '4') {
- is_virtual = !!(tmpbits & 0x10);
- is_sevenbit = !!(tmpbits & 8);
- }
- fread(tmp_buffer, is_virtual ? VTX_VIRTUALSIZE : VTX_PAGESIZE, 1, file);
- if (virtual) {
- *virtual = is_virtual;
- }
- }
- if (feof(file)) {
- return LOADECORRUPT;
- }
- if (ferror(file)) {
- return LOADERR;
- }
- if (buffer) {
- /* If file was saved in seven-bit mode, fake parity bit.
- * FIXME: Should we add parity to the virtual part too?
- */
- if (is_sevenbit) {
- for (pos = 0; pos < VTX_PAGESIZE; pos++) {
- tmp_buffer[pos] = vtx_mkparity(tmp_buffer[pos]);
- }
- }
- memcpy(buffer, tmp_buffer, is_virtual ? VTX_VIRTUALSIZE : VTX_PAGESIZE);
- memset(buffer, vtx_mkparity(7), 8);
- }
- if (info) {
- *info = tmp_inf;
- }
- return LOADOK;
-}
diff --git a/oldstuff/vtx/fileio.h b/oldstuff/vtx/fileio.h
deleted file mode 100644
index f2d55a0..0000000
--- a/oldstuff/vtx/fileio.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef VTXBITMAP_H_INCLUDED
-#define VTXBITMAP_H_INCLUDED
-
-/* $Id: fileio.h,v 1.3 1997/08/14 23:00:12 mb Exp mb $
- *
- * Copyright (c) 1995-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- */
-
-
-#include <stdio.h>
-#include "vtxdecode.h"
-
-
-#define BITS_PER_BYTE 8
-
-#define LOADOK 0
-#define LOADERR -1
-#define LOADEMAGIC -2
-#define LOADEVERSION -3
-#define LOADECORRUPT -4
-
-
-typedef struct {
- int xsize, ysize, bpr, bpc;
- unsigned char *bitmap;
-} vtxbmfont_t;
-
-
-extern char *vtx_fontpath;
-
-
-vtxbmfont_t * read_font(unsigned int xsize, unsigned int ysize);
-#ifdef GIF_SUPPORT
-void export_gif(FILE *file, const vtxpage_t *page, const vtxbmfont_t *font, int interlace,
- int show_hidden);
-#endif
-void export_ppm(FILE *file, const vtxpage_t *page, const vtxbmfont_t *font, int show_hidden);
-#ifdef PNG_SUPPORT
-int export_png(FILE *file, const vtxpage_t *page, const vtxbmfont_t *font, int interlace,
- int show_hidden, char ***msg_list);
-#endif
-void export_ascii(FILE *file, const vtxpage_t *page, int show_hidden);
-void save_vtx(FILE *file, const byte_t *buffer, const vtx_pageinfo_t *info, int virtual);
-int load_vtx(FILE *file, byte_t *buffer, vtx_pageinfo_t *info, int *virtual);
-
-#endif /* VTXBITMAP_H_INCLUDED */
diff --git a/oldstuff/vtx/main.c b/oldstuff/vtx/main.c
deleted file mode 100644
index 7890621..0000000
--- a/oldstuff/vtx/main.c
+++ /dev/null
@@ -1,160 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <getopt.h>
-
-#include "fileio.h"
-
-unsigned char buffer[65536];
-vtxpage_t page;
-int virtual;
-
-#define OUT_ASCII 1
-#define OUT_ANSI 2
-#define OUT_HTML 3
-
-void
-export_ansi_ascii(FILE *file, const vtxpage_t *page, int show_hidden)
-{
- int pos;
- int bg,fg,lbg,lfg,hidden;
-
- lfg = lbg = -1;
- for (pos = 0; pos < VTX_PAGESIZE; pos++) {
- fg = page->attrib[pos] & VTX_COLMASK;
- bg = (page->attrib[pos] & VTX_BGMASK) >> 3;
- hidden = (page->attrib[pos] & VTX_HIDDEN) && !show_hidden;
- if (fg != lfg || bg != lbg) {
- fprintf(file,"\033[%d;%d;1m",fg+30,bg+40);
- lfg = fg;
- lbg = bg;
- }
- fputc(hidden ? ' ' : vtx2iso_table[page->chr[pos]], file);
- if (pos % 40 == 39) {
- lfg = lbg = -1;
- fprintf(file,"\033[0m\n");
- }
- }
-}
-
-void
-export_html(FILE *file, const vtxpage_t *page, int show_hidden)
-{
- static const char *color[] = {
- "black", "red", "green", "yellow",
- "blue", "magenta", "cyan", "white"
- };
-
- int pos;
- int bg,fg,lbg,lfg,hidden;
- int used[64];
-
- /* scan for used colors */
- memset(used,0,sizeof(used));
- for (pos = 0; pos < VTX_PAGESIZE; pos++) {
- fg = page->attrib[pos] & VTX_COLMASK;
- bg = (page->attrib[pos] & VTX_BGMASK) >> 3;
- used[fg*8+bg] = 1;
- }
-
- /* print styles */
- fprintf(file,"<style type=\"text/css\"> <!--\n");
- for (bg = 0; bg < 8; bg++) {
- for (fg = 0; fg < 8; fg++) {
- if (used[fg*8+bg]) {
- fprintf(file,"font.c%d { color: %s; background-color: %s; font-weight: bold }\n",
- fg*8+bg,color[fg],color[bg]);
- }
- }
- }
- fprintf(file,"//--> </style>\n");
-
- /* print page */
- fprintf(file,"<pre>\n");
- lfg = lbg = -1;
- for (pos = 0; pos < VTX_PAGESIZE; pos++) {
- fg = page->attrib[pos] & VTX_COLMASK;
- bg = (page->attrib[pos] & VTX_BGMASK) >> 3;
- hidden = (page->attrib[pos] & VTX_HIDDEN) && !show_hidden;
- if (fg != lfg || bg != lbg) {
- if (lfg != -1 || lbg != -1)
- fprintf(file,"</font>");
- fprintf(file,"<font class=c%d>",fg*8+bg);
- lfg = fg;
- lbg = bg;
- }
- fputc(hidden ? ' ' : vtx2iso_table[page->chr[pos]], file);
- if (pos % 40 == 39) {
- lfg = lbg = -1;
- fprintf(file,"</font>\n");
- }
- }
- fprintf(file,"</pre>\n");
-}
-
-void
-usage(char *prog)
-{
- fprintf(stderr,"usage: %s [ options ] vtx-file\n",prog);
- fprintf(stderr,
- "options: \n"
- " -a dump plain ascii (default)\n"
- " -c dump colored ascii (using ansi control sequences).\n"
- " -h dump html\n");
- exit(1);
-}
-
-int
-main(int argc, char *argv[])
-{
- FILE *fp;
- char *prog;
- int c,output=OUT_ASCII;
-
- if (NULL != (prog = strrchr(argv[0],'/')))
- prog++;
- else
- prog = argv[0];
-
- for (;;) {
- if (-1 == (c = getopt(argc, argv, "ach")))
- break;
- switch (c) {
- case 'a':
- output=OUT_ASCII;
- break;
- case 'c':
- output=OUT_ANSI;
- break;
- case 'h':
- output=OUT_HTML;
- break;
- default:
- usage(prog);
- }
- }
- if (optind+1 != argc)
- usage(prog);
-
- if (NULL == (fp = fopen(argv[optind],"r"))) {
- fprintf(stderr,"%s: %s: %s\n",prog,argv[optind],strerror(errno));
- exit(1);
- }
-
- load_vtx(fp, buffer, &page.info, &virtual);
- decode_page(buffer, &page, 0, 23);
- switch(output) {
- case OUT_ASCII:
- export_ascii(stdout, &page, 0);
- break;
- case OUT_ANSI:
- export_ansi_ascii(stdout, &page, 0);
- break;
- case OUT_HTML:
- export_html(stdout, &page, 0);
- break;
- }
- return 0;
-}
diff --git a/oldstuff/vtx/misc.h b/oldstuff/vtx/misc.h
deleted file mode 100644
index 8039941..0000000
--- a/oldstuff/vtx/misc.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef MISC_H_INCLUDED
-#define MISC_H_INCLUDED
-
-/* $Id: misc.h,v 1.1 1996/10/14 21:37:00 mb Exp mb $
- *
- * Copyright (c) 1994-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- */
-
-#include <limits.h>
-
-
-#define VTXVERSION "0.6.970815"
-#define VTXNAME "videotext"
-#define VTXCLASS "Videotext"
-#define VTXWINNAME "VideoteXt"
-
-#define REQ_MAJOR 1
-#define REQ_MINOR 6
-
-
-#ifndef MIN
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#endif
-#define SIGN(a) ((a) < 0 ? -1 : ((a) > 0 ? 1 : 0))
-#define STRINGIFY_NOMACRO(str) #str
-#define STRINGIFY(str) STRINGIFY_NOMACRO(str)
-#define NELEM(a) (sizeof(a) / sizeof(*(a)))
-
-#ifndef FALSE
-#define FALSE 0
-#define TRUE 1
-#endif
-
-/* It's unbelievable that some systems are unable to provide the most basic ANSI-C features */
-#ifndef INT_MAX
-#define INT_MAX 2147483647
-#endif
-
-#endif /* MISC_H_INCLUDED */
diff --git a/oldstuff/vtx/sys/vtx.h b/oldstuff/vtx/sys/vtx.h
deleted file mode 100644
index c1b4fec..0000000
--- a/oldstuff/vtx/sys/vtx.h
+++ /dev/null
@@ -1,151 +0,0 @@
-#ifndef VTX_H_INCLUDED
-#define VTX_H_INCLUDED
-
-/* $Id: vtx.h,v 1.6 1997/08/09 00:40:49 mb Exp mb $
- *
- * Copyright (c) 1994-97 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- *
- */
-
-
-typedef unsigned char byte_t;
-
-
-/* videotext ioctls
- */
-#define VTXIOCGETINFO 0x7101 /* get version of driver & capabilities of vtx-chipset */
-#define VTXIOCCLRPAGE 0x7102 /* clear page-buffer */
-#define VTXIOCCLRFOUND 0x7103 /* clear bits indicating that page was found */
-#define VTXIOCPAGEREQ 0x7104 /* search for page */
-#define VTXIOCGETSTAT 0x7105 /* get status of page-buffer */
-#define VTXIOCGETPAGE 0x7106 /* get contents of page-buffer */
-#define VTXIOCSTOPDAU 0x7107 /* stop data acquisition unit */
-#define VTXIOCPUTPAGE 0x7108 /* display page on TV-screen */
-#define VTXIOCSETDISP 0x7109 /* set TV-mode */
-#define VTXIOCPUTSTAT 0x710a /* set status of TV-output-buffer */
-#define VTXIOCCLRCACHE 0x710b /* clear cache on VTX-interface (if avail.) */
-#define VTXIOCSETVIRT 0x710c /* turn on virtual mode (this disables TV-display) */
-#define VTXIOCGETQUAL 0x710d /* get current video/videotext quality */
-
-
-/* definitions for VTXIOCGETINFO
- */
-#define SAA5243 0
-#define SAA5246 1
-#define SAA5249 2
-#define SAA5248 3
-#define XSTV5346 4
-
-typedef struct {
- int version_major, version_minor; /* version of driver; if version_major changes, driver */
- /* is not backward compatible!!! CHECK THIS!!! */
- int numpages; /* number of page-buffers of vtx-chipset */
- int cct_type; /* type of vtx-chipset (SAA5243, SAA5246, SAA5248 or
- * SAA5249) */
-} vtx_info_t;
-
-
-/* definitions for VTXIOC{CLRPAGE,CLRFOUND,PAGEREQ,GETSTAT,GETPAGE,STOPDAU,PUTPAGE,SETDISP}
- */
-#define MIN_UNIT (1<<0)
-#define MIN_TEN (1<<1)
-#define HR_UNIT (1<<2)
-#define HR_TEN (1<<3)
-#define PG_UNIT (1<<4)
-#define PG_TEN (1<<5)
-#define PG_HUND (1<<6)
-#define PGMASK_MAX (1<<7)
-#define PGMASK_PAGE (PG_HUND | PG_TEN | PG_UNIT)
-#define PGMASK_HOUR (HR_TEN | HR_UNIT)
-#define PGMASK_MINUTE (MIN_TEN | MIN_UNIT)
-
-typedef struct {
- int page; /* number of requested page (hexadecimal) */
- int hour; /* requested hour (hexadecimal) */
- int minute; /* requested minute (hexadecimal) */
- int pagemask; /* mask defining which values of the above are set */
- int pgbuf; /* buffer where page will be stored */
- int start; /* start of requested part of page */
- int end; /* end of requested part of page */
- void* buffer; /* pointer to beginning of destination buffer */
-} vtx_pagereq_t;
-
-
-/* definitions for VTXIOC{GETSTAT,PUTSTAT}
- */
-#define VTX_PAGESIZE (40 * 24)
-#define VTX_VIRTUALSIZE (40 * 49)
-
-typedef struct {
- int pagenum; /* number of page (hexadecimal) */
- int hour; /* hour (hexadecimal) */
- int minute; /* minute (hexadecimal) */
- int charset; /* national charset */
- unsigned delete : 1; /* delete page (C4) */
- unsigned headline : 1; /* insert headline (C5) */
- unsigned subtitle : 1; /* insert subtitle (C6) */
- unsigned supp_header : 1; /* suppress header (C7) */
- unsigned update : 1; /* update page (C8) */
- unsigned inter_seq : 1; /* interrupted sequence (C9) */
- unsigned dis_disp : 1; /* disable/suppress display (C10) */
- unsigned serial : 1; /* serial mode (C11) */
- unsigned notfound : 1; /* /FOUND */
- unsigned pblf : 1; /* PBLF */
- unsigned hamming : 1; /* hamming-error occured */
-} vtx_pageinfo_t;
-
-
-/* definitions for VTXIOCSETDISP
- */
-typedef enum { DISPOFF, DISPNORM, DISPTRANS, DISPINS, INTERLACE_OFFSET } vtxdisp_t;
-
-
-/* definitions for VTXIOCGETQUAL
- */
-typedef struct {
- int video;
- int videotext;
-} vtx_quality_t;
-
-
-/* tuner ioctls
- */
-#define TUNIOCGETINFO 0x7201 /* get version of driver & capabilities of tuner */
-#define TUNIOCRESET 0x7202 /* reset tuner */
-#define TUNIOCSETFREQ 0x7203 /* set tuning frequency (unit: kHz) */
-#define TUNIOCGETFREQ 0x7204 /* get tuning frequency (unit: kHz) */
-#define TUNIOCSETPROG 0x7205 /* set tuning program */
-#define TUNIOCGETPROG 0x7206 /* get tuning program */
-
-
-typedef struct {
- int version_major, version_minor; /* version of driver; if version_major changes, driver */
- /* is not backward compatible!!! CHECK THIS!!! */
- unsigned freq : 1; /* tuner can be set to arbitrary frequency */
- unsigned prog : 1; /* tuner stores several programs */
- unsigned scan : 1; /* tuner supports scanning */
- unsigned autoscan : 1; /* tuner supports scanning with automatic stop */
- unsigned afc : 1; /* tuner supports AFC */
- unsigned dummy1, dummy2, dummy3, dummy4, dummy5, dummy6, dummy7, dummy8, dummy9, dummy10,
- dummy11 : 1;
- int dummy12, dummy13, dummy14, dummy15, dummy16, dummy17, dummy18, dummy19;
-} tuner_info_t;
-
-
-/* i2c ioctls
- */
-
-#define I2CIOCWRITE 0x7300 /* write raw data to I²C-bus (needs RAW_I2C_SUPPORT) */
-#define I2CIOCREAD 0x7301 /* read raw data from I²C-bus (needs RAW_I2C_SUPPORT) */
-
-
-/* definitions for I2CIOC{WRITE,READ}
- */
-typedef struct {
- int adr;
- int count;
- byte_t *buffer;
-} i2c_raw_t;
-
-#endif /* VTX_H_INCLUDED */
diff --git a/oldstuff/vtx/vtx.cgi b/oldstuff/vtx/vtx.cgi
deleted file mode 100644
index c8b94af..0000000
--- a/oldstuff/vtx/vtx.cgi
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/usr/bin/perl
-use CGI;
-
-# config
-$SPOOL="/home/kraxel/vtx";
-$VTX2ASCII="/home/kraxel/bin/vtx2ascii";
-
-#######################################################################
-# create time string
-
-@WEEK = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
-@MON = ('Jan','Feb','Mar','Apr','May','Jun',
- 'Jul','Aug','Sep','Oct','Nov','Dec');
-
-sub time2str {
- @tm = gmtime($_[0]);
- sprintf ("%s, %02d %s %04d %02d:%02d:%02d GMT",
- $WEEK[$tm[6]],$tm[3],$MON[$tm[4]],$tm[5]+1900,$tm[2],$tm[1],$tm[0]);
-}
-
-#######################################################################
-# helper functions
-
-sub start_page {
- local($title,$file) = @_;
-
- if ($file ne "") {
- @inode = stat $file;
- printf("Last-modified: %s\n",time2str(@inode[9]));
- }
- print <<EOF;
-Content-Type: text/html
-
-<html>
-<head>
-<title>videotext: $title</title>
-</html>
-<body bgcolor=white color=black link=royalblue vlink=darkblue>
-EOF
-}
-
-sub finish_page {
- print "</body></html>\n";
-}
-
-sub panic {
- local($text) = @_;
-
- start_page("PANIC");
- print "<h2>PANIC</h2>$text";
- &finish_page;
- exit;
-}
-
-sub addlink() {
- local($nr) = @_;
-
- $links{$nr} = 1;
- return $nr;
-}
-
-#######################################################################
-# main
-
-$cgi = new CGI;
-
-if ($cgi->path_info eq "" || $cgi->path_info =~ /^\/[^\/]+$/) {
- print $cgi->redirect($cgi->url . $cgi->path_info . "/");
- exit;
-}
-($dummy,$station,$page) = split(/\//,$cgi->path_info);
-
-# entry page - station list
-if ($station !~ /\S/) {
- opendir DIR, $SPOOL || panic("can't open dir $SPOOL: $@");
- &start_page("station list",$SPOOL);
- print "<h2>station list</h2>\n<ul>\n";
- foreach $file (sort readdir(DIR)) {
- next if ($file =~ /^\./);
- next unless -d "$SPOOL/$file";
- $url=$file;
- $url=~s/ /+/g;
- print "<li><a href=\"$url/\">$file</a>\n";
- }
- print "</ul>\n";
- &finish_page;
- exit;
-} else {
- $station =~ s/\+/ /g;
-}
-
-# station dir - spage list
-if ($page !~ /\S/) {
- opendir DIR, "$SPOOL/$station" ||
- panic("can't open dir $SPOOL/$station: $@");
- &start_page("$station - page list","$SPOOL/$station");
- print "<h2>$station - page list</h2>\n\n";
- print "<a href=\"../\">[station list]</a><hr noshade><ul>\n";
- foreach $file (sort readdir(DIR)) {
- next unless ($file =~ /\.vtx/);
- print "<li><a href=\"$file\">$file</a>\n";
- }
- print "</ul>\n";
- &finish_page;
- exit;
-}
-
-# print page
-unless (-f "$SPOOL/$station/$page") {
- # sub-page check
- if ($page =~ s/_00.vtx/_01.vtx/ && -f "$SPOOL/$station/$page") {
- print $cgi->redirect($cgi->url . "/$station/$page");
- exit;
- }
- panic("$SPOOL/$station/$page: not found");
-}
-
-# read
-undef $/;
-open VTX,"$VTX2ASCII -h \"$SPOOL/$station/$page\" |" ||
- panic("can't run $VTX2ASCII: $@");
-$data = <VTX>;
-close VTX;
-
-# look for links
-$data =~ s/(\d\d\d)/&addlink($1)/eg;
-
-# print
-start_page("$station - $page","$SPOOL/$station/$page");
-print "<h2>$station - $page</h2>\n";
-print "<a href=\"../\">[station list]</a> &nbsp; ";
-print "<a href=\"./\">[page list]</a> &nbsp; ";
-if ($page =~ /(\d\d\d)_(\d\d).vtx/ && $2 > 0) {
- printf "<a href=\"%03d_%02d.vtx\">[prev subpage]</a> &nbsp; ",$1,$2-1;
- printf "<a href=\"%03d_%02d.vtx\">[next subpage]</a> &nbsp; ",$1,$2+1;
-}
-print "<br>\n";
-foreach $item (sort keys %links) {
- print "<a href=\"${item}_00.vtx\">$item</a>\n";
-}
-print "<hr noshade>\n";
-print "<table border=0 cellspacing=0 cellpadding=10 bgcolor=\"c0c0c0\"><tr><td>\n";
-print "$data";
-print "</td></tr></table>\n";
-&finish_page;
-exit;
diff --git a/oldstuff/vtx/vtx.sh b/oldstuff/vtx/vtx.sh
deleted file mode 100644
index 4b65a9e..0000000
--- a/oldstuff/vtx/vtx.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-
-if test ! -f 100_00.vtx; then
- echo "100_00.vtx not found, chdir to the station directory first"
- exit
-fi
-
-echo "keys:"
-echo " <number>return jump to page <number>"
-echo " return jump to next (sub-) page"
-echo " ^C quit"
-echo
-echo "hit return to begin"
-read key
-
-current=100
-sub="00"
-timestamp="/tmp/.vtx-$$"
-rm -rf $timestamp
-set -o noclobber
-> $timestamp || exit 1
-set +o noclobber
-
-cleanup() {
- rm -f $timestamp
-}
-trap cleanup EXIT
-
-display() {
- touch $timestamp
- echo -e "\033[H"
- vtx2ascii -c "${current}_${sub}.vtx"
- echo
- echo -n "$current"
- test "$sub" != "00" && echo -n "/$sub"
- echo -n "> "
-}
-
-alarm() {
- if test "${current}_${sub}.vtx" -nt $timestamp; then
- display
- fi
-}
-trap alarm SIGALRM || exit
-(while kill -SIGALRM $$; do sleep 1; done)&
-
-while true; do
- clear
- test ! -f "${current}_${sub}.vtx" && sub="00";
- test ! -f "${current}_${sub}.vtx" && sub="01";
- display
- while true; do read new && break; done
- if test "$new" = ""; then
- if test "$sub" != "00"; then
- sub=`printf '%02d' $[$sub+1]`;
- else
- current=`printf '%02d' $[$current+1]`;
- fi
- else
- current="$new"
- sub="00"
- fi
-done
-
diff --git a/oldstuff/vtx/vtx_assert.h b/oldstuff/vtx/vtx_assert.h
deleted file mode 100644
index e4dce2a..0000000
--- a/oldstuff/vtx/vtx_assert.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $Id: vtx_assert.h,v 1.1 1996/10/01 21:25:20 mb Exp mb $
- *
- * Copyright (c) 1994-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- */
-
-/* This header file provides an alternative to the standard assert: You can
- * choose wheter or not your program should dump core when an assertion
- * fails. If you don't define ASSERT_DUMP_CORE, your program will print the
- * `failed assertion'-message and call exit(1) without a coredump.
- *
- * The reason for this is that you can lock up your X-server when assert
- * calls abort() at the wrong time (probably during grabs). If you can't
- * login on a serial line or over the network to kill the X-server, you will
- * have to reboot your machine (I once experienced this with another
- * application -- not even XFree's ZapServer-key did work)!
- *
- * There has been a report that in VideoteXt an assertion fails when a
- * station broadcasts a multipage-extension-table. I wasn't able to
- * reproduce this and I don't think that this was the reason for the abort,
- * but I decided to use this alternative assert just to make sure VideoteXt
- * doesn't do bad things[tm] to your machine :-)
- *
- * But if you get `failed assertion'-messages, *please* report them to me!
- */
-
-#include <stdio.h>
-
-#undef assert
-#undef __assert
-
-#ifdef NDEBUG
-#define assert(ignore) ((void) 0)
-#else
-
-#define assert(exp) ((void) ((exp) ? 0 : __assert (#exp, __FILE__, __LINE__)))
-
-#ifdef ASSERT_DUMP_CORE
-#define __assert(exp, file, lineno) \
- (fprintf (stderr, "%s:%u: failed assertion `%s'\n", file, lineno, exp), abort (), 0)
-#else
-#define __assert(exp, file, lineno) \
- (fprintf (stderr, "%s:%u: failed assertion `%s'\nTerminating\n", file, lineno, exp), \
- exit (1), 0)
-#endif
-#endif
diff --git a/oldstuff/vtx/vtxdecode.c b/oldstuff/vtx/vtxdecode.c
deleted file mode 100644
index 7fc4552..0000000
--- a/oldstuff/vtx/vtxdecode.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * vtxdecode.c: Routines to decode VTX-pages & convert from magic-cookie-VTX-attributes to
- * 'normal' attributes usable by x_vtx_redraw()
- *
- * $Id: vtxdecode.c,v 1.2 1997/03/26 00:16:54 mb Exp mb $
- *
- * Copyright (c) 1994-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- *
- */
-
-#include <stdio.h>
-#include "vtx_assert.h"
-#include "cct.h"
-#include "vtxtools.h"
-#include "misc.h"
-#include "vtxdecode.h"
-
-
-/* Translation tables to convert VTX font-layout (with different national charsets) to
- * X-Window font layout
- */
-const chr_t cct2vtx_table[8][96] = {
- /* English */
- { 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
- 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
- 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
- 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,
- 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
- 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f },
- /* French */
- { 0x20,0x21,0x22,0Xc0,0Xc1,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
- 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
- 0Xc2,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
- 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0Xc3,0Xc4,0Xc5,0Xc6,0x5f,
- 0Xc7,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
- 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0Xc8,0Xc9,0Xca,0Xcb,0x7f },
- /* Swedish */
- { 0x20,0x21,0x22,0X5f,0Xcc,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
- 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
- 0Xcd,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
- 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0Xce,0Xcf,0Xd0,0Xd1,0Xd2,
- 0Xc0,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
- 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0Xd3,0Xd4,0Xd5,0Xd6,0x7f },
- /* Unknown */
- { 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
- 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
- 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
- 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,
- 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
- 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f },
- /* German */
- { 0x20,0x21,0x22,0X5f,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
- 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
- 0Xd7,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
- 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0Xce,0Xcf,0Xd1,0Xd8,0Xd2,
- 0Xd9,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
- 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0Xd3,0Xd4,0Xd6,0Xda,0x7f },
- /* Spanish */
- { 0x20,0x21,0x22,0Xcb,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
- 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
- 0Xcb,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
- 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0Xde,0Xc0,0Xdf,0Xe2,0Xe3,
- 0Xdc,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
- 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0Xd6,0Xdd,0Xc7,0Xc2,0x7f },
- /* Italian */
- { 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
- 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
- 0Xc0,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
- 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0Xd9,0Xcb,0x5d,0x5e,0x5f,
- 0Xc5,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
- 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0Xc2,0Xe0,0Xc7,0Xe1,0x7f },
- /* Unknown */
- { 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
- 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
- 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
- 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,
- 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
- 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f }
-};
-
-
-/* Translation table to convert VideoteXt-X-Window font-layout to ISO 8859-1.
- * You should have a complete ISO-Font when editing the following table!
- */
-const char vtx2iso_table[256] =
- " "
- " !\"£$%&'()*+,-./0123456789:;<=>?"
- "@ABCDEFGHIJKLMNOPQRSTUVWXYZ<½>^#"
- "-abcdefghijklmnopqrstuvwxyz¼|¾÷#"
- " "
- " "
- "éïàëêùîèâôûç¤ÉÄÖÅÜ_äöåü§^°ß¡¿ñáí"
- "òìóú ? ";
-/* The same table with all characters mapped to lowercase */
-const char vtx2iso_lc_table[256] =
- " "
- " !\"£$%&'()*+,-./0123456789:;<=>?"
- "@abcdefghijklmnopqrstuvwxyz<½>^#"
- "-abcdefghijklmnopqrstuvwxyz¼|¾÷#"
- " "
- " "
- "éïàëêùîèâôûç¤Éäöåü_äöåü§^°ß¡¿ñáí"
- "òìóú ? ";
-/* All word delimiters in videotext's subset of ISO 8859-1 */
-const char vtxiso_worddelim[] = " !\"£$%&'()*+,-./:;<=>?@<½>^#-¼|¾÷¤_§^°¡¿";
-
-
-/* Decode lines y1 - y2 of original VTX-page in pgbuf to vtxpage usable by VideoteXt using
- * national charset lang
- * Return VTXOK if OK, VTXEINVAL if start-/end-line invalid
- */
-int
-decode_page(const byte_t *pgbuf, vtxpage_t *page, int y1, int y2) {
- int line, col, pos, graphics, grhold, doubleht, nextattr = 0;
- static int lang;
- attrib_t *lastattr, default_attrib = 7, next_attrib;
- chr_t chr, *lastchr, default_chr = ' ';
-
- if (y1 > y2 || y1 < 0 || y2 > 23)
- return VTXEINVAL;
-
- if (!page->info.hamming)
- lang = page->info.charset;
-
- pos = y1 * 40;
- doubleht = 0;
- for (line = y1; line <= y2; line++) {
- lastchr = &default_chr;
- lastattr = &default_attrib;
- graphics = grhold = 0;
- if (doubleht) {
- for (col = 0; col <= 39; col++) {
- if (page->attrib[pos - 40] & VTX_DOUBLE1) {
- page->chr[pos] = page->chr[pos - 40];
- page->chr[pos - 40] = ' ';
- page->attrib[pos] = (page->attrib[pos - 40] & ~VTX_DOUBLE1) | VTX_DOUBLE2;
- } else {
- page->chr[pos] = ' ';
- page->attrib[pos] = page->attrib[pos - 40];
- }
- pos++;
- }
- doubleht = 0;
- } else {
- for (col = 0; col <= 39; col++) {
- chr = pgbuf[pos];
- if (!vtx_chkparity(&chr)) {
- page->chr[pos] = 254; /* Parity error */
- page->attrib[pos] = 7;
- } else if (chr >= 32 && chr <= 127) { /* Normal character */
- page->attrib[pos] = *lastattr;
- if (!graphics || (chr >= 64 && chr <= 95)) {
- page->chr[pos] = cct2vtx_table[lang][chr - 32];
- } else {
- page->chr[pos] = chr + (chr >= 96 ? 64 : 96);
- }
- } else {
- page->chr[pos] = ((grhold && graphics ) ? *lastchr : ' ');
- if (chr <= 7) { /* Set alphanumerics-color */
- page->attrib[pos] = *lastattr;
- next_attrib = (*lastattr & ~(VTX_COLMASK | VTX_HIDDEN)) + chr;
- nextattr = 1;
- graphics = 0;
- } else if (chr == 8 || chr == 9) { /* Flash on/off */
- page->attrib[pos] = (*lastattr & ~VTX_FLASH) + VTX_FLASH * (chr == 8);
- } else if (chr == 10 || chr == 11) { /* End/start box */
- page->attrib[pos] = (*lastattr & ~VTX_BOX) + VTX_BOX * (chr == 11);
- } else if (chr == 12 || chr == 13) { /* Normal/double height */
- page->attrib[pos] = (*lastattr & ~VTX_DOUBLE1) + VTX_DOUBLE1 * (chr == 13);
- if (chr == 13)
- doubleht = 1;
- } else if (chr == 14 || chr == 15 || chr == 27) { /* SO, SI, ESC (ignored) */
- page->attrib[pos] = *lastattr;
- } else if (chr >= 16 && chr <= 23) { /* Set graphics-color */
- page->attrib[pos] = *lastattr;
- next_attrib = (*lastattr & ~(VTX_COLMASK | VTX_HIDDEN)) + chr - 16;
- nextattr = 1;
- graphics = 1;
- } else if (chr == 24) { /* Conceal display */
- page->attrib[pos] = *lastattr | VTX_HIDDEN;
- } else if (chr == 25 || chr == 26) { /* Contiguous/separated graphics */
- page->attrib[pos] = (*lastattr & ~VTX_GRSEP) + VTX_GRSEP * (chr == 26);
- } else if (chr == 28) { /* Black background */
- page->attrib[pos] = *lastattr & ~VTX_BGMASK;
- } else if (chr == 29) { /* Set background */
- page->attrib[pos] = (*lastattr & ~VTX_BGMASK) + ((*lastattr & VTX_COLMASK) << 3);
- } else if (chr == 30 || chr == 31) { /* Hold/release graphics */
- page->attrib[pos] = *lastattr;
- grhold = (chr == 30);
- if (grhold && graphics)
- page->chr[pos] = *lastchr;
- } else {
- assert(0);
- }
- }
- lastchr = page->chr + pos;
- if (nextattr) {
- lastattr = &next_attrib;
- nextattr = 0;
- } else {
- lastattr = page->attrib + pos;
- }
- pos++;
- }
- }
- }
- return VTXOK;
-}
diff --git a/oldstuff/vtx/vtxdecode.h b/oldstuff/vtx/vtxdecode.h
deleted file mode 100644
index b56bf75..0000000
--- a/oldstuff/vtx/vtxdecode.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef VTXDECODE_H_INCLUDED
-#define VTXDECODE_H_INCLUDED
-
-/* $Id: vtxdecode.h,v 1.3 1997/03/26 00:17:34 mb Exp mb $
- *
- * Copyright (c) 1994-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- */
-
-
-#include <sys/vtx.h>
-
-
-#define VTXOK 0
-#define VTXEINVAL -1
-#define VTXEPARITY -2
-
-#define VTX_COLMASK 0x07 /* I rely on the position of the VTX_COLMASK & VTX_BGMASK bits! */
-#define VTX_BGMASK (0x07 << 3)
-#define VTX_GRSEP (1 << 7)
-#define VTX_HIDDEN (1 << 8)
-#define VTX_BOX (1 << 9)
-#define VTX_FLASH (1 << 10)
-#define VTX_DOUBLE1 (1 << 11)
-#define VTX_DOUBLE2 (1 << 12)
-#define VTX_INVERT (1 << 13)
-#define VTX_DOUBLE (VTX_DOUBLE1 | VTX_DOUBLE2)
-
-
-typedef unsigned char chr_t;
-typedef unsigned short attrib_t;
-typedef struct {
- chr_t chr[VTX_PAGESIZE];
- attrib_t attrib[VTX_PAGESIZE];
- vtx_pageinfo_t info;
-} vtxpage_t;
-
-
-extern const chr_t cct2vtx_table[][96];
-extern const char vtx2iso_table[], vtx2iso_lc_table[], vtxiso_worddelim[];
-
-
-int decode_page(const byte_t *pgbuf, vtxpage_t *page, int y1, int y2);
-
-#endif /* VTXDECODE_H_INCLUDED */
diff --git a/oldstuff/vtx/vtxtools.c b/oldstuff/vtx/vtxtools.c
deleted file mode 100644
index 40c9297..0000000
--- a/oldstuff/vtx/vtxtools.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * vtxtools.c: Misceallaneous routines for VideoteXt (parity checking, handling of hexadecimal
- * page-numbers)
- *
- * $Id: vtxtools.c,v 1.1 1996/10/14 21:36:23 mb Exp mb $
- *
- * Copyright (c) 1994-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- *
- */
-
-#include <sys/vtx.h>
-#include "misc.h"
-#include "vtxtools.h"
-
-
-static byte_t parity_table[256];
-static int init_done;
-
-
-
-static void
-tools_init(void) {
- int pos, val, bit;
-
- for (pos = 0; pos <= 255; pos++) { /* Set up parity_table: If (parity_table[foo] & 0x80), */
- bit = 0; /* foo has odd number of bits set */
- val = pos;
- while (val) { /* Count number of set bits in val; see K&R, Exercise 2-9 */
- bit ^= 0x80;
- val &= val - 1;
- }
- parity_table[pos] = bit | 0x7f;
- }
- /* parity_table is also used for hamming decoding: If (parity_table[foo] & 0x40), foo has
- * more than one bit-error and can't be corrected; otherwise the correct(ed) value is
- * parity_table[foo] & 0xf
- */
- for (pos = 0; pos <= 15; pos++) {
- val = ( !(pos & 1) ^ !!(pos & 4) ^ !!(pos & 8)) << 0 | !!(pos & 1) << 1 |
- ( !(pos & 1) ^ !!(pos & 2) ^ !!(pos & 8)) << 2 | !!(pos & 2) << 3 |
- ( !(pos & 1) ^ !!(pos & 2) ^ !!(pos & 4)) << 4 | !!(pos & 4) << 5 |
- (!!(pos & 2) ^ !!(pos & 4) ^ !!(pos & 8)) << 6 | !!(pos & 8) << 7;
- for (bit = 0; bit <= 8; bit++) {
- parity_table[val ^ ((1 << bit) & 0xff)] &= (0x80 | pos);
- }
- }
- init_done = TRUE;
-}
-
-
-/* Check parity of *val (parity bit is bit 7, odd parity)
- * Clear bit 7 of *val if parity OK & return TRUE, FALSE otherwise
- */
-int
-vtx_chkparity(byte_t *val) {
- if (!init_done)
- tools_init();
- if (parity_table[*val] & 0x80) {
- *val &= 0x7f;
- return TRUE;
- } else return FALSE;
-}
-
-
-/* Add odd parity bit to val
- */
-byte_t
-vtx_mkparity(byte_t val) {
- if (!init_done)
- tools_init();
- val &= 0x7f;
- return val | ((parity_table[val] & 0x80) ? 0 : 128);
-}
-
-
-/* Check hamming-encoding of val, return decoded value if OK, -1 otherwise
- */
-int
-vtx_chkhamming(byte_t val) {
- if (!init_done)
- tools_init();
- if (parity_table[val] & 0x40) {
- return -1;
- } else {
- return parity_table[val] & 0xf;
- }
-}
-
-
-/* Increase page-number. Skip over hexadecimal pages
- */
-int
-inc_vtxpage(int page) {
- page++;
- if ((page & 0xf) >= 0xa)
- page = (page & ~0xf) + 0x10;
- if ((page & 0xf0) >= 0xa0)
- page = (page & ~0xff) + 0x100;
- if (page >= 0x899)
- page = 0x100;
- return page;
-}
-
-
-/* Decrease page-number. Skip over hexadecimal pages
- */
-int
-dec_vtxpage(int page) {
- page--;
- if ((page & 0xf) >= 0xa)
- page = (page & ~0xf) + 9;
- if ((page & 0xf0) >= 0xa0)
- page = (page & ~0xff) + 0x99;
- if (page < 0x100)
- page = 0x899;
- return page;
-}
-
-
-int
-vtx_hex2dec(int pgnum) {
- return (pgnum / 0x100) * 100 + ((pgnum / 0x10) % 0x10) * 10 + (pgnum % 0x10);
-}
-
-
-int
-vtx_dec2hex(int pgnum) {
- return (pgnum / 100) * 0x100 + ((pgnum / 10) % 10) * 0x10 + (pgnum % 10);
-}
-
-
-int
-vtx_chkpgnum(int pgnum, int hex_ok) {
- if (hex_ok) {
- return (pgnum >= 0x100 && pgnum <= 0x8ff);
- } else {
- return (pgnum >= 0x100 && pgnum <= 0x899 && (pgnum & 0xff) <= 0x99 && (pgnum & 0xf) <= 9);
- }
-}
diff --git a/oldstuff/vtx/vtxtools.h b/oldstuff/vtx/vtxtools.h
deleted file mode 100644
index b819d84..0000000
--- a/oldstuff/vtx/vtxtools.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef VTXTOOLS_H_INCLUDED
-#define VTXTOOLS_H_INCLUDED
-
-/* $Id: vtxtools.h,v 1.1 1996/10/14 21:36:25 mb Exp mb $
- *
- * Copyright (c) 1994-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
- * Read COPYING for more information
- */
-
-
-#include <sys/vtx.h>
-
-
-int vtx_chkparity(byte_t *val);
-byte_t vtx_mkparity(byte_t val);
-int vtx_chkhamming(byte_t val);
-int inc_vtxpage(int page);
-int dec_vtxpage(int page);
-int vtx_hex2dec(int pgnum);
-int vtx_dec2hex(int pgnum);
-int vtx_chkpgnum(int pgnum, int hex_ok);
-
-#endif /* VTXTOOLS_H_INCLUDED */
diff --git a/radio/Makefile.in b/radio/Makefile.in
deleted file mode 100644
index 67cf579..0000000
--- a/radio/Makefile.in
+++ /dev/null
@@ -1,30 +0,0 @@
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../Make.config
-
-CFLAGS=-g @CFLAGS@ $(WARN_FLAGS) -I$(srcdir)/.. -I..
-
-PROGS=@RADIO@
-
-##########################################################################
-
-all build: $(PROGS)
-
-radio: radio.o
- $(CC) $(CFLAGS) -o $@ radio.o @LIBCURSES@
-
-install: all
- test -f radio &&\
- $(INSTALL_DIR) $(bindir) &&\
- $(INSTALL_PROGRAM) -s radio $(bindir) &&\
- $(INSTALL_DATA) $(srcdir)/radio.man $(mandir)/man1/radio.1 || true
-
-clean:
- -rm -f *.o core* TAGS radio.fmmap
-
-realclean distclean: clean
- -rm -f $(PROGS) Makefile *~ *.bak
-
-dep depend:
-
diff --git a/radio/radio-old.c b/radio/radio-old.c
deleted file mode 100644
index eff28e0..0000000
--- a/radio/radio-old.c
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * radio.c - (c) 1998 Gerd Knorr <kraxel@goldbach.in-berlin.de>
- *
- * test tool for bttv + WinTV/Radio
- *
- */
-
-/* Changes:
- * 20 Jun 99 - Juli Merino (JMMV) <jmmv@mail.com> - Added some features:
- * visual menu, manual 'go to' function, negative symbol and a
- * good interface. See code for more details.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <curses.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-
-#include <linux/videodev.h>
-
-#define DEVICE "/dev/radio" /* major=81, minor=64 */
-
-/* JMMV: WINDOWS for radio */
-WINDOW *wfreq, *woptions, *wstations, *wcommand;
-
-/* Determine and return the appropriate frequency multiplier for
- the first tuner on the open video device with handle FD. */
-static int get_freq_fact(int fd)
-{
- struct video_tuner tuner;
-
- tuner.tuner = 0;
- if (ioctl (fd, VIDIOCGTUNER, &tuner) < 0)
- return 16;
- if ((tuner.flags & VIDEO_TUNER_LOW) == 0)
- return 16;
- return 16000;
-}
-
-static int
-radio_setfreq(int fd, float freq)
-{
- int ifreq = (freq+1.0/32)*get_freq_fact(fd);
- return ioctl(fd, VIDIOCSFREQ, &ifreq);
-}
-
-static void
-radio_unmute(int fd)
-{
- struct video_audio vid_aud;
-
- if (ioctl(fd, VIDIOCGAUDIO, &vid_aud))
- perror("VIDIOCGAUDIO");
- if (vid_aud.volume == 0)
- vid_aud.volume = 65535;
- vid_aud.flags &= ~VIDEO_AUDIO_MUTE;
- if (ioctl(fd, VIDIOCSAUDIO, &vid_aud))
- perror("VIDIOCSAUDIO");
-}
-
-static void
-radio_mute(int fd)
-{
- struct video_audio vid_aud;
-
- if (ioctl(fd, VIDIOCGAUDIO, &vid_aud))
- perror("VIDIOCGAUDIO");
- vid_aud.flags |= VIDEO_AUDIO_MUTE;
- if (ioctl(fd, VIDIOCSAUDIO, &vid_aud))
- perror("VIDIOCSAUDIO");
-}
-
-static void
-radio_getstereo(int fd)
-{
- struct video_audio va;
- va.mode=-1;
-
- if (ioctl (fd, VIDIOCGAUDIO, &va) < 0)
- mvwprintw(wfreq,2,1," ");
- mvwprintw(wfreq,2,1,"%s", va.mode == VIDEO_SOUND_STEREO ?
- "STEREO":" MONO ");
-}
-
-static void
-radio_getsignal(int fd)
-{
- struct video_tuner vt;
- int i,signal;
-
- memset(&vt,0,sizeof(vt));
- ioctl (fd, VIDIOCGTUNER, &vt);
- signal=vt.signal>>13;
-
- for(i=0;i<8;i++)
- mvwprintw(wfreq,3,i+1,"%s", signal>i ? "*":" ");
-}
-
-static int
-select_wait(int sec)
-{
- struct timeval tv;
- fd_set se;
-
- FD_ZERO(&se);
- FD_SET(0,&se);
- tv.tv_sec = sec;
- tv.tv_usec = 0;
- return select(1,&se,NULL,NULL,&tv);
-}
-
-/* ---------------------------------------------------------------------- */
-
-char *digit[3][10] = {
- { " _ ", " ", " _ ", " _ ", " ", " _ ", " _ ", " _ ", " _ ", " _ " },
- { "| |", " | ", " _|", " _|", "|_|", "|_ ", "|_ ", " |", "|_|", "|_|" },
- { "|_|", " | ", "|_ ", " _|", " |", " _|", "|_|", " |", "|_|", " _|" }
-};
-
-static void print_freq(float freq)
-{
- int x,y,i;
- char text[10];
- sprintf(text,"%6.2f",freq);
- for (i = 0, x = 8; i < 6; i++, x+=4) {
- if (text[i] >= '0' && text[i] <= '9') {
- for (y = 0; y < 3; y++)
- mvwprintw(wfreq,y+1,x,"%s",digit[y][text[i]-'0']);
- } else if (text[i] == '.') {
- mvwprintw(wfreq,3,x,".");
- x -= 2;
- } else {
- for (y = 0; y < 3; y++)
- mvwprintw(wfreq,y+1,x," ");
- }
- }
- wrefresh(wfreq);
-}
-
-/* ---------------------------------------------------------------------- */
-
-int fkeys[8];
-
-int freqs[99];
-char *labels[99];
-int stations;
-
-static void
-read_kradioconfig(void)
-{
- char name[80],file[256],n;
- int ifreq;
- FILE *fp;
-
- sprintf(file,"%.225s/.kde/share/config/kradiorc",getenv("HOME"));
- if (NULL == (fp = fopen(file,"r"))) {
- sprintf(file,"%.225s/.radio",getenv("HOME"));
- if (NULL == (fp = fopen(file,"r")))
- return;
- }
- while (NULL != fgets(file,255,fp)) {
- if (2 == sscanf(file,"%c=%d",&n,&ifreq) && n >= '1' && n <= '8') {
- fkeys[n - '1'] = ifreq;
- } else if (2 == sscanf(file,"%d=%30[^\n]",&ifreq,name) && stations < 99) {
- freqs[stations] = ifreq;
- labels[stations] = strdup(name);
- stations++;
- }
- }
-}
-
-static char*
-find_label(int ifreq)
-{
- int i;
-
- for (i = 0; i < stations; i++) {
- if (ifreq == freqs[i])
- return labels[i];
- }
- return NULL;
-}
-
-static char *
-make_label(int ifreq)
-{
- static char text[20],*l;
-
- if (NULL != (l = find_label(ifreq)))
- return l;
- sprintf(text,"%6.2f MHz",(float)ifreq/1000000);
- return text;
-}
-
-int
-main(int argc, char *argv[])
-{
- /* JMMV: lastfreq set to 1 to start radio at 0.0 */
- int fd,key,done,i,ifreq = 0,lastfreq = 1, mute=1;
- char *name;
- /* Variables set by JMMV */
- float ffreq, newfreq = 0;
- int stset = 0, c;
-
- if (argc > 1 && 1 == sscanf(argv[1],"%f",&ffreq)) {
- ifreq = (int)(ffreq * 1000000);
- ifreq += 25000;
- ifreq -= ifreq % 50000;
- }
-
- if (-1 == (fd = open(DEVICE, O_RDONLY))) {
- perror("open " DEVICE);
- exit(1);
- }
-
- read_kradioconfig();
- if (!ifreq && fkeys[0])
- ifreq = fkeys[0];
-
- initscr();
- start_color();
- cbreak();
- noecho();
- keypad(stdscr,1);
- curs_set(0);
-
- /* JMMV: Set colors and windows */
- /* XXX: Color definitions are wrong! BLUE is RED, CYAN is YELLOW and
- * viceversa */
- init_pair(1,COLOR_WHITE,COLOR_BLACK);
- init_pair(2,COLOR_CYAN,COLOR_BLUE);
- init_pair(3,COLOR_WHITE,COLOR_RED);
- bkgd(A_BOLD | COLOR_PAIR(1));
- refresh();
-
- wfreq = newwin(7,32,1,2);
- wbkgd(wfreq,A_BOLD | COLOR_PAIR(2));
- werase(wfreq);
- box(wfreq, 0, 0);
- mvwprintw(wfreq, 0, 1, " Tuner ");
-
- woptions = newwin(7,COLS-38,1,36);
- wbkgd(woptions,A_BOLD | COLOR_PAIR(3));
- werase(woptions);
- box(woptions, 0, 0);
- mvwprintw(woptions, 0, 1, " Main menu ");
-
- wstations = newwin(LINES-14,COLS-4,9,2);
- wbkgd(wstations,A_BOLD | COLOR_PAIR(3));
- werase(wstations);
- box(wstations, 0, 0);
- mvwprintw(wstations, 0, 1, " Preset stations ");
-
- wcommand = newwin(3,COLS-4,LINES-4,2);
- wbkgd(wcommand,A_BOLD | COLOR_PAIR(3));
- werase(wcommand);
- box(wcommand,0,0);
- mvwprintw(wcommand, 0, 1, " Command window ");
- wrefresh(wcommand);
-
- /* JMMV: Added key information and windows division */
- mvwprintw(woptions, 1, 1, "UP Key - increment frequency");
- mvwprintw(woptions, 2, 1, "DOWN Key - decrease frequency");
- mvwprintw(woptions, 3, 1, "g - go to frequency...");
- mvwprintw(woptions, 4, 1, "x - exit");
- mvwprintw(woptions, 5, 1, "ESC, q, e - mute and exit");
- wrefresh(woptions);
- for (i = 0, c = 1; i < 8; i++) {
- if (fkeys[i]) {
- mvwprintw(wstations,c,2,"F%d: %s",i+1,make_label(fkeys[i]));
- c++;
- stset = 1;
- }
- }
- if (!stset) mvwprintw(wstations,1,1,"[none]");
- wrefresh(wstations);
-
- radio_unmute(fd);
- for (done = 0; done == 0;) {
- if (ifreq != lastfreq) {
- lastfreq = ifreq;
- ffreq = (float)ifreq / 1000000;
- radio_setfreq(fd,ffreq);
- print_freq(ffreq);
- if (NULL != (name = find_label(ifreq)))
- mvwprintw(wfreq,5,2,"%-20.20s",name);
- else
- mvwprintw(wfreq,5,2,"%-20.20s","");
- }
- radio_getstereo(fd);
- radio_getsignal(fd);
- wrefresh(wfreq);
- wrefresh(wcommand);
-
- if (0 == select_wait(1)) {
- mvwprintw(wcommand,1,1,"%50.50s","");
- wrefresh(wcommand);
- continue;
- }
- key = getch();
- switch (key) {
- case EOF: /* for noninteractive use: "radio 95.8 <>/dev/null" */
- case 'x':
- case 'X':
- mute = 0;
- /* fall throuth */
- case 27: /* ESC */
- case 'q':
- case 'Q':
- case 'e':
- case 'E':
- done = 1;
- break;
- case 'g':
- case 'G':
- /* JMMV: Added 'go to frequency' function */
- mvwprintw(wcommand,1,2,"GO: Enter frequency: ");
- curs_set(1);
- echo();
- wrefresh(wcommand);
- wscanw(wcommand,"%f",&newfreq);
- noecho();
- curs_set(0);
- wrefresh(wcommand);
- ifreq = newfreq * 1000000;
- break;
- case KEY_UP:
- ifreq += 50000;
- if (ifreq > 108000000)
- ifreq = 87500000;
- mvwprintw(wcommand, 1, 2, "Increment frequency");
- break;
- case KEY_DOWN:
- ifreq -= 50000;
- if (ifreq < 87500000)
- ifreq = 108000000;
- mvwprintw(wcommand, 1, 2, "Decrease frequency");
- break;
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case KEY_F(1):
- case KEY_F(2):
- case KEY_F(3):
- case KEY_F(4):
- case KEY_F(5):
- case KEY_F(6):
- case KEY_F(7):
- case KEY_F(8):
- i = (key >= '1' && key <= '8') ? key - '1' : key - KEY_F(1);
- if (fkeys[i]) {
- ifreq = fkeys[i];
- mvwprintw(wcommand, 1, 2, "Go to preset station %d", i+1);
- }
- break;
- }
- }
- if (mute)
- radio_mute(fd);
- close(fd);
-
- bkgd(0);
- clear();
- refresh();
- endwin();
- printf("radio\n");
- printf("copyright (c) 1998-99 Gerd Knorr <kraxel@goldbach.in-berlin.de>\n");
- printf("interface by Juli Merino <jmmv@mail.com>\n");
-
- return 0;
-}
diff --git a/radio/x b/radio/x
deleted file mode 100644
index 25a5fd3..0000000
--- a/radio/x
+++ /dev/null
@@ -1,21 +0,0 @@
-[Stations]
-87900000=scan-0
-89550000=scan-1
-90150000=scan-2
-91350000=scan-3
-93600000=scan-4
-94300000=scan-5
-95800000=scan-6
-97650000=scan-7
-98800000=scan-8
-99650000=scan-9
-100600000=scan-10
-101250000=scan-11
-101850000=scan-12
-102600000=scan-13
-103400000=scan-14
-104600000=scan-15
-105500000=scan-16
-105950000=scan-17
-106800000=scan-18
-107450000=scan-19
diff --git a/scripts/Subdir.mk b/scripts/Subdir.mk
new file mode 100644
index 0000000..fbd0717
--- /dev/null
+++ b/scripts/Subdir.mk
@@ -0,0 +1,3 @@
+
+install::
+ $(INSTALL_DATA) -m755 $(srcdir)/scripts/subtitles $(bindir)
diff --git a/font/bigfont.pl b/scripts/bigfont.pl
index 64f8f98..64f8f98 100644
--- a/font/bigfont.pl
+++ b/scripts/bigfont.pl
diff --git a/src/fallback.pl b/scripts/fallback.pl
index 03706c4..03706c4 100644
--- a/src/fallback.pl
+++ b/scripts/fallback.pl
diff --git a/src/subtitles b/scripts/subtitles
index 45bddfe..45bddfe 100644
--- a/src/subtitles
+++ b/scripts/subtitles
diff --git a/webcam/webcam.cgi b/scripts/webcam.cgi
index 9033aa5..9033aa5 100644
--- a/webcam/webcam.cgi
+++ b/scripts/webcam.cgi
diff --git a/src/Makefile.in b/src/Makefile.in
deleted file mode 100644
index 696ba66..0000000
--- a/src/Makefile.in
+++ /dev/null
@@ -1,180 +0,0 @@
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../Make.config
-
-CFLAGS=-g @CFLAGS@ $(WARN_FLAGS) $(LFS_FLAGS) $(X11_FLAGS) $(LIB_FLAGS) \
- -DVERSION='"$(VERSION)"' -DCONFIGFILE='"$(config)"' \
- -I$(srcdir)/.. -I.. -I. -D_REENTRANT
-
-# object files /libraries
-COMMON_OBJS = sound.o webcam.o frequencies.o commands.o parseconfig.o \
- capture.o event.o ../libng/libng.a
-
-XAWTV_OBJS = main.o xt.o toolbox.o conf.o x11.o xv.o complete-xaw.o \
- wmhooks.o channel.o lirc.o midictrl.o joystick.o \
- $(COMMON_OBJS)
-XAWTV_LIBS = $(THREAD_LIBS) $(LIRC_LIBS) $(ATHENA_LIBS) $(OSS_LIBS) \
- $(ALSA_LIBS) -ljpeg -lvbi
-
-MOTV_OBJS = motif.o man.o xt.o x11.o xv.o channel-no-x11.o wmhooks.o \
- RegEdit.o icons.o complete-motif.o lirc.o midictrl.o \
- joystick.o $(COMMON_OBJS)
-MOTV_LIBS = $(THREAD_LIBS) $(LIRC_LIBS) $(MOTIF_LIBS) $(OSS_LIBS) \
- $(ALSA_LIBS) -ljpeg -lvbi
-
-FBTV_OBJS = fbtv.o fbtools.o fs.o channel-no-x11.o matrox.o lirc.o \
- midictrl.o joystick.o $(COMMON_OBJS)
-FBTV_LIBS = $(THREAD_LIBS) $(LIRC_LIBS) $(CURSES_LIBS) $(ALSA_LIBS) \
- -L@x_libraries@ @FSLIB@ -ljpeg -lm
-
-TTV_OBJS = aa.o channel-no-x11.o $(COMMON_OBJS)
-TTV_LIBS = $(THREAD_LIBS) $(AA_LIBS) -ljpeg
-
-V4LCTL_OBJS = v4lctl.o channel-no-x11.o xv.o $(COMMON_OBJS)
-V4LCTL_LIBS = $(THREAD_LIBS) $(ATHENA_LIBS) -ljpeg
-
-STREAMER_OBJS = streamer.o channel-no-x11.o $(COMMON_OBJS)
-STREAMER_LIBS = $(THREAD_LIBS) $(OSS_LIBS) -ljpeg
-
-SCANTV_OBJS = scantv.o channel-no-x11.o $(COMMON_OBJS)
-SCANTV_LIBS = $(THREAD_LIBS) -lvbi -ljpeg
-
-# what to build / install
-PROGS=v4lctl streamer scantv vbi-debug @PROGS@
-INST=install-dirs install-common @INST@
-LANGS=de it
-
-all build: $(PROGS) i18n
-
-
-##########################################################################
-# app-defaults
-
-.SUFFIXES: .ad .h
-.ad.h:
- perl $(srcdir)/fallback.pl < $< > $@
-
-MoTV.ad: $(srcdir)/MoTV-default $(srcdir)/MoTV-fixed
- cat $(srcdir)/MoTV-default $(srcdir)/MoTV-fixed > MoTV.ad
-
-i18n:
- for lang in $(LANGS); do \
- cat $(srcdir)/MoTV-$$lang $(srcdir)/MoTV-fixed > MoTV.$$lang.ad; \
- done
-
-
-##########################################################################
-# build rules
-
-xawtv: $(XAWTV_OBJS)
- $(CC) $(CFLAGS) -o $@ $(XAWTV_OBJS) $(XAWTV_LIBS) $(DLFLAGS)
-
-motv: $(MOTV_OBJS)
- $(CC) $(CFLAGS) -o $@ $(MOTV_OBJS) $(MOTV_LIBS) $(DLFLAGS)
-
-fbtv: $(FBTV_OBJS)
- $(CC) $(CFLAGS) -o $@ $(FBTV_OBJS) $(FBTV_LIBS) $(DLFLAGS)
-
-ttv: $(TTV_OBJS)
- $(CC) $(CFLAGS) -o $@ $(TTV_OBJS) $(TTV_LIBS) $(DLFLAGS)
-
-v4lctl: $(V4LCTL_OBJS)
- $(CC) $(CFLAGS) -o $@ $(V4LCTL_OBJS) $(V4LCTL_LIBS) $(DLFLAGS)
-
-streamer: $(STREAMER_OBJS)
- $(CC) $(CFLAGS) -o $@ $(STREAMER_OBJS) $(STREAMER_LIBS) $(DLFLAGS)
-
-scantv: $(SCANTV_OBJS)
- $(CC) $(CFLAGS) -o $@ $(SCANTV_OBJS) $(SCANTV_LIBS) $(DLFLAGS)
-
-xvideo: xvideo.o
- $(CC) $(CFLAGS) -o $@ xvideo.o $(ATHENA_LIBS)
-
-vbi-debug: vbi-debug.o
- $(CC) $(CFLAGS) -o $@ vbi-debug.o -lvbi
-
-rootv: rootv.o parseconfig.o
- $(CC) $(CFLAGS) -o $@ rootv.o parseconfig.o $(ATHENA_LIBS)
-
-v4l-conf: v4l-conf.o
- $(CC) $(CFLAGS) -o $@ v4l-conf.o $(ATHENA_LIBS)
-
-xawtv-remote: xawtv-remote.o
- $(CC) $(CFLAGS) -o $@ xawtv-remote.o $(ATHENA_LIBS)
-
-mididump: midictrl.c
- $(CC) $(CFLAGS) -DSTANDALONE -o $@ $(srcdir)/midictrl.c $(ALSA_LIBS)
-
-gl: gl.o RegEdit.o
- $(CC) $(CFLAGS) -o $@ gl.o RegEdit.o $(MOTIF_LIBS) \
- -lGLU -lGL -lng -ljpeg $(DLFLAGS)
-hwscan: hwscan.o
- $(CC) $(CFLAGS) -o $@ hwscan.o -lasound
-
-channel-no-x11.o: $(srcdir)/channel.c
- $(CC) $(CFLAGS) -DNO_X11=1 -c -o $@ $(srcdir)/channel.c
-
-complete-xaw.o: $(srcdir)/complete.c
- $(CC) $(CFLAGS) -DATHENA=1 -c -o $@ $(srcdir)/complete.c
-
-complete-motif.o: $(srcdir)/complete.c
- $(CC) $(CFLAGS) -DMOTIF=1 -c -o $@ $(srcdir)/complete.c
-
-
-##########################################################################
-# install rules
-
-install: all $(INST)
-
-install-dirs:
- $(INSTALL_DIR) $(bindir)
- $(INSTALL_DIR) $(resdir)/app-defaults
- $(INSTALL_DIR) $(resdir)/de/app-defaults
-
-install-common:
- $(INSTALL_DIR) $(bindir)
- $(INSTALL_DIR) $(resdir)/app-defaults
- $(INSTALL_PROGRAM) $(srcdir)/subtitles $(bindir)
- $(INSTALL_PROGRAM) -s xawtv-remote $(bindir)
- $(INSTALL_PROGRAM) -s streamer $(bindir)
- $(INSTALL_PROGRAM) -s v4lctl $(bindir)
- $(INSTALL_PROGRAM) -s rootv $(bindir)
- $(INSTALL_PROGRAM) -s scantv $(bindir)
- $(INSTALL_PROGRAM) -s xawtv $(bindir)
- $(INSTALL_DATA) $(srcdir)/Xawtv.ad $(resdir)/app-defaults/Xawtv
-
-install-motv:
- $(INSTALL_PROGRAM) -s motv $(bindir)
- $(INSTALL_DIR) $(resdir)/app-defaults
- $(INSTALL_DATA) MoTV.ad $(resdir)/app-defaults/MoTV
- for lang in $(LANGS); do \
- $(INSTALL_DIR) $(resdir)/$$lang/app-defaults; \
- $(INSTALL_DATA) MoTV.$$lang.ad $(resdir)/$$lang/app-defaults/MoTV; \
- done
-
-install-ttv:
- $(INSTALL_PROGRAM) -s ttv $(bindir)
-
-install-fbtv:
- $(INSTALL_PROGRAM) -s fbtv $(bindir)
-
-install-v4l-conf:
- $(INSTALL_PROGRAM) -s $(SUID_ROOT) v4l-conf $(bindir)
-
-
-##########################################################################
-# misc
-
-clean:
- -rm -f *.o *.moc *core TAGS Xawtv.h MoTV.h MoTV.ad $(I18N)
-
-realclean distclean: clean
- -rm -f $(PROGS) Makefile *~ *.bak gl hwscan
-
-depend dep: Xawtv.h MoTV.h gl.h
- $(DEPEND) -- $(CFLAGS) -- *.c
-
-
-##########################################################################
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/src/MoTV.de.ad b/src/MoTV.de.ad
deleted file mode 100644
index 51c18b7..0000000
--- a/src/MoTV.de.ad
+++ /dev/null
@@ -1,599 +0,0 @@
-
-! ----------------------------------------------------------------------------
-! some standard motif stuff [i18n]
-
-*.cancelLabelString: Abbrechen
-*.applyLabelString: Übernehmen
-*.XmFileSelectionBox.dirListLabelString: Verzeichnisse
-*.XmFileSelectionBox.fileListLabelString: Dateien
-*.XmFileSelectionBox.selectionLabelString: Auswahl
-
-
-! ----------------------------------------------------------------------------
-! fonts [i18n]
-
-*renderTable:
-*renderTable.fontType: FONT_IS_FONTSET
-*renderTable.fontName: \
- -*-helvetica-medium-r-normal--*-120-*-*-*-*, \
- -*-*-*-r-normal--*-120-*-*-*-*, \
- fixed
-
-MoTV.onscreen.label.renderTable:
-MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
-MoTV.onscreen.label.renderTable.fontName: \
- -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*, \
- fixed
-
-MoTV.vtx.label.renderTable:
-MoTV.vtx.label.renderTable.fontType: FONT_IS_FONT
-MoTV.vtx.label.renderTable.fontName: 10x20
-
-
-! ----------------------------------------------------------------------------
-! strings [i18n]
-
-MoTV.about_box_popup.title: Über motv
-MoTV*about_box_popup*messageString: \
- motv - Motif TV application \n\
- \n\
- (c) 2002 Gerd Knorr <kraxel@bytesex.org>
-
-MoTV.errbox_popup.title: Fehler
-
-control*menubar*fileM.tearOffTitle: Datei
-control*menubar*editM.tearOffTitle: Bearbeiten
-control*menubar*toolsM.tearOffTitle: Tools
-control*menubar*tuneM.tearOffTitle: Tuner
-control*menubar*grabM.tearOffTitle: Bild speichern
-control*menubar*ratioM.tearOffTitle: Seitenverhältnis
-control*menubar*launchM.tearOffTitle: Launch
-control*menubar*subM.tearOffTitle: Untertitel
-control*menubar*stationsM.tearOffTitle: Sender
-control*menubar*optionsM.tearOffTitle: Einstellungen
-control*menubar*helpM.tearOffTitle: Hilfe
-control*menubar*captureM.tearOffTitle: Capture
-control*menubar*freqM.tearOffTitle: Frequenztabelle
-control*menubar*inputM.tearOffTitle: Eingang
-control*menubar*normM.tearOffTitle: TV Norm
-
-control*menubar.file.labelString: Datei
-control*menubar.file.mnemonic: D
-control*menubar.edit.labelString: Bearbeiten
-control*menubar.edit.mnemonic: B
-control*menubar.tools.labelString: Tools
-control*menubar.tools.mnemonic: T
-control*menubar*tune.labelString: Tuner
-control*menubar*grab.labelString: Bild speichern
-control*menubar*ratio.labelString: Seitenverhältnis
-control*menubar*launch.labelString: Launch
-control*menubar*sub.labelString: Untertitel
-control*menubar.stations.labelString: Sender
-control*menubar.stations.mnemonic: S
-control*menubar.options.labelString: Einstellungen
-control*menubar.options.mnemonic: E
-control*menubar.filter.labelString: Filter
-control*menubar.filter.mnemonic: F
-control*menubar.help.labelString: Hilfe
-control*menubar.help.mnemonic: H
-
-! file menu
-control*menubar*rec.labelString: Film aufnehmen ...
-control*menubar*rec.mnemonic: F
-control*menubar*rec.acceleratorText: R
-control*menubar*rec.accelerator: <Key>R
-control*menubar*quit.labelString: Beenden
-control*menubar*quit.mnemonic: B
-control*menubar*quit.acceleratorText: Q
-control*menubar*quit.accelerator: <Key>Q
-
-! edit menu
-control*menubar*copy.labelString: Kopieren
-control*menubar*copy.mnemonic: K
-control*menubar*copy.acceleratorText: Ctrl+C
-control*menubar*copy.accelerator: Ctrl<Key>C
-
-! tools menu
-control*menubar*mute.labelString: Ton aus
-control*menubar*mute.mnemonic: a
-control*menubar*mute.acceleratorText: A
-control*menubar*mute.accelerator: <Key>A
-control*menubar*full.labelString: Vollbild
-control*menubar*full.acceleratorText: F
-control*menubar*full.accelerator: <Key>F
-control*menubar*ontop.labelString: Stay on Top
-control*menubar*ontop.mnemonic: T
-control*menubar*ontop.acceleratorText: T
-control*menubar*ontop.accelerator: <Key>T
-control*menubar*levels.labelString: Aufnahmepegel ...
-control*menubar*levels.acceleratorText: L
-control*menubar*levels.accelerator: <Key>L
-control*menubar*st_up.labelString: Nächster Sender
-control*menubar*st_up.acceleratorText: page up
-control*menubar*st_dn.labelString: Vorheriger Sender
-control*menubar*st_dn.acceleratorText: page down
-
-control*menubar*ch_up.labelString: Nächster Kanal
-control*menubar*ch_up.acceleratorText: up
-control*menubar*ch_dn.labelString: Vorheriger Kanal
-control*menubar*ch_dn.acceleratorText: down
-control*menubar*fi_up.labelString: Finetune up
-control*menubar*fi_up.acceleratorText: right
-control*menubar*fi_dn.labelString: Finetune down
-control*menubar*fi_dn.acceleratorText: left
-
-control*menubar*ppm_f.labelString: PPM, maximale Größe
-control*menubar*ppm_f.acceleratorText: G
-control*menubar*ppm_f.accelerator: ~Ctrl<Key>G
-control*menubar*ppm_w.labelString: PPM, Fenstergröße
-control*menubar*ppm_w.acceleratorText: Ctrl+G
-control*menubar*ppm_w.accelerator: Ctrl<Key>G
-control*menubar*jpg_f.labelString: JPEG, maximale Größe
-control*menubar*jpg_f.mnemonic: J
-control*menubar*jpg_f.acceleratorText: J
-control*menubar*jpg_f.accelerator: ~Ctrl<Key>J
-control*menubar*jpg_w.labelString: JPEG, Fenstergröße
-control*menubar*jpg_w.acceleratorText: Ctrl+J
-control*menubar*jpg_w.accelerator: Ctrl<Key>J
-
-control*menubar*r_no.labelString: keines
-control*menubar*r_no.mnemonic: k
-control*menubar*r_43.labelString: 4:3
-control*menubar*r_43.mnemonic: 4
-
-control*menubar*s_off.labelString: keine
-control*menubar*s_150.labelString: Seite 150
-control*menubar*s_150.mnemonic: 1
-control*menubar*s_333.labelString: Seite 333
-control*menubar*s_333.mnemonic: 3
-control*menubar*s_777.labelString: Seite 777
-control*menubar*s_777.mnemonic: 7
-control*menubar*s_888.labelString: Seite 888
-control*menubar*s_888.mnemonic: 8
-
-! options menu
-control*menubar*add.labelString: Sender hinzufügen ...
-control*menubar*add.mnemonic: h
-control*menubar*scan.labelString: Sendersuche ...
-control*menubar*pref.labelString: Konfiguration ...
-control*menubar*save.labelString: Einstellungen speichern
-control*menubar*save.mnemonic: s
-
-control*menubar*capture.labelString: Capture
-control*menubar*capture.mnemonic: C
-control*menubar*freq.labelString: Frequenztabelle
-control*menubar*freq.mnemonic: F
-control*menubar*scale.labelString: Regler ...
-control*menubar*scale.acceleratorText: S
-control*menubar*scale.accelerator: <Key>S
-
-control*menubar*input.labelString: Eingang
-control*menubar*input.mnemonic: E
-control*menubar*norm.labelString: Fernsehnorm
-control*menubar*norm.mnemonic: n
-
-! filter menu
-control*menubar*fnone.labelString: Kein filter
-control*menubar*fnone.mnemonic: K
-
-! help menu
-control*menubar*man.labelString: Manual anzeigen
-control*menubar*man.mnemonic: M
-control*menubar*about.labelString: Über ...
-control*menubar*about.mnemonic: b
-
-! tooltips (needs openmotif 2.2)
-control*tool.prev.toolTipString: nächster Sender
-control*tool.next.toolTipString: vorheriger Sender
-control*tool.snap.toolTipString: Bild speichern
-control*tool.movie.toolTipString: Film aufnehmen
-control*tool.mute.toolTipString: Ton aus
-control*tool.exit.toolTipString: Beenden
-
-control*box.XmPushButton*menu.del.labelString: Löschen
-control*box.XmPushButton*menu.edit.labelString: Ändern ...
-
-! channel scan
-*chscan_popup.title: Sendersuche
-*chscan_popup*okLabelString: Start
-*chscan_popup*hints.labelString: \
- Der Sendersuchlauf baut eine komplett neue\n\
- Senderliste auf, die jetzige Liste wird\n\
- überschrieben.\n\
- \n\
- Damit die Sendersuche richtig funkioniert\n\
- müssen Fernsehnorm und Frequenztabelle\n\
- richtig eingestellt sein. Beides ist auch\n\
- unter "Einstellungen" zu finden.\n
-
-! channel properties
-*prop_popup.title: Einstellungen
-*prop_popup*rc.nameL.labelString: Sendername
-*prop_popup*rc.keyL.labelString: Hotkey
-*prop_popup*rc.channelL.labelString: Kanal
-*prop_popup*rc.buttons.ok.labelString: OK
-*prop_popup*rc.buttons.cancel.labelString: Abbrechen
-*prop_popup*no_name_popup.title: Fehler
-*prop_popup*no_name_popup*messageString: \
- Einen Namen für den Sender mußt Du schon vergeben.
-
-! preferences
-*pref_popup.title: Einstellungen
-*pref_popup*okLabelString: Speichern
-*pref_popup*fsL.labelString: Vollbild
-*pref_popup*fsT.labelString: Auflösung umschalten
-*pref_popup*fsO.labelString: Auflösung:
-*pref_popup*mixL.labelString: \
- Lautstärke (funkioniert erst nach Neustart)
-*pref_popup*mixT.labelString: Lautstärke mit Mixer regeln
-*pref_popup*mix1O.labelString: Gerät:
-*pref_popup*mix2O.labelString: Regler:
-*pref_popup*optL.labelString: Optionen
-*pref_popup*osd.labelString: Bei Vollbild OSD benutzen
-*pref_popup*keypad-ntsc.labelString: Nummernblock: ntsc modus
-*pref_popup*keypad-partial.labelString: \
- Nummernblock: beim ersten Tastendruck umschalten
-*pref_popup*jpeg.label.labelString: JPEG Bildqualität:
-
-scale.title: Regler
-scale*volume.titleString: Lautstärke
-scale*bright.titleString: Helligkeit
-scale*hue.titleString: Farbe
-scale*color.titleString: Sättigung
-scale*contrast.titleString: Kontrast
-
-levels.title: Monitor
-levels*enable.labelstring: einschalten
-
-streamer.title: Film aufnehmen
-streamer*driverL.labelString: Ausgabeformat
-streamer*driver.labelString: Driver:
-streamer*videoL.labelString: Video Einstellungen
-streamer*video.labelString: Format:
-streamer*fpsL.labelString: fps:
-streamer*audioL.labelString: Audio Einstellungen
-streamer*audio.labelString: Format:
-streamer*rateL.labelString: Rate:
-streamer*fileL.labelString: Dateinamen
-streamer*fvideoL.labelString: Video:
-streamer*faudioL.labelString: Audio:
-streamer*status.labelString: fixme
-
-streamer*files.labelString: Browse ...
-streamer*buttons.rec.labelString: Aufnahme
-streamer*buttons.stop.labelString: Stop
-streamer*buttons.play.labelString: Abspielen
-streamer*buttons.cancel.labelString: Schließen
-
-MoTV.man_popup.title: Manual page
-MoTV.man_popup*okLabelString: Fenster schließen
-MoTV.man_popup*label.labelString: bitte warten ...
-
-! ----------------------------------------------------------------------------
-! main window
-
-MoTV.geometry: 320x240+50+50
-MoTV.winGravity: Static
-
-MoTV.translations: #override \n\
- <PropertyNotify>: Remote()
-
-MoTV.tv.traversalOn: false
-MoTV.tv.highlightThickness: 0
-MoTV.tv.background: black
-MoTV.tv.translations: #replace \n\
- <Btn2Down>: Ipc(drag) \n\
- <Btn3Up>: Popup(control) \n\
- ~Alt ~Ctrl <Key>C: Popup(control) \n\
- Ctrl <Key>C: Ipc(primary) \n\
- Alt <Key>C: Ipc(primary) \n\
- <Key>R: Popup(streamer) \n\
- <Key>S: Popup(scale) \n\
- <Key>L: Popup(levels) \n\
- <Key>H: man(motv) \n\
- <Key>F1: man(motv) \n\
- <Key>osfHelp: man(motv) \n\
- \
- <Key>Q: CloseMain() \n\
- <Key>KP_Add: Command(volume,inc) \n\
- <Key>KP_Subtract: Command(volume,dec) \n\
- <Key>KP_Enter: Command(volume,mute) \n\
- <Key>osfActivate: Command(volume,mute) \n\
- <Key>A: Command(volume,mute) \n\
- <Key>F: Command(fullscreen) \n\
- Ctrl<Key>Z: Zap(fast) \n\
- <Key>Z: Zap() \n\
- Ctrl<Key>G: Command(snap,ppm,win) \n\
- Ctrl<Key>J: Command(snap,jpeg,win) \n\
- <Key>G: Command(snap,ppm,full) \n\
- <Key>J: Command(snap,jpeg,full) \n\
- Ctrl<Key>Up: Scan() \n\
- Ctrl<Key>osfUp: Scan() \n\
- ~Ctrl<Key>Up: Command(setchannel,next) \n\
- ~Ctrl<Key>osfUp: Command(setchannel,next) \n\
- <Key>Down: Command(setchannel,prev) \n\
- <Key>osfDown: Command(setchannel,prev) \n\
- <Key>Right: Command(setchannel,fine_up) \n\
- <Key>osfRight: Command(setchannel,fine_up) \n\
- <Key>Left: Command(setchannel,fine_down) \n\
- <Key>osfLeft: Command(setchannel,fine_down) \n\
- <Key>Page_Up: Command(setstation,next) \n\
- <Key>osfPageUp: Command(setstation,next) \n\
- <Key>Page_Down: Command(setstation,prev) \n\
- <Key>osfPageDown: Command(setstation,prev) \n\
- <Key>BackSpace: Command(setstation,back) \n\
- <Key>osfBackSpace: Command(setstation,back) \n\
- <Btn4Up>: Command(setstation,next) \n\
- <Btn5Up>: Command(setstation,prev) \n\
- <Key>V: Command(capture,toggle) \n\
- <Key>space: Command(setstation,next) \n\
- \
- <Key>KP_0: Command(keypad,0) \n\
- <Key>KP_1: Command(keypad,1) \n\
- <Key>KP_2: Command(keypad,2) \n\
- <Key>KP_3: Command(keypad,3) \n\
- <Key>KP_4: Command(keypad,4) \n\
- <Key>KP_5: Command(keypad,5) \n\
- <Key>KP_6: Command(keypad,6) \n\
- <Key>KP_7: Command(keypad,7) \n\
- <Key>KP_8: Command(keypad,8) \n\
- <Key>KP_9: Command(keypad,9)
-
-
-MoTV.tv*stationsM.menuPost: <Btn1>
-
-MoTV.about_box_popup.deleteResponse: DESTROY
-MoTV.errbox_popup.deleteResponse: UNMAP
-
-MoTV.tv*stationsM.packing: PACK_COLUMN
-control*menubar*stationsM.packing: PACK_COLUMN
-
-
-! ----------------------------------------------------------------------------
-! control window
-
-control.title: MoTV
-control.iconName: MoTV
-control.iconPixmap: TVimg
-control.iconMask: TVmask
-control*highlightThickness: 0
-control*XmPushButton.highlightThickness: 1
-control.XmDialogShell*highlightThickness: 1
-
-control.toolTipEnable: 1
-control.toolTipPostDelay: 3000
-control.toolTipPostDuration: 8000
-control*TipLabel.foreground: black
-control*TipLabel.background: lightyellow
-control*TipShell.borderWidth: 1
-control*TipShell.borderColor: black
-control*tool.orientation: HORIZONTAL
-control*tool.?.shadowThickness: 1
-control*tool.?.labelType: PIXMAP
-control*tool.XmSeparator.orientation: VERTICAL
-control*tool.XmSeparator.width: 12
-control*tool.XmSeparator.margin: 3
-control*tool.prev.labelPixmap: prev
-control*tool.next.labelPixmap: next
-control*tool.snap.labelPixmap: snap
-control*tool.movie.labelPixmap: movie
-control*tool.mute.labelPixmap: mute
-control*tool.exit.labelPixmap: exit
-
-control*menubar*XmMenuShell.XmRowColumn.tearOffModel: TEAR_OFF_ENABLED
-!control*box.XmPushButton*menu.tearOffModel: TEAR_OFF_DISABLED
-
-control.form.view.scrollingPolicy: AUTOMATIC
-!control.form.view.scrollBarDisplayPolicy: STATIC
-control.form.view.scrollBarPlacement: BOTTOM_RIGHT
-control.form.view.scrolledWindowChildType: SCROLL_VERT
-control.form.view.box.resizeWidth: false
-control.form.view.box.packing: PACK_TIGHT
-control.form.view.box.orientation: HORIZONTAL
-control.form.view.box.entryAlignment: ALIGNMENT_CENTER
-
-control.form.?.leftAttachment: ATTACH_FORM
-control.form.?.rightAttachment: ATTACH_FORM
-control.form.tool.topAttachment: ATTACH_WIDGET
-control.form.tool.topWidget: menubar
-control.form.view.topAttachment: ATTACH_WIDGET
-control.form.view.topWidget: tool
-control.form.view.bottomAttachment: ATTACH_WIDGET
-control.form.view.bottomWidget: status
-control.form.status.bottomAttachment: ATTACH_FORM
-control.form.status.orientation: HORIZONTAL
-control.form.status.marginWidth: 0
-control.form.status.marginHeight: 0
-control.form.status.spacing: 0
-!control.form.status.adjustLast: True
-control.form.status.f.shadowType: SHADOW_IN
-control.form.status.f.shadowThickness: 1
-control.form.status.f.?.marginLeft: 3
-control.form.status.f.?.marginRight: 3
-control.form.status.f.?.labelString:
-
-
-! ----------------------------------------------------------------------------
-! channel scan
-
-*chscan_popup.deleteResponse: DESTROY
-*chscan_popup*dialogStyle: DIALOG_PRIMARY_APPLICATION_MODAL
-*chscan_popup*okLabelString: Start
-*chscan_popup*channel.editable: False
-*chscan_popup*channel.slidingMode: THERMOMETER
-*chscan_popup*channel.orientation: HORIZONTAL
-*chscan_popup*channel.titleString: -
-*chscan_popup*channel.sliderVisual: SHADOWED_BACKGROUND
-
-
-! ----------------------------------------------------------------------------
-! channel properties
-
-*prop_popup.deleteResponse: UNMAP
-*prop_popup*rc.key.editable: false
-*prop_popup*rc.channel.visibleItemCount: 16
-*prop_popup*rc.channel.comboBoxType: DROP_DOWN_LIST
-*prop_popup*rc.channel.positionMode: ONE_BASED
-*prop_popup*rc.keyL.marginTop: 10
-*prop_popup*rc.channelL.marginTop: 10
-*prop_popup*rc.XmLabel.alignment: ALIGNMENT_BEGINNING
-
-*prop_popup*no_name_popup.deleteResponse: DESTROY
-
-
-! ----------------------------------------------------------------------------
-! preferences
-
-*pref_popup.deleteResponse: UNMAP
-*pref_popup*fsL.frameChildType: FRAME_TITLE_CHILD
-*pref_popup*optL.frameChildType: FRAME_TITLE_CHILD
-*pref_popup*mixL.frameChildType: FRAME_TITLE_CHILD
-*pref_popup*jpeg.orientation: HORIZONTAL
-*pref_popup*jpeg.quality.columns: 3
-
-
-! ----------------------------------------------------------------------------
-! scale controls
-
-scale.form.shadowThickness: 0
-scale*XmScale.orientation: HORIZONTAL
-scale*XmScale.showValue: true
-scale*XmScale.highlightOnEnter: true
-scale*XmScale.highlightThickness: 1
-scale*XmScale.topAttachment: ATTACH_WIDGET
-scale*XmScale.leftAttachment: ATTACH_FORM
-scale*XmScale.rightAttachment: ATTACH_FORM
-scale*XmScale.topOffset: 5
-scale*XmScale.BottomOffset: 5
-scale*XmScale.leftOffset: 10
-scale*XmScale.rightOffset: 10
-scale*XmScale.width: 160
-
-
-! ----------------------------------------------------------------------------
-! filter property controls
-
-filter*label.frameChildType: FRAME_TITLE_CHILD
-filter*XmScale.showValue: true
-filter*XmScale.highlightOnEnter: true
-filter*XmScale.highlightThickness: 1
-filter*XmScale.orientation: HORIZONTAL
-
-
-! ----------------------------------------------------------------------------
-! levels window (sound level monitor)
-
-levels*highlightThickness: 1
-levels*XmScale.editable: False
-levels*XmScale.slidingMode: THERMOMETER
-levels*XmScale.orientation: HORIZONTAL
-levels*XmScale.sliderVisual: SHADOWED_BACKGROUND
-levels*XmScale.minimum: 0
-levels*XmScale.maximum: 128
-levels*XmScale.width: 256
-
-
-! ----------------------------------------------------------------------------
-! streamer window
-
-streamer.title: record a movie
-streamer*XmComboBox.comboBoxType: DROP_DOWN_COMBO_BOX
-streamer*XmComboBox.width: 100
-streamer*XmLabel.alignment: ALIGNMENT_BEGINNING
-
-streamer*highlightThickness: 1
-!streamer*navigationType: STICKY_TAB_GROUP
-
-streamer*form.?.leftAttachment: ATTACH_FORM
-streamer*form.?.rightAttachment: ATTACH_FORM
-streamer*form.?.topAttachment: ATTACH_WIDGET
-streamer*form.?.topOffset: 10
-streamer*form.?.leftOffset: 10
-streamer*form.?.rightOffset: 10
-streamer*form.XmFrame.marginWidth: 5
-streamer*form.XmFrame.marginHeight: 5
-
-streamer*XmFrame.XmRowColumn.orientation: HORIZONTAL
-streamer*XmFrame.fbox.orientation: VERTICAL
-streamer*XmFrame.fbox.spacing: 0
-streamer*XmFrame.fbox.marginWidth: 0
-streamer*XmFrame.fbox.marginHeight: 0
-streamer*XmFrame.fbox.?.orientation: HORIZONTAL
-
-streamer*form.buttons.marginWidth: 0
-streamer*form.buttons.packing: PACK_COLUMN
-streamer*form.buttons.orientation: HORIZONTAL
-streamer*form.buttons.entryAlignment: ALIGNMENT_CENTER
-streamer*form.buttons.bottomAttachment: ATTACH_FORM
-
-streamer*driverL.frameChildType: FRAME_TITLE_CHILD
-streamer*videoL.frameChildType: FRAME_TITLE_CHILD
-streamer*audioL.frameChildType: FRAME_TITLE_CHILD
-streamer*fileL.frameChildType: FRAME_TITLE_CHILD
-
-streamer*videoF.topWidget: driverF
-streamer*audioF.topWidget: videoF
-streamer*fileF.topWidget: audioF
-streamer*status.topWidget: fileF
-streamer*buttons.topWidget: status
-streamer*buttons.bottomOffset: 10
-
-streamer*rate.itemCount: 6
-streamer*rate.visibleItemCount: 6
-streamer*rate.items: 8000,11025,22050,32000,44100,48000
-streamer*rate.selectedItem: 44100
-streamer*fps.itemCount: 11
-streamer*fps.visibleItemCount: 11
-streamer*fps.items: 3,5,8,10,12,15,18,20,24,25,30
-streamer*fps.selectedItem: 12
-
-streamer*fvideo.translations: #override\
- Ctrl<Key>Tab: Complete()
-streamer*faudio.translations: #override\
- Ctrl<Key>Tab: Complete()
-
-! debug
-streamer.form.*.borderWidth: 0
-!streamer.form.*.borderColor: darkred
-!streamer*form.XmFrame.background: yellow
-
-
-! ----------------------------------------------------------------------------
-! man page renderer
-
-MoTV.man_popup.deleteResponse: DESTROY
-MoTV.man_popup*view.width: 500
-MoTV.man_popup*view.height: 600
-MoTV.man_popup*view.scrollingPolicy: AUTOMATIC
-MoTV.man_popup*view.scrollBarPlacement: BOTTOM_RIGHT
-
-MoTV.man_popup*label.alignment: ALIGNMENT_BEGINNING
-MoTV.man_popup*label.marginWidth: 5
-MoTV.man_popup*label.marginHeight: 5
-MoTV.man_popup*label.renderTable: bold,underline
-MoTV.man_popup*label.renderTable.fontType: FONT_IS_FONTSET
-MoTV.man_popup*label.renderTable.fontName: \
- -*-fixed-medium-r-normal--13-*-*-*-*-*, \
- fixed
-MoTV.man_popup*label.renderTable.bold.fontType: FONT_IS_FONTSET
-MoTV.man_popup*label.renderTable.bold.fontName: \
- -*-fixed-bold-r-normal--13-*-*-*-*-*, \
- fixed
-MoTV.man_popup*label.renderTable.underline.underlineType: SINGLE_LINE
-
-
-! ----------------------------------------------------------------------------
-! Onscreen window
-
-MoTV.onscreen.allowShellResize: true
-MoTV.onscreen*background: black
-MoTV.onscreen*borderColor: black
-MoTV.onscreen*foreground: lightgreen
-MoTV.onscreen*highlightThickness: 0
-
-MoTV.vtx.allowShellResize: true
-MoTV.vtx*borderColor: black
-MoTV.vtx*background: black
-MoTV.vtx*foreground: white
-MoTV.vtx*highlightThickness: 0
-
diff --git a/src/MoTV.it.ad b/src/MoTV.it.ad
deleted file mode 100644
index 8f038f1..0000000
--- a/src/MoTV.it.ad
+++ /dev/null
@@ -1,605 +0,0 @@
-! Mij <mij@fastwebnet.it>
-
-! ----------------------------------------------------------------------------
-! some standard motif stuff [i18n]
-
-*.cancelLabelString: Annulla
-*.applyLabelString: Applica
-*.XmFileSelectionBox.dirListLabelString: Directory
-*.XmFileSelectionBox.fileListLabelString: File
-*.XmFileSelectionBox.selectionLabelString: Seleziona
-
-
-! ----------------------------------------------------------------------------
-! fonts [i18n]
-
-*renderTable:
-*renderTable.fontType: FONT_IS_FONTSET
-*renderTable.fontName: \
- -*-helvetica-medium-r-normal--*-120-*-*-*-*, \
- -*-*-*-r-normal--*-120-*-*-*-*, \
- fixed
-
-MoTV.onscreen.label.renderTable:
-MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
-MoTV.onscreen.label.renderTable.fontName: \
- -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*, \
- fixed
-
-MoTV.vtx.label.renderTable:
-MoTV.vtx.label.renderTable.fontType: FONT_IS_FONT
-MoTV.vtx.label.renderTable.fontName: 10x20
-
-
-! ----------------------------------------------------------------------------
-! strings [i18n]
-
-MoTV.about_box_popup.title: Info su motv
-MoTV*about_box_popup*messageString: \
- motv - Motif TV application \n\
- \n\
- (c) 2002 Gerd Knorr <kraxel@bytesex.org>
-
-MoTV.errbox_popup.title: Errori
-
-control*menubar*fileM.tearOffTitle: File
-control*menubar*editM.tearOffTitle: Modifica
-control*menubar*toolsM.tearOffTitle: Strumenti
-control*menubar*tuneM.tearOffTitle: Sintonizzatore
-control*menubar*grabM.tearOffTitle: Cattura immagine
-control*menubar*ratioM.tearOffTitle: Aspetto
-control*menubar*launchM.tearOffTitle: Avvia
-control*menubar*subM.tearOffTitle: Sottotitoli
-control*menubar*stationsM.tearOffTitle: Stazioni TV
-control*menubar*optionsM.tearOffTitle: Opzioni
-control*menubar*helpM.tearOffTitle: Aiuto
-control*menubar*captureM.tearOffTitle: Cattura
-control*menubar*freqM.tearOffTitle: Frequency table
-control*menubar*inputM.tearOffTitle: Input
-control*menubar*normM.tearOffTitle: Protocollo TV
-
-control*menubar.file.labelString: File
-control*menubar.file.mnemonic: F
-control*menubar.edit.labelString: Modifica
-control*menubar.edit.mnemonic: M
-control*menubar.tools.labelString: Tools
-control*menubar.tools.mnemonic: T
-control*menubar*tune.labelString: Sintonizzatore
-control*menubar*grab.labelString: Cattura immagine
-control*menubar*ratio.labelString: Aspetto
-control*menubar*launch.labelString: Avvia
-control*menubar*sub.labelString: Sottotitoli
-control*menubar.stations.labelString: Stazioni
-control*menubar.stations.mnemonic: S
-control*menubar.options.labelString: Opzioni
-control*menubar.options.mnemonic: O
-!control*menubar.filter.labelString: Filter
-!control*menubar.filter.mnemonic: F
-control*menubar.help.labelString: Aiuto
-control*menubar.help.mnemonic: A
-
-! file menu
-control*menubar*rec.labelString: Registra filmato ...
-control*menubar*rec.mnemonic: R
-control*menubar*rec.acceleratorText: R
-control*menubar*rec.accelerator: <Key>R
-control*menubar*quit.labelString: Esci
-control*menubar*quit.mnemonic: Q
-control*menubar*quit.acceleratorText: Q
-control*menubar*quit.accelerator: <Key>Q
-
-! edit menu
-control*menubar*copy.labelString: Copia
-control*menubar*copy.mnemonic: C
-control*menubar*copy.acceleratorText: Ctrl+C
-control*menubar*copy.accelerator: Ctrl<Key>C
-
-! tools menu
-control*menubar*mute.labelString: Muto
-control*menubar*mute.mnemonic: a
-control*menubar*mute.acceleratorText: A
-control*menubar*mute.accelerator: <Key>A
-control*menubar*full.labelString: Fullscreen
-control*menubar*full.mnemonic: F
-control*menubar*full.acceleratorText: F
-control*menubar*full.accelerator: <Key>F
-control*menubar*ontop.labelString: Stay on Top
-control*menubar*ontop.mnemonic: T
-control*menubar*ontop.acceleratorText: T
-control*menubar*ontop.accelerator: <Key>T
-!control*menubar*levels.labelString: Record level monitor ...
-!control*menubar*levels.mnemonic: l
-!control*menubar*levels.acceleratorText: L
-!control*menubar*levels.accelerator: <Key>L
-control*menubar*st_up.labelString: Stazione successiva
-control*menubar*st_up.acceleratorText: pagina su
-control*menubar*st_dn.labelString: Stazione precedente
-control*menubar*st_dn.acceleratorText: pagina giù
-
-control*menubar*ch_up.labelString: Canale Successivo
-control*menubar*ch_up.acceleratorText: su
-control*menubar*ch_dn.labelString: Canale precedente
-control*menubar*ch_dn.acceleratorText: giù
-control*menubar*fi_up.labelString: Sintonizzazione di precisione su
-control*menubar*fi_up.acceleratorText: destra
-control*menubar*fi_dn.labelString: Sintonizzazione di precisione giù
-control*menubar*fi_dn.acceleratorText: sinistra
-
-control*menubar*ppm_f.labelString: PPM, dimensione max
-control*menubar*ppm_f.acceleratorText: G
-control*menubar*ppm_f.accelerator: ~Ctrl<Key>G
-control*menubar*ppm_w.labelString: PPM, dimensione finestra
-control*menubar*ppm_w.acceleratorText: Ctrl+G
-control*menubar*ppm_w.accelerator: Ctrl<Key>G
-control*menubar*jpg_f.labelString: JPEG, dimensione max
-control*menubar*jpg_f.mnemonic: J
-control*menubar*jpg_f.acceleratorText: J
-control*menubar*jpg_f.accelerator: ~Ctrl<Key>J
-control*menubar*jpg_w.labelString: JPEG, dimensione finestra
-control*menubar*jpg_w.acceleratorText: Ctrl+J
-control*menubar*jpg_w.accelerator: Ctrl<Key>J
-
-control*menubar*r_no.labelString: non fisso
-control*menubar*r_no.mnemonic: n
-control*menubar*r_43.labelString: 4:3
-control*menubar*r_43.mnemonic: 4
-
-control*menubar*s_off.labelString: disabilita
-control*menubar*s_150.labelString: pagina 150
-control*menubar*s_150.mnemonic: 1
-control*menubar*s_333.labelString: pagina 333
-control*menubar*s_333.mnemonic: 3
-control*menubar*s_777.labelString: pagina 777
-control*menubar*s_777.mnemonic: 7
-control*menubar*s_888.labelString: pagina 888
-control*menubar*s_888.mnemonic: 8
-
-! options menu
-control*menubar*add.labelString: Aggiungi stazione ...
-control*menubar*add.mnemonic: A
-control*menubar*scan.labelString: Scansiona canale ...
-control*menubar*pref.labelString: Preferenze ...
-control*menubar*pref.mnemonic: P
-control*menubar*save.labelString: Salva configurazione
-control*menubar*save.mnemonic: S
-
-control*menubar*capture.labelString: Cattura
-control*menubar*capture.mnemonic: C
-control*menubar*freq.labelString: Frequency table
-control*menubar*freq.mnemonic: F
-control*menubar*scale.labelString: Scala ...
-control*menubar*scale.mnemonic: S
-control*menubar*scale.acceleratorText: S
-control*menubar*scale.accelerator: <Key>S
-
-control*menubar*input.labelString: Input
-control*menubar*input.mnemonic: I
-control*menubar*norm.labelString: Protocollo TV
-control*menubar*norm.mnemonic: N
-
-! filter menu
-!control*menubar*fnone.labelString: No filter
-!control*menubar*fnone.mnemonic: N
-
-! help menu
-control*menubar*man.labelString: Mostra la manpage
-control*menubar*man.mnemonic: m
-control*menubar*about.labelString: Informazioni ...
-control*menubar*about.mnemonic: A
-
-! tooltips (needs openmotif 2.2)
-control*tool.prev.toolTipString: Stazione precedente
-control*tool.next.toolTipString: Stazione successiva
-control*tool.snap.toolTipString: Cattura immagine
-control*tool.movie.toolTipString: Registra filmato
-control*tool.mute.toolTipString: Muto
-control*tool.exit.toolTipString: Esci
-
-control*box.XmPushButton*menu.del.labelString: Cancella
-control*box.XmPushButton*menu.edit.labelString: Modifica ...
-
-! channel scan
-*chscan_popup.title: Scansiona canale
-*chscan_popup*okLabelString: Inizia
-*chscan_popup*hints.labelString: \
- COn questa opzione puoi lasciarmi\n\
- scansionare tutti i canali TV. Così\n\
- sarà creata una nuova lista canali\n\
- che sovrascriverà quella attuale.\n\
- \n\
- Prima assicurati di aver configurato\n\
- correttamente TV Norm e Frequency table\n\
- (vedi menu Opzioni), altrimenti la scansione\n\
- non individuerà alcuna stazione ...\n\
- \n
-
-! channel properties
-*prop_popup.title: Modifica stazione
-*prop_popup*rc.nameL.labelString: Nome stazione
-*prop_popup*rc.keyL.labelString: Acceleratore
-*prop_popup*rc.channelL.labelString: Canale
-*prop_popup*rc.buttons.ok.labelString: OK
-*prop_popup*rc.buttons.cancel.labelString: Annulla
-*prop_popup*no_name_popup.title: Errore
-*prop_popup*no_name_popup*messageString: \
- Devi specificare un nome per la stazione
-
-! preferences
-*pref_popup.title: Preferenze
-*pref_popup*okLabelString: Salva
-*pref_popup*fsL.labelString: Fullscreen
-*pref_popup*fsT.labelString: Abilita lo switchng video
-*pref_popup*fsO.labelString: Modalità video:
-*pref_popup*mixL.labelString: Volume (necessario riavviare)
-*pref_popup*mixT.labelString: Usa il mixer per regolare il volume
-*pref_popup*mix1O.labelString: Periferica mixer:
-*pref_popup*mix2O.labelString: Controllo mixer:
-*pref_popup*optL.labelString: Opzioni
-*pref_popup*osd.labelString: Usa onscreen display in modalità fullscreen
-*pref_popup*keypad-ntsc.labelString: keypad: modalità ntsc
-*pref_popup*keypad-partial.labelString: \
- keypad: abilita parzialmente (cambia al primo tasto)
-*pref_popup*jpeg.label.labelString: Qaulità JPEG:
-
-scale.title: Controlli scala
-scale*volume.titleString: Volume
-scale*bright.titleString: Luminosità
-scale*hue.titleString: Tono
-scale*color.titleString: Saturazione
-scale*contrast.titleString: Contrasto
-
-!levels.title: Monitor
-!levels*enable.labelstring: enable
-
-streamer.title: registra filmato
-streamer*driverL.labelString: Formato
-streamer*driver.labelString: Driver:
-streamer*videoL.labelString: Opzioni video
-streamer*video.labelString: Formato:
-streamer*fpsL.labelString: fps:
-streamer*audioL.labelString: Opzioni audio
-streamer*audio.labelString: Formato:
-streamer*rateL.labelString: frequenza:
-streamer*fileL.labelString: Nome file
-streamer*fvideoL.labelString: Video:
-streamer*faudioL.labelString: Audio:
-streamer*status.labelString: fissa
-
-streamer*files.labelString: Naviga ...
-streamer*buttons.rec.labelString: Registra
-streamer*buttons.stop.labelString: Stop
-streamer*buttons.play.labelString: Playback
-streamer*buttons.cancel.labelString: Chiudi
-
-MoTV.man_popup.title: Manuale
-MoTV.man_popup*okLabelString: chiudi finestra
-MoTV.man_popup*label.labelString: Attendi ...
-
-! ----------------------------------------------------------------------------
-! main window
-
-MoTV.geometry: 320x240+50+50
-MoTV.winGravity: Static
-
-MoTV.translations: #override \n\
- <PropertyNotify>: Remote()
-
-MoTV.tv.traversalOn: false
-MoTV.tv.highlightThickness: 0
-MoTV.tv.background: black
-MoTV.tv.translations: #replace \n\
- <Btn2Down>: Ipc(drag) \n\
- <Btn3Up>: Popup(control) \n\
- ~Alt ~Ctrl <Key>C: Popup(control) \n\
- Ctrl <Key>C: Ipc(primary) \n\
- Alt <Key>C: Ipc(primary) \n\
- <Key>R: Popup(streamer) \n\
- <Key>S: Popup(scale) \n\
- <Key>L: Popup(levels) \n\
- <Key>H: man(motv) \n\
- <Key>F1: man(motv) \n\
- <Key>osfHelp: man(motv) \n\
- \
- <Key>Q: CloseMain() \n\
- <Key>KP_Add: Command(volume,inc) \n\
- <Key>KP_Subtract: Command(volume,dec) \n\
- <Key>KP_Enter: Command(volume,mute) \n\
- <Key>osfActivate: Command(volume,mute) \n\
- <Key>A: Command(volume,mute) \n\
- <Key>F: Command(fullscreen) \n\
- Ctrl<Key>Z: Zap(fast) \n\
- <Key>Z: Zap() \n\
- Ctrl<Key>G: Command(snap,ppm,win) \n\
- Ctrl<Key>J: Command(snap,jpeg,win) \n\
- <Key>G: Command(snap,ppm,full) \n\
- <Key>J: Command(snap,jpeg,full) \n\
- Ctrl<Key>Up: Scan() \n\
- Ctrl<Key>osfUp: Scan() \n\
- ~Ctrl<Key>Up: Command(setchannel,next) \n\
- ~Ctrl<Key>osfUp: Command(setchannel,next) \n\
- <Key>Down: Command(setchannel,prev) \n\
- <Key>osfDown: Command(setchannel,prev) \n\
- <Key>Right: Command(setchannel,fine_up) \n\
- <Key>osfRight: Command(setchannel,fine_up) \n\
- <Key>Left: Command(setchannel,fine_down) \n\
- <Key>osfLeft: Command(setchannel,fine_down) \n\
- <Key>Page_Up: Command(setstation,next) \n\
- <Key>osfPageUp: Command(setstation,next) \n\
- <Key>Page_Down: Command(setstation,prev) \n\
- <Key>osfPageDown: Command(setstation,prev) \n\
- <Key>BackSpace: Command(setstation,back) \n\
- <Key>osfBackSpace: Command(setstation,back) \n\
- <Btn4Up>: Command(setstation,next) \n\
- <Btn5Up>: Command(setstation,prev) \n\
- <Key>V: Command(capture,toggle) \n\
- <Key>space: Command(setstation,next) \n\
- \
- <Key>KP_0: Command(keypad,0) \n\
- <Key>KP_1: Command(keypad,1) \n\
- <Key>KP_2: Command(keypad,2) \n\
- <Key>KP_3: Command(keypad,3) \n\
- <Key>KP_4: Command(keypad,4) \n\
- <Key>KP_5: Command(keypad,5) \n\
- <Key>KP_6: Command(keypad,6) \n\
- <Key>KP_7: Command(keypad,7) \n\
- <Key>KP_8: Command(keypad,8) \n\
- <Key>KP_9: Command(keypad,9)
-
-
-MoTV.tv*stationsM.menuPost: <Btn1>
-
-MoTV.about_box_popup.deleteResponse: DESTROY
-MoTV.errbox_popup.deleteResponse: UNMAP
-
-MoTV.tv*stationsM.packing: PACK_COLUMN
-control*menubar*stationsM.packing: PACK_COLUMN
-
-
-! ----------------------------------------------------------------------------
-! control window
-
-control.title: MoTV
-control.iconName: MoTV
-control.iconPixmap: TVimg
-control.iconMask: TVmask
-control*highlightThickness: 0
-control*XmPushButton.highlightThickness: 1
-control.XmDialogShell*highlightThickness: 1
-
-control.toolTipEnable: 1
-control.toolTipPostDelay: 3000
-control.toolTipPostDuration: 8000
-control*TipLabel.foreground: black
-control*TipLabel.background: lightyellow
-control*TipShell.borderWidth: 1
-control*TipShell.borderColor: black
-control*tool.orientation: HORIZONTAL
-control*tool.?.shadowThickness: 1
-control*tool.?.labelType: PIXMAP
-control*tool.XmSeparator.orientation: VERTICAL
-control*tool.XmSeparator.width: 12
-control*tool.XmSeparator.margin: 3
-control*tool.prev.labelPixmap: prev
-control*tool.next.labelPixmap: next
-control*tool.snap.labelPixmap: snap
-control*tool.movie.labelPixmap: movie
-control*tool.mute.labelPixmap: mute
-control*tool.exit.labelPixmap: exit
-
-control*menubar*XmMenuShell.XmRowColumn.tearOffModel: TEAR_OFF_ENABLED
-!control*box.XmPushButton*menu.tearOffModel: TEAR_OFF_DISABLED
-
-control.form.view.scrollingPolicy: AUTOMATIC
-!control.form.view.scrollBarDisplayPolicy: STATIC
-control.form.view.scrollBarPlacement: BOTTOM_RIGHT
-control.form.view.scrolledWindowChildType: SCROLL_VERT
-control.form.view.box.resizeWidth: false
-control.form.view.box.packing: PACK_TIGHT
-control.form.view.box.orientation: HORIZONTAL
-control.form.view.box.entryAlignment: ALIGNMENT_CENTER
-
-control.form.?.leftAttachment: ATTACH_FORM
-control.form.?.rightAttachment: ATTACH_FORM
-control.form.tool.topAttachment: ATTACH_WIDGET
-control.form.tool.topWidget: menubar
-control.form.view.topAttachment: ATTACH_WIDGET
-control.form.view.topWidget: tool
-control.form.view.bottomAttachment: ATTACH_WIDGET
-control.form.view.bottomWidget: status
-control.form.status.bottomAttachment: ATTACH_FORM
-control.form.status.orientation: HORIZONTAL
-control.form.status.marginWidth: 0
-control.form.status.marginHeight: 0
-control.form.status.spacing: 0
-!control.form.status.adjustLast: True
-control.form.status.f.shadowType: SHADOW_IN
-control.form.status.f.shadowThickness: 1
-control.form.status.f.?.marginLeft: 3
-control.form.status.f.?.marginRight: 3
-control.form.status.f.?.labelString:
-
-
-! ----------------------------------------------------------------------------
-! channel scan
-
-*chscan_popup.deleteResponse: DESTROY
-*chscan_popup*dialogStyle: DIALOG_PRIMARY_APPLICATION_MODAL
-*chscan_popup*okLabelString: Start
-*chscan_popup*channel.editable: False
-*chscan_popup*channel.slidingMode: THERMOMETER
-*chscan_popup*channel.orientation: HORIZONTAL
-*chscan_popup*channel.titleString: -
-*chscan_popup*channel.sliderVisual: SHADOWED_BACKGROUND
-
-
-! ----------------------------------------------------------------------------
-! channel properties
-
-*prop_popup.deleteResponse: UNMAP
-*prop_popup*rc.key.editable: false
-*prop_popup*rc.channel.visibleItemCount: 16
-*prop_popup*rc.channel.comboBoxType: DROP_DOWN_LIST
-*prop_popup*rc.channel.positionMode: ONE_BASED
-*prop_popup*rc.keyL.marginTop: 10
-*prop_popup*rc.channelL.marginTop: 10
-*prop_popup*rc.XmLabel.alignment: ALIGNMENT_BEGINNING
-
-*prop_popup*no_name_popup.deleteResponse: DESTROY
-
-
-! ----------------------------------------------------------------------------
-! preferences
-
-*pref_popup.deleteResponse: UNMAP
-*pref_popup*fsL.frameChildType: FRAME_TITLE_CHILD
-*pref_popup*optL.frameChildType: FRAME_TITLE_CHILD
-*pref_popup*mixL.frameChildType: FRAME_TITLE_CHILD
-*pref_popup*jpeg.orientation: HORIZONTAL
-*pref_popup*jpeg.quality.columns: 3
-
-
-! ----------------------------------------------------------------------------
-! scale controls
-
-scale.form.shadowThickness: 0
-scale*XmScale.orientation: HORIZONTAL
-scale*XmScale.showValue: true
-scale*XmScale.highlightOnEnter: true
-scale*XmScale.highlightThickness: 1
-scale*XmScale.topAttachment: ATTACH_WIDGET
-scale*XmScale.leftAttachment: ATTACH_FORM
-scale*XmScale.rightAttachment: ATTACH_FORM
-scale*XmScale.topOffset: 5
-scale*XmScale.BottomOffset: 5
-scale*XmScale.leftOffset: 10
-scale*XmScale.rightOffset: 10
-scale*XmScale.width: 160
-
-
-! ----------------------------------------------------------------------------
-! filter property controls
-
-filter*label.frameChildType: FRAME_TITLE_CHILD
-filter*XmScale.showValue: true
-filter*XmScale.highlightOnEnter: true
-filter*XmScale.highlightThickness: 1
-filter*XmScale.orientation: HORIZONTAL
-
-
-! ----------------------------------------------------------------------------
-! levels window (sound level monitor)
-
-levels*highlightThickness: 1
-levels*XmScale.editable: False
-levels*XmScale.slidingMode: THERMOMETER
-levels*XmScale.orientation: HORIZONTAL
-levels*XmScale.sliderVisual: SHADOWED_BACKGROUND
-levels*XmScale.minimum: 0
-levels*XmScale.maximum: 128
-levels*XmScale.width: 256
-
-
-! ----------------------------------------------------------------------------
-! streamer window
-
-streamer.title: record a movie
-streamer*XmComboBox.comboBoxType: DROP_DOWN_COMBO_BOX
-streamer*XmComboBox.width: 100
-streamer*XmLabel.alignment: ALIGNMENT_BEGINNING
-
-streamer*highlightThickness: 1
-!streamer*navigationType: STICKY_TAB_GROUP
-
-streamer*form.?.leftAttachment: ATTACH_FORM
-streamer*form.?.rightAttachment: ATTACH_FORM
-streamer*form.?.topAttachment: ATTACH_WIDGET
-streamer*form.?.topOffset: 10
-streamer*form.?.leftOffset: 10
-streamer*form.?.rightOffset: 10
-streamer*form.XmFrame.marginWidth: 5
-streamer*form.XmFrame.marginHeight: 5
-
-streamer*XmFrame.XmRowColumn.orientation: HORIZONTAL
-streamer*XmFrame.fbox.orientation: VERTICAL
-streamer*XmFrame.fbox.spacing: 0
-streamer*XmFrame.fbox.marginWidth: 0
-streamer*XmFrame.fbox.marginHeight: 0
-streamer*XmFrame.fbox.?.orientation: HORIZONTAL
-
-streamer*form.buttons.marginWidth: 0
-streamer*form.buttons.packing: PACK_COLUMN
-streamer*form.buttons.orientation: HORIZONTAL
-streamer*form.buttons.entryAlignment: ALIGNMENT_CENTER
-streamer*form.buttons.bottomAttachment: ATTACH_FORM
-
-streamer*driverL.frameChildType: FRAME_TITLE_CHILD
-streamer*videoL.frameChildType: FRAME_TITLE_CHILD
-streamer*audioL.frameChildType: FRAME_TITLE_CHILD
-streamer*fileL.frameChildType: FRAME_TITLE_CHILD
-
-streamer*videoF.topWidget: driverF
-streamer*audioF.topWidget: videoF
-streamer*fileF.topWidget: audioF
-streamer*status.topWidget: fileF
-streamer*buttons.topWidget: status
-streamer*buttons.bottomOffset: 10
-
-streamer*rate.itemCount: 6
-streamer*rate.visibleItemCount: 6
-streamer*rate.items: 8000,11025,22050,32000,44100,48000
-streamer*rate.selectedItem: 44100
-streamer*fps.itemCount: 11
-streamer*fps.visibleItemCount: 11
-streamer*fps.items: 3,5,8,10,12,15,18,20,24,25,30
-streamer*fps.selectedItem: 12
-
-streamer*fvideo.translations: #override\
- Ctrl<Key>Tab: Complete()
-streamer*faudio.translations: #override\
- Ctrl<Key>Tab: Complete()
-
-! debug
-streamer.form.*.borderWidth: 0
-!streamer.form.*.borderColor: darkred
-!streamer*form.XmFrame.background: yellow
-
-
-! ----------------------------------------------------------------------------
-! man page renderer
-
-MoTV.man_popup.deleteResponse: DESTROY
-MoTV.man_popup*view.width: 500
-MoTV.man_popup*view.height: 600
-MoTV.man_popup*view.scrollingPolicy: AUTOMATIC
-MoTV.man_popup*view.scrollBarPlacement: BOTTOM_RIGHT
-
-MoTV.man_popup*label.alignment: ALIGNMENT_BEGINNING
-MoTV.man_popup*label.marginWidth: 5
-MoTV.man_popup*label.marginHeight: 5
-MoTV.man_popup*label.renderTable: bold,underline
-MoTV.man_popup*label.renderTable.fontType: FONT_IS_FONTSET
-MoTV.man_popup*label.renderTable.fontName: \
- -*-fixed-medium-r-normal--13-*-*-*-*-*, \
- fixed
-MoTV.man_popup*label.renderTable.bold.fontType: FONT_IS_FONTSET
-MoTV.man_popup*label.renderTable.bold.fontName: \
- -*-fixed-bold-r-normal--13-*-*-*-*-*, \
- fixed
-MoTV.man_popup*label.renderTable.underline.underlineType: SINGLE_LINE
-
-
-! ----------------------------------------------------------------------------
-! Onscreen window
-
-MoTV.onscreen.allowShellResize: true
-MoTV.onscreen*background: black
-MoTV.onscreen*borderColor: black
-MoTV.onscreen*foreground: lightgreen
-MoTV.onscreen*highlightThickness: 0
-
-MoTV.vtx.allowShellResize: true
-MoTV.vtx*borderColor: black
-MoTV.vtx*background: black
-MoTV.vtx*foreground: white
-MoTV.vtx*highlightThickness: 0
-
diff --git a/src/rootv.c b/src/rootv.c
deleted file mode 100644
index bed8f43..0000000
--- a/src/rootv.c
+++ /dev/null
@@ -1,190 +0,0 @@
-#include "config.h"
-#ifndef HAVE_LIBXV
-#include "stdio.h"
-int main(void)
-{puts("Compiled without Xvideo extention support, sorry.");exit(0);}
-#else
-/*
- * put a TV image to the root window - requires Xvideo
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <signal.h>
-
-#include <X11/Xlib.h>
-#include <X11/StringDefs.h>
-#include <X11/Xatom.h>
-#include <X11/extensions/Xv.h>
-#include <X11/extensions/Xvlib.h>
-
-#include "parseconfig.h"
-
-int port=-1,bye=0;
-GC gc;
-Atom mute;
-
-XvAdaptorInfo *ai;
-XvEncodingInfo *ei;
-XvAttribute *at;
-XvImageFormatValues *fo;
-
-static char *reasons[] = {
- "XvStarted",
- "XvStopped",
- "XvBusy",
- "XvPreempted",
- "XvHardError",
-};
-
-static void
-wm_menu(void)
-{
- char filename[100];
- char **list;
-
- sprintf(filename,"%s/%s",getenv("HOME"),".xawtv");
- cfg_parse_file(CONFIGFILE);
- cfg_parse_file(filename);
-
- printf("\"TV stations\" MENU\n");
- for (list = cfg_list_sections(); *list != NULL; list++) {
- if (0 == strcmp(*list,"defaults")) continue;
- if (0 == strcmp(*list,"global")) continue;
- if (0 == strcmp(*list,"launch")) continue;
- if (0 == strcmp(*list,"eventmap")) continue;
- printf("\t\"%s\" EXEC v4lctl setstation \"%s\"\n",*list,*list);
- }
- printf("\"TV stations\" END\n");
-}
-
-int
-main(int argc, char *argv[])
-{
- Display *dpy;
- Screen *scr;
- Window win = 0;
- XWindowAttributes wts;
-
- int ver, rel, req, ev, err;
- int adaptors,attributes;
- int i,stop;
-
- stop = 0;
- while (argc > 1) {
- if (0 == strcmp(argv[1],"-wm")) {
- /* windowmaker menu */
- wm_menu();
- exit(0);
- }
- if (0 == strcmp(argv[1],"-stop")) {
- /* stop video */
- stop = 1;
- argc--;
- argv++;
- } else if (argc > 2 && 0 == strcmp(argv[1],"-id")) {
- /* pick window id (default: root window) */
- sscanf(argv[2],"%li",&win);
- argc-=2;
- argv+=2;
- } else {
- fprintf(stderr,"unknown arg: %s\n",argv[1]);
- exit(1);
- }
- }
-
- /* init X11 */
- dpy = XOpenDisplay(NULL);
- scr = DefaultScreenOfDisplay(dpy);
- if (0 == win)
- win = RootWindowOfScreen(scr);
-
- /* query+print Xvideo properties */
- if (Success != XvQueryExtension(dpy,&ver,&rel,&req,&ev,&err)) {
- puts("Server does'nt support Xvideo");
- exit(1);
- }
- if (Success != XvQueryAdaptors(dpy,DefaultRootWindow(dpy),&adaptors,&ai)) {
- puts("Oops: XvQueryAdaptors failed");
- exit(1);
- }
- printf("%d adaptors available.\n",adaptors);
- for (i = 0; i < adaptors; i++) {
- printf(" name: %s\n",ai[i].name);
-
- /* video adaptor ? */
- if ((ai[i].type & XvInputMask) &&
- (ai[i].type & XvVideoMask) &&
- (port == -1)) {
- port = ai[i].base_id;
- }
- }
- if (adaptors > 0)
- XvFreeAdaptorInfo(ai);
- if (-1 == port)
- exit(0);
-
- at = XvQueryPortAttributes(dpy,port,&attributes);
- for (i = 0; i < attributes; i++) {
- if (0 == strcmp("XV_MUTE",at[i].name))
- mute = XInternAtom(dpy, "XV_MUTE", False);
- }
-
- if (stop) {
- /* stop video */
- XvStopVideo(dpy,port,win);
- if (mute)
- XvSetPortAttribute(dpy,port,mute,1);
- XCloseDisplay(dpy);
- exit(0);
- }
-
- /* fork into background, but keep tty */
- if (fork())
- exit(0);
-
- /* put video to the root window */
- gc = XCreateGC(dpy,win,0,NULL);
- XGetWindowAttributes(dpy, win, &wts);
- XvPutVideo(dpy,port,win,gc,
- 0,0,wts.width,wts.height,
- 0,0,wts.width,wts.height);
- if (mute)
- XvSetPortAttribute(dpy,port,mute,0);
-
- /* receive events */
- XvSelectPortNotify(dpy, port, 1);
- XvSelectVideoNotify(dpy, win, 1);
-
- /* main loop */
- for (;!bye;) {
- XEvent event;
- XNextEvent(dpy,&event);
- switch (event.type-ev) {
- case XvVideoNotify:
- {
- XvVideoNotifyEvent *xve = (XvVideoNotifyEvent*)&event;
- printf("XvVideoNotify, reason=%s, exiting\n",
- reasons[xve->reason]);
- bye=1;
- break;
- }
- case XvPortNotify:
- {
- XvPortNotifyEvent *xpe = (XvPortNotifyEvent*)&event;
- printf("XvPortNotify: %s=%ld\n",
- XGetAtomName(dpy,xpe->attribute),xpe->value);
- break;
- }
- }
- }
- XvStopVideo(dpy,port,win);
- XClearWindow(dpy,win);
- XCloseDisplay(dpy);
-
- /* keep compiler happy */
- exit(0);
-}
-
-#endif
diff --git a/src/xscreensaver.c b/src/xscreensaver.c
deleted file mode 100644
index c6e51a2..0000000
--- a/src/xscreensaver.c
+++ /dev/null
@@ -1,454 +0,0 @@
-/* xscreensaver-command, Copyright (c) 1991-1998
- * by Jamie Zawinski <jwz@jwz.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation. No representations are made about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
-#include <sys/types.h>
-
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif /* HAVE_SYS_SELECT_H */
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include <X11/Xproto.h> /* for CARD32 */
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <X11/Xutil.h> /* for XGetClassHint() */
-#include <X11/Xos.h>
-
-#define XAWTV 1
-#if XAWTV
-# include <X11/Intrinsic.h>
-# include "xscreensaver.h"
-extern XtAppContext app_context;
-#else
-# include "remote.h"
-#endif
-
-#ifdef _VROOT_H_
-ERROR! you must not include vroot.h in this file
-#endif
-
-extern char *progname;
-extern Atom XA_SCREENSAVER, XA_SCREENSAVER_VERSION, XA_SCREENSAVER_RESPONSE;
-extern Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_TIME;
-extern Atom XA_VROOT, XA_SELECT, XA_DEMO;
-
-
-static XErrorHandler old_handler = 0;
-static Bool got_badwindow = False;
-static int
-BadWindow_ehandler (Display *dpy, XErrorEvent *error)
-{
- if (error->error_code == BadWindow)
- {
- got_badwindow = True;
- return 0;
- }
- else
- {
- fprintf (stderr, "%s: ", progname);
- return (*old_handler) (dpy, error);
- }
-}
-
-
-
-static Window
-find_screensaver_window (Display *dpy, char **version)
-{
- int i;
- Window root = RootWindowOfScreen (DefaultScreenOfDisplay (dpy));
- Window root2, parent, *kids;
- unsigned int nkids;
-
- if (version) *version = 0;
-
- if (! XQueryTree (dpy, root, &root2, &parent, &kids, &nkids))
- abort ();
- if (root != root2)
- abort ();
- if (parent)
- abort ();
- if (! (kids && nkids))
- abort ();
- for (i = 0; i < nkids; i++)
- {
- Atom type;
- int format;
- unsigned long nitems, bytesafter;
- char *v;
-
- if (XGetWindowProperty (dpy, kids[i],
- XA_SCREENSAVER_VERSION,
- 0, 200, False, XA_STRING,
- &type, &format, &nitems, &bytesafter,
- (unsigned char **) &v)
- == Success
- && type != None)
- {
- if (version)
- *version = v;
- return kids[i];
- }
- }
- fprintf (stderr, "%s: no screensaver is running on display %s\n", progname,
- DisplayString (dpy));
- return 0;
-}
-
-
-static int
-send_xscreensaver_command (Display *dpy, Atom command, long arg,
- Window *window_ret)
-{
- char *v = 0;
- Window window = find_screensaver_window (dpy, &v);
- XWindowAttributes xgwa;
-
- if (window_ret)
- *window_ret = window;
-
- if (!window)
- return -1;
-
- /* Select for property change events, so that we can read the response. */
- XGetWindowAttributes (dpy, window, &xgwa);
- XSelectInput (dpy, window, xgwa.your_event_mask | PropertyChangeMask);
-
- if (command == XA_SCREENSAVER_TIME ||
- command == XA_SCREENSAVER_VERSION)
- {
- XClassHint hint;
- memset (&hint, 0, sizeof(hint));
- if (!v || !*v)
- {
- fprintf (stderr, "%s: version property not set on window 0x%x?\n",
- progname, (unsigned int) window);
- return -1;
- }
-
- XGetClassHint(dpy, window, &hint);
- if (!hint.res_class)
- {
- fprintf (stderr, "%s: class hints not set on window 0x%x?\n",
- progname, (unsigned int) window);
- return -1;
- }
-
- fprintf (stdout, "%s %s", hint.res_class, v);
-
- if (command != XA_SCREENSAVER_TIME)
- {
- fprintf (stdout, "\n");
- }
- else
- {
- Atom type;
- int format;
- unsigned long nitems, bytesafter;
- unsigned char *data = 0;
- Bool active_p = False;
-
- if (XGetWindowProperty (dpy, window, XA_VROOT,
- 0, 0, False, XA_WINDOW,
- &type, &format, &nitems, &bytesafter,
- &data)
- == Success
- && type != None)
- active_p = True;
-
- if (data) free (data);
- data = 0;
-
- if (XGetWindowProperty (dpy, window,
- XA_SCREENSAVER_TIME,
- 0, 1, False, XA_INTEGER,
- &type, &format, &nitems, &bytesafter,
- &data)
- == Success
- && type == XA_INTEGER
- && data)
- {
- CARD32 time32 = *((CARD32 *)data);
- time_t tt = (time_t) time32;
-
- if (active_p)
- fprintf (stdout, ": screen blanked since ");
- else
- /* suggestions for a better way to phrase this are welcome. */
- fprintf (stdout, ": screen non-blanked since ");
- fprintf (stdout, "%s", ctime(&tt));
- if (data) free (data);
- }
- else
- {
- if (data) free (data);
- fprintf (stdout, "\n");
- fflush (stdout);
- fprintf (stderr, "%s: no time on window 0x%x (%s %s).\n",
- progname, (unsigned int) window,
- hint.res_class, (v ? v : "???"));
- return -1;
- }
- }
-
- /* No need to read a response for these commands. */
- return 1;
- }
- else
- {
- XEvent event;
- long arg1 = arg;
- long arg2 = 0;
-
- if (arg < 0)
- abort();
- else if (arg == 0 && command == XA_SELECT)
- abort();
- else if (arg != 0 && command == XA_DEMO)
- {
- arg1 = 300; /* version number of the XA_DEMO protocol, */
- arg2 = arg; /* since it didn't use to take an argument. */
- }
-
- event.xany.type = ClientMessage;
- event.xclient.display = dpy;
- event.xclient.window = window;
- event.xclient.message_type = XA_SCREENSAVER;
- event.xclient.format = 32;
- memset (&event.xclient.data, 0, sizeof(event.xclient.data));
- event.xclient.data.l[0] = (long) command;
- event.xclient.data.l[1] = arg1;
- event.xclient.data.l[2] = arg2;
- if (! XSendEvent (dpy, window, False, 0L, &event))
- {
- fprintf (stderr, "%s: XSendEvent(dpy, 0x%x ...) failed.\n",
- progname, (unsigned int) window);
- return -1;
- }
- }
- XSync (dpy, 0);
- return 0;
-}
-
-
-static int
-xscreensaver_command_response (Display *dpy, Window window, Bool verbose_p)
-{
- int fd = ConnectionNumber (dpy);
- int timeout = 10;
- int status;
- fd_set fds;
- struct timeval tv;
-
- while (1)
- {
- FD_ZERO(&fds);
- FD_SET(fd, &fds);
- memset(&tv, 0, sizeof(tv));
- tv.tv_sec = timeout;
- status = select (fd+1, &fds, 0, &fds, &tv);
-
- if (status < 0)
- {
- char buf[1024];
- sprintf (buf, "%s: waiting for reply", progname);
- perror (buf);
- return status;
- }
- else if (status == 0)
- {
- fprintf (stderr, "%s: no response to command.\n", progname);
- return -1;
- }
- else
- {
- XEvent event;
-#if XAWTV
- XtAppNextEvent(app_context,&event);
-#else
- XNextEvent (dpy, &event);
-#endif
- if (event.xany.type == PropertyNotify &&
- event.xproperty.state == PropertyNewValue &&
- event.xproperty.atom == XA_SCREENSAVER_RESPONSE)
- {
- Status st2;
- Atom type;
- int format;
- unsigned long nitems, bytesafter;
- char *msg = 0;
-
- old_handler = XSetErrorHandler (BadWindow_ehandler);
- XSync (dpy, False);
-
- st2 = XGetWindowProperty (dpy, window,
- XA_SCREENSAVER_RESPONSE,
- 0, 1024, True,
- AnyPropertyType,
- &type, &format, &nitems, &bytesafter,
- (unsigned char **) &msg);
-
- if (got_badwindow)
- {
- fprintf (stdout,
- "%s: xscreensaver window has been deleted.\n",
- progname);
- return 0;
- }
-
- if (st2 == Success && type != None)
- {
- if (type != XA_STRING || format != 8)
- {
- fprintf (stderr,
- "%s: unrecognized response property.\n",
- progname);
- if (msg) XFree (msg);
- return -1;
- }
- else if (!msg || (msg[0] != '+' && msg[0] != '-'))
- {
- fprintf (stderr,
- "%s: unrecognized response message.\n",
- progname);
- if (msg) XFree (msg);
- return -1;
- }
- else
- {
- int ret = (msg[0] == '+' ? 0 : -1);
- if (verbose_p || ret != 0)
- fprintf ((ret < 0 ? stderr : stdout),
- "%s: %s\n",
- progname,
- msg+1);
- XFree (msg);
- return ret;
- }
- }
-#if XAWTV
- } else {
- XtDispatchEvent(&event);
-#endif
- }
- }
- }
-}
-
-
-int
-xscreensaver_command (Display *dpy, Atom command, long arg, Bool verbose_p)
-{
- Window w = 0;
- int status = send_xscreensaver_command (dpy, command, arg, &w);
- if (status == 0)
- status = xscreensaver_command_response (dpy, w, verbose_p);
- fflush (stdout);
- fflush (stderr);
- return status;
-}
-
-
-void
-server_xscreensaver_version (Display *dpy,
- char **version_ret,
- char **user_ret,
- char **host_ret)
-{
- Window window = find_screensaver_window (dpy, 0);
-
- Atom type;
- int format;
- unsigned long nitems, bytesafter;
-
- if (version_ret)
- *version_ret = 0;
- if (host_ret)
- *host_ret = 0;
-
- if (!window)
- return;
-
- if (version_ret)
- {
- char *v = 0;
- XGetWindowProperty (dpy, window, XA_SCREENSAVER_VERSION, 0, 1,
- False, XA_STRING, &type, &format, &nitems,
- &bytesafter, (unsigned char **) &v);
- if (v)
- {
- *version_ret = strdup (v);
- XFree (v);
- }
- }
-
- if (user_ret || host_ret)
- {
- char *id = 0;
- const char *user = 0;
- const char *host = 0;
-
- XGetWindowProperty (dpy, window, XA_SCREENSAVER_ID, 0, 512,
- False, XA_STRING, &type, &format, &nitems,
- &bytesafter, (unsigned char **) &id);
- if (id && *id)
- {
- const char *old_tag = " on host ";
- const char *s = strstr (id, old_tag);
- if (s)
- {
- /* found ID of the form "1234 on host xyz". */
- user = 0;
- host = s + strlen (old_tag);
- }
- else
- {
- char *o = 0, *p = 0, *c = 0;
- o = strchr (id, '(');
- if (o) p = strchr (o, '@');
- if (p) c = strchr (p, ')');
- if (c)
- {
- /* found ID of the form "1234 (user@host)". */
- user = o+1;
- host = p+1;
- *p = 0;
- *c = 0;
- }
- }
-
- }
-
- if (user && *user && *user != '?')
- *user_ret = strdup (user);
- else
- *user_ret = 0;
-
- if (host && *host && *host != '?')
- *host_ret = strdup (host);
- else
- *host_ret = 0;
-
- if (id)
- XFree (id);
- }
-}
diff --git a/tools/Makefile.in b/tools/Makefile.in
deleted file mode 100644
index 00d8f98..0000000
--- a/tools/Makefile.in
+++ /dev/null
@@ -1,49 +0,0 @@
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../Make.config
-
-CFLAGS=-g @CFLAGS@ $(WARN_FLAGS) $(LFS_FLAGS) $(X11_FLAGS) \
- -I$(srcdir)/.. -I..
-
-PROGS=dump-mixers record showriff @TOOLS@
-
-##########################################################################
-
-all build: $(PROGS)
-
-dump-mixers: dump-mixers.o
- $(CC) $(CFLAGS) -o $@ dump-mixers.o $(OSS_LIBS)
-
-showriff: showriff.o
- $(CC) $(CFLAGS) -o $@ showriff.o
-
-record: record.o
- $(CC) $(CFLAGS) -o $@ record.o $(CURSES_LIBS) $(OSS_LIBS)
-
-propwatch: propwatch.o
- $(CC) $(CFLAGS) -o $@ propwatch.o $(ATHENA_LIBS)
-
-install: all
- $(INSTALL_DIR) $(bindir)
- $(INSTALL_DIR) $(mandir)/man1
- $(INSTALL_PROGRAM) -s dump-mixers $(bindir)
- $(INSTALL_PROGRAM) -s record $(bindir)
- $(INSTALL_PROGRAM) -s showriff $(bindir)
- $(INSTALL_PROGRAM) -s propwatch $(bindir)
- for page in $(srcdir)/*.man; do \
- dest=`basename $$page .man`; \
- $(INSTALL_DATA) $$page $(mandir)/man1/$$dest.1; \
- done
-
-clean:
- -rm -f *.o *.moc core* TAGS
-
-realclean distclean: clean
- -rm -f $(PROGS) Makefile *~ *.bak
-
-dep depend:
- $(DEPEND) -- $(CFLAGS) -- *.c
-
-#-------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/tools/README b/tools/README
deleted file mode 100644
index c6d32bd..0000000
--- a/tools/README
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Some handy tools I've used/wrote for debugging.
-
-
-dump-mixers
------------
-
-Just does what the name suggests: It simply dumps the current mixer
-settings to stdout. I used it to debug the msp3400 module, maybe
-someone finds this useful...
-
-It scans the devices /dev/mixer[0123]
-
-
-record
-------
-
-records *.wav files in CD quality. See "record -h" for more info.
-Has a input level meter, which might be useful for sound trouble
-shooting (check if the mixer settings ok for recording from the
-TV card etc.)
-
-
-propwatch
----------
-
-X11 Property tracker. If you want to know how to keep track of xawtv's
-_XAWTV_STATION property, look at this code. It has a short man page.
-
-
-showriff
---------
-
-Display the structure of RIFF files (wav, avi). Based on some code
-published by the german c't magazine some years ago.
-
diff --git a/vbistuff/Makefile b/vbistuff/Makefile
new file mode 100644
index 0000000..4e33e30
--- /dev/null
+++ b/vbistuff/Makefile
@@ -0,0 +1,2 @@
+default:
+ cd ..; $(MAKE)
diff --git a/vbistuff/Subdir.mk b/vbistuff/Subdir.mk
new file mode 100644
index 0000000..d65684f
--- /dev/null
+++ b/vbistuff/Subdir.mk
@@ -0,0 +1,42 @@
+
+# variables
+TARGETS-vbistuff := vbistuff/alevtd vbistuff/ntsc-cc
+
+HTML-alevtd := \
+ vbistuff/alevt.css.h \
+ vbistuff/top.html.h \
+ vbistuff/bottom.html.h \
+ vbistuff/about.html.h \
+
+OBJS-alevtd := \
+ vbistuff/main.o \
+ vbistuff/request.o \
+ vbistuff/response.o \
+ vbistuff/page.o \
+ libng/devices.o \
+ libvbi/libvbi.a
+OBJS-ntsc-cc := \
+ vbistuff/ntsc-cc.o
+
+# local targets
+vbistuff/alevtd: $(OBJS-alevtd)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-alevtd)
+
+vbistuff/ntsc-cc: $(OBJS-ntsc-cc)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-ntsc-cc) $(ATHENA_LIBS)
+
+
+# global targets
+all:: $(TARGETS-vbistuff)
+
+install::
+ $(INSTALL_PROGRAM) -s $(TARGETS-vbistuff) $(bindir)
+
+clean::
+ rm -f $(HTML-alevtd)
+
+distclean::
+ rm -f $(TARGETS-vbistuff)
+
+# special dependences
+vbistuff/main.o:: vbistuff/main.c $(HTML-alevtd)
diff --git a/http/about.html.in b/vbistuff/about.html.in
index e09683d..e09683d 100644
--- a/http/about.html.in
+++ b/vbistuff/about.html.in
diff --git a/http/alevt.css.in b/vbistuff/alevt.css.in
index 08648b4..08648b4 100644
--- a/http/alevt.css.in
+++ b/vbistuff/alevt.css.in
diff --git a/http/bottom.html.in b/vbistuff/bottom.html.in
index aed8480..aed8480 100644
--- a/http/bottom.html.in
+++ b/vbistuff/bottom.html.in
diff --git a/http/httpd.h b/vbistuff/httpd.h
index 20cacc5..9d4dbf2 100644
--- a/http/httpd.h
+++ b/vbistuff/httpd.h
@@ -58,6 +58,7 @@ extern int debug;
extern int tcp_port;
extern int ascii_art;
extern char *server_name;
+extern int canonicalhost;
extern char server_host[];
extern time_t now,start;
diff --git a/http/main.c b/vbistuff/main.c
index 77500eb..160bb1c 100644
--- a/http/main.c
+++ b/vbistuff/main.c
@@ -39,7 +39,7 @@
/* ---------------------------------------------------------------------- */
/* public variables - server configuration */
-char *server_name = "alevt/1.5.1";
+char *server_name = "alevt/1.6.0";
int debug = 0;
int dontdetach = 0;
@@ -49,6 +49,7 @@ int tcp_port = 0;
int ascii_art = 0;
char *listen_ip = NULL;
char *listen_port = "5654";
+int canonicalhost = 0;
char server_host[256];
char user[17];
char group[17];
@@ -124,6 +125,7 @@ usage(char *name)
" -c n set max. allowed connections [%i]\n"
" -p port use tcp-port >port< [%s]\n"
" -n host server hostname is >host< [%s]\n"
+ " -N host same as above + UseCanonicalName\n"
" -i ip bind to IP-address >ip< [%s]\n"
" -l log write access log to file >log< [%s]\n"
" -L log same as above + flush every line\n"
@@ -562,7 +564,8 @@ main(int argc, char *argv[])
/* parse options */
for (;;) {
- if (-1 == (c = getopt(argc,argv,"69hasdFrp:n:i:t:c:u:g:l:L:v:")))
+ if (-1 == (c = getopt(argc,argv,"69hasdFr"
+ "p:N:n:i:t:c:u:g:l:L:v:")))
break;
switch (c) {
case 'h':
@@ -589,6 +592,9 @@ main(int argc, char *argv[])
case 'r':
cachereset++;
break;
+ case 'N':
+ canonicalhost = 1;
+ /* fall through */
case 'n':
strcpy(server_host,optarg);
break;
diff --git a/cc/ntsc-cc.c b/vbistuff/ntsc-cc.c
index 78b6cc9..78b6cc9 100644
--- a/cc/ntsc-cc.c
+++ b/vbistuff/ntsc-cc.c
diff --git a/http/page.c b/vbistuff/page.c
index a608b96..a608b96 100644
--- a/http/page.c
+++ b/vbistuff/page.c
diff --git a/http/request.c b/vbistuff/request.c
index d37960b..307095c 100644
--- a/http/request.c
+++ b/vbistuff/request.c
@@ -178,8 +178,11 @@ parse_request(struct REQUEST *req)
}
}
- /* take care about the hostname */
- strncpy(req->hostname,server_host,64);
+ /* make sure we have a hostname */
+ if (req->hostname[0] == '\0' || canonicalhost)
+ strncpy(req->hostname,server_host,64);
+
+ /* lowercase hostname */
for (h = req->hostname; *h != 0; h++) {
if (*h < 'A' || *h > 'Z')
continue;
diff --git a/http/response.c b/vbistuff/response.c
index b544f47..b544f47 100644
--- a/http/response.c
+++ b/vbistuff/response.c
diff --git a/http/top.html.in b/vbistuff/top.html.in
index a67ab20..a67ab20 100644
--- a/http/top.html.in
+++ b/vbistuff/top.html.in
diff --git a/webcam/Makefile.in b/webcam/Makefile.in
deleted file mode 100644
index 05d3380..0000000
--- a/webcam/Makefile.in
+++ /dev/null
@@ -1,36 +0,0 @@
-srcdir=@srcdir@
-VPATH=$(srcdir)
-
-include ../Make.config
-
-CFLAGS=-g @CFLAGS@ $(WARN_FLAGS) $(LIB_FLAGS) -I..
-LDLIBS=$(THREAD_LIBS) -ljpeg
-
-PROGS=webcam
-
-OBJS=webcam.o ftp.o parseconfig.o
-
-##########################################################################
-
-all build: $(PROGS)
-
-webcam: $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) ../libng/libng.a $(LDLIBS) $(DLFLAGS)
-
-install: all
- $(INSTALL_DIR) $(bindir)
- $(INSTALL_DIR) $(mandir)/man1
- $(INSTALL_PROGRAM) -s webcam $(bindir)
- $(INSTALL_DATA) $(srcdir)/webcam.man $(mandir)/man1/webcam.1
-
-clean:
- -rm -f $(OBJS) *.moc core* TAGS
-
-realclean distclean: clean
- -rm -f $(PROGS) Makefile *~ *.bak
-
-depend dep:
- $(DEPEND) -- $(CFLAGS) -- *.c
-
-##########################################################################
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/webcam/parseconfig.c b/webcam/parseconfig.c
deleted file mode 100644
index 7a0dd66..0000000
--- a/webcam/parseconfig.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * config file parser
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "parseconfig.h"
-
-struct CFG_ENTRIES {
- int ent_count;
- char **ent_names;
- char **ent_values;
- int **ent_seen;
-};
-
-struct CFG_SECTIONS {
- int sec_count;
- char **sec_names;
- struct CFG_ENTRIES **sec_entries;
-};
-
-/* ------------------------------------------------------------------------ */
-
-static struct CFG_SECTIONS *c;
-
-/* ------------------------------------------------------------------------ */
-
-#define ALLOC_SIZE 16
-
-static struct CFG_SECTIONS*
-cfg_init_sections(void)
-{
- struct CFG_SECTIONS *c;
- c = malloc(sizeof(struct CFG_SECTIONS));
- memset(c,0,sizeof(struct CFG_SECTIONS));
- c->sec_names = malloc(ALLOC_SIZE*sizeof(char*));
- c->sec_names[0] = NULL;
- c->sec_entries = malloc(ALLOC_SIZE*sizeof(struct CFG_ENTRIES*));
- c->sec_entries[0] = NULL;
- return c;
-}
-
-static struct CFG_ENTRIES*
-cfg_init_entries(void)
-{
- struct CFG_ENTRIES *e;
- e = malloc(sizeof(struct CFG_ENTRIES));
- memset(e,0,sizeof(struct CFG_ENTRIES));
- e->ent_names = malloc(ALLOC_SIZE*sizeof(char*));
- e->ent_names[0] = NULL;
- e->ent_values = malloc(ALLOC_SIZE*sizeof(char*));
- e->ent_values[0] = NULL;
- e->ent_seen = malloc(ALLOC_SIZE*sizeof(int));
- e->ent_seen[0] = 0;
- return e;
-}
-
-static struct CFG_ENTRIES*
-cfg_find_section(struct CFG_SECTIONS *c, char *name)
-{
- struct CFG_ENTRIES* e;
- int i;
-
- for (i = 0; i < c->sec_count; i++)
- if (0 == strcasecmp(c->sec_names[i],name))
- return c->sec_entries[i];
-
- /* 404 not found => create a new one */
- if ((c->sec_count % ALLOC_SIZE) == (ALLOC_SIZE-2)) {
- c->sec_names = realloc(c->sec_names,(c->sec_count+2+ALLOC_SIZE)*sizeof(char*));
- c->sec_entries = realloc(c->sec_entries,(c->sec_count+2+ALLOC_SIZE)*sizeof(struct CFG_ENTRIES*));
- }
- e = cfg_init_entries();
- c->sec_names[c->sec_count] = strdup(name);
- c->sec_entries[c->sec_count] = e;
- c->sec_count++;
- c->sec_names[c->sec_count] = NULL;
- c->sec_entries[c->sec_count] = NULL;
- return e;
-}
-
-static void
-cfg_set_entry(struct CFG_ENTRIES *e, char *name, char *value)
-{
- int i;
-
- for (i = 0; i < e->ent_count; i++)
- if (0 == strcasecmp(e->ent_names[i],name))
- break;
- if (i == e->ent_count) {
- /* 404 not found => create a new one */
- if ((e->ent_count % ALLOC_SIZE) == (ALLOC_SIZE-2)) {
- e->ent_names = realloc(e->ent_names,(e->ent_count+2+ALLOC_SIZE)*sizeof(char*));
- e->ent_values = realloc(e->ent_values,(e->ent_count+2+ALLOC_SIZE)*sizeof(char*));
- e->ent_seen = realloc(e->ent_seen,(e->ent_count+2+ALLOC_SIZE)*sizeof(int));
- }
- e->ent_count++;
- e->ent_names[e->ent_count] = NULL;
- e->ent_values[e->ent_count] = NULL;
- e->ent_seen[e->ent_count] = 0;
- }
- e->ent_names[i] = strdup(name);
- e->ent_values[i] = strdup(value);
-}
-
-/* ------------------------------------------------------------------------ */
-
-int
-cfg_parse_file(char *filename)
-{
- struct CFG_ENTRIES *e = NULL;
- char line[256],tag[64],value[192];
- FILE *fp;
- int nr;
-
- if (NULL == c)
- c = cfg_init_sections();
- if (NULL == (fp = fopen(filename,"r")))
- return -1;
-
- nr = 0;
- while (NULL != fgets(line,255,fp)) {
- nr++;
- if (line[0] == '\n' || line[0] == '#' || line[0] == '%')
- continue;
- if (1 == sscanf(line,"[%99[^]]]",value)) {
- /* [section] */
- e = cfg_find_section(c,value);
- } else if (2 == sscanf(line," %63[^= ] = %191[^\n]",tag,value)) {
- /* foo = bar */
- if (NULL == e) {
- fprintf(stderr,"%s:%d: error: no section\n",filename,nr);
- } else {
- cfg_set_entry(e,tag,value);
- }
- } else {
- /* Huh ? */
- fprintf(stderr,"%s:%d: syntax error\n",filename,nr);
- }
- }
- return 0;
-}
-
-/* ------------------------------------------------------------------------ */
-
-char**
-cfg_list_sections()
-{
- return c->sec_names;
-}
-
-char**
-cfg_list_entries(char *name)
-{
- int i;
-
- for (i = 0; i < c->sec_count; i++)
- if (0 == strcasecmp(c->sec_names[i],name))
- return c->sec_entries[i]->ent_names;
- return NULL;
-}
-
-char*
-cfg_get_str(char *sec, char *ent)
-{
- struct CFG_ENTRIES* e = NULL;
- char *v = NULL;
- int i;
-
- for (i = 0; i < c->sec_count; i++)
- if (0 == strcasecmp(c->sec_names[i],sec))
- e = c->sec_entries[i];
- if (NULL == e)
- return NULL;
- for (i = 0; i < e->ent_count; i++)
- if (0 == strcasecmp(e->ent_names[i],ent)) {
- v = e->ent_values[i];
- e->ent_seen[i]++;
- }
- return v;
-}
-
-int
-cfg_get_int(char *sec, char *ent)
-{
- char *val;
-
- val = cfg_get_str(sec,ent);
- if (NULL == val)
- return -1;
- return atoi(val);
-}
-
-int
-cfg_get_signed_int(char *sec, char *ent)
-{
- char *val;
-
- val = cfg_get_str(sec,ent);
- if (NULL == val)
- return 0;
- return atoi(val);
-}
-
-float
-cfg_get_float(char *sec, char *ent)
-{
- char *val;
-
- val = cfg_get_str(sec,ent);
- if (NULL == val)
- return -1;
- return atof(val);
-}
diff --git a/webcam/parseconfig.h b/webcam/parseconfig.h
deleted file mode 100644
index e3b609d..0000000
--- a/webcam/parseconfig.h
+++ /dev/null
@@ -1,7 +0,0 @@
-int cfg_parse_file(char *filename);
-char** cfg_list_sections(void);
-char** cfg_list_entries(char *name);
-char* cfg_get_str(char *sec, char *ent);
-int cfg_get_int(char *sec, char *ent);
-int cfg_get_signed_int(char *sec, char *ent);
-float cfg_get_float(char *sec, char *ent);
diff --git a/webcam/webcam-old.c b/webcam/webcam-old.c
deleted file mode 100644
index 271bfc0..0000000
--- a/webcam/webcam-old.c
+++ /dev/null
@@ -1,577 +0,0 @@
-/*
- * (c) 1998-2000 Gerd Knorr
- *
- * capture a image, compress as jpeg and upload to the webserver
- * using ftp the ftp utility
- *
- * not used any more -- but I'll leave the source code hanging
- * around here as it is a nice, short example for v4l usage.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/time.h>
-#include <sys/mman.h>
-#include <sys/ioctl.h>
-
-#include <linux/videodev.h> /* change this to "videodev2.h" for v4l2 */
-
-#include "jpeglib.h"
-#include "ftp.h"
-#include "parseconfig.h"
-
-
-/* ---------------------------------------------------------------------- */
-/* configuration */
-
-#define JPEG_FILE "/tmp/webcam.jpeg"
-
-char *ftp_host = "www";
-char *ftp_user = "webcam";
-char *ftp_pass = "xxxxxx";
-char *ftp_dir = "public_html/images";
-char *ftp_file = "webcam.jpeg";
-char *ftp_tmp = "uploading.jpeg";
-int ftp_passive = 1;
-int ftp_auto = 0;
-int ftp_local = 0;
-
-char *grab_device = "/dev/video0";
-char *grab_text = "webcam %Y-%m-%d %H:%M:%S"; /* strftime */
-int grab_width = 320;
-int grab_height = 240;
-int grab_delay = 3;
-int grab_rotate = 0;
-int grab_top = 0;
-int grab_left = 0;
-int grab_bottom = -1;
-int grab_right = -1;
-int grab_quality= 75;
-int grab_trigger= 0;
-int grab_once = 0;
-
-/* these work for v4l only, not v4l2 */
-int grab_input = 0;
-int grab_norm = VIDEO_MODE_PAL;
-
-/* ---------------------------------------------------------------------- */
-
-void swap_rgb24(char *mem, int n);
-
-/* ---------------------------------------------------------------------- */
-/* jpeg stuff */
-
-int
-write_jpeg(char *filename, char *data, int width, int height)
-{
- struct jpeg_compress_struct cinfo;
- struct jpeg_error_mgr jerr;
- FILE *fp;
- int i;
- unsigned char *line;
-
- if (NULL == (fp = fopen(filename,"w"))) {
- fprintf(stderr,"can't open %s for writing: %s\n",
- filename,strerror(errno));
- return -1;
- }
-
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_compress(&cinfo);
- jpeg_stdio_dest(&cinfo, fp);
- cinfo.image_width = width;
- cinfo.image_height = height;
- cinfo.input_components = 3;
- cinfo.in_color_space = JCS_RGB;
- jpeg_set_defaults(&cinfo);
- jpeg_set_quality(&cinfo, grab_quality, TRUE);
- jpeg_start_compress(&cinfo, TRUE);
-
- for (i = 0, line = data; i < height; i++, line += width*3)
- jpeg_write_scanlines(&cinfo, &line, 1);
-
- jpeg_finish_compress(&(cinfo));
- jpeg_destroy_compress(&(cinfo));
- fclose(fp);
-
- return 0;
-}
-
-/* ---------------------------------------------------------------------- */
-/* capture stuff - v4l2 */
-
-#ifdef VIDIOC_QUERYCAP
-
-static struct v4l2_capability grab_cap;
-static struct v4l2_format grab_pix;
-static int grab_fd, grab_size;
-static unsigned char *grab_data;
-
-void
-grab_init()
-{
- if (-1 == (grab_fd = open(grab_device,O_RDWR))) {
- fprintf(stderr,"open %s: %s\n",grab_device,strerror(errno));
- exit(1);
- }
- if (-1 == ioctl(grab_fd,VIDIOC_QUERYCAP,&grab_cap)) {
- fprintf(stderr,"%s: no v4l2 device\n",grab_device);
- exit(1);
- }
- if (-1 == ioctl(grab_fd, VIDIOC_G_FMT, &grab_pix)) {
- perror("ioctl VIDIOC_G_FMT");
- exit(1);
- }
- grab_pix.type = V4L2_BUF_TYPE_CAPTURE;
- grab_pix.fmt.pix.pixelformat = V4L2_PIX_FMT_BGR24;
- grab_pix.fmt.pix.depth = 24;
- grab_pix.fmt.pix.width = grab_width;
- grab_pix.fmt.pix.height = grab_height;
- if (-1 == ioctl(grab_fd, VIDIOC_S_FMT, &grab_pix)) {
- perror("ioctl VIDIOC_S_FMT");
- exit(1);
- }
- grab_size = grab_pix.fmt.pix.width * grab_pix.fmt.pix.height *
- ((grab_pix.fmt.pix.depth+7)/8);
- fprintf(stderr,"grabber: using %dx%dx%d => %d byte\n",
- grab_pix.fmt.pix.width,grab_pix.fmt.pix.height,
- grab_pix.fmt.pix.depth,grab_size);
- if (NULL == (grab_data = malloc(grab_size))) {
- fprintf(stderr,"out of virtual memory\n");
- exit(1);
- }
-}
-
-unsigned char*
-grab_one(int *width, int *height)
-{
- int rc;
-
- for (;;) {
- rc = read(grab_fd,grab_data,grab_size);
- if (rc == grab_size) {
- swap_rgb24(grab_data,grab_pix.fmt.
- pix.width*grab_pix.fmt.pix.height);
- *width = grab_pix.fmt.pix.width;
- *height = grab_pix.fmt.pix.height;
- return grab_data;
- }
- fprintf(stderr,"grabber: read: %d != %d\n",grab_size,rc);
- if (-1 == rc)
- perror("grabber: read");
- }
-}
-
-#endif
-
-
-/* ---------------------------------------------------------------------- */
-/* capture stuff - old v4l (bttv) */
-
-#ifdef VIDIOCGCAP
-
-static struct video_capability grab_cap;
-static struct video_mmap grab_buf;
-static struct video_channel grab_chan;
-static struct video_picture grab_pict;
-static struct video_window grab_win;
-static int grab_fd, grab_size, have_mmap;
-static unsigned char *grab_data;
-
-void
-grab_init()
-{
- if (-1 == (grab_fd = open(grab_device,O_RDWR))) {
- fprintf(stderr,"open %s: %s\n",grab_device,strerror(errno));
- exit(1);
- }
- if (-1 == ioctl(grab_fd,VIDIOCGCAP,&grab_cap)) {
- fprintf(stderr,"%s: no v4l device\n",grab_device);
- exit(1);
- }
-
- /* set image source and TV norm */
- grab_chan.channel = grab_input;
- if (-1 == ioctl(grab_fd,VIDIOCGCHAN,&grab_chan)) {
- perror("ioctl VIDIOCGCHAN");
- exit(1);
- }
- grab_chan.channel = grab_input;
- grab_chan.norm = grab_norm;
- if (-1 == ioctl(grab_fd,VIDIOCSCHAN,&grab_chan)) {
- perror("ioctl VIDIOCSCHAN");
- exit(1);
- }
-
- /* try to setup mmap-based capture */
- grab_buf.format = VIDEO_PALETTE_RGB24;
- grab_buf.frame = 0;
- grab_buf.width = grab_width;
- grab_buf.height = grab_height;
- grab_size = grab_buf.width * grab_buf.height * 3;
- grab_data = mmap(0,grab_size,PROT_READ|PROT_WRITE,MAP_SHARED,grab_fd,0);
- if (-1 != (int)grab_data) {
- have_mmap = 1;
- return;
- }
-
- /* fallback to read() */
- fprintf(stderr,"no mmap support available, using read()\n");
- have_mmap = 0;
- grab_pict.depth = 24;
- grab_pict.palette = VIDEO_PALETTE_RGB24;
- if (-1 == ioctl(grab_fd,VIDIOCSPICT,&grab_pict)) {
- perror("ioctl VIDIOCSPICT");
- exit(1);
- }
- if (-1 == ioctl(grab_fd,VIDIOCGPICT,&grab_pict)) {
- perror("ioctl VIDIOCGPICT");
- exit(1);
- }
- memset(&grab_win,0,sizeof(struct video_window));
- grab_win.width = grab_width;
- grab_win.height = grab_height;
- if (-1 == ioctl(grab_fd,VIDIOCSWIN,&grab_win)) {
- perror("ioctl VIDIOCSWIN");
- exit(1);
- }
- if (-1 == ioctl(grab_fd,VIDIOCGWIN,&grab_win)) {
- perror("ioctl VIDIOCGWIN");
- exit(1);
- }
- grab_size = grab_win.width * grab_win.height * 3;
- grab_data = malloc(grab_size);
-}
-
-unsigned char*
-grab_one(int *width, int *height)
-{
- int rc;
-
- for (;;) {
- if (have_mmap) {
- if (-1 == ioctl(grab_fd,VIDIOCMCAPTURE,&grab_buf)) {
- perror("ioctl VIDIOCMCAPTURE");
- } else {
- if (-1 == ioctl(grab_fd,VIDIOCSYNC,&grab_buf)) {
- perror("ioctl VIDIOCSYNC");
- } else {
- swap_rgb24(grab_data,grab_buf.width*grab_buf.height);
- *width = grab_buf.width;
- *height = grab_buf.height;
- return grab_data;
- }
- }
- } else {
- rc = read(grab_fd,grab_data,grab_size);
- if (grab_size != rc) {
- fprintf(stderr,"grabber read error (rc=%d)\n",rc);
- return NULL;
- } else {
- swap_rgb24(grab_data,grab_win.width*grab_win.height);
- *width = grab_win.width;
- *height = grab_win.height;
- return grab_data;
- }
- }
- sleep(1);
- }
-}
-
-#endif
-
-/* ---------------------------------------------------------------------- */
-
-#define CHAR_HEIGHT 11
-#define CHAR_WIDTH 6
-#define CHAR_START 4
-#include "font_6x11.h"
-
-void
-add_text(char *image, int width, int height)
-{
- time_t t;
- struct tm *tm;
- char line[128],*ptr;
- int i,x,y,f,len;
-
- time(&t);
- tm = localtime(&t);
- len = strftime(line,127,grab_text,tm);
- fprintf(stderr,"%s\n",line);
-
- for (y = 0; y < CHAR_HEIGHT; y++) {
- ptr = image + 3 * width * (height-CHAR_HEIGHT-2+y) + 12;
- for (x = 0; x < len; x++) {
- f = fontdata[line[x] * CHAR_HEIGHT + y];
- for (i = CHAR_WIDTH-1; i >= 0; i--) {
- if (f & (CHAR_START << i)) {
- ptr[0] = 255;
- ptr[1] = 255;
- ptr[2] = 255;
- }
- ptr += 3;
- }
- }
- }
-}
-
-void
-swap_rgb24(char *mem, int n)
-{
- char c;
- char *p = mem;
- int i = n;
-
- while (--i) {
- c = p[0]; p[0] = p[2]; p[2] = c;
- p += 3;
- }
-}
-
-unsigned char *
-rotate_image(unsigned char * in, int *wp, int *hp, int rot,
- int top, int left, int bottom, int right)
-{
- static unsigned char * rotimg = NULL;
-
- int i, j;
-
- int w = *wp;
- int ow = (right-left);
- int oh = (bottom-top);
-
- if (rotimg == NULL && (rotimg = malloc(ow*oh*3)) == NULL ) {
- fprintf(stderr, "out of memory\n");
- exit(1);
- }
- switch ( rot ) {
- default:
- case 0:
- for (j = 0; j < oh; j++) {
- int ir = (j+top)*w+left;
- int or = j*ow;
- for (i = 0; i < ow; i++) {
- rotimg[3*(or + i)] = in[3*(ir+i)];
- rotimg[3*(or + i)+1] = in[3*(ir+i)+1];
- rotimg[3*(or + i)+2] = in[3*(ir+i)+2];
- }
- }
- *wp = ow;
- *hp = oh;
- break;
- case 1:
- for (i = 0; i < ow; i++) {
- int rr = (ow-1-i)*oh;
- int ic = i+left;
- for (j = 0; j < oh; j++) {
- rotimg[3*(rr+j)] = in[3*((j+top)*w+ic)];
- rotimg[3*(rr+j)+1] = in[3*((j+top)*w+ic)+1];
- rotimg[3*(rr+j)+2] = in[3*((j+top)*w+ic)+2];
- }
- }
- *wp = oh;
- *hp = ow;
- break;
- case 2:
- for (j = 0; j < oh; j++) {
- int ir = (j+top)*w;
- for (i = 0; i < ow; i++) {
- rotimg[3*((oh-1-j)*ow + (ow-1-i))] = in[3*(ir+i+left)];
- rotimg[3*((oh-1-j)*ow + (ow-1-i))+1] = in[3*(ir+i+left)+1];
- rotimg[3*((oh-1-j)*ow + (ow-1-i))+2] = in[3*(ir+i+left)+2];
- }
- }
- *wp = ow;
- *hp = oh;
- break;
- case 3:
- for (i = 0; i < ow; i++) {
- int rr = i*oh;
- int ic = i+left;
- rr += oh-1;
- for (j = 0; j < oh; j++) {
- rotimg[3*(rr-j)] = in[3*((j+top)*w+ic)];
- rotimg[3*(rr-j)+1] = in[3*((j+top)*w+ic)+1];
- rotimg[3*(rr-j)+2] = in[3*((j+top)*w+ic)+2];
- }
- }
- *wp = oh;
- *hp = ow;
- break;
- }
- return rotimg;
-}
-
-unsigned int
-compare_images(unsigned char *last, unsigned char *current,
- int width, int height)
-{
- unsigned char *p1 = last;
- unsigned char *p2 = current;
- int avg, diff, max, i = width*height*3;
-
- for (max = 0, avg = 0; --i; p1++,p2++) {
- diff = (*p1 < *p2) ? (*p2 - *p1) : (*p1 - *p2);
- avg += diff;
- if (diff > max)
- max = diff;
- }
- avg = avg / width / height;
- fprintf(stderr,"compare: max=%d,avg=%d\n",max,avg);
- /* return avg */
- return max;
-}
-
-/* ---------------------------------------------------------------------- */
-
-int
-main(int argc, char *argv[])
-{
- unsigned char *image,*val,*gimg,*lastimg = NULL;
- char filename[100];
- int width, height, i;
-
- /* read config */
- sprintf(filename,"%s/%s",getenv("HOME"),".webcamrc");
- fprintf(stderr,"reading config file: %s\n",filename);
- cfg_parse_file(filename);
-
- if (NULL != (val = cfg_get_str("ftp","host")))
- ftp_host = val;
- if (NULL != (val = cfg_get_str("ftp","user")))
- ftp_user = val;
- if (NULL != (val = cfg_get_str("ftp","pass")))
- ftp_pass = val;
- if (NULL != (val = cfg_get_str("ftp","dir")))
- ftp_dir = val;
- if (NULL != (val = cfg_get_str("ftp","file")))
- ftp_file = val;
- if (NULL != (val = cfg_get_str("ftp","tmp")))
- ftp_tmp = val;
- if (-1 != (i = cfg_get_int("ftp","passive")))
- ftp_passive = i;
- if (-1 != (i = cfg_get_int("ftp","auto")))
- ftp_auto = i;
- if (-1 != (i = cfg_get_int("ftp","debug")))
- ftp_debug = i;
- if (-1 != (i = cfg_get_int("ftp","local")))
- ftp_local = i;
-
- if (NULL != (val = cfg_get_str("grab","device")))
- grab_device = val;
- if (NULL != (val = cfg_get_str("grab","text")))
- grab_text = val;
- if (-1 != (i = cfg_get_int("grab","width")))
- grab_width = i;
- if (-1 != (i = cfg_get_int("grab","height")))
- grab_height = i;
- if (-1 != (i = cfg_get_int("grab","delay")))
- grab_delay = i;
- if (-1 != (i = cfg_get_int("grab","input")))
- grab_input = i;
- if (-1 != (i = cfg_get_int("grab","norm")))
- grab_norm = i;
- if (-1 != (i = cfg_get_int("grab","rotate")))
- grab_rotate = i;
- if (-1 != (i = cfg_get_int("grab","top")))
- grab_top = i;
- if (-1 != (i = cfg_get_int("grab","left")))
- grab_left = i;
- grab_bottom = cfg_get_int("grab","bottom");
- grab_right = cfg_get_int("grab","right");
- if (-1 != (i = cfg_get_int("grab","quality")))
- grab_quality = i;
- if (-1 != (i = cfg_get_int("grab","trigger")))
- grab_trigger = i;
- if (-1 != (i = cfg_get_int("grab","once")))
- grab_once = i;
-
- if ( grab_top < 0 ) grab_top = 0;
- if ( grab_left < 0 ) grab_left = 0;
- if ( grab_bottom > grab_height ) grab_bottom = grab_height;
- if ( grab_right > grab_width ) grab_right = grab_width;
- if ( grab_bottom < 0 ) grab_bottom = grab_height;
- if ( grab_right < 0 ) grab_right = grab_width;
- if ( grab_top >= grab_bottom ) grab_top = 0;
- if ( grab_left >= grab_right ) grab_left = 0;
-
- if ( ftp_local ) {
- if ( ftp_dir != NULL && ftp_dir[0] != '\0' ) {
- char * t = malloc(strlen(ftp_tmp)+strlen(ftp_dir)+2);
- sprintf(t, "%s/%s", ftp_dir, ftp_tmp);
- ftp_tmp = t;
-
- t = malloc(strlen(ftp_file)+strlen(ftp_dir)+2);
- sprintf(t, "%s/%s", ftp_dir, ftp_file);
- ftp_file = t;
- }
- }
-
- /* print config */
- fprintf(stderr,"video4linux webcam v1.3 - (c) 1998-2000 Gerd Knorr\n");
- fprintf(stderr,"grabber config: size %dx%d, input %d, norm %d, "
- "jpeg quality %d\n",
- grab_width,grab_height,grab_input,grab_norm, grab_quality);
- fprintf(stderr, "rotate=%d, top=%d, left=%d, bottom=%d, right=%d\n",
- grab_rotate, grab_top, grab_left, grab_bottom, grab_right);
-
- if ( ftp_local )
- fprintf(stderr,"ftp config:\n local transfer %s => %s\n",
- ftp_tmp,ftp_file);
- else
- fprintf(stderr,"ftp config:\n %s@%s:%s\n %s => %s\n",
- ftp_user,ftp_host,ftp_dir,ftp_tmp,ftp_file);
-
- /* init everything */
- grab_init();
- if ( ! ftp_local ) {
- ftp_init(ftp_auto,ftp_passive);
- ftp_connect(ftp_host,ftp_user,ftp_pass,ftp_dir);
- }
-
- /* main loop */
- for (;;) {
- /* grab a new one */
- gimg = grab_one(&width,&height);
- image = rotate_image(gimg, &width, &height, grab_rotate,
- grab_top, grab_left, grab_bottom, grab_right);
-
- if (grab_trigger) {
- /* look if it has changed */
- if (NULL != lastimg) {
- i = compare_images(lastimg,image,width,height);
- if (i < grab_trigger)
- continue;
- } else {
- lastimg = malloc(width*height*3);
- }
- memcpy(lastimg,image,width*height*3);
- }
-
- /* ok, label it and upload */
- add_text(image,width,height);
- if ( ftp_local ) {
- write_jpeg(ftp_tmp, image, width, height);
- if ( rename(ftp_tmp, ftp_file) ) {
- fprintf(stderr, "can't move %s -> %s\n", ftp_tmp, ftp_file);
- }
- } else {
- write_jpeg(JPEG_FILE, image, width, height);
- if (!ftp_connected)
- ftp_connect(ftp_host,ftp_user,ftp_pass,ftp_dir);
- ftp_upload(JPEG_FILE,ftp_file,ftp_tmp);
- }
-
- if (grab_once)
- break;
- if (grab_delay > 0)
- sleep(grab_delay);
- }
- return 0;
-}
diff --git a/x11/Makefile b/x11/Makefile
new file mode 100644
index 0000000..4e33e30
--- /dev/null
+++ b/x11/Makefile
@@ -0,0 +1,2 @@
+default:
+ cd ..; $(MAKE)
diff --git a/src/MoTV-de b/x11/MoTV-de
index 31ea381..90a6628 100644
--- a/src/MoTV-de
+++ b/x11/MoTV-de
@@ -16,14 +16,12 @@
*renderTable.fontType: FONT_IS_FONTSET
*renderTable.fontName: \
-*-helvetica-medium-r-normal--*-120-*-*-*-*, \
- -*-*-*-r-normal--*-120-*-*-*-*, \
- fixed
+ -*-*-*-r-normal--*-120-*-*-*-*
MoTV.onscreen.label.renderTable:
MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
MoTV.onscreen.label.renderTable.fontName: \
- -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*, \
- fixed
+ -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*
MoTV.vtx.label.renderTable:
MoTV.vtx.label.renderTable.fontType: FONT_IS_FONT
diff --git a/src/MoTV-default b/x11/MoTV-default
index 90a58da..4a618b4 100644
--- a/src/MoTV-default
+++ b/x11/MoTV-default
@@ -16,14 +16,12 @@
*renderTable.fontType: FONT_IS_FONTSET
*renderTable.fontName: \
-*-helvetica-medium-r-normal--*-120-*-*-*-*, \
- -*-*-*-r-normal--*-120-*-*-*-*, \
- fixed
+ -*-*-*-r-normal--*-120-*-*-*-*
MoTV.onscreen.label.renderTable:
MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
MoTV.onscreen.label.renderTable.fontName: \
- -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*, \
- fixed
+ -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*
MoTV.vtx.label.renderTable:
MoTV.vtx.label.renderTable.fontType: FONT_IS_FONT
diff --git a/src/MoTV-fixed b/x11/MoTV-fixed
index d579c48..e70f566 100644
--- a/src/MoTV-fixed
+++ b/x11/MoTV-fixed
@@ -21,13 +21,11 @@ MoTV.tv.translations: #replace \n\
<Key>L: Popup(levels) \n\
<Key>H: man(motv) \n\
<Key>F1: man(motv) \n\
- <Key>osfHelp: man(motv) \n\
\
<Key>Q: CloseMain() \n\
<Key>KP_Add: Command(volume,inc) \n\
<Key>KP_Subtract: Command(volume,dec) \n\
<Key>KP_Enter: Command(volume,mute) \n\
- <Key>osfActivate: Command(volume,mute) \n\
<Key>A: Command(volume,mute) \n\
<Key>F: Command(fullscreen) \n\
Ctrl<Key>Z: Zap(fast) \n\
@@ -37,21 +35,13 @@ MoTV.tv.translations: #replace \n\
<Key>G: Command(snap,ppm,full) \n\
<Key>J: Command(snap,jpeg,full) \n\
Ctrl<Key>Up: Scan() \n\
- Ctrl<Key>osfUp: Scan() \n\
~Ctrl<Key>Up: Command(setchannel,next) \n\
- ~Ctrl<Key>osfUp: Command(setchannel,next) \n\
<Key>Down: Command(setchannel,prev) \n\
- <Key>osfDown: Command(setchannel,prev) \n\
<Key>Right: Command(setchannel,fine_up) \n\
- <Key>osfRight: Command(setchannel,fine_up) \n\
<Key>Left: Command(setchannel,fine_down) \n\
- <Key>osfLeft: Command(setchannel,fine_down) \n\
<Key>Page_Up: Command(setstation,next) \n\
- <Key>osfPageUp: Command(setstation,next) \n\
<Key>Page_Down: Command(setstation,prev) \n\
- <Key>osfPageDown: Command(setstation,prev) \n\
<Key>BackSpace: Command(setstation,back) \n\
- <Key>osfBackSpace: Command(setstation,back) \n\
<Btn4Up>: Command(setstation,next) \n\
<Btn5Up>: Command(setstation,prev) \n\
<Key>V: Command(capture,toggle) \n\
@@ -66,7 +56,18 @@ MoTV.tv.translations: #replace \n\
<Key>KP_6: Command(keypad,6) \n\
<Key>KP_7: Command(keypad,7) \n\
<Key>KP_8: Command(keypad,8) \n\
- <Key>KP_9: Command(keypad,9)
+ <Key>KP_9: Command(keypad,9) \n\
+ \
+ <Key>osfHelp: man(motv) \n\
+ <Key>osfActivate: Command(volume,mute) \n\
+ Ctrl<Key>osfUp: Scan() \n\
+ ~Ctrl<Key>osfUp: Command(setchannel,next) \n\
+ <Key>osfDown: Command(setchannel,prev) \n\
+ <Key>osfRight: Command(setchannel,fine_up) \n\
+ <Key>osfLeft: Command(setchannel,fine_down) \n\
+ <Key>osfPageUp: Command(setstation,next) \n\
+ <Key>osfPageDown: Command(setstation,prev) \n\
+ <Key>osfBackSpace: Command(setstation,back)
MoTV.tv*stationsM.menuPost: <Btn1>
@@ -302,12 +303,10 @@ MoTV.man_popup*label.marginHeight: 5
MoTV.man_popup*label.renderTable: bold,underline
MoTV.man_popup*label.renderTable.fontType: FONT_IS_FONTSET
MoTV.man_popup*label.renderTable.fontName: \
- -*-fixed-medium-r-normal--13-*-*-*-*-*, \
- fixed
+ -*-fixed-medium-r-normal--13-*-*-*-*-*
MoTV.man_popup*label.renderTable.bold.fontType: FONT_IS_FONTSET
MoTV.man_popup*label.renderTable.bold.fontName: \
- -*-fixed-bold-r-normal--13-*-*-*-*-*, \
- fixed
+ -*-fixed-bold-r-normal--13-*-*-*-*-*
MoTV.man_popup*label.renderTable.underline.underlineType: SINGLE_LINE
diff --git a/src/MoTV-it b/x11/MoTV-it
index 4d0b1a2..0b67b9e 100644
--- a/src/MoTV-it
+++ b/x11/MoTV-it
@@ -17,14 +17,12 @@
*renderTable.fontType: FONT_IS_FONTSET
*renderTable.fontName: \
-*-helvetica-medium-r-normal--*-120-*-*-*-*, \
- -*-*-*-r-normal--*-120-*-*-*-*, \
- fixed
+ -*-*-*-r-normal--*-120-*-*-*-*
MoTV.onscreen.label.renderTable:
MoTV.onscreen.label.renderTable.fontType: FONT_IS_FONTSET
MoTV.onscreen.label.renderTable.fontName: \
- -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*, \
- fixed
+ -*-ledfixed-medium-r-semicondensed--39-*-*-*-*-*
MoTV.vtx.label.renderTable:
MoTV.vtx.label.renderTable.fontType: FONT_IS_FONT
diff --git a/x11/Subdir.mk b/x11/Subdir.mk
new file mode 100644
index 0000000..8685474
--- /dev/null
+++ b/x11/Subdir.mk
@@ -0,0 +1,137 @@
+
+# variables
+TARGETS-x11 :=
+
+ifeq ($(FOUND_X11),yes)
+TARGETS-x11 += \
+ x11/propwatch \
+ x11/v4lctl \
+ x11/xawtv-remote \
+ x11/rootv \
+ x11/xawtv
+endif
+ifeq ($(FOUND_MOTIF),yes)
+TARGETS-x11 += \
+ x11/motv
+endif
+
+OBJS-xawtv := \
+ x11/wmhooks.o \
+ x11/xawtv.o \
+ x11/x11.o \
+ x11/xt.o \
+ x11/xv.o \
+ x11/toolbox.o \
+ x11/conf.o \
+ x11/complete-xaw.o \
+ jwz/remote.o \
+ common/channel.o \
+ $(OBJS-common-input) \
+ $(OBJS-common-capture) \
+ libvbi/libvbi.a
+LIBS-xawtv := \
+ $(THREAD_LIBS) $(CURSES_LIBS) $(LIRC_LIBS) $(ALSA_LIBS) \
+ $(ATHENA_LIBS) -ljpeg -lm
+
+OBJS-motv := \
+ x11/motv.o \
+ x11/man.o \
+ x11/icons.o \
+ x11/wmhooks.o \
+ x11/x11.o \
+ x11/xt.o \
+ x11/xv.o \
+ x11/complete-motif.o \
+ jwz/remote.o \
+ common/RegEdit.o \
+ common/channel-no-x11.o \
+ $(OBJS-common-input) \
+ $(OBJS-common-capture) \
+ libvbi/libvbi.a
+LIBS-motv := \
+ $(THREAD_LIBS) $(CURSES_LIBS) $(LIRC_LIBS) $(ALSA_LIBS) \
+ $(MOTIF_LIBS) -ljpeg -lm
+
+OBJS-v4lctl := \
+ x11/v4lctl.o \
+ x11/xv.o \
+ common/channel-no-x11.o \
+ $(OBJS-common-capture)
+LIBS-v4lctl := \
+ $(THREAD_LIBS) $(ATHENA_LIBS) -ljpeg -lm
+
+OBJS-rootv := \
+ x11/rootv.o \
+ common/parseconfig.o
+LIBS-rootv := \
+ $(ATHENA_LIBS)
+
+LANGUAGES := de it
+MOTV-app := $(patsubst %,x11/MoTV.%.ad,$(LANGUAGES))
+
+
+# local targets
+x11/xawtv-remote: x11/xawtv-remote.o
+ $(CC) $(CFLAGS) -o $@ $< $(ATHENA_LIBS)
+
+x11/propwatch: x11/propwatch.o
+ $(CC) $(CFLAGS) -o $@ $< $(ATHENA_LIBS)
+
+x11/rootv: $(OBJS-rootv)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-rootv) $(LIBS-rootv) $(DLFLAGS)
+
+x11/v4lctl: $(OBJS-v4lctl)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-v4lctl) $(LIBS-v4lctl) $(DLFLAGS)
+
+x11/xawtv: $(OBJS-xawtv)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-xawtv) $(LIBS-xawtv) $(DLFLAGS)
+
+x11/motv: $(OBJS-motv)
+ $(CC) $(CFLAGS) -o $@ $(OBJS-motv) $(LIBS-motv) $(DLFLAGS)
+
+x11/complete-xaw.o:: x11/complete.c
+ $(CC) $(CFLAGS) -DATHENA=1 -Wp,-MD,$*.dep -c -o $@ $<
+ @sed -e "s|.*\.o:|$@::|" < $*.dep > $*.d && rm -f $*.dep
+
+x11/complete-motif.o:: x11/complete.c
+ $(CC) $(CFLAGS) -DMOTIF=1 -Wp,-MD,$*.dep -c -o $@ $<
+ @sed -e "s|.*\.o:|$@::|" < $*.dep > $*.d && rm -f $*.dep
+
+
+# global targets
+ifeq ($(FOUND_X11),yes)
+all:: $(TARGETS-x11)
+endif
+ifeq ($(FOUND_MOTIF),yes)
+all:: $(MOTV-app)
+endif
+
+ifeq ($(FOUND_X11),yes)
+install::
+ $(INSTALL_PROGRAM) -s $(TARGETS-x11) $(bindir)
+ $(INSTALL_DIR) $(resdir)/app-defaults
+ $(INSTALL_DATA) $(srcdir)/x11/Xawtv.ad $(resdir)/app-defaults/Xawtv
+endif
+ifeq ($(FOUND_MOTIF),yes)
+install::
+ $(INSTALL_DATA) x11/MoTV.ad $(resdir)/app-defaults/MoTV
+ for lang in $(LANGUAGES); do \
+ $(INSTALL_DIR) $(resdir)/$$lang/app-defaults; \
+ $(INSTALL_DATA) x11/MoTV.$$lang.ad \
+ $(resdir)/$$lang/app-defaults/MoTV; \
+ done
+endif
+
+distclean::
+ rm -f $(TARGETS-x11)
+ rm -f $(MOTV-app) x11/MoTV.ad x11/MoTV.h x11/Xawtv.h
+
+# special dependences / rules
+x11/xawtv.o:: x11/xawtv.c x11/Xawtv.h
+x11/motv.o:: x11/motv.c x11/MoTV.h
+
+x11/MoTV.ad: $(srcdir)/x11/MoTV-default $(srcdir)/x11/MoTV-fixed
+ cat $(srcdir)/x11/MoTV-default $(srcdir)/x11/MoTV-fixed > x11/MoTV.ad
+
+x11/MoTV.%.ad: x11/MoTV-%
+ cat $< $(srcdir)/x11/MoTV-fixed > $@
diff --git a/src/Xawtv.ad b/x11/Xawtv.ad
index dedaf1e..009687f 100644
--- a/src/Xawtv.ad
+++ b/x11/Xawtv.ad
@@ -346,8 +346,7 @@ xawtv.onscreen*borderColor: black
xawtv.onscreen*foreground: lightgreen
xawtv.onscreen.label.justify: left
xawtv.onscreen.label.font: -*-ledfixed-medium-r-semicondensed--39-*
-xawtv.onscreen.label.fontSet: -*-ledfixed-medium-r-semicondensed--39-*,-*-*-*-R-*-*-*-120-*-*-*-*,fixed
-
+xawtv.onscreen.label.fontSet: -*-ledfixed-medium-r-semicondensed--39-*,-*-*-*-R-*-*-*-120-*-*-*-*
xawtv.vtx.allowShellResize: true
xawtv.vtx.label.resize: true
diff --git a/src/complete.c b/x11/complete.c
index e309006..e309006 100644
--- a/src/complete.c
+++ b/x11/complete.c
diff --git a/src/complete.h b/x11/complete.h
index 3a4089b..3a4089b 100644
--- a/src/complete.h
+++ b/x11/complete.h
diff --git a/src/conf.c b/x11/conf.c
index c70d2c3..c70d2c3 100644
--- a/src/conf.c
+++ b/x11/conf.c
diff --git a/src/conf.h b/x11/conf.h
index a0083d0..a0083d0 100644
--- a/src/conf.h
+++ b/x11/conf.h
diff --git a/src/icons.c b/x11/icons.c
index d2c6be8..fa3998e 100644
--- a/src/icons.c
+++ b/x11/icons.c
@@ -9,13 +9,13 @@
#include <Xm/Xm.h>
#include "icons.h"
-#include "../xpm/prev.xpm"
-#include "../xpm/next.xpm"
-#include "../xpm/movie.xpm"
-#include "../xpm/snap.xpm"
-#include "../xpm/mute.xpm"
-#include "../xpm/exit.xpm"
-#include "../xpm/tv.xpm"
+#include "xpm/prev.xpm"
+#include "xpm/next.xpm"
+#include "xpm/movie.xpm"
+#include "xpm/snap.xpm"
+#include "xpm/mute.xpm"
+#include "xpm/exit.xpm"
+#include "xpm/tv.xpm"
static void
add_pixmap(Display *dpy, unsigned long bg,
diff --git a/src/icons.h b/x11/icons.h
index e5e633d..e5e633d 100644
--- a/src/icons.h
+++ b/x11/icons.h
diff --git a/src/man.c b/x11/man.c
index da9566a..da9566a 100644
--- a/src/man.c
+++ b/x11/man.c
diff --git a/src/man.h b/x11/man.h
index 9943cfc..9943cfc 100644
--- a/src/man.h
+++ b/x11/man.h
diff --git a/src/motif.c b/x11/motv.c
index cbbfab8..2f14e55 100644
--- a/src/motif.c
+++ b/x11/motv.c
@@ -17,12 +17,6 @@
#include <signal.h>
#include <pthread.h>
#include <sys/ioctl.h>
-#ifdef HAVE_SOUNDCARD_H
-# include <soundcard.h>
-#endif
-#ifdef HAVE_SYS_SOUNDCARD_H
-# include <sys/soundcard.h>
-#endif
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
@@ -2245,38 +2239,29 @@ pref_fst_cb(Widget widget, XtPointer clientdata, XtPointer call_data)
static void
pref_mix2(void)
{
- static char *names[] = SOUND_DEVICE_NAMES;
- static char *labels[] = SOUND_DEVICE_LABELS;
Widget push,w = NULL;
char *name;
- int i,on,devmask,fd = -1;
+ int i,on;
+ struct ng_devinfo *info = NULL;
on = XmToggleButtonGetState(pref_mix_toggle);
XtVaGetValues(pref_mix1_menu,XmNmenuHistory,&w,NULL);
if (w) {
name = XtName(w);
- if (-1 == (fd = open(name,O_RDONLY))) {
- if (debug)
- fprintf(stderr,"open %s: %s\n",name,strerror(errno));
- on = 0;
- }
- } else
- on = 0;
+ if (ng_mix_drivers && ng_mix_drivers[0] && 0 != strcmp(name,"none"))
+ info = ng_mix_drivers[0]->channels(name);
+ }
- if (on) {
+ if (NULL != info && on) {
pref_menu(pref_mix2_option,pref_mix2_menu,1);
- ioctl(fd,MIXER_READ(SOUND_MIXER_DEVMASK),&devmask);
- for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- if (!((1<<i) & devmask))
- continue;
- push = XtVaCreateManagedWidget(names[i],
+ for (i = 0; 0 != strlen(info[i].name); i++) {
+ push = XtVaCreateManagedWidget(info[i].device,
xmPushButtonWidgetClass,
pref_mix2_menu,NULL);
- toolkit_set_label(push,labels[i]);
- if (strcasecmp(names[i],mixerctl) == 0)
+ toolkit_set_label(push,info[i].name);
+ if (strcasecmp(info[i].device,mixerctl) == 0)
XtVaSetValues(pref_mix2_menu,XmNmenuHistory,push,NULL);
}
- close(fd);
} else {
pref_menu(pref_mix2_option,pref_mix2_menu,0);
}
@@ -2292,38 +2277,23 @@ static void
pref_mix1(void)
{
Widget push;
-#ifdef SOUND_MIXER_INFO
- mixer_info info;
-#endif
- char s[64];
- int on,i,fd;
+ int on,i;
+ struct ng_devinfo *info = NULL;
on = XmToggleButtonGetState(pref_mix_toggle);
- if (on) {
+ if (ng_mix_drivers && ng_mix_drivers[0])
+ info = ng_mix_drivers[0]->probe();
+ if (NULL != info && on) {
pref_menu(pref_mix1_option,pref_mix1_menu,1);
- for (i = 0; NULL != ng_dev.mixer_scan[i]; i++) {
- fd = open(ng_dev.mixer_scan[i],O_RDONLY);
- if (-1 == fd) {
- if (debug)
- fprintf(stderr,"open %s: %s\n",
- ng_dev.mixer_scan[i],strerror(errno));
- continue;
- }
- push = XtVaCreateManagedWidget(ng_dev.mixer_scan[i],
+ for (i = 0; 0 != strlen(info[i].name); i++) {
+ push = XtVaCreateManagedWidget(info[i].device,
xmPushButtonWidgetClass,
pref_mix1_menu,
NULL);
XtAddCallback(push,XmNactivateCallback,pref_mix2_cb,NULL);
-#ifdef SOUND_MIXER_INFO
- ioctl(fd,SOUND_MIXER_INFO,&info);
- sprintf(s,"%.20s - %.40s",ng_dev.mixer_scan[i],info.name);
-#else
- sprintf(s,"%.20s",ng_dev.mixer_scan[i]);
-#endif
- toolkit_set_label(push,s);
- if (0 == i || 0 == strcmp(ng_dev.mixer_scan[i],mixerdev))
+ toolkit_set_label(push,info[i].name);
+ if (0 == i || 0 == strcmp(info[i].device,mixerdev))
XtVaSetValues(pref_mix1_menu,XmNmenuHistory,push,NULL);
- close(fd);
}
} else {
pref_menu(pref_mix1_option,pref_mix1_menu,0);
@@ -3083,7 +3053,7 @@ main(int argc, char *argv[])
xfree_xinerama_init();
if (debug)
fprintf(stderr,"main: xvideo extention...\n");
- xv_init(args.xv_video,args.xv_scale,args.xv_port,0);
+ xv_init(args.xv_video,args.xv_image,args.xv_port,0);
/* set hooks (command.c) */
update_title = new_title;
@@ -3272,9 +3242,3 @@ main(int argc, char *argv[])
XtAppMainLoop(app_context);
return 0;
}
-
-/*
- * Local variables:
- * compile-command: "(cd ..; make)"
- * End:
- */
diff --git a/tools/propwatch.c b/x11/propwatch.c
index 5c25c8c..5c25c8c 100644
--- a/tools/propwatch.c
+++ b/x11/propwatch.c
diff --git a/x11/rootv.c b/x11/rootv.c
new file mode 100644
index 0000000..19adde9
--- /dev/null
+++ b/x11/rootv.c
@@ -0,0 +1,445 @@
+#include "config.h"
+#ifndef HAVE_LIBXV
+#include "stdio.h"
+int main(void)
+{puts("Compiled without Xvideo extention support, sorry.");exit(0);}
+#else
+/*
+ * put a TV image to the root window - requires Xvideo
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/StringDefs.h>
+#include <X11/Xatom.h>
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvlib.h>
+
+#include "vroot.h"
+#include "parseconfig.h"
+
+int port=-1,bye=0,termsig=0,verbose=0;
+GC gc;
+Atom mute, XA_WM_PROTOCOLS, XA_WM_DELETE_WINDOW;
+
+XvAdaptorInfo *ai;
+XvEncodingInfo *ei;
+XvAttribute *at;
+XvImageFormatValues *fo;
+
+static char *reasons[] = {
+ "XvStarted",
+ "XvStopped",
+ "XvBusy",
+ "XvPreempted",
+ "XvHardError",
+};
+
+static char *events[] = {
+ "0", "1",
+ "KeyPress",
+ "KeyRelease",
+ "ButtonPress",
+ "ButtonRelease",
+ "MotionNotify",
+ "EnterNotify",
+ "LeaveNotify",
+ "FocusIn",
+ "FocusOut",
+ "KeymapNotify",
+ "Expose",
+ "GraphicsExpose",
+ "NoExpose",
+ "VisibilityNotify",
+ "CreateNotify",
+ "DestroyNotify",
+ "UnmapNotify",
+ "MapNotify",
+ "MapRequest",
+ "ReparentNotify",
+ "ConfigureNotify",
+ "ConfigureRequest",
+ "GravityNotify",
+ "ResizeRequest",
+ "CirculateNotify",
+ "CirculateRequest",
+ "PropertyNotify",
+ "SelectionClear",
+ "SelectionRequest",
+ "SelectionNotify",
+ "ColormapNotify",
+ "ClientMessage",
+ "MappingNotify"
+};
+
+static void station_list(FILE *fp)
+{
+ char filename[100];
+ char **list;
+
+ sprintf(filename,"%s/%s",getenv("HOME"),".xawtv");
+ cfg_parse_file(CONFIGFILE);
+ cfg_parse_file(filename);
+
+ for (list = cfg_list_sections(); *list != NULL; list++) {
+ if (0 == strcmp(*list,"defaults")) continue;
+ if (0 == strcmp(*list,"global")) continue;
+ if (0 == strcmp(*list,"launch")) continue;
+ if (0 == strcmp(*list,"eventmap")) continue;
+ fprintf(fp,"\t\"%s\" EXEC v4lctl setstation \"%s\"\n",
+ *list,*list);
+ }
+}
+
+static void wm_menu(FILE *fp)
+{
+ fprintf(fp,"\"TV stations\" MENU\n");
+ station_list(fp);
+ fprintf(fp,"\"TV stations\" END\n");
+}
+
+static void video_blit(Display *dpy, Window win)
+{
+ XWindowAttributes wts;
+
+ XGetWindowAttributes(dpy, win, &wts);
+#if 0
+ XClearArea(dpy,win,0,0,0,0,False);
+ XvStopVideo(dpy,port,win);
+#endif
+ XvPutVideo(dpy,port,win,gc,
+ 0,0,wts.width,wts.height,
+ 0,0,wts.width,wts.height);
+ if (verbose)
+ fprintf(stderr,"XvPutVideo(win=0x%lx,w=%d,h=%d)\n",
+ win,wts.width,wts.height);
+}
+
+static void
+catch_sig(int signal)
+{
+ termsig = signal;
+ if (verbose)
+ fprintf(stderr,"received signal %d [%s]\n",
+ termsig,sys_siglist[termsig]);
+}
+
+static void usage(FILE *fp)
+{
+ fprintf(fp,
+ "rootv is a simple TV application. Uses and requires Xvideo.\n"
+ "Most settings must be tweaked done using some other tool,\n"
+ "v4lctl for example.\n"
+ "\n"
+ "options:\n"
+ " -help print this text\n"
+ " -verbose be verbose\n"
+ " -root put video onto the root window instead of\n"
+ " creating a new window.\n"
+ " -id <win> put video into the window <win> instead of\n"
+ " creating a new window.\n"
+ " -station <st> tune station <st> (just calls v4lctl)\n"
+ " -no-mute don't toggle mute on start/exit.\n"
+ " -port <n> use Xvideo port <n>.\n"
+ " -bg fork into background.\n"
+ " -wm print WindowMaker menu, to set all stations\n"
+ " listed in ~/.xawtv using v4lctl.\n"
+ "\n");
+}
+
+int
+main(int argc, char *argv[])
+{
+ struct sigaction act,old;
+ Display *dpy;
+ Screen *scr;
+ Window win = -1;
+ XWindowAttributes wts;
+ KeySym keysym;
+ char c;
+
+ int ver, rel, req, ev, err, dummy;
+ int adaptors,attributes;
+ int i,stop,bg,newwin,do_mute,grab;
+
+ dpy = XOpenDisplay(NULL);
+ scr = DefaultScreenOfDisplay(dpy);
+ stop = 0;
+ bg = 0;
+ do_mute = 1;
+ newwin = 1;
+
+ while (argc > 1) {
+ if (0 == strcmp(argv[1],"-wm")) {
+ /* windowmaker menu */
+ wm_menu(stdout);
+ exit(0);
+ }
+ if (0 == strcmp(argv[1],"-h") ||
+ 0 == strcmp(argv[1],"-help") ||
+ 0 == strcmp(argv[1],"--help")) {
+ usage(stdout);
+ exit(0);
+ }
+ if (argc > 2 && (0 == strcmp(argv[1],"-id") ||
+ 0 == strcmp(argv[1],"-window-id"))) {
+ sscanf(argv[2],"%li",&win);
+ newwin = 0;
+ if (verbose)
+ fprintf(stderr,"using window id 0x%lx\n",win);
+ argc-=2;
+ argv+=2;
+ } else if (argc > 2 && 0 == strcmp(argv[1],"-port")) {
+ sscanf(argv[2],"%i",&port);
+ argc-=2;
+ argv+=2;
+ } else if (argc > 2 && 0 == strcmp(argv[1],"-station")) {
+ if (0 == fork()) {
+ execlp("v4lctl","v4lctl","setstation",argv[2],NULL);
+ exit(1);
+ } else {
+ wait(&dummy);
+ }
+ argc-=2;
+ argv+=2;
+ } else if (0 == strcmp(argv[1],"-root")) {
+ win = RootWindowOfScreen(scr);
+ newwin = 0;
+ if (verbose)
+ fprintf(stderr,"using root window [0x%lx]\n",win);
+ argc--;
+ argv++;
+ } else if (0 == strcmp(argv[1],"-bg")) {
+ bg = 1;
+ argc--;
+ argv++;
+ } else if (0 == strcmp(argv[1],"-verbose")) {
+ verbose = 1;
+ argc--;
+ argv++;
+ } else if (0 == strcmp(argv[1],"-no-mute")) {
+ do_mute = 0;
+ argc--;
+ argv++;
+ } else {
+ fprintf(stderr,"unknown arg: \"%s\"\n",argv[1]);
+ exit(1);
+ }
+ }
+
+ /* init X11 */
+ XA_WM_PROTOCOLS = XInternAtom (dpy, "WM_PROTOCOLS", False);
+ XA_WM_DELETE_WINDOW = XInternAtom (dpy, "WM_DELETE_WINDOW", False);
+ if (newwin) {
+ win = XCreateSimpleWindow(dpy,RootWindowOfScreen(scr),
+ 0,0,640,480,1,
+ BlackPixelOfScreen(scr),
+ BlackPixelOfScreen(scr));
+ XChangeProperty(dpy, win, XA_WM_PROTOCOLS, XA_ATOM, 32,
+ PropModeReplace,
+ (unsigned char *) &XA_WM_DELETE_WINDOW, 1);
+ }
+ XGetWindowAttributes (dpy, win, &wts);
+ XSelectInput(dpy, win, wts.your_event_mask |
+ KeyPressMask | StructureNotifyMask | ExposureMask);
+
+ /* query+print Xvideo properties */
+ if (Success != XvQueryExtension(dpy,&ver,&rel,&req,&ev,&err)) {
+ puts("Server does'nt support Xvideo");
+ exit(1);
+ }
+ if (Success != XvQueryAdaptors(dpy,DefaultRootWindow(dpy),&adaptors,&ai)) {
+ puts("Oops: XvQueryAdaptors failed");
+ exit(1);
+ }
+ if (verbose)
+ fprintf(stderr,"%d adaptors available.\n",adaptors);
+ for (i = 0; i < adaptors; i++) {
+ if (verbose)
+ fprintf(stderr," port=%ld name=\"%s\"\n",ai[i].base_id,ai[i].name);
+
+ /* video adaptor ? */
+ if ((ai[i].type & XvInputMask) &&
+ (ai[i].type & XvVideoMask) &&
+ (port == -1)) {
+ port = ai[i].base_id;
+ }
+ }
+ if (adaptors > 0)
+ XvFreeAdaptorInfo(ai);
+ if (-1 == port) {
+ fprintf(stderr,"no Xvideo port found\n");
+ exit(1);
+ }
+
+ /* grab Xvideo port */
+ grab = 0;
+ for (i = 0; !grab && i < 3; i++) {
+ switch (XvGrabPort(dpy,port,CurrentTime)) {
+ case Success:
+ if (verbose)
+ fprintf(stderr,"grabbed Xv port\n");
+ grab=1;
+ break;
+ case XvAlreadyGrabbed:
+ if (verbose)
+ fprintf(stderr,"Xv port already grabbed\n");
+ sleep(1);
+ break;
+ default:
+ fprintf(stderr,"Xv port grab: Huh?\n");
+ exit(1);
+ }
+ }
+ if (!grab) {
+ fprintf(stderr,"can't grab Xv port\n");
+ exit(1);
+ }
+
+ at = XvQueryPortAttributes(dpy,port,&attributes);
+ for (i = 0; i < attributes; i++) {
+ if (0 == strcmp("XV_MUTE",at[i].name))
+ mute = XInternAtom(dpy, "XV_MUTE", False);
+ }
+ gc = XCreateGC(dpy,win,0,NULL);
+
+#if 0
+ if (stop) {
+ /* stop video */
+ XvStopVideo(dpy,port,win);
+ if (mute)
+ XvSetPortAttribute(dpy,port,mute,1);
+ XCloseDisplay(dpy);
+ exit(0);
+ }
+#endif
+
+ /* fork into background, but keep tty */
+ if (bg)
+ if (fork())
+ exit(0);
+
+ /* catch signals */
+ memset(&act,0,sizeof(act));
+ sigemptyset(&act.sa_mask);
+ act.sa_handler = catch_sig;
+ sigaction(SIGINT,&act,&old);
+ sigaction(SIGHUP,&act,&old);
+ sigaction(SIGTERM,&act,&old);
+
+ /* put video to the window */
+ if (newwin)
+ XMapWindow(dpy,win);
+ if (verbose)
+ fprintf(stderr,"starting video\n");
+ video_blit(dpy,win);
+ if (do_mute && mute)
+ XvSetPortAttribute(dpy,port,mute,0);
+
+ /* receive events */
+ XvSelectPortNotify(dpy, port, 1);
+ XvSelectVideoNotify(dpy, win, 1);
+
+ /* main loop */
+ for (;!bye && !termsig;) {
+ int rc;
+ fd_set set;
+ XEvent event;
+
+ if (False == XCheckMaskEvent(dpy, ~0, &event)) {
+ /* wait for x11 events, make sure that signals are catched */
+ XFlush(dpy);
+ FD_ZERO(&set);
+ FD_SET(ConnectionNumber(dpy),&set);
+ rc = select(ConnectionNumber(dpy)+1,&set,NULL,NULL,NULL);
+ if (-1 == rc)
+ if (verbose)
+ perror("... select");
+ continue;
+ }
+
+ if (event.type > ev) {
+ /* Xvideo extention event */
+ switch (event.type-ev) {
+ case XvVideoNotify:
+ {
+ XvVideoNotifyEvent *xve = (XvVideoNotifyEvent*)&event;
+ if (verbose)
+ fprintf(stderr,"XvVideoNotify, reason=%s, exiting\n",
+ reasons[xve->reason]);
+#if 0
+ bye=1;
+#endif
+ break;
+ }
+ case XvPortNotify:
+ {
+ XvPortNotifyEvent *xpe = (XvPortNotifyEvent*)&event;
+ if (verbose)
+ fprintf(stderr,"XvPortNotify: %s=%ld\n",
+ XGetAtomName(dpy,xpe->attribute),xpe->value);
+ break;
+ }
+ }
+ } else {
+ /* other event */
+ switch (event.type) {
+ case KeyPress:
+ c = 0;
+ XLookupString (&event.xkey, &c, 1, &keysym, 0);
+ if (verbose)
+ fprintf(stderr,"key: %c\n",c);
+ switch (c) {
+ case 'q':
+ case 'Q':
+ case 3: /* ^C */
+ case 27: /* ESC */
+ bye = 1;
+ }
+ break;
+ case ClientMessage:
+ if (event.xclient.message_type == XA_WM_PROTOCOLS &&
+ event.xclient.data.l[0] == XA_WM_DELETE_WINDOW)
+ bye = 1;
+ break;
+ case Expose:
+ if (event.xexpose.count)
+ break;
+ /* fall througth */
+ case ConfigureNotify:
+ video_blit(dpy,win);
+ break;
+ default:
+ if (verbose) {
+ if (event.type < sizeof(events)/sizeof(char*))
+ fprintf(stderr,"ev: %s\n",events[event.type]);
+ else
+ fprintf(stderr,"ev: #%d\n",event.type);
+ }
+ }
+ }
+ }
+ if (verbose && termsig)
+ fprintf(stderr,"exiting on signal %d [%s]\n",
+ termsig,sys_siglist[termsig]);
+ if (do_mute && mute)
+ XvSetPortAttribute(dpy,port,mute,1);
+ XvStopVideo(dpy,port,win);
+ XvUngrabPort(dpy,port,CurrentTime);
+ XClearArea(dpy,win,0,0,0,0,True);
+ XCloseDisplay(dpy);
+ if (verbose)
+ fprintf(stderr,"bye\n");
+
+ /* keep compiler happy */
+ exit(0);
+}
+
+#endif
diff --git a/x11/rootv.xml b/x11/rootv.xml
new file mode 100644
index 0000000..f8d3013
--- /dev/null
+++ b/x11/rootv.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<screensaver name="rootv" _label="rootv">
+ <command arg="-root"/>
+ <boolean id="mute"
+ _label="unmute/mute on start/stop"
+ arg-unset="-no-mute"
+ />
+ <string id="station"
+ _label="TV station"
+ arg="-station %"
+ />
+ <_description>
+ This hack displays some TV station using
+ the Xvideo extention. Use CNN or MTV as
+ screen saver :-)
+ (c) Gerd Knorr &lt;kraxel@bytesex.org&gt;
+ </_description>
+</screensaver>
diff --git a/src/toolbox.c b/x11/toolbox.c
index 825785a..825785a 100644
--- a/src/toolbox.c
+++ b/x11/toolbox.c
diff --git a/src/toolbox.h b/x11/toolbox.h
index 1438a7e..1438a7e 100644
--- a/src/toolbox.h
+++ b/x11/toolbox.h
diff --git a/src/v4lctl.c b/x11/v4lctl.c
index 9366c6b..568b6b8 100644
--- a/src/v4lctl.c
+++ b/x11/v4lctl.c
@@ -110,9 +110,3 @@ int main(int argc, char *argv[])
#endif
return 0;
}
-
-/*
- * Local variables:
- * compile-command: "(cd ..; make)"
- * End:
- */
diff --git a/src/wmhooks.c b/x11/wmhooks.c
index ccc30bc..ccc30bc 100644
--- a/src/wmhooks.c
+++ b/x11/wmhooks.c
diff --git a/src/wmhooks.h b/x11/wmhooks.h
index 9488482..9488482 100644
--- a/src/wmhooks.h
+++ b/x11/wmhooks.h
diff --git a/src/x11.c b/x11/x11.c
index f54be58..da77107 100644
--- a/src/x11.c
+++ b/x11/x11.c
@@ -12,15 +12,12 @@
#include <stdlib.h>
#include <strings.h>
#include <errno.h>
+#include <pthread.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/ipc.h>
#include <sys/shm.h>
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
-#include <pthread.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
diff --git a/src/x11.h b/x11/x11.h
index 3a34182..3a34182 100644
--- a/src/x11.h
+++ b/x11/x11.h
diff --git a/src/xawtv-remote.c b/x11/xawtv-remote.c
index 0505782..0505782 100644
--- a/src/xawtv-remote.c
+++ b/x11/xawtv-remote.c
diff --git a/src/main.c b/x11/xawtv.c
index f751e06..458b9d6 100644
--- a/src/main.c
+++ b/x11/xawtv.c
@@ -1515,7 +1515,8 @@ create_launchwin(void)
/*--- main ---------------------------------------------------------------*/
int
-main(int argc, char *argv[])
+main(
+ int argc, char *argv[])
{
int i;
unsigned long freq;
@@ -1564,7 +1565,7 @@ main(int argc, char *argv[])
xfree_xinerama_init();
if (debug)
fprintf(stderr,"main: xvideo extention...\n");
- xv_init(args.xv_video,args.xv_scale,args.xv_port,0);
+ xv_init(args.xv_video,args.xv_image,args.xv_port,0);
/* set hooks (command.c) */
update_title = new_title;
@@ -1763,9 +1764,3 @@ main(int argc, char *argv[])
/* keep compiler happy */
return 0;
}
-
-/*
- * Local variables:
- * compile-command: "(cd ..; make)"
- * End:
- */
diff --git a/xpm/exit.xpm b/x11/xpm/exit.xpm
index c3e5530..c3e5530 100644
--- a/xpm/exit.xpm
+++ b/x11/xpm/exit.xpm
diff --git a/xpm/movie.xpm b/x11/xpm/movie.xpm
index d02b415..d02b415 100644
--- a/xpm/movie.xpm
+++ b/x11/xpm/movie.xpm
diff --git a/xpm/mute.xpm b/x11/xpm/mute.xpm
index 48eaa30..48eaa30 100644
--- a/xpm/mute.xpm
+++ b/x11/xpm/mute.xpm
diff --git a/xpm/next.xpm b/x11/xpm/next.xpm
index 7b36b3c..7b36b3c 100644
--- a/xpm/next.xpm
+++ b/x11/xpm/next.xpm
diff --git a/xpm/prev.xpm b/x11/xpm/prev.xpm
index 2bfe9bd..2bfe9bd 100644
--- a/xpm/prev.xpm
+++ b/x11/xpm/prev.xpm
diff --git a/xpm/snap.xpm b/x11/xpm/snap.xpm
index d348d8f..d348d8f 100644
--- a/xpm/snap.xpm
+++ b/x11/xpm/snap.xpm
diff --git a/xpm/tv.xpm b/x11/xpm/tv.xpm
index a6c713e..a6c713e 100644
--- a/xpm/tv.xpm
+++ b/x11/xpm/tv.xpm
diff --git a/src/xt.c b/x11/xt.c
index eb01903..50ca95e 100644
--- a/src/xt.c
+++ b/x11/xt.c
@@ -85,6 +85,9 @@ Status DPMSDisable(Display*);
#include "dllist.h"
#include "export.h"
+/* jwz */
+#include "remote.h"
+
/*----------------------------------------------------------------------*/
XtAppContext app_context;
@@ -212,14 +215,19 @@ XtResource args_desc[] = {
XtOffset(struct ARGS*,fbdev),
XtRString, "0"
},{
- "xvideo",
+ "xv",
+ XtCBoolean, XtRBoolean, sizeof(int),
+ XtOffset(struct ARGS*,xv),
+ XtRString, "1"
+ },{
+ "xvVideo",
XtCBoolean, XtRBoolean, sizeof(int),
XtOffset(struct ARGS*,xv_video),
XtRString, "1"
},{
- "hwscale",
+ "xvImage",
XtCBoolean, XtRBoolean, sizeof(int),
- XtOffset(struct ARGS*,xv_scale),
+ XtOffset(struct ARGS*,xv_image),
XtRString, "1"
},{
"vidmode",
@@ -272,12 +280,15 @@ XrmOptionDescRec opt_desc[] = {
{ "-f", "fullscreen", XrmoptionNoArg, "1" },
{ "-fullscreen", "fullscreen", XrmoptionNoArg, "1" },
{ "-hwscan", "hwscan", XrmoptionNoArg, "1" },
-
{ "-fb", "fbdev", XrmoptionNoArg, "1" },
- { "-xv", "xvideo", XrmoptionNoArg, "1" },
- { "-noxv", "xvideo", XrmoptionNoArg, "0" },
- { "-scale", "hwscale", XrmoptionNoArg, "1" },
- { "-noscale", "hwscale", XrmoptionNoArg, "0" },
+
+ { "-xv", "xv", XrmoptionNoArg, "1" },
+ { "-noxv", "xv", XrmoptionNoArg, "0" },
+ { "-xv-video", "xvVideo", XrmoptionNoArg, "1" },
+ { "-noxv-video", "xvVideo", XrmoptionNoArg, "0" },
+ { "-xv-image", "xvImage", XrmoptionNoArg, "1" },
+ { "-noxv-image", "xvImage", XrmoptionNoArg, "0" },
+
{ "-vm", "vidmode", XrmoptionNoArg, "1" },
{ "-novm", "vidmode", XrmoptionNoArg, "0" },
{ "-dga", "dga", XrmoptionNoArg, "1" },
@@ -724,6 +735,33 @@ xt_siginit(void)
/*----------------------------------------------------------------------*/
+static XtIntervalId xscreensaver_timer;
+static Atom XA_DEACTIVATE;
+
+static void
+xscreensaver_timefunc(XtPointer clientData, XtIntervalId *id)
+{
+ int status;
+ char *err;
+
+ if (debug)
+ fprintf(stderr,"xscreensaver_timefunc\n");
+ xscreensaver_timer = 0;
+ if (!XA_DEACTIVATE) {
+ xscreensaver_init(dpy);
+ XA_DEACTIVATE = XInternAtom(dpy,"DEACTIVATE",False);
+ }
+ status = xscreensaver_command(dpy,XA_DEACTIVATE,0,debug,&err);
+ if (0 != status) {
+ fprintf(stderr,"xscreensaver_command: %s\n",err);
+ return;
+ }
+ xscreensaver_timer = XtAppAddTimeOut(app_context,60000,
+ xscreensaver_timefunc,NULL);
+}
+
+/*----------------------------------------------------------------------*/
+
Boolean
MyResize(XtPointer client_data)
{
@@ -813,7 +851,9 @@ do_fullscreen(void)
DPMSEnable(dpy);
}
#endif
-
+ if (xscreensaver_timer)
+ XtRemoveTimeOut(xscreensaver_timer);
+
if (warp_pointer)
XWarpPointer(dpy, None, RootWindowOfScreen(XtScreen(tv)),
0, 0, 0, 0, rpx, rpy);
@@ -910,6 +950,8 @@ do_fullscreen(void)
DPMSDisable(dpy);
}
#endif
+ xscreensaver_timer = XtAppAddTimeOut(app_context,60000,
+ xscreensaver_timefunc,NULL);
if (warp_pointer)
XWarpPointer(dpy, None, XtWindow(tv), 0, 0, 0, 0, 30, 15);
@@ -1374,12 +1416,13 @@ usage(void)
" -n -noconf don't read the config file\n"
" -m -nomouse startup with mouse pointer disabled\n"
" -f -fullscreen startup in fullscreen mode\n"
- " -dga/-nodga enable/disable DGA extention\n"
- " -vm/-novm enable/disable VidMode extention\n"
- " -xv/-noxv enable/disable Xvideo extention (for video overlay)\n"
- " -scale/-noscale enable/disable Xvideo extention (for image scaling)\n"
- " you might need that if your hardware does support\n"
- " neither hardware overlay nor yuv capture\n"
+ " -(no)dga enable/disable DGA extention\n"
+ " -(no)vm enable/disable VidMode extention\n"
+ " -(no)xv enable/disable Xvideo extention altogether\n"
+ " -(no)xv-video enable/disable Xvideo extention (for video only,\n"
+ " i.e. XvPutVideo() calls)\n"
+ " -(no)xv-image enable/disable Xvideo extention (for image scaling\n"
+ " only, i.e. XvPutImage() calls)\n"
" -b -bpp n color depth of the display is n (n=24,32)\n"
" -o -outfile file filename base for snapshots\n"
" -c -device file use <file> as video4linux device\n"
@@ -1429,6 +1472,10 @@ handle_cmdline_args(void)
debug = args.debug;
ng_debug = args.debug;
+ if (0 == args.xv) {
+ args.xv_video = 0;
+ args.xv_image = 0;
+ }
if (NULL == args.dspdev)
args.dspdev = ng_dev.dsp;
if (NULL == args.vbidev)
diff --git a/src/xt.h b/x11/xt.h
index c4f8292..1b55dac 100644
--- a/src/xt.h
+++ b/x11/xt.h
@@ -21,8 +21,9 @@ struct ARGS {
int readconfig;
int fullscreen;
int fbdev;
+ int xv;
int xv_video;
- int xv_scale;
+ int xv_image;
int vidmode;
int dga;
int help;
diff --git a/src/xv.c b/x11/xv.c
index 757c6e1..b9c5838 100644
--- a/src/xv.c
+++ b/x11/xv.c
@@ -49,7 +49,7 @@ unsigned int im_formats[VIDEO_FMT_COUNT];
const struct ng_vid_driver xv_driver;
-static int ver, rel, req, ev, err;
+static int ver, rel, req, ev, err, grabbed;
static int adaptors;
static int attributes;
static int formats;
@@ -257,23 +257,29 @@ xv_video(Window win, int dw, int dh, int on)
}
if (NULL == h->vi_gc)
h->vi_gc = XCreateGC(dpy, win, 0, NULL);
-#if 1
ng_ratio_fixup(&dw,&dh,&dx,&dy);
-#endif
-#if 0
- ng_ratio_fixup2(&sw,&sh,&sx,&sy,dw,dh);
-#endif
- XvPutVideo(dpy,h->vi_port,win,h->vi_gc,
- sx,sy,sw,sh, dx,dy,dw,dh);
- if (debug)
- fprintf(stderr,"Xvideo: video: win=0x%lx, "
- "src=%dx%d+%d+%d dst=%dx%d+%d+%d\n",
- win, sw,sh,sx,sy, dw,dh,dx,dy);
+ if (0 == grabbed)
+ if (Success == XvGrabPort(dpy,h->vi_port,CurrentTime))
+ grabbed = 1;
+ if (1 == grabbed) {
+ XvPutVideo(dpy,h->vi_port,win,h->vi_gc,
+ sx,sy,sw,sh, dx,dy,dw,dh);
+ if (debug)
+ fprintf(stderr,"Xvideo: video: win=0x%lx, "
+ "src=%dx%d+%d+%d dst=%dx%d+%d+%d\n",
+ win, sw,sh,sx,sy, dw,dh,dx,dy);
+ } else {
+ fprintf(stderr,"Xvideo: port %ld busy\n",h->vi_port);
+ }
} else {
- XClearArea(dpy,win,0,0,0,0,False);
- XvStopVideo(dpy,h->vi_port,win);
- if (debug)
- fprintf(stderr,"Xvideo: video off\n");
+ if (grabbed) {
+ XClearArea(dpy,win,0,0,0,0,False);
+ XvStopVideo(dpy,h->vi_port,win);
+ XvUngrabPort(dpy,h->vi_port,CurrentTime);
+ grabbed = 0;
+ if (debug)
+ fprintf(stderr,"Xvideo: video off\n");
+ }
}
}
diff --git a/src/xv.h b/x11/xv.h
index b23df5f..b23df5f 100644
--- a/src/xv.h
+++ b/x11/xv.h
diff --git a/xawtv.spec b/xawtv.spec
index 943cf03..c947399 100644
--- a/xawtv.spec
+++ b/xawtv.spec
@@ -2,7 +2,7 @@ Name: xawtv
Group: Applications/Multimedia
Requires: v4l-conf, tv-common
Autoreqprov: on
-Version: 3.73
+Version: 3.74
Release: 0
License: GPL
Summary: Video4Linux TV application (Athena)
@@ -70,12 +70,13 @@ via http, i.e. you can read the teletext pages with a web browser.
%build
export CFLAGS="$RPM_OPT_FLAGS"
-./configure --prefix=/usr/X11R6
-make depend
-make all
+mkdir build
+cd build
+../configure --prefix=/usr/X11R6
+make
%install
-make DESTDIR="%{buildroot}" SUID_ROOT="" install
+(cd build; make DESTDIR="%{buildroot}" SUID_ROOT="" install)
gzip -v %{buildroot}/usr/X11R6/man/man*/*
find %{buildroot} -name Xawtv -print |\
sed -e 's|%{buildroot}||' > appdefaults.xawtv
@@ -86,7 +87,6 @@ find %{buildroot} -name MoTV -print |\
%defattr(-,root,root)
%doc COPYING
%doc Changes TODO README README.*
-%doc Programming-FAQ UPDATE_TO_v3.0
%doc contrib/dot.lircrc contrib/frequencies*
/usr/X11R6/bin/xawtv
/usr/X11R6/man/man1/xawtv.1.gz
diff --git a/xawtv.spec.in b/xawtv.spec.in
index 65914fa..0a2d0e3 100644
--- a/xawtv.spec.in
+++ b/xawtv.spec.in
@@ -70,12 +70,13 @@ via http, i.e. you can read the teletext pages with a web browser.
%build
export CFLAGS="$RPM_OPT_FLAGS"
-./configure --prefix=/usr/X11R6
-make depend
-make all
+mkdir build
+cd build
+../configure --prefix=/usr/X11R6
+make
%install
-make DESTDIR="%{buildroot}" SUID_ROOT="" install
+(cd build; make DESTDIR="%{buildroot}" SUID_ROOT="" install)
gzip -v %{buildroot}/usr/X11R6/man/man*/*
find %{buildroot} -name Xawtv -print |\
sed -e 's|%{buildroot}||' > appdefaults.xawtv
@@ -86,7 +87,6 @@ find %{buildroot} -name MoTV -print |\
%defattr(-,root,root)
%doc COPYING
%doc Changes TODO README README.*
-%doc Programming-FAQ UPDATE_TO_v3.0
%doc contrib/dot.lircrc contrib/frequencies*
/usr/X11R6/bin/xawtv
/usr/X11R6/man/man1/xawtv.1.gz

Privacy Policy