aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:40 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:40 +0200
commit9bbee7df3b13eb0caf1874748038235350916fbd (patch)
tree3fb2783458e405e75e9e0b2fc4e26f38ee601f0d
parent82fbaff22e3e4b1bbdd1e2192cfeff061ce7285c (diff)
v3.84
-rw-r--r--Changes14
-rw-r--r--Makefile2
-rw-r--r--Makefile.clean2
-rw-r--r--Makefile.in2
-rw-r--r--README14
-rw-r--r--common/channel.c12
-rw-r--r--common/commands.c7
-rw-r--r--common/commands.h2
-rw-r--r--common/frequencies.h4
-rw-r--r--common/joystick.c2
-rw-r--r--common/vbi-sim.c2
-rwxr-xr-xconfigure1714
-rw-r--r--console/fbtools.c52
-rw-r--r--console/fbtv.c16
-rw-r--r--console/fs.c3
-rw-r--r--console/fs.h3
-rw-r--r--console/record.c31
-rw-r--r--console/scantv.c9
-rw-r--r--console/showqt.c2
-rw-r--r--console/showriff.c4
-rw-r--r--console/streamer.c16
-rw-r--r--console/v4l-conf.c4
-rw-r--r--console/v4l-info.c2
-rw-r--r--console/webcam.c31
-rw-r--r--debug/xvideo.c74
-rw-r--r--frequencies/pal-australia.list8
-rw-r--r--jwz/remote.c2
-rw-r--r--jwz/vroot.h2
-rw-r--r--libng/color_common.c2
-rw-r--r--libng/color_lut.c6
-rw-r--r--libng/color_yuv2rgb.c20
-rw-r--r--libng/contrib-plugins/Subdir.mk4
-rw-r--r--libng/contrib-plugins/bilinear.c2
-rw-r--r--libng/contrib-plugins/cubic.c2
-rw-r--r--libng/contrib-plugins/flt-smooth.c2
-rw-r--r--libng/contrib-plugins/linear-blend.c2
-rw-r--r--libng/contrib-plugins/linedoubler.c2
-rw-r--r--libng/convert.c2
-rw-r--r--libng/grab-ng.c220
-rw-r--r--libng/grab-ng.h91
-rw-r--r--libng/list.h (renamed from common/list.h)0
-rw-r--r--libng/plugins/Subdir.mk2
-rw-r--r--libng/plugins/conv-audio.c23
-rw-r--r--libng/plugins/conv-mjpeg.c16
-rw-r--r--libng/plugins/drv0-v4l2-old.c31
-rw-r--r--libng/plugins/drv0-v4l2.c22
-rw-r--r--libng/plugins/drv1-v4l.c35
-rw-r--r--libng/plugins/flt-disor.c10
-rw-r--r--libng/plugins/flt-gamma.c2
-rw-r--r--libng/plugins/flt-invert.c2
-rw-r--r--libng/plugins/read-avi.c12
-rw-r--r--libng/plugins/read-dv.c8
-rw-r--r--libng/plugins/read-qt.c4
-rw-r--r--libng/plugins/snd-oss.c10
-rw-r--r--libng/plugins/write-qt.c13
-rw-r--r--libng/videodev.h22
-rw-r--r--libng/videodev2-old.h28
-rw-r--r--libng/writefile.c26
-rw-r--r--man/scantv.14
-rw-r--r--scripts/capture-test (renamed from capture-test)0
-rw-r--r--structs/struct-dump.c2
-rw-r--r--structs/struct-dump.h4
-rw-r--r--todo/tmohan/webcam.c.orig993
-rw-r--r--vbistuff/alevtd.c25
-rw-r--r--x11/MoTV-fixed8
-rw-r--r--x11/Xawtv.ad28
-rw-r--r--x11/blit.c28
-rw-r--r--x11/blit.h2
-rw-r--r--x11/icons.c2
-rw-r--r--x11/motv.c137
-rw-r--r--x11/pia.c9
-rw-r--r--x11/propwatch.c3
-rw-r--r--x11/rootv.c8
-rw-r--r--x11/vbi-gui.c2
-rw-r--r--x11/wmhooks.c3
-rw-r--r--x11/x11.c6
-rw-r--r--x11/x11.h4
-rw-r--r--x11/xawtv-remote.c3
-rw-r--r--x11/xawtv.c118
-rw-r--r--x11/xt.c35
-rw-r--r--x11/xv.c2
-rw-r--r--x11/xv.h2
-rw-r--r--xawtv.spec2
83 files changed, 2801 insertions, 1286 deletions
diff --git a/Changes b/Changes
index 5afa42a..89833bf 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,13 @@
+3.83 => 3.84
+============
+
+ * fixed a number of gcc 3.3 warnings, also did some other cleanups
+ while being at it.
+ * Multimedia keyboard support.
+ * commented alsa-mixer plugin (segfaults for me).
+
+
3.82 => 3.83
============
@@ -15,11 +24,6 @@
* compile fixes again ...
* v4l-conf fix (Kyosti Malkki <kmalkki@cc.hut.fi>).
* wmhook fix (Marcin Krzyzanowski <krzak@hakore.com>).
-
-
-3.81 => 3.82
-============
-
* still a few compile bug left ...
* s/recode/iconv/. iconv should (unlike recode) be present on almost
every system as it comes with glibc ...
diff --git a/Makefile b/Makefile
index 7181ff3..d4377c7 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ build all install: $(arch)/Makefile
clean distclean:
-test -d "$(arch)" && rm -rf "$(arch)"
-tarball rpm checkit release port:
+tarball rpm checkit release port snapshot:
./configure
$(MAKE) $@
diff --git a/Makefile.clean b/Makefile.clean
index 7181ff3..d4377c7 100644
--- a/Makefile.clean
+++ b/Makefile.clean
@@ -12,7 +12,7 @@ build all install: $(arch)/Makefile
clean distclean:
-test -d "$(arch)" && rm -rf "$(arch)"
-tarball rpm checkit release port:
+tarball rpm checkit release port snapshot:
./configure
$(MAKE) $@
diff --git a/Makefile.in b/Makefile.in
index e487b6b..d663962 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -175,6 +175,6 @@ rpm: tarball
rpm -ta ../xawtv_$(VERSION).tar.gz
snapshot: distclean
- (cd ..; tar cvzf xawtv-snap-`date +%Y-%m-%d`.tar.gz \
+ (cd ..; tar cvzf $(HOME)/snapshot/xawtv-`date +%Y%m%d`.tar.gz \
xawtv-$(VERSION))
diff --git a/README b/README
index f3b7ff1..9e88387 100644
--- a/README
+++ b/README
@@ -36,8 +36,8 @@ will never ever see an answer for these.
If you have problems after upgrading, please check the ChangeLog for
hints first. Looking into the ChangeLog is a good idea in general,
-becauce it is updated for every release, the other files are updated
-less freqently and might be a bit outdated.
+because it is updated for every release, the other files are updated
+less frequently and might be a bit outdated.
For problem/bug reports:
@@ -50,7 +50,7 @@ For problem/bug reports:
- xawtv version
- kernel version
- which driver (+ version if you know)
- - which hardware (althrouth I'll probably can help with bttv
+ - which hardware (although I probably can help with bttv
driver problems only).
- which TV norms are used in your country.
- if xawtv prints errors, include these too (cut+paste)
@@ -66,7 +66,7 @@ problem, you can skip it. But if in doubt, better include it...
For patches/changes:
- * Please add a comment on what is changed and and why you changed it.
+ * Please add a comment on what is changed and why you changed it.
* Please send unified diffs ("diff -u") against the latest version.
* Please don't reformat my source code.
* Complete patches have better chances to go in. Quick+dirty hacks
@@ -107,7 +107,7 @@ usage
bttv
----
-bttv is'nt bundled with xawtv any more. You can the latest version
+bttv isn't bundled with xawtv any more. You can the latest version
from http://bytesex.org/bttv/. If you are using kernel 2.4.x, it is
very unlikely that you need an update, the bttv driver in 2.4.x is
updated in regular intervals.
@@ -117,8 +117,8 @@ v4l-conf
--------
v4l-conf is a small tool which tells video4linux about the current
-video mode (size and color depth). This requires root priviliges,
-becauce it is easy to crash the box by passing bogus values there.
+video mode (size and color depth). This requires root privileges,
+because it is easy to crash the box by passing bogus values there.
It requires the X-Server with DGA support up and running or a
framebuffer device. It is a temporary hack, this problem will be
solved in a better way with a X11 extention. See README.xfree4
diff --git a/common/channel.c b/common/channel.c
index 567f6ae..b10802f 100644
--- a/common/channel.c
+++ b/common/channel.c
@@ -388,6 +388,7 @@ init_channel(char *name, struct CHANNEL *c)
void
read_config(char *conffile, int *argc, char **argv)
{
+ struct list_head *item;
char filename[100];
char *val;
int i;
@@ -489,10 +490,13 @@ read_config(char *conffile, int *argc, char **argv)
if (NULL != (val = cfg_get_str("global","mov-rate")))
mov_rate = val;
- if (NULL != (val = cfg_get_str("global","filter")))
- for (i = 0; NULL != ng_filters[i]; i++)
- if (0 == strcasecmp(ng_filters[i]->name, val))
- cur_filter=ng_filters[i];
+ if (NULL != (val = cfg_get_str("global","filter"))) {
+ list_for_each(item,&ng_filters) {
+ struct ng_filter *f = list_entry(item, struct ng_filter, list);
+ if (0 == strcasecmp(f->name, val))
+ cur_filter = f;
+ }
+ }
}
void
diff --git a/common/commands.c b/common/commands.c
index aa13501..429aef4 100644
--- a/common/commands.c
+++ b/common/commands.c
@@ -67,7 +67,7 @@ int do_overlay;
char *snapbase = "snap";
int have_shmem;
-int cur_tv_width,cur_tv_height;
+unsigned int cur_tv_width,cur_tv_height;
int cur_movie,cur_attrs[256];
/* current hardware driver */
@@ -955,7 +955,7 @@ static int list_handler(char *name, int argc, char **argv)
static int dattr_handler(char *name, int argc, char **argv)
{
struct ng_attribute *attr = NULL;
- int i;
+ unsigned int i;
if (argc > 0 && 0 == strcasecmp(argv[0],"next")) {
for (i = 0; i < NUM_DATTR; i++) {
@@ -1269,7 +1269,8 @@ vdr_handler(char *name, int argc, char **argv)
{
char line[80];
struct addrinfo ask;
- int i,l,len;
+ int i;
+ unsigned int l,len;
if (-1 == vdr_sock) {
memset(&ask,0,sizeof(ask));
diff --git a/common/commands.h b/common/commands.h
index f3ac2b4..8e51e9d 100644
--- a/common/commands.h
+++ b/common/commands.h
@@ -52,7 +52,7 @@ extern int debug;
extern int do_overlay;
extern char *snapbase;
extern int have_shmem;
-extern int cur_tv_width,cur_tv_height;
+extern unsigned int cur_tv_width,cur_tv_height;
extern int cur_movie,cur_attrs[256];
extern struct movie_parm m_parm;
diff --git a/common/frequencies.h b/common/frequencies.h
index 47cd7b7..113e96c 100644
--- a/common/frequencies.h
+++ b/common/frequencies.h
@@ -80,8 +80,8 @@
/* --------------------------------------------------------------------- */
struct CHANLIST {
- char *name;
- int freq;
+ char *name;
+ unsigned int freq;
};
struct CHANLISTS {
diff --git a/common/joystick.c b/common/joystick.c
index 3498bf0..da64a3e 100644
--- a/common/joystick.c
+++ b/common/joystick.c
@@ -90,7 +90,7 @@ int joystick_tv_init(char *dev)
void joystick_tv_havedata(int js)
{
#ifdef HAVE_LINUX_JOYSTICK_H
- int i;
+ unsigned int i;
struct js_event event;
if (debug)
fprintf(stderr, "joystick: received input\n");
diff --git a/common/vbi-sim.c b/common/vbi-sim.c
index 88c7e45..e9fca68 100644
--- a/common/vbi-sim.c
+++ b/common/vbi-sim.c
@@ -197,7 +197,7 @@ ttx_sim(double t, double F, const uint8_t *text)
}
}
-static int caption_i = 0;
+static unsigned int caption_i = 0;
static const uint8_t caption_text[] = {
0x14, 0x25, 0x14, 0x25, 'L', 'I', 'B', 'Z',
'V', 'B', 'I', ' ', 'C', 'A', 'P', 'T',
diff --git a/configure b/configure
index 5ed1770..63eff74 100755
--- a/configure
+++ b/configure
@@ -1,19 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.53.
+# Generated by GNU Autoconf 2.57.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
@@ -22,11 +14,13 @@ fi
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
-# NLS nuisances.
# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
as_unset=unset
@@ -34,34 +28,42 @@ else
as_unset=false
fi
-(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
- { $as_unset LANG || test "${LANG+set}" != set; } ||
- { LANG=C; export LANG; }
-(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
- { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
- { LC_ALL=C; export LC_ALL; }
-(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
- { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
- { LC_TIME=C; export LC_TIME; }
-(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
- { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
- { LC_CTYPE=C; export LC_CTYPE; }
-(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
- { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
- { LANGUAGE=C; export LANGUAGE; }
-(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
- { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
- { LC_COLLATE=C; export LC_COLLATE; }
-(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
- { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
- { LC_NUMERIC=C; export LC_NUMERIC; }
-(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
- { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
- { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
# Name of the executable.
-as_me=`(basename "$0") 2>/dev/null ||
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
@@ -72,6 +74,7 @@ echo X/"$0" |
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
+
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -82,15 +85,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conftest.sh
- echo "exit 0" >>conftest.sh
- chmod +x conftest.sh
- if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
- rm -f conftest.sh
+ rm -f conf$$.sh
fi
@@ -138,6 +141,8 @@ do
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
@@ -210,6 +215,12 @@ else
fi
rm -f conf$$ conf$$.exe conf$$.file
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
@@ -226,7 +237,7 @@ as_nl='
IFS=" $as_nl"
# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+$as_unset CDPATH
# Name of the host.
@@ -240,6 +251,7 @@ exec 6>&1
# Initializations.
#
ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
cross_compiling=no
subdirs=
MFLAGS=
@@ -296,6 +308,8 @@ ac_includes_default="\
# include <unistd.h>
#endif"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA DEPEND FOUND_AALIB FOUND_ALSA FOUND_DV FOUND_LQT FOUND_MOTIF FOUND_OS FOUND_X11 FOUND_GL FOUND_ZVBI EGREP DLFLAGS LIBPTHREAD LIBOSS LIBCURSES X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS x_includes x_libraries ATHENA FSLIB SUBS TOOLS LDLIBS LIBALSA LIRC LIBZVBI AALIBS LIBDV QTLIBS LIBGL VERSION x11conf resdir USE_MMX LIBOBJS LTLIBOBJS'
+ac_subst_files=''
# Initialize some variables set by options.
ac_init_help=
@@ -719,6 +733,9 @@ if test ! -r $srcdir/$ac_unique_file; then
{ (exit 1); exit 1; }; }
fi
fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
@@ -941,7 +958,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.53. Invocation command line was
+generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
@@ -993,27 +1010,54 @@ _ACEOF
# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
ac_sep=
-for ac_arg
+ac_must_keep_next=false
+for ac_pass in 1 2
do
- case $ac_arg in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n ) continue ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- ac_sep=" " ;;
- esac
- # Get rid of the leading space.
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
@@ -1024,6 +1068,7 @@ trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
+
cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
@@ -1046,6 +1091,35 @@ _ASBOX
esac;
}
echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
if test -s confdefs.h; then
cat <<\_ASBOX
## ----------- ##
@@ -1053,7 +1127,7 @@ _ASBOX
## ----------- ##
_ASBOX
echo
- sed "/^$/d" confdefs.h
+ sed "/^$/d" confdefs.h | sort
echo
fi
test "$ac_signal" != 0 &&
@@ -1210,7 +1284,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_config_headers="$ac_config_headers config.h"
+
+ ac_config_headers="$ac_config_headers config.h"
@@ -1477,9 +1552,7 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$as_dir/$ac_word" ${1+"$@"}
- shift
- ac_cv_prog_CC="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
@@ -1584,8 +1657,10 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
@@ -1610,14 +1685,12 @@ ac_compiler=`set X $ac_compile; echo $2`
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -1627,7 +1700,7 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe"
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
@@ -1646,26 +1719,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
# Be careful to initialize this variable, since it used to be cached.
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
ac_cv_exeext=
-for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
- ls a.out conftest 2>/dev/null;
- ls a.* conftest.* 2>/dev/null`; do
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
- a.out ) # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
- export ac_cv_exeext
- break;;
- * ) break;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
esac
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
-echo "$as_me: error: C compiler cannot create executables" >&2;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
fi
@@ -1692,9 +1778,11 @@ if test "$cross_compiling" != yes; then
cross_compiling=yes
else
{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&5
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&2;}
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -1702,7 +1790,7 @@ fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
-rm -f a.out a.exe conftest$ac_cv_exeext
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
@@ -1722,9 +1810,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
-for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
export ac_cv_exeext
break;;
@@ -1732,8 +1821,10 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1751,14 +1842,12 @@ if test "${ac_cv_objext+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -1775,16 +1864,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(exit $ac_status); }; then
for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1801,14 +1893,12 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -1835,7 +1925,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -1855,14 +1946,12 @@ if test "${ac_cv_prog_cc_g+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -1886,7 +1975,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -1908,6 +1998,102 @@ else
CFLAGS=
fi
fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
# Some people use a C++ compiler to compile C. Since we use `exit',
# in C++ we need to declare it. In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
@@ -1940,15 +2126,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
$ac_declaration
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -1972,20 +2156,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_declaration
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2009,7 +2192,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
@@ -2022,7 +2206,8 @@ fi
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
@@ -2151,14 +2336,12 @@ if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2185,7 +2368,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -2205,14 +2389,12 @@ if test "${ac_cv_prog_cxx_g+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2236,7 +2418,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_prog_cxx_g=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_prog_cxx_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -2269,15 +2452,13 @@ for ac_declaration in \
do
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
$ac_declaration
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2301,20 +2482,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_declaration
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -2338,7 +2518,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
@@ -2378,18 +2559,28 @@ for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -2406,7 +2597,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -2416,13 +2608,17 @@ rm -f conftest.err conftest.$ac_ext
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -2440,7 +2636,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -2469,18 +2666,28 @@ for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -2497,7 +2704,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -2507,13 +2715,17 @@ rm -f conftest.err conftest.$ac_ext
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -2531,7 +2743,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -2544,8 +2757,10 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2744,14 +2959,33 @@ esac
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/socket.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "sockaddr_storage" >/dev/null 2>&1; then
+ $EGREP "sockaddr_storage" >/dev/null 2>&1; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_SOCKADDR_STORAGE 1
@@ -2767,48 +3001,59 @@ if test "${ac_cv_header_stdc+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
+int
+main ()
+{
+
+ ;
+ return 0;
+}
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_stdc=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
@@ -2821,12 +3066,16 @@ if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
@@ -2842,13 +3091,18 @@ if test $ac_cv_header_stdc = yes; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
@@ -2881,11 +3135,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -2920,7 +3175,11 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
@@ -2940,7 +3199,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -2983,7 +3243,11 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
@@ -3002,7 +3266,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
@@ -3014,13 +3279,17 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -3037,7 +3306,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -3050,14 +3320,32 @@ case $ac_header_compiler:$ac_header_preproc in
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
no:yes )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
@@ -3096,37 +3384,44 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* 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 $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
@@ -3146,7 +3441,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3174,7 +3470,11 @@ else
LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3183,12 +3483,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3212,7 +3506,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3245,7 +3540,11 @@ else
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3254,12 +3553,6 @@ extern "C"
/* 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 ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3283,7 +3576,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_pthread_pthread_create=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_pthread_pthread_create=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3305,7 +3599,11 @@ else
LIBS="-lc_r $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3314,12 +3612,6 @@ extern "C"
/* 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 ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3343,7 +3635,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_c_r_pthread_create=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_c_r_pthread_create=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3365,15 +3658,13 @@ else
LIBS="-lossaudio $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3397,7 +3688,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_ossaudio_main=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_ossaudio_main=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3418,7 +3710,11 @@ else
LIBS="-lncurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3427,12 +3723,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char initscr ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3456,7 +3746,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_ncurses_initscr=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_ncurses_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3478,7 +3769,11 @@ else
LIBS="-lcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3487,12 +3782,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char initscr ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3516,7 +3805,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_curses_initscr=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_curses_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3640,13 +3930,17 @@ if test "$ac_x_includes" = no; then
# First, try using that file with no special directory specified.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <X11/Intrinsic.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
+ grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -3664,7 +3958,8 @@ if test -z "$ac_cpp_err"; then
ac_x_includes=
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
for ac_dir in $ac_x_header_dirs; do
if test -r "$ac_dir/X11/Intrinsic.h"; then
ac_x_includes=$ac_dir
@@ -3683,14 +3978,12 @@ if test "$ac_x_libraries" = no; then
LIBS="-lXt $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <X11/Intrinsic.h>
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3716,7 +4009,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_x_libraries=
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
LIBS=$ac_save_LIBS
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
@@ -3786,14 +4080,12 @@ 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 $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3817,7 +4109,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_R_nospace=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_R_nospace=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3829,14 +4122,12 @@ echo "${ECHO_T}no" >&6
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3860,7 +4151,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_R_space=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_R_space=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3890,7 +4182,11 @@ echo "${ECHO_T}neither works" >&6
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3899,12 +4195,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XOpenDisplay ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3928,7 +4218,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
echo "$as_me:$LINENO: 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
@@ -3938,7 +4229,11 @@ else
LIBS="-ldnet $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -3947,12 +4242,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dnet_ntoa ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -3976,7 +4265,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_dnet_dnet_ntoa=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_dnet_dnet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -3998,7 +4288,11 @@ else
LIBS="-ldnet_stub $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4007,12 +4301,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dnet_ntoa ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4036,7 +4324,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_dnet_stub_dnet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4068,37 +4357,44 @@ if test "${ac_cv_func_gethostbyname+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname (); below. */
-#include <assert.h>
+ which can conflict with char gethostbyname (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* 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 gethostbyname ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-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_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
-f = gethostbyname;
+char (*f) () = gethostbyname;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != gethostbyname;
;
return 0;
}
@@ -4118,7 +4414,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_gethostbyname=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4136,7 +4433,11 @@ else
LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4145,12 +4446,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4174,7 +4469,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_nsl_gethostbyname=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4196,7 +4492,11 @@ else
LIBS="-lbsd $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4205,12 +4505,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4234,7 +4528,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_bsd_gethostbyname=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_bsd_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4253,7 +4548,7 @@ fi
# socket/setsockopt and other routines are undefined under SCO ODT
# 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
# on later versions), says Simon Leinen: it contains gethostby*
- # variants that don't use the nameserver (or something). -lsocket
+ # variants that don't use the name server (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:$LINENO: checking for connect" >&5
@@ -4263,37 +4558,44 @@ if test "${ac_cv_func_connect+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char connect (); below. */
-#include <assert.h>
+ which can conflict with char connect (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* 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 connect ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-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_connect) || defined (__stub___connect)
choke me
#else
-f = connect;
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != connect;
;
return 0;
}
@@ -4313,7 +4615,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_connect=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4331,7 +4634,11 @@ else
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4340,12 +4647,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char connect ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4369,7 +4670,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_socket_connect=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_socket_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4391,37 +4693,44 @@ if test "${ac_cv_func_remove+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char remove (); below. */
-#include <assert.h>
+ which can conflict with char remove (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* 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 remove ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-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_remove) || defined (__stub___remove)
choke me
#else
-f = remove;
+char (*f) () = remove;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != remove;
;
return 0;
}
@@ -4441,7 +4750,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_remove=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4459,7 +4769,11 @@ else
LIBS="-lposix $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4468,12 +4782,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char remove ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4497,7 +4805,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_posix_remove=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_posix_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4519,37 +4828,44 @@ if test "${ac_cv_func_shmat+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shmat (); below. */
-#include <assert.h>
+ which can conflict with char shmat (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* 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 shmat ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-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_shmat) || defined (__stub___shmat)
choke me
#else
-f = shmat;
+char (*f) () = shmat;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != shmat;
;
return 0;
}
@@ -4569,7 +4885,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_shmat=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4587,7 +4904,11 @@ else
LIBS="-lipc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4596,12 +4917,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shmat ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4625,7 +4940,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_ipc_shmat=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_ipc_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4658,7 +4974,11 @@ else
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4667,12 +4987,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char IceConnectionNumber ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4696,7 +5010,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_ICE_IceConnectionNumber=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_ICE_IceConnectionNumber=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4741,7 +5056,11 @@ else
LIBS="-ljpeg $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4750,12 +5069,6 @@ extern "C"
/* 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 ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4779,7 +5092,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_jpeg_jpeg_start_compress=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_jpeg_jpeg_start_compress=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4810,7 +5124,11 @@ else
LIBS="-lasound $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4819,12 +5137,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char snd_seq_open ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4848,7 +5160,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_asound_snd_seq_open=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_asound_snd_seq_open=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4880,7 +5193,11 @@ else
LIBS="-llirc_client $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4889,12 +5206,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char lirc_init ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4918,7 +5229,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_lirc_client_lirc_init=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_lirc_client_lirc_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -4950,7 +5262,11 @@ else
LIBS="-lzvbi $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4959,12 +5275,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char vbi_capture_fd ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -4988,7 +5298,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_zvbi_vbi_capture_fd=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_zvbi_vbi_capture_fd=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5020,7 +5331,11 @@ else
LIBS="-laa $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5029,12 +5344,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char aa_autoinit ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5058,7 +5367,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_aa_aa_autoinit=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_aa_aa_autoinit=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5092,7 +5402,11 @@ else
LIBS="-ldv -lm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5101,12 +5415,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dv_decoder_new ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5130,7 +5438,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_dv_dv_decoder_new=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_dv_dv_decoder_new=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5160,7 +5469,11 @@ else
LIBS="-lquicktime -ldl -lglib $LIBPTHREAD $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5169,12 +5482,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char lqt_query_registry ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5198,7 +5505,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_quicktime_lqt_query_registry=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_quicktime_lqt_query_registry=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5234,7 +5542,11 @@ else
LIBS="-lXxf86dga $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5243,12 +5555,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XF86DGAQueryExtension ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5272,7 +5578,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_Xxf86dga_XF86DGAQueryExtension=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_Xxf86dga_XF86DGAQueryExtension=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5299,7 +5606,11 @@ else
LIBS="-lXxf86vm $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5308,12 +5619,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XF86VidModeQueryExtension ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5337,7 +5642,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5364,7 +5670,11 @@ else
LIBS="-lXdpms $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5373,12 +5683,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char DPMSQueryExtension ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5402,7 +5706,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_Xdpms_DPMSQueryExtension=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_Xdpms_DPMSQueryExtension=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5429,7 +5734,11 @@ else
LIBS="-lXext $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5438,12 +5747,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char DPMSQueryExtension ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5467,7 +5770,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_Xext_DPMSQueryExtension=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_Xext_DPMSQueryExtension=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5493,7 +5797,11 @@ else
LIBS="-lXinerama $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5502,12 +5810,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XineramaQueryExtension ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5531,7 +5833,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_Xinerama_XineramaQueryExtension=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_Xinerama_XineramaQueryExtension=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5563,7 +5866,11 @@ else
LIBS="-lXv $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5572,12 +5879,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XvQueryExtension ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5601,7 +5902,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_Xv_XvQueryExtension=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_Xv_XvQueryExtension=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5632,7 +5934,11 @@ else
LIBS="-lXm $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5641,12 +5947,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XmStringGenerate ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5670,7 +5970,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_Xm_XmStringGenerate=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_Xm_XmStringGenerate=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5698,7 +5999,11 @@ else
LIBS="-lGL $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS -lm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -5707,12 +6012,6 @@ extern "C"
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char glXChooseVisual ();
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
int
main ()
{
@@ -5736,7 +6035,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_GL_glXChooseVisual=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_GL_glXChooseVisual=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -5803,7 +6103,7 @@ fi
echo "$as_me:$LINENO: result: $USE_MMX" >&5
echo "${ECHO_T}$USE_MMX" >&6
-ac_config_files="$ac_config_files Makefile xawtv.spec"
+ 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
@@ -5814,7 +6114,7 @@ cat >confcache <<\_ACEOF
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
-# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.
@@ -5849,7 +6149,7 @@ _ACEOF
t end
/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
: end' >>confcache
-if cmp -s $cache_file confcache; then :; else
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
cat confcache >$cache_file
@@ -5880,6 +6180,21 @@ fi
DEFS=-DHAVE_CONFIG_H
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -5894,11 +6209,12 @@ cat >$CONFIG_STATUS <<_ACEOF
# configure, is in config.log if it exists.
debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
-
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
@@ -5907,11 +6223,13 @@ cat >>$CONFIG_STATUS <<\_ACEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
-# NLS nuisances.
# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
as_unset=unset
@@ -5919,34 +6237,42 @@ else
as_unset=false
fi
-(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
- { $as_unset LANG || test "${LANG+set}" != set; } ||
- { LANG=C; export LANG; }
-(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
- { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
- { LC_ALL=C; export LC_ALL; }
-(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
- { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
- { LC_TIME=C; export LC_TIME; }
-(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
- { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
- { LC_CTYPE=C; export LC_CTYPE; }
-(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
- { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
- { LANGUAGE=C; export LANGUAGE; }
-(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
- { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
- { LC_COLLATE=C; export LC_COLLATE; }
-(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
- { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
- { LC_NUMERIC=C; export LC_NUMERIC; }
-(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
- { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
- { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
# Name of the executable.
-as_me=`(basename "$0") 2>/dev/null ||
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
@@ -5957,6 +6283,7 @@ echo X/"$0" |
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
+
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -5967,15 +6294,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conftest.sh
- echo "exit 0" >>conftest.sh
- chmod +x conftest.sh
- if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
- rm -f conftest.sh
+ rm -f conf$$.sh
fi
@@ -6024,6 +6351,8 @@ do
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
@@ -6097,6 +6426,12 @@ else
fi
rm -f conf$$ conf$$.exe conf$$.file
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
@@ -6113,7 +6448,7 @@ as_nl='
IFS=" $as_nl"
# CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+$as_unset CDPATH
exec 6>&1
@@ -6130,7 +6465,7 @@ _ASBOX
cat >&5 <<_CSEOF
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.53. Invocation command line was
+generated by GNU Autoconf 2.57. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -6170,6 +6505,7 @@ Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
-V, --version print version number, then exit
+ -q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
@@ -6189,7 +6525,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.53,
+configured by $0, generated by GNU Autoconf 2.57,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -6210,25 +6546,25 @@ do
--*=*)
ac_option=`expr "x$1" : 'x\([^=]*\)='`
ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- shift
- set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
- shift
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
;;
- -*);;
*) # This is not an option, so the user has probably given explicit
# arguments.
+ ac_option=$1
ac_need_defaults=false;;
esac
- case $1 in
+ case $ac_option in
# Handling of the options.
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
- exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
-_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
@@ -6243,13 +6579,16 @@ Try \`$0 --help' for more information." >&2;}
--debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
- shift
- CONFIG_FILES="$CONFIG_FILES $1"
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
- shift
- CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
# This is an error.
-*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
@@ -6264,6 +6603,20 @@ Try \`$0 --help' for more information." >&2;}
shift
done
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
_ACEOF
@@ -6293,6 +6646,9 @@ if $ac_need_defaults; then
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
fi
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
@@ -6301,17 +6657,17 @@ $debug ||
}
# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=$TMPDIR/cs$$-$RANDOM
+ tmp=./confstat$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
@@ -6383,6 +6739,7 @@ s,@FOUND_OS@,$FOUND_OS,;t t
s,@FOUND_X11@,$FOUND_X11,;t t
s,@FOUND_GL@,$FOUND_GL,;t t
s,@FOUND_ZVBI@,$FOUND_ZVBI,;t t
+s,@EGREP@,$EGREP,;t t
s,@DLFLAGS@,$DLFLAGS,;t t
s,@LIBPTHREAD@,$LIBPTHREAD,;t t
s,@LIBOSS@,$LIBOSS,;t t
@@ -6409,6 +6766,8 @@ s,@VERSION@,$VERSION,;t t
s,@x11conf@,$x11conf,;t t
s,@resdir@,$resdir,;t t
s,@USE_MMX@,$USE_MMX,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
_ACEOF
@@ -6479,25 +6838,30 @@ echo X"$ac_file" |
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
- { case "$ac_dir" in
- [\\/]* | ?:[\\/]* ) as_incr_dir=;;
- *) as_incr_dir=.;;
-esac
-as_dummy="$ac_dir"
-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
- case $as_mkdir_dir in
- # Skip DOS drivespec
- ?:) as_incr_dir=$as_mkdir_dir ;;
- *)
- as_incr_dir=$as_incr_dir/$as_mkdir_dir
- test -d "$as_incr_dir" ||
- mkdir "$as_incr_dir" ||
- { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-done; }
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
ac_builddir=.
@@ -6717,7 +7081,7 @@ _ACEOF
# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo ' :' >>$CONFIG_STATUS
rm -f conftest.tail
@@ -6741,7 +7105,7 @@ do
mv conftest.tail conftest.defines
done
rm -f conftest.defines
-echo ' fi # egrep' >>$CONFIG_STATUS
+echo ' fi # grep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS
# Break up conftest.undefs because some shells have a limit on the size
@@ -6781,7 +7145,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF
cat $tmp/in >>$tmp/config.h
rm -f $tmp/in
if test x"$ac_file" != x-; then
- if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
{ echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
@@ -6797,25 +7161,30 @@ echo X"$ac_file" |
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
- { case "$ac_dir" in
- [\\/]* | ?:[\\/]* ) as_incr_dir=;;
- *) as_incr_dir=.;;
-esac
-as_dummy="$ac_dir"
-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
- case $as_mkdir_dir in
- # Skip DOS drivespec
- ?:) as_incr_dir=$as_mkdir_dir ;;
- *)
- as_incr_dir=$as_incr_dir/$as_mkdir_dir
- test -d "$as_incr_dir" ||
- mkdir "$as_incr_dir" ||
- { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-done; }
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
rm -f $ac_file
mv $tmp/config.h $ac_file
@@ -6845,8 +7214,11 @@ ac_clean_files=$ac_clean_files_save
# need to make the FD available again.
if test "$no_create" != yes; then
ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
exec 5>/dev/null
- $SHELL $CONFIG_STATUS || ac_cs_success=false
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
diff --git a/console/fbtools.c b/console/fbtools.c
index 228589f..6ad7ceb 100644
--- a/console/fbtools.c
+++ b/console/fbtools.c
@@ -20,7 +20,6 @@
#include <linux/kd.h>
#include <linux/vt.h>
#include <linux/fb.h>
-#include <linux/major.h>
#include <asm/page.h>
@@ -307,61 +306,32 @@ static int fb_activate_current(int tty)
if (-1 == ioctl(tty,VT_GETSTATE, &vts)) {
perror("ioctl VT_GETSTATE");
return -1;
- } else {
- if (-1 == ioctl(tty,VT_ACTIVATE, vts.v_active)) {
- perror("ioctl VT_ACTIVATE");
- return -1;
- }
- if (-1 == ioctl(tty,VT_WAITACTIVE, vts.v_active)) {
- perror("ioctl VT_WAITACTIVE");
- return -1;
- }
}
- return 0;
-}
-
-int fb_probe(void)
-{
- struct fb_con2fbmap c2m;
- struct stat st;
- int fb;
-
- dev_init();
- fstat(0,&st);
- if (((st.st_rdev >> 8) & 0xff) != TTY_MAJOR)
- /* not a linux console */
- return -1;
- if (-1 == (fb = open(devices->fb0,O_WRONLY,0)))
- /* can't open /dev/fb0 */
+ if (-1 == ioctl(tty,VT_ACTIVATE, vts.v_active)) {
+ perror("ioctl VT_ACTIVATE");
return -1;
-
- c2m.console = st.st_rdev & 0xff;
- if (-1 == ioctl(fb, FBIOGET_CON2FBMAP, &c2m))
- /* ??? */
+ }
+ if (-1 == ioctl(tty,VT_WAITACTIVE, vts.v_active)) {
+ perror("ioctl VT_WAITACTIVE");
return -1;
- close(fb);
+ }
return 0;
}
int
fb_init(char *device, char *mode, int vt)
{
- struct stat st;
char fbdev[16];
+ struct vt_stat vts;
dev_init();
tty = 0;
if (vt != 0)
fb_setvt(vt);
- /* FIXME: where are MAJOR() / MINOR() ??? */
- fstat(tty,&st);
- if (((st.st_rdev >> 8) & 0xff) != TTY_MAJOR) {
- /* catch that here, give a more user friendly error message that just
- * throw a error about a failed ioctl later on ... */
- fprintf(stderr,
- "ERROR: tty is not a linux console. You can not start this\n"
- " tool from a pseudo tty (xterm/ssh/screen/...).\n");
+ if (-1 == ioctl(tty,VT_GETSTATE, &vts)) {
+ fprintf(stderr,"ioctl VT_GETSTATE: %s (not a linux console?)\n",
+ strerror(errno));
exit(1);
}
@@ -373,7 +343,7 @@ fb_init(char *device, char *mode, int vt)
fprintf(stderr,"open %s: %s\n",devices->fb0,strerror(errno));
exit(1);
}
- c2m.console = st.st_rdev & 0xff;
+ c2m.console = vts.v_active;
if (-1 == ioctl(fb, FBIOGET_CON2FBMAP, &c2m)) {
perror("ioctl FBIOGET_CON2FBMAP");
exit(1);
diff --git a/console/fbtv.c b/console/fbtv.c
index 9c4e868..2a20090 100644
--- a/console/fbtv.c
+++ b/console/fbtv.c
@@ -575,7 +575,8 @@ scaler_test(int off)
int
main(int argc, char *argv[])
{
- int key,i,c,gray=0,rc,vt=0,fps=0,t1,t2,lirc,js,err,mute=1,fdmax;
+ int i,key,c,gray=0,rc,vt=0,fps=0,t1,t2,lirc,js,err,mute=1,fdmax;
+ unsigned int ui;
unsigned long freq;
struct timeval tv;
time_t t;
@@ -801,8 +802,9 @@ main(int argc, char *argv[])
dst = fb_mem +
dy * fb_fix.line_length +
dx * ((fb_var.bits_per_pixel+7)/8);
- for (i = 0; i < buf->fmt.height; i++) {
- memcpy(dst,buf->data + i*buf->fmt.bytesperline, buf->fmt.bytesperline);
+ for (ui = 0; ui < buf->fmt.height; ui++) {
+ memcpy(dst, buf->data + ui*buf->fmt.bytesperline,
+ buf->fmt.bytesperline);
dst += fb_fix.line_length;
}
ng_release_video_buf(buf);
@@ -864,12 +866,12 @@ main(int argc, char *argv[])
sprintf(event,"kbd-key-f%d",key - KEY_F(0));
} else {
/* other special keys */
- for (i = 0; i < NKEYTAB; i++) {
- if (keytab[i].key == key)
+ for (ui = 0; ui < NKEYTAB; ui++) {
+ if (keytab[ui].key == key)
break;
}
- if (i != NKEYTAB)
- sprintf(event,"kbd-key-%s",keytab[i].name);
+ if (ui != NKEYTAB)
+ sprintf(event,"kbd-key-%s",keytab[ui].name);
}
if (0 != event[0]) {
event_dispatch(event);
diff --git a/console/fs.c b/console/fs.c
index c5008a2..4f129e0 100644
--- a/console/fs.c
+++ b/console/fs.c
@@ -122,7 +122,8 @@ void fs_render_fb(unsigned char *ptr, int pitch,
}
}
-int fs_puts(struct fs_font *f, int x, int y, unsigned char *str)
+int fs_puts(struct fs_font *f, unsigned int x, unsigned int y,
+ unsigned char *str)
{
unsigned char *pos,*start;
int i,c,j,w;
diff --git a/console/fs.h b/console/fs.h
index 2ac7228..290a00b 100644
--- a/console/fs.h
+++ b/console/fs.h
@@ -56,7 +56,8 @@ struct fs_font {
int fs_init_fb(int white8);
void fs_render_fb(unsigned char *ptr, int pitch,
FSXCharInfo *charInfo, unsigned char *data);
-int fs_puts(struct fs_font *f, int x, int y, unsigned char *str);
+int fs_puts(struct fs_font *f, unsigned int x, unsigned int y,
+ unsigned char *str);
int fs_textwidth(struct fs_font *f, unsigned char *str);
void fs_render_tty(FSXCharInfo *charInfo, unsigned char *data);
diff --git a/console/record.c b/console/record.c
index b334a1e..4bc43dd 100644
--- a/console/record.c
+++ b/console/record.c
@@ -39,14 +39,14 @@ tty_restore(void)
/* -------------------------------------------------------------------- */
-static int sound_fd;
-static int sound_blksize;
-static short *sound_buffer;
-static int maxl,maxr;
-static int secl,secr;
-static int *histl,*histr,histn,histi;
-static float peak_seconds = 1.5;
-static char *audio_dev = "/dev/dsp";
+static int sound_fd;
+static unsigned int sound_blksize;
+static short *sound_buffer;
+static int maxl,maxr;
+static int secl,secr;
+static int *histl,*histr,histn,histi;
+static float peak_seconds = 1.5;
+static char *audio_dev = "/dev/dsp";
static int
sound_open(int rate)
@@ -126,7 +126,8 @@ sound_open(int rate)
static int
sound_read(void)
{
- int i,rc,have;
+ unsigned int have;
+ int i,rc;
short *v;
/* read */
@@ -305,8 +306,8 @@ typedef struct WAVEHDR {
/* -------------------------------------------------------------------- */
static WAVEHDR fileheader;
-static off_t wav_size;
-static off_t done_size;
+static size_t wav_size;
+static size_t done_size;
static void
wav_init_header(int rate)
@@ -457,7 +458,7 @@ record_stop(int fd)
}
}
-static off_t
+static size_t
parse_size(const char *arg)
{
int value;
@@ -465,7 +466,7 @@ parse_size(const char *arg)
off_t retval = -1;
if (2 != sscanf(arg,"%d%3s",&value,mul))
- return -1;
+ return 0;
if (0 == strcasecmp(mul,"g") ||
0 == strcasecmp(mul,"gb"))
retval = (off_t)value * 1024 * 1024 * 1024;
@@ -555,7 +556,7 @@ main(int argc, char *argv[])
fd_set s;
int sec,maxhour,maxmin,maxsec;
int maxfiles = 0;
- off_t maxsize;
+ size_t maxsize;
/* init some vars */
progname = strrchr(argv[0],'/');
@@ -627,7 +628,7 @@ main(int argc, char *argv[])
}
}
maxsize = parse_size(str_maxsize);
- if (-1 == maxsize) {
+ if (0 == maxsize) {
fprintf(stderr,"maxsize parse error [%s]\n",str_maxsize);
exit(1);
}
diff --git a/console/scantv.c b/console/scantv.c
index a33ee06..3bebf78 100644
--- a/console/scantv.c
+++ b/console/scantv.c
@@ -120,10 +120,12 @@ usage(FILE *out, char *prog, char *outfile)
" -f table set frequency table.\n"
" -c device set video device file. [%s]\n"
" -C device set vbi device file. [%s]\n"
- " -s skip channel scan\n",
+ " -s skip channel scan\n"
+ " -a full scan (all frequencies, not just\n"
+ " the ones from the frequency table)\n",
prog,
outfile ? outfile : "stdout",
- ng_dev.video,ng_dev.vbi);
+ ng_dev.video, ng_dev.vbi);
}
int
@@ -131,7 +133,8 @@ main(int argc, char **argv)
{
struct vbi_state *vbi;
struct ng_attribute *attr;
- int c,f,f1,f2,fc,fi,on,tuned,i,j,scan=1,fullscan=0;
+ int c,fi,on,tuned,i,j,scan=1,fullscan=0;
+ unsigned int f,f1,f2,fc;
char *name,dummy[32];
char *tvnorm = NULL;
char *freqtab = NULL;
diff --git a/console/showqt.c b/console/showqt.c
index 12a9d18..51dfc94 100644
--- a/console/showqt.c
+++ b/console/showqt.c
@@ -547,7 +547,7 @@ static int handle_classic_atom(int fh, off_t pos, off_t size, int depth)
{
struct classic_atom a;
uint64_t asize;
- off_t off;
+ size_t off;
int i;
if (-1 == lseek(fh,pos,SEEK_SET)) {
diff --git a/console/showriff.c b/console/showriff.c
index c2240b9..c884e4d 100644
--- a/console/showriff.c
+++ b/console/showriff.c
@@ -370,7 +370,7 @@ static boolean ReadChunkHead(FILE* f, FOURCC* ID, DWORD* size)
ProcessChunk prints out information of the chunk to stdout
and returns FALSE, if an error occured. */
-static boolean ProcessChunk(FILE* f, off_t filepos, off_t filesize,
+static boolean ProcessChunk(FILE* f, size_t filepos, size_t filesize,
FOURCC DesiredTag, int RekDepth,
DWORD* chunksize)
{
@@ -378,7 +378,7 @@ static boolean ProcessChunk(FILE* f, off_t filepos, off_t filesize,
int buflen;
char tagstr[5]; /* FOURCC of chunk converted to string */
FOURCC chunkid; /* read FOURCC of chunk */
- off_t datapos; /* position of data in file to process */
+ size_t datapos; /* position of data in file to process */
if (filepos>filesize-1) { /* Oops. Must be something wrong! */
printf(" ***** Error: Data would be behind end of file!\n");
diff --git a/console/streamer.c b/console/streamer.c
index 50fd7c8..1759403 100644
--- a/console/streamer.c
+++ b/console/streamer.c
@@ -66,12 +66,13 @@ int debug = 0, have_dga = 0;
static void
list_formats(FILE *out)
{
+ struct list_head *item;
const struct ng_writer *wr;
- int i,j;
+ int j;
fprintf(out,"\nmovie writers:\n");
- for (i = 0; NULL != ng_writers[i]; i++) {
- wr = ng_writers[i];
+ list_for_each(item,&ng_writers) {
+ wr = list_entry(item, struct ng_writer, list);
fprintf(out," %s - %s\n",wr->name,
wr->desc ? wr->desc : "-");
if (NULL != wr->video) {
@@ -186,10 +187,11 @@ usage(FILE *out)
static void
find_formats(void)
{
+ struct list_head *item;
const struct ng_writer *wr = NULL;
char *mext = NULL;
char *aext = NULL;
- int w,v=-1,a=-1;
+ int v=-1,a=-1;
if (moviename) {
mext = strrchr(moviename,'.');
@@ -201,8 +203,8 @@ find_formats(void)
if (aext)
aext++;
}
- for (w = 0; NULL != ng_writers[w]; w++) {
- wr = ng_writers[w];
+ list_for_each(item,&ng_writers) {
+ wr = list_entry(item, struct ng_writer, list);
if (debug)
fprintf(stderr,"checking writer %s [%s] ...\n",wr->name,wr->desc);
if ((/*!wr->combined && */mext) || NULL != vfmt_name) {
@@ -268,7 +270,7 @@ find_formats(void)
}
break;
}
- if (NULL != ng_writers[w]) {
+ if (item != &ng_writers) {
writer = wr;
if (-1 != v) {
video.fmtid = wr->video[v].fmtid;
diff --git a/console/v4l-conf.c b/console/v4l-conf.c
index a17e416..e492644 100644
--- a/console/v4l-conf.c
+++ b/console/v4l-conf.c
@@ -224,7 +224,7 @@ displayinfo_dga(Display *dpy, struct DISPLAYINFO *d)
{
#ifdef HAVE_LIBXXF86DGA
int width,bar,foo,major,minor,flags=0;
- void *base = 0;
+ void *base = NULL;
if (!XF86DGAQueryExtension(dpy,&foo,&bar)) {
fprintf(stderr,"WARNING: Your X-Server has no DGA support.\n");
@@ -238,7 +238,7 @@ displayinfo_dga(Display *dpy, struct DISPLAYINFO *d)
fprintf(stderr,"WARNING: No DGA support available for this display.\n");
return;
}
- XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(int*)&base,&width,&foo,&bar);
+ XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(void*)&base,&width,&foo,&bar);
d->bpl = width * d->bpp/8;
d->base = base;
#else
diff --git a/console/v4l-info.c b/console/v4l-info.c
index 0f184b2..38659cf 100644
--- a/console/v4l-info.c
+++ b/console/v4l-info.c
@@ -29,7 +29,7 @@ static int dump_v4l(int fd, int tab)
struct video_picture picture;
struct video_buffer buffer;
struct video_window window;
- int i;
+ unsigned int i;
printf("general info\n");
memset(&capability,0,sizeof(capability));
diff --git a/console/webcam.c b/console/webcam.c
index 4baf12a..8ddc107 100644
--- a/console/webcam.c
+++ b/console/webcam.c
@@ -42,8 +42,8 @@ int grab_height = 240;
int grab_delay = 3;
int grab_wait = 0;
int grab_rotate = 0;
-int grab_top = 0;
-int grab_left = 0;
+int grab_top = -1;
+int grab_left = -1;
int grab_bottom = -1;
int grab_right = -1;
int grab_quality= 75;
@@ -726,15 +726,24 @@ main(int argc, char *argv[])
grab_dist_sensorw = i;
if (-1 != (i = cfg_get_int("grab","distor_sensorh")))
grab_dist_sensorh = 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;
+
+ /* defaults */
+ if (grab_top < 0) grab_top = 0;
+ if (grab_left < 0) grab_left = 0;
+ if (grab_bottom < 0) grab_bottom = grab_height;
+ if (grab_right < 0) grab_right = grab_width;
+
+ if (grab_bottom > grab_height) grab_bottom = grab_height;
+ if (grab_right > grab_width) grab_right = grab_width;
+
+ if (grab_top >= grab_bottom) {
+ fprintf(stderr, "config error: top must be smaller than bottom\n");
+ exit(1);
+ }
+ if (grab_left >= grab_right) {
+ fprintf(stderr, "config error: left must be smaller than right\n");
+ exit(1);
+ }
if (grab_dist_k < 1 || grab_dist_k > 10000)
grab_dist_k = 700;
diff --git a/debug/xvideo.c b/debug/xvideo.c
index 00ea087..f0400eb 100644
--- a/debug/xvideo.c
+++ b/debug/xvideo.c
@@ -165,9 +165,9 @@ main(int argc, char *argv[])
int found,v;
char *class;
- int ver, rel, req, ev, err, val;
- int adaptors,encodings,attributes,formats;
- int i,j,p,c;
+ int ver, rel, req, ev, err, val, c;
+ unsigned int adaptors,encodings,attributes,formats;
+ unsigned int i,ui,p;
/* init X11 */
app_shell = XtAppInitialize(&app_context,
@@ -242,12 +242,12 @@ main(int argc, char *argv[])
ai[i].num_ports,
ai[i].base_id);
printf(" format list (n=%ld)\n",ai[i].num_formats);
- for (j = 0; j < ai[i].num_formats; j++) {
+ for (ui = 0; ui < ai[i].num_formats; ui++) {
printf(" depth=%d, visual: id=0x%lx",
- ai[i].formats[j].depth,
- ai[i].formats[j].visual_id);
+ ai[i].formats[ui].depth,
+ ai[i].formats[ui].visual_id);
for (v = 0; v < found; v++) {
- if (ai[i].formats[j].visual_id != info[v].visualid)
+ if (ai[i].formats[ui].visual_id != info[v].visualid)
continue;
switch (info[v].class) {
case StaticGray: class = "StaticGray"; break;
@@ -268,23 +268,23 @@ main(int argc, char *argv[])
continue;
}
printf(" encoding list for port %d (n=%d)\n",p,encodings);
- for (j = 0; j < encodings; j++) {
+ for (ui = 0; ui < encodings; ui++) {
printf(" id=%ld, name=%s, size=%ldx%ld\n",
- ei[j].encoding_id, ei[j].name,
- ei[j].width, ei[j].height);
+ ei[ui].encoding_id, ei[ui].name,
+ ei[ui].width, ei[ui].height);
}
XvFreeEncodingInfo(ei);
at = XvQueryPortAttributes(dpy,p,&attributes);
printf(" attribute list for port %d (n=%d)\n",p,attributes);
- for (j = 0; j < attributes; j++) {
+ for (ui = 0; ui < attributes; ui++) {
printf(" %s%s%s, %i -> %i",
- at[j].name,
- (at[j].flags & XvGettable) ? " get" : "",
- (at[j].flags & XvSettable) ? " set" : "",
- at[j].min_value,at[j].max_value);
- attr = XInternAtom(dpy, at[j].name, False);
- if (at[j].flags & XvGettable) {
+ at[ui].name,
+ (at[ui].flags & XvGettable) ? " get" : "",
+ (at[ui].flags & XvSettable) ? " set" : "",
+ at[ui].min_value,at[ui].max_value);
+ attr = XInternAtom(dpy, at[ui].name, False);
+ if (at[ui].flags & XvGettable) {
XvGetPortAttribute(dpy, p, attr, &val);
printf(", val=%d",val);
}
@@ -295,30 +295,30 @@ main(int argc, char *argv[])
fo = XvListImageFormats(dpy, p, &formats);
printf(" image format list for port %d (n=%d)\n",p,formats);
- for(j = 0; j < formats; j++) {
+ for(ui = 0; ui < formats; ui++) {
fprintf(stderr, " 0x%x (%c%c%c%c) %s",
- fo[j].id,
- (fo[j].id) & 0xff,
- (fo[j].id >> 8) & 0xff,
- (fo[j].id >> 16) & 0xff,
- (fo[j].id >> 24) & 0xff,
- (fo[j].format == XvPacked) ? "packed" : "planar");
- if (fo[j].type == XvRGB)
+ fo[ui].id,
+ (fo[ui].id) & 0xff,
+ (fo[ui].id >> 8) & 0xff,
+ (fo[ui].id >> 16) & 0xff,
+ (fo[ui].id >> 24) & 0xff,
+ (fo[ui].format == XvPacked) ? "packed" : "planar");
+ if (fo[ui].type == XvRGB)
fprintf(stderr," rgb: depth=%d masks=0x%x/0x%x/0x%x",
- fo[j].depth,fo[j].red_mask,fo[j].green_mask,
- fo[j].blue_mask);
- if (fo[j].type == XvYUV)
+ fo[ui].depth,fo[ui].red_mask,fo[ui].green_mask,
+ fo[ui].blue_mask);
+ if (fo[ui].type == XvYUV)
fprintf(stderr," yuv: bits=%d/%d/%d horiz=%d/%d/%d "
"vert=%d/%d/%d",
- fo[j].y_sample_bits,
- fo[j].u_sample_bits,
- fo[j].v_sample_bits,
- fo[j].horz_y_period,
- fo[j].horz_u_period,
- fo[j].horz_v_period,
- fo[j].vert_y_period,
- fo[j].vert_u_period,
- fo[j].vert_v_period);
+ fo[ui].y_sample_bits,
+ fo[ui].u_sample_bits,
+ fo[ui].v_sample_bits,
+ fo[ui].horz_y_period,
+ fo[ui].horz_u_period,
+ fo[ui].horz_v_period,
+ fo[ui].vert_y_period,
+ fo[ui].vert_u_period,
+ fo[ui].vert_v_period);
fprintf(stderr,"\n");
}
if (fo)
diff --git a/frequencies/pal-australia.list b/frequencies/pal-australia.list
index c857f8c..b9ee27c 100644
--- a/frequencies/pal-australia.list
+++ b/frequencies/pal-australia.list
@@ -62,7 +62,13 @@ freq = 569250
freq = 576250
[36]
-freq = 591250
+freq = 583250
+
+[37]
+freq = 590250
+
+[38]
+freq = 597250
[39]
freq = 604250
diff --git a/jwz/remote.c b/jwz/remote.c
index f103477..94c53e5 100644
--- a/jwz/remote.c
+++ b/jwz/remote.c
@@ -72,7 +72,7 @@ BadWindow_ehandler (Display *dpy, XErrorEvent *error)
static Window
find_screensaver_window (Display *dpy, char **version)
{
- int i;
+ unsigned int i;
Window root = RootWindowOfScreen (DefaultScreenOfDisplay (dpy));
Window root2, parent, *kids;
unsigned int nkids;
diff --git a/jwz/vroot.h b/jwz/vroot.h
index ba3e5d2..83c7ba9 100644
--- a/jwz/vroot.h
+++ b/jwz/vroot.h
@@ -78,7 +78,7 @@ VirtualRootWindowOfScreen(screen) Screen *screen;
if (screen != save_screen) {
Display *dpy = DisplayOfScreen(screen);
Atom __SWM_VROOT = None;
- int i;
+ unsigned int i;
Window rootReturn, parentReturn, *children;
unsigned int numChildren;
diff --git a/libng/color_common.c b/libng/color_common.c
index 0380db1..0019ee4 100644
--- a/libng/color_common.c
+++ b/libng/color_common.c
@@ -24,7 +24,7 @@ ng_packed_frame(void *handle, struct ng_video_buf *out,
{
int (*func)(unsigned char *dest, unsigned char *src, int p) = handle;
unsigned char *sp,*dp;
- int i,sw,dw;
+ unsigned int i,sw,dw;
dw = (out->fmt.width * ng_vfmt_to_depth[out->fmt.fmtid]) >> 3;
sw = (in->fmt.width * ng_vfmt_to_depth[in->fmt.fmtid]) >> 3;
diff --git a/libng/color_lut.c b/libng/color_lut.c
index ed87e21..72de486 100644
--- a/libng/color_lut.c
+++ b/libng/color_lut.c
@@ -234,12 +234,12 @@ static struct ng_video_conv lut4_list[] = {
}
};
-static const int nconv2 = sizeof(lut2_list)/sizeof(struct ng_video_conv);
-static const int nconv4 = sizeof(lut4_list)/sizeof(struct ng_video_conv);
+static const unsigned int nconv2 = sizeof(lut2_list)/sizeof(lut2_list[0]);
+static const unsigned int nconv4 = sizeof(lut4_list)/sizeof(lut4_list[0]);
void
ng_lut_init(unsigned long red_mask, unsigned long green_mask,
- unsigned long blue_mask, int fmtid, int swap)
+ unsigned long blue_mask, unsigned int fmtid, int swap)
{
static int once=0;
int rgb_red_bits = 0;
diff --git a/libng/color_yuv2rgb.c b/libng/color_yuv2rgb.c
index 66291a3..37eebfc 100644
--- a/libng/color_yuv2rgb.c
+++ b/libng/color_yuv2rgb.c
@@ -151,7 +151,7 @@ yuv42xp_to_gray(void *h, struct ng_video_buf *out, struct ng_video_buf *in)
unsigned char* restrict y;
unsigned char* restrict d;
unsigned char* dp;
- int i,j;
+ unsigned int i,j;
dp = out->data;
y = in->data;
@@ -172,7 +172,8 @@ yuv420p_to_rgb24(void *h, struct ng_video_buf *out, struct ng_video_buf *in)
unsigned char *restrict y, *restrict u, *restrict v, *restrict d;
unsigned char *us,*vs;
unsigned char *dp;
- int i,j,gray;
+ unsigned int i,j;
+ int gray;
dp = out->data;
y = in->data;
@@ -206,7 +207,8 @@ yuv422p_to_rgb24(void *h, struct ng_video_buf *out, struct ng_video_buf *in)
{
unsigned char *restrict y, *restrict u, *restrict v, *restrict d;
unsigned char *dp;
- int i,j,gray;
+ unsigned int i,j;
+ int gray;
dp = out->data;
y = in->data;
@@ -238,7 +240,8 @@ ng_yuv420p_to_lut2(void *h, struct ng_video_buf *out, struct ng_video_buf *in)
unsigned char *us,*vs;
unsigned char *dp;
unsigned short *restrict d;
- int i,j,gray;
+ unsigned int i,j;
+ int gray;
dp = out->data;
y = in->data;
@@ -275,7 +278,8 @@ ng_yuv422p_to_lut2(void *h, struct ng_video_buf *out, struct ng_video_buf *in)
unsigned char *restrict y, *restrict u, *restrict v;
unsigned char *dp;
unsigned short *restrict d;
- int i,j,gray;
+ unsigned int i,j;
+ int gray;
dp = out->data;
y = in->data;
@@ -309,7 +313,8 @@ ng_yuv420p_to_lut4(void *h, struct ng_video_buf *out, struct ng_video_buf *in)
unsigned char *us,*vs;
unsigned char *dp;
unsigned int *restrict d;
- int i,j,gray;
+ unsigned int i,j;
+ int gray;
dp = out->data;
y = in->data;
@@ -346,7 +351,8 @@ ng_yuv422p_to_lut4(void *h, struct ng_video_buf *out, struct ng_video_buf *in)
unsigned char *restrict y, *restrict u, *restrict v;
unsigned char *dp;
unsigned int *restrict d;
- int i,j,gray;
+ unsigned int i,j;
+ int gray;
dp = out->data;
y = in->data;
diff --git a/libng/contrib-plugins/Subdir.mk b/libng/contrib-plugins/Subdir.mk
index f729bdf..cc1c848 100644
--- a/libng/contrib-plugins/Subdir.mk
+++ b/libng/contrib-plugins/Subdir.mk
@@ -8,8 +8,8 @@ TARGETS-contrib-plugins := \
libng/contrib-plugins/linedoubler.so
ifeq ($(FOUND_ALSA),yes)
-TARGETS-contrib-plugins += \
- libng/contrib-plugins/snd-alsa.so
+#TARGETS-contrib-plugins += \
+# libng/contrib-plugins/snd-alsa.so
endif
# alsa is c++ and thus we should call g++ for linking ...
diff --git a/libng/contrib-plugins/bilinear.c b/libng/contrib-plugins/bilinear.c
index e9ff9df..243208b 100644
--- a/libng/contrib-plugins/bilinear.c
+++ b/libng/contrib-plugins/bilinear.c
@@ -32,7 +32,7 @@
static void inline
deinterlace (struct ng_video_buf *frame)
{
- int x, y;
+ unsigned int x, y;
for (y = 1; y < frame->fmt.height - 1; y += 2)
for (x = 0; x < frame->fmt.bytesperline + 1; x++)
diff --git a/libng/contrib-plugins/cubic.c b/libng/contrib-plugins/cubic.c
index 1647b52..6c67682 100644
--- a/libng/contrib-plugins/cubic.c
+++ b/libng/contrib-plugins/cubic.c
@@ -39,7 +39,7 @@
static void inline
deinterlace (struct ng_video_buf *frame)
{
- int x, y, bytes = frame->fmt.bytesperline;
+ unsigned int x, y, bytes = frame->fmt.bytesperline;
/*
* if(isOdd){
diff --git a/libng/contrib-plugins/flt-smooth.c b/libng/contrib-plugins/flt-smooth.c
index ee513e4..a1d865d 100644
--- a/libng/contrib-plugins/flt-smooth.c
+++ b/libng/contrib-plugins/flt-smooth.c
@@ -462,7 +462,7 @@ frame(void *h, struct ng_video_buf *in)
unsigned char *dst;
unsigned char *src;
unsigned char *last;
- int y,cnt;
+ unsigned int y,cnt;
out = ng_malloc_video_buf(&in->fmt, in->fmt.height * in->fmt.bytesperline);
out->info = in->info;
diff --git a/libng/contrib-plugins/linear-blend.c b/libng/contrib-plugins/linear-blend.c
index a50987e..9377ae6 100644
--- a/libng/contrib-plugins/linear-blend.c
+++ b/libng/contrib-plugins/linear-blend.c
@@ -104,7 +104,7 @@ static inline void linearBlend(unsigned char *src, int stride)
static void inline
deinterlace (struct ng_video_buf *frame)
{
- int x, y, bytes = frame->fmt.bytesperline;
+ unsigned int x, y, bytes = frame->fmt.bytesperline;
unsigned char *src;
for (y = 1; y < frame->fmt.height - 8; y+=8)
diff --git a/libng/contrib-plugins/linedoubler.c b/libng/contrib-plugins/linedoubler.c
index 8fec152..114fdf8 100644
--- a/libng/contrib-plugins/linedoubler.c
+++ b/libng/contrib-plugins/linedoubler.c
@@ -30,7 +30,7 @@
static void inline
deinterlace(struct ng_video_buf *frame)
{
- int x,y;
+ unsigned int x,y;
for (y = 1; y < frame->fmt.height; y += 2)
for (x = 0; x < frame->fmt.bytesperline + 1; x++)
diff --git a/libng/convert.c b/libng/convert.c
index bd17600..6efe51a 100644
--- a/libng/convert.c
+++ b/libng/convert.c
@@ -69,7 +69,7 @@ static void
ng_convert_copyframe(struct ng_video_buf *dest,
struct ng_video_buf *src)
{
- int i,sw,dw;
+ unsigned int i,sw,dw;
unsigned char *sp,*dp;
dw = dest->fmt.width * ng_vfmt_to_depth[dest->fmt.fmtid] / 8;
diff --git a/libng/grab-ng.c b/libng/grab-ng.c
index 607085f..333c46e 100644
--- a/libng/grab-ng.c
+++ b/libng/grab-ng.c
@@ -362,25 +362,14 @@ ng_ratio_fixup2(int *width, int *height, int *xoff, int *yoff,
/* --------------------------------------------------------------------- */
-struct ng_video_conv **ng_conv;
-struct ng_filter **ng_filters;
-struct ng_writer **ng_writers;
-struct ng_reader **ng_readers;
-struct ng_vid_driver **ng_vid_drivers;
-struct ng_dsp_driver **ng_dsp_drivers;
-struct ng_mix_driver **ng_mix_drivers;
-
-static void ng_register_listadd(void ***list, void *add)
-{
- int n = 0;
-
- if (*list)
- for (n = 0; NULL != (*list)[n]; n++)
- /* nothing */;
- *list = realloc(*list,sizeof(void*)*(n+2));
- (*list)[n++] = add;
- (*list)[n++] = NULL;
-}
+LIST_HEAD(ng_conv);
+LIST_HEAD(ng_aconv);
+LIST_HEAD(ng_filters);
+LIST_HEAD(ng_writers);
+LIST_HEAD(ng_readers);
+LIST_HEAD(ng_vid_drivers);
+LIST_HEAD(ng_dsp_drivers);
+LIST_HEAD(ng_mix_drivers);
static int ng_check_magic(int magic, char *plugname, char *type)
{
@@ -402,10 +391,23 @@ ng_conv_register(int magic, char *plugname,
{
int n;
- if (0 != ng_check_magic(magic,plugname,"converters"))
+ if (0 != ng_check_magic(magic,plugname,"video converters"))
+ return -1;
+ for (n = 0; n < count; n++)
+ list_add_tail(&(list[n].list),&ng_conv);
+ return 0;
+}
+
+int
+ng_aconv_register(int magic, char *plugname,
+ struct ng_audio_conv *list, int count)
+{
+ int n;
+
+ if (0 != ng_check_magic(magic,plugname,"audio converters"))
return -1;
for (n = 0; n < count; n++)
- ng_register_listadd((void***)(&ng_conv),&list[n]);
+ list_add_tail(&(list[n].list),&ng_aconv);
return 0;
}
@@ -414,7 +416,7 @@ ng_filter_register(int magic, char *plugname, struct ng_filter *filter)
{
if (0 != ng_check_magic(magic,plugname,"filter"))
return -1;
- ng_register_listadd((void***)(&ng_filters),filter);
+ list_add_tail(&filter->list,&ng_filters);
return 0;
}
@@ -423,7 +425,7 @@ ng_writer_register(int magic, char *plugname, struct ng_writer *writer)
{
if (0 != ng_check_magic(magic,plugname,"writer"))
return -1;
- ng_register_listadd((void***)(&ng_writers),writer);
+ list_add_tail(&writer->list,&ng_writers);
return 0;
}
@@ -432,7 +434,7 @@ ng_reader_register(int magic, char *plugname, struct ng_reader *reader)
{
if (0 != ng_check_magic(magic,plugname,"reader"))
return -1;
- ng_register_listadd((void***)(&ng_readers),reader);
+ list_add_tail(&reader->list,&ng_readers);
return 0;
}
@@ -441,7 +443,7 @@ ng_vid_driver_register(int magic, char *plugname, struct ng_vid_driver *driver)
{
if (0 != ng_check_magic(magic,plugname,"video drv"))
return -1;
- ng_register_listadd((void***)(&ng_vid_drivers),driver);
+ list_add_tail(&driver->list,&ng_vid_drivers);
return 0;
}
@@ -450,7 +452,7 @@ ng_dsp_driver_register(int magic, char *plugname, struct ng_dsp_driver *driver)
{
if (0 != ng_check_magic(magic,plugname,"dsp drv"))
return -1;
- ng_register_listadd((void***)(&ng_dsp_drivers),driver);
+ list_add_tail(&driver->list,&ng_dsp_drivers);
return 0;
}
@@ -459,58 +461,76 @@ ng_mix_driver_register(int magic, char *plugname, struct ng_mix_driver *driver)
{
if (0 != ng_check_magic(magic,plugname,"mixer drv"))
return -1;
- ng_register_listadd((void***)(&ng_mix_drivers),driver);
+ list_add_tail(&driver->list,&ng_mix_drivers);
return 0;
}
struct ng_video_conv*
-ng_conv_find_to(int out, int *i)
+ng_conv_find_to(unsigned int out, int *i)
{
- struct ng_video_conv *ret = NULL;
-
- for (; ng_conv[*i] != NULL; (*i)++) {
+ struct list_head *item;
+ struct ng_video_conv *ret;
+ int j = 0;
+
+ list_for_each(item,&ng_conv) {
+ if (j < *i) {
+ j++;
+ continue;
+ }
+ ret = list_entry(item, struct ng_video_conv, list);
#if 0
fprintf(stderr,"\tconv to: %-28s => %s\n",
- ng_vfmt_to_desc[ng_conv[*i]->fmtid_in],
- ng_vfmt_to_desc[ng_conv[*i]->fmtid_out]);
+ ng_vfmt_to_desc[ret->fmtid_in],
+ ng_vfmt_to_desc[ret->fmtid_out]);
#endif
- if (ng_conv[*i]->fmtid_out == out) {
- ret = ng_conv[*i];
+ if (ret->fmtid_out == out) {
(*i)++;
- break;
+ return ret;
}
+ (*i)++;
+ j++;
}
- return ret;
+ return NULL;
}
struct ng_video_conv*
-ng_conv_find_from(int in, int *i)
+ng_conv_find_from(unsigned int in, int *i)
{
- struct ng_video_conv *ret = NULL;
+ struct list_head *item;
+ struct ng_video_conv *ret;
- for (; ng_conv[*i] != NULL; (*i)++) {
+ int j = 0;
+
+ list_for_each(item,&ng_conv) {
+ if (j < *i) {
+ j++;
+ continue;
+ }
+ ret = list_entry(item, struct ng_video_conv, list);
#if 0
fprintf(stderr,"\tconv from: %-28s => %s\n",
- ng_vfmt_to_desc[ng_conv[*i]->fmtid_in],
- ng_vfmt_to_desc[ng_conv[*i]->fmtid_out]);
+ ng_vfmt_to_desc[ret->fmtid_in],
+ ng_vfmt_to_desc[ret->fmtid_out]);
#endif
- if (ng_conv[*i]->fmtid_in == in) {
- ret = ng_conv[*i];
+ if (ret->fmtid_in == in) {
(*i)++;
- break;
+ return ret;
}
}
- return ret;
+ return NULL;
}
struct ng_video_conv*
-ng_conv_find_match(int in, int out)
+ng_conv_find_match(unsigned int in, unsigned int out)
{
- int i;
+ struct list_head *item;
+ struct ng_video_conv *ret = NULL;
- for (i = 0; ng_conv[i] != NULL; i++)
- if (ng_conv[i]->fmtid_in == in && ng_conv[i]->fmtid_out == out)
- return ng_conv[i];
+ list_for_each(item,&ng_conv) {
+ ret = list_entry(item, struct ng_video_conv, list);
+ if (ret->fmtid_in == in && ret->fmtid_out == out)
+ return ret;
+ }
return NULL;
}
@@ -520,7 +540,8 @@ const struct ng_vid_driver*
ng_vid_open(char *device, char *driver, struct ng_video_fmt *screen,
void *base, void **handle)
{
- int i;
+ struct list_head *item;
+ struct ng_vid_driver *drv;
#ifdef __linux__
if (NULL != screen) {
@@ -539,99 +560,89 @@ ng_vid_open(char *device, char *driver, struct ng_video_fmt *screen,
#endif
/* check all grabber drivers */
- if (NULL == ng_vid_drivers)
- return NULL;
- for (i = 0; NULL != ng_vid_drivers[i]; i++) {
- if (driver && 0 != strcasecmp(driver, ng_vid_drivers[i]->name))
+ list_for_each(item,&ng_vid_drivers) {
+ drv = list_entry(item, struct ng_vid_driver, list);
+ if (driver && 0 != strcasecmp(driver, drv->name))
continue;
if (ng_debug)
- fprintf(stderr,"vid-open: trying: %s... \n",
- ng_vid_drivers[i]->name);
- if (NULL != (*handle = ng_vid_drivers[i]->open(device)))
+ fprintf(stderr,"vid-open: trying: %s... \n", drv->name);
+ if (NULL != (*handle = drv->open(device)))
break;
if (ng_debug)
- fprintf(stderr,"vid-open: failed: %s\n",ng_vid_drivers[i]->name);
+ fprintf(stderr,"vid-open: failed: %s\n",drv->name);
}
- if (NULL == ng_vid_drivers[i])
+ if (item == &ng_vid_drivers)
return NULL;
if (ng_debug)
- fprintf(stderr,"vid-open: ok: %s\n",ng_vid_drivers[i]->name);
- if (NULL != screen &&
- ng_vid_drivers[i]->capabilities(*handle) & CAN_OVERLAY) {
- ng_vid_drivers[i]->setupfb(*handle,screen,base);
- }
- return ng_vid_drivers[i];
+ fprintf(stderr,"vid-open: ok: %s\n",drv->name);
+ if (NULL != screen && drv->capabilities(*handle) & CAN_OVERLAY)
+ drv->setupfb(*handle,screen,base);
+ return drv;
}
const struct ng_dsp_driver*
ng_dsp_open(char *device, struct ng_audio_fmt *fmt, int record, void **handle)
{
- int i;
-
+ struct list_head *item;
+ struct ng_dsp_driver *drv;
+
/* check all dsp drivers */
- if (NULL == ng_dsp_drivers)
- return NULL;
- for (i = 0; NULL != ng_dsp_drivers[i]; i++) {
- if (NULL == ng_dsp_drivers[i]->name)
+ list_for_each(item,&ng_dsp_drivers) {
+ drv = list_entry(item, struct ng_dsp_driver, list);
+ if (NULL == drv->name)
continue;
- if (record && NULL == ng_dsp_drivers[i]->read)
+ if (record && NULL == drv->read)
continue;
- if (!record && NULL == ng_dsp_drivers[i]->write)
+ if (!record && NULL == drv->write)
continue;
if (ng_debug)
- fprintf(stderr,"dsp-open: trying: %s... \n",
- ng_dsp_drivers[i]->name);
- if (NULL != (*handle = ng_dsp_drivers[i]->open(device,fmt,record)))
+ fprintf(stderr,"dsp-open: trying: %s... \n", drv->name);
+ if (NULL != (*handle = drv->open(device,fmt,record)))
break;
if (ng_debug)
- fprintf(stderr,"dsp-open: failed: %s\n",ng_dsp_drivers[i]->name);
+ fprintf(stderr,"dsp-open: failed: %s\n", drv->name);
}
- if (NULL == ng_dsp_drivers[i])
+ if (item == &ng_dsp_drivers)
return NULL;
if (ng_debug)
- fprintf(stderr,"dsp-open: ok: %s\n",ng_dsp_drivers[i]->name);
- return ng_dsp_drivers[i];
+ fprintf(stderr,"dsp-open: ok: %s\n",drv->name);
+ return drv;
}
struct ng_attribute*
ng_mix_init(char *device, char *channel)
{
+ struct list_head *item;
+ struct ng_mix_driver *drv = NULL;
struct ng_attribute *attrs = NULL;
void *handle;
- int i;
/* check all mixer drivers */
- if (NULL == ng_mix_drivers)
- return NULL;
- for (i = 0; NULL != ng_mix_drivers[i]; i++) {
- if (NULL == ng_mix_drivers[i]->name)
- continue;
+ list_for_each(item, &ng_mix_drivers) {
+ drv = list_entry(item, struct ng_mix_driver, list);
if (ng_debug)
- fprintf(stderr,"mix-init: trying: %s... \n",
- ng_mix_drivers[i]->name);
- if (NULL != (handle = ng_mix_drivers[i]->open(device))) {
- if (NULL != (attrs = ng_mix_drivers[i]->volctl(handle,channel)))
+ fprintf(stderr,"mix-init: trying: %s... \n", drv->name);
+ if (NULL != (handle = drv->open(device))) {
+ if (NULL != (attrs = drv->volctl(handle,channel)))
break;
- ng_mix_drivers[i]->close(handle);
+ drv->close(handle);
}
if (ng_debug)
- fprintf(stderr,"mix-init: failed: %s\n",ng_mix_drivers[i]->name);
+ fprintf(stderr,"mix-init: failed: %s\n",drv->name);
}
if (ng_debug && NULL != attrs)
- fprintf(stderr,"mix-init: ok: %s\n",ng_mix_drivers[i]->name);
+ fprintf(stderr,"mix-init: ok: %s\n",drv->name);
return attrs;
}
struct ng_reader* ng_find_reader(char *filename)
{
+ struct list_head *item;
struct ng_reader *reader;
char blk[512];
FILE *fp;
- int i,m;
+ int m;
- if (NULL == ng_readers)
- return NULL;
-
if (NULL == (fp = fopen(filename, "r"))) {
fprintf(stderr,"open %s: %s\n",filename,strerror(errno));
return NULL;
@@ -640,19 +651,16 @@ struct ng_reader* ng_find_reader(char *filename)
fread(blk,1,sizeof(blk),fp);
fclose(fp);
- for (i = 0;; i++) {
- reader = ng_readers[i];
- if (NULL == reader) {
- if (ng_debug)
- fprintf(stderr,"%s: no reader found\n",filename);
- return NULL;
- }
+ list_for_each(item,&ng_readers) {
+ reader = list_entry(item, struct ng_reader, list);
for (m = 0; m < 4 && reader->mlen[m] > 0; m++) {
if (0 == memcmp(blk+reader->moff[m],reader->magic[m],
reader->mlen[m]))
return reader;
}
}
+ if (ng_debug)
+ fprintf(stderr,"%s: no reader found\n",filename);
return NULL;
}
diff --git a/libng/grab-ng.h b/libng/grab-ng.h
index 3940565..e7efa2a 100644
--- a/libng/grab-ng.h
+++ b/libng/grab-ng.h
@@ -1,7 +1,7 @@
/*
* next generation[tm] xawtv capture interfaces
*
- * (c) 2001 Gerd Knorr <kraxel@bytesex.org>
+ * (c) 2001-03 Gerd Knorr <kraxel@bytesex.org>
*
*/
@@ -9,6 +9,7 @@
#include <sys/types.h>
#include "devices.h"
+#include "list.h"
extern int ng_debug;
extern int ng_chromakey;
@@ -24,8 +25,15 @@ extern char ng_v4l_conf[256];
#if __STDC_VERSION__ < 199901
# define restrict
+# define bool int
#endif
+#define UNSET (-1U)
+#define DIMOF(array) (sizeof(array)/sizeof(array[0]))
+#define SDIMOF(array) ((signed int)(sizeof(array)/sizeof(array[0])))
+#define GETELEM(array,index,default) \
+ (index < sizeof(array)/sizeof(array[0]) ? array[index] : default)
+
/* --------------------------------------------------------------------- */
/* defines */
@@ -119,15 +127,15 @@ struct OVERLAY_CLIP {
/* video data structures */
struct ng_video_fmt {
- int fmtid; /* VIDEO_* */
- int width;
- int height;
- int bytesperline; /* zero for compressed formats */
+ unsigned int fmtid; /* VIDEO_* */
+ unsigned int width;
+ unsigned int height;
+ unsigned int bytesperline; /* zero for compressed formats */
};
struct ng_video_buf {
struct ng_video_fmt fmt;
- int size;
+ size_t size;
unsigned char *data;
/* meta info for frame */
@@ -162,8 +170,8 @@ void ng_waiton_video_buf(struct ng_video_buf *buf);
/* audio data structures */
struct ng_audio_fmt {
- int fmtid; /* AUDIO_* */
- int rate;
+ unsigned int fmtid; /* AUDIO_* */
+ unsigned int rate;
};
struct ng_audio_buf {
@@ -184,12 +192,12 @@ struct ng_audio_buf* ng_malloc_audio_buf(struct ng_audio_fmt *fmt,
/* someone who receives video and/or audio data (writeavi, ...) */
struct ng_format_list {
- char *name;
- char *desc; /* if standard fmtid description doesn't work
- because it's converted somehow */
- char *ext;
- int fmtid;
- void *priv;
+ char *name;
+ char *desc; /* if standard fmtid description doesn't work
+ because it's converted somehow */
+ char *ext;
+ unsigned int fmtid;
+ void *priv;
};
struct ng_writer {
@@ -205,6 +213,8 @@ struct ng_writer {
int (*wr_video)(void *handle, struct ng_video_buf *buf);
int (*wr_audio)(void *handle, struct ng_audio_buf *buf);
int (*wr_close)(void *handle);
+
+ struct list_head list;
};
struct ng_reader {
@@ -218,10 +228,12 @@ struct ng_reader {
void* (*rd_open)(char *moviename);
struct ng_video_fmt* (*rd_vfmt)(void *handle, int *vfmt, int vn);
struct ng_audio_fmt* (*rd_afmt)(void *handle);
- struct ng_video_buf* (*rd_vdata)(void *handle, int drop);
+ struct ng_video_buf* (*rd_vdata)(void *handle, unsigned int drop);
struct ng_audio_buf* (*rd_adata)(void *handle);
int64_t (*frame_time)(void *handle);
int (*rd_close)(void *handle);
+
+ struct list_head list;
};
@@ -288,7 +300,7 @@ struct ng_vid_driver {
/* capture */
int (*setformat)(void *handle, struct ng_video_fmt *fmt);
- int (*startvideo)(void *handle, int fps, int buffers);
+ int (*startvideo)(void *handle, int fps, unsigned int buffers);
void (*stopvideo)(void *handle);
struct ng_video_buf* (*nextframe)(void *handle); /* video frame */
struct ng_video_buf* (*getimage)(void *handle); /* single image */
@@ -297,6 +309,8 @@ struct ng_vid_driver {
unsigned long (*getfreq)(void *handle);
void (*setfreq)(void *handle, unsigned long freq);
int (*is_tuned)(void *handle);
+
+ struct list_head list;
};
@@ -313,6 +327,8 @@ struct ng_dsp_driver {
struct ng_audio_buf* (*read)(void *handle, int64_t stopby);
struct ng_audio_buf* (*write)(void *handle, struct ng_audio_buf *buf);
int64_t (*latency)(void *handle);
+
+ struct list_head list;
};
struct ng_mix_driver {
@@ -322,6 +338,8 @@ struct ng_mix_driver {
void* (*open)(char *device);
struct ng_attribute* (*volctl)(void *handle, char *channel);
void (*close)(void *handle);
+
+ struct list_head list;
};
@@ -329,8 +347,8 @@ struct ng_mix_driver {
/* color space converters */
struct ng_video_conv {
- int fmtid_in;
- int fmtid_out;
+ unsigned int fmtid_in;
+ unsigned int fmtid_out;
void* (*init)(struct ng_video_fmt *out,
void *priv);
void (*frame)(void *handle,
@@ -338,6 +356,8 @@ struct ng_video_conv {
struct ng_video_buf *in);
void (*fini)(void *handle);
void *priv;
+
+ struct list_head list;
};
struct ng_convert_handle {
@@ -364,13 +384,15 @@ struct ng_video_buf* ng_convert_single(struct ng_convert_handle *h,
/* audio converters */
struct ng_audio_conv {
- int fmtid_in;
- int fmtid_out;
+ unsigned int fmtid_in;
+ unsigned int fmtid_out;
void* (*init)(void *priv);
struct ng_audio_buf* (*frame)(void *handle,
struct ng_audio_buf *in);
void (*fini)(void *handle);
void *priv;
+
+ struct list_head list;
};
/* --------------------------------------------------------------------- */
@@ -384,23 +406,28 @@ struct ng_filter {
struct ng_video_buf* (*frame)(void *handle,
struct ng_video_buf *in);
void (*fini)(void *handle);
+
+ struct list_head list;
};
/* --------------------------------------------------------------------- */
/* must be changed if we break compatibility */
-#define NG_PLUGIN_MAGIC 0x20021114
+#define NG_PLUGIN_MAGIC 0x20030129
-extern struct ng_video_conv **ng_conv;
-extern struct ng_filter **ng_filters;
-extern struct ng_writer **ng_writers;
-extern struct ng_reader **ng_readers;
-extern struct ng_vid_driver **ng_vid_drivers;
-extern struct ng_dsp_driver **ng_dsp_drivers;
-extern struct ng_mix_driver **ng_mix_drivers;
+extern struct list_head ng_conv;
+extern struct list_head ng_aconv;
+extern struct list_head ng_filters;
+extern struct list_head ng_writers;
+extern struct list_head ng_readers;
+extern struct list_head ng_vid_drivers;
+extern struct list_head ng_dsp_drivers;
+extern struct list_head ng_mix_drivers;
int ng_conv_register(int magic, char *plugname,
struct ng_video_conv *list, int count);
+int ng_aconv_register(int magic, char *plugname,
+ struct ng_audio_conv *list, int count);
int ng_filter_register(int magic, char *plugname,
struct ng_filter *filter);
int ng_writer_register(int magic, char *plugname,
@@ -414,9 +441,9 @@ int ng_dsp_driver_register(int magic, char *plugname,
int ng_mix_driver_register(int magic, char *plugname,
struct ng_mix_driver *driver);
-struct ng_video_conv* ng_conv_find_to(int out, int *i);
-struct ng_video_conv* ng_conv_find_from(int out, int *i);
-struct ng_video_conv* ng_conv_find_match(int in, int out);
+struct ng_video_conv* ng_conv_find_to(unsigned int out, int *i);
+struct ng_video_conv* ng_conv_find_from(unsigned int out, int *i);
+struct ng_video_conv* ng_conv_find_match(unsigned int in, unsigned int out);
const struct ng_vid_driver* ng_vid_open(char *device, char *driver,
struct ng_video_fmt *screen,
@@ -437,7 +464,7 @@ struct ng_video_buf* ng_filter_single(struct ng_filter *filter,
void ng_init(void);
void ng_lut_init(unsigned long red_mask, unsigned long green_mask,
- unsigned long blue_mask, int fmtid, int swap);
+ unsigned long blue_mask, unsigned int fmtid, int swap);
void ng_rgb24_to_lut2(unsigned char *dest, unsigned char *src, int p);
void ng_rgb24_to_lut4(unsigned char *dest, unsigned char *src, int p);
diff --git a/common/list.h b/libng/list.h
index 902f7d4..902f7d4 100644
--- a/common/list.h
+++ b/libng/list.h
diff --git a/libng/plugins/Subdir.mk b/libng/plugins/Subdir.mk
index 30c9fb1..37c3b54 100644
--- a/libng/plugins/Subdir.mk
+++ b/libng/plugins/Subdir.mk
@@ -5,9 +5,9 @@ TARGETS-plugins := \
libng/plugins/flt-invert.so \
libng/plugins/flt-disor.so \
libng/plugins/conv-mjpeg.so \
- libng/plugins/conv-audio.so \
libng/plugins/read-avi.so \
libng/plugins/write-avi.so
+# libng/plugins/conv-audio.so
ifeq ($(FOUND_LQT),yes)
TARGETS-plugins += \
libng/plugins/read-qt.so \
diff --git a/libng/plugins/conv-audio.c b/libng/plugins/conv-audio.c
index a510423..ebfd2e5 100644
--- a/libng/plugins/conv-audio.c
+++ b/libng/plugins/conv-audio.c
@@ -28,27 +28,27 @@ static int (*lame_init_params)(lame_global_flags * const );
* mp3buffer_size_max = 1.25*num_samples + 7200
*/
static int (*lame_encode_buffer_interleaved)(
- lame_global_flags* gfp, /* global context handlei */
+ lame_global_flags* gfp, /* global context handlei */
short int pcm[], /* PCM data for left and right
- channel, interleaved */
+ channel, interleaved */
int num_samples, /* number of samples per channel,
_not_ number of samples in
- pcm[] */
- unsigned char* mp3buf, /* pointer to encoded MP3 stream */
+ pcm[] */
+ unsigned char* mp3buf, /* pointer to encoded MP3 stream */
int mp3buf_size ); /* number of valid octets in this
- stream */
+ stream */
static int (*lame_encode_flush)(
lame_global_flags * gfp, /* global context handle */
unsigned char* mp3buf, /* pointer to encoded MP3 stream */
int size); /* number of valid octets in this stream */
/* ---------------------------------------------------------------------- */
-/* do dynamic linking */
+/* simple, portable dynamic linking (call stuff indirectly using */
+/* function pointers) */
-typedef void (*dlcall)(void);
-#define SYM(symbol) { .func = (dlcall*)(&symbol), .name = #symbol }
+#define SYM(symbol) { .func = (void*)(&symbol), .name = #symbol }
static struct {
- dlcall *func;
+ void **func;
char *name;
} symtab[] = {
SYM(lame_init),
@@ -65,7 +65,7 @@ static int link_lame(void)
{
void *handle;
void *symbol;
- int i;
+ unsigned int i;
handle = dlopen("libmp3lame.so.0",RTLD_NOW);
if (NULL == handle)
@@ -127,6 +127,7 @@ mp3_enc_data(void *handle, struct ng_audio_buf *in)
out->size = lame_encode_buffer_interleaved
(h->gf, (short int*) in->data, samples, out->data, size);
+ free(in);
return out;
}
@@ -159,5 +160,5 @@ void ng_plugin_init(void)
{
if (0 != link_lame())
return;
- // ng_aconv_register(NG_PLUGIN_MAGIC,__FILE__,mp3_list,nconv);
+ ng_aconv_register(NG_PLUGIN_MAGIC,__FILE__,mp3_list,nconv);
}
diff --git a/libng/plugins/conv-mjpeg.c b/libng/plugins/conv-mjpeg.c
index 5a17afe..6efb233 100644
--- a/libng/plugins/conv-mjpeg.c
+++ b/libng/plugins/conv-mjpeg.c
@@ -182,7 +182,7 @@ mjpg_rgb_compress(void *handle, struct ng_video_buf *out,
{
struct mjpeg_compress *h = handle;
unsigned char *line;
- int i;
+ unsigned int i;
if (ng_debug > 1)
fprintf(stderr,"mjpg_rgb_compress\n");
@@ -250,7 +250,7 @@ static void
mjpg_420_compress(struct mjpeg_compress *h)
{
unsigned char **mjpg_run[3];
- int y;
+ unsigned int y;
mjpg_run[0] = h->mjpg_ptrs[0];
mjpg_run[1] = h->mjpg_ptrs[1];
@@ -270,7 +270,7 @@ static void
mjpg_422_compress(struct mjpeg_compress *h)
{
unsigned char **mjpg_run[3];
- int y;
+ unsigned int y;
mjpg_run[0] = h->mjpg_ptrs[0];
mjpg_run[1] = h->mjpg_ptrs[1];
@@ -296,7 +296,7 @@ mjpg_422_420_compress(void *handle, struct ng_video_buf *out,
{
struct mjpeg_compress *h = handle;
unsigned char *line;
- int i;
+ unsigned int i;
if (ng_debug > 1)
fprintf(stderr,"mjpg_422_420_compress\n");
@@ -326,7 +326,7 @@ mjpg_420_420_compress(void *handle, struct ng_video_buf *out,
{
struct mjpeg_compress *h = handle;
unsigned char *line;
- int i;
+ unsigned int i;
if (ng_debug > 1)
fprintf(stderr,"mjpg_420_420_compress\n");
@@ -358,7 +358,7 @@ mjpg_422_422_compress(void *handle, struct ng_video_buf *out,
{
struct mjpeg_compress *h = handle;
unsigned char *line;
- int i;
+ unsigned int i;
if (ng_debug > 1)
fprintf(stderr,"mjpg_422_422_compress\n");
@@ -422,7 +422,7 @@ mjpg_rgb_decompress(void *handle, struct ng_video_buf *out,
{
struct mjpeg_decompress *h = handle;
unsigned char *line;
- int i;
+ unsigned int i;
if (ng_debug > 1)
fprintf(stderr,"mjpg_rgb_decompress\n");
@@ -445,7 +445,7 @@ mjpg_yuv420_decompress(void *handle, struct ng_video_buf *out,
struct mjpeg_decompress *h = handle;
unsigned char **mjpg_run[3];
unsigned char *line;
- int i,y;
+ unsigned int i,y;
if (ng_debug > 1)
fprintf(stderr,"mjpg_yuv_decompress\n");
diff --git a/libng/plugins/drv0-v4l2-old.c b/libng/plugins/drv0-v4l2-old.c
index f7ccdcb..dabea4e 100644
--- a/libng/plugins/drv0-v4l2-old.c
+++ b/libng/plugins/drv0-v4l2-old.c
@@ -46,7 +46,7 @@ static int v4l2_overlay(void *handle, struct ng_video_fmt *fmt, int x, int y,
/* capture video */
static int v4l2_setformat(void *handle, struct ng_video_fmt *fmt);
-static int v4l2_startvideo(void *handle, int fps, int buffers);
+static int v4l2_startvideo(void *handle, int fps, unsigned int buffers);
static void v4l2_stopvideo(void *handle);
static struct ng_video_buf* v4l2_nextframe(void *handle);
static struct ng_video_buf* v4l2_getimage(void *handle);
@@ -69,7 +69,7 @@ struct v4l2_handle {
int fd;
/* device descriptions */
- int ninputs,nstds,nfmts;
+ unsigned int ninputs,nstds,nfmts;
struct v4l2_capability cap;
struct v4l2_streamparm streamparm;
struct v4l2_input inp[MAX_INPUT];
@@ -340,15 +340,14 @@ print_device_capabilities(struct v4l2_handle *h)
"hflip"
};
- int i;
+ unsigned int i;
fprintf(stderr,"\n*** v4l2: video device capabilities ***\n");
/* capabilities */
- fprintf(stderr,"type: %s\n",
- h->cap.type < sizeof(cap_type)/sizeof(char*) ?
- cap_type[h->cap.type] : "unknown");
- print_bits("flags",cap_flags,sizeof(cap_flags)/sizeof(char*),h->cap.flags);
+ fprintf(stderr, "type: %s\n", h->cap.type < SDIMOF(cap_type)
+ ? cap_type[h->cap.type] : "unknown");
+ print_bits("flags",cap_flags,DIMOF(cap_flags),h->cap.flags);
fprintf(stderr,"\n");
fprintf(stderr,"inputs: %d\naudios: %d\n",h->cap.inputs,h->cap.audios);
fprintf(stderr,"size: %dx%d => %dx%d\n",
@@ -394,7 +393,7 @@ print_device_capabilities(struct v4l2_handle *h)
/* controls */
fprintf(stderr,"supported controls:\n");
for (i = 0; i < MAX_CTRL*2; i++) {
- if (h->ctl[i].id == -1)
+ if (h->ctl[i].id == UNSET)
continue;
fprintf(stderr," %2d: \"%s\", [%d .. %d], step=%d, def=%d, type=%s\n",
i, h->ctl[i].name,
@@ -462,7 +461,7 @@ print_fbinfo(struct v4l2_framebuffer *fb)
static void
get_device_capabilities(struct v4l2_handle *h)
{
- int i;
+ unsigned int i;
for (h->ninputs = 0; h->ninputs < h->cap.inputs; h->ninputs++) {
h->inp[h->ninputs].index = h->ninputs;
@@ -502,7 +501,7 @@ static struct STRTAB *
build_norms(struct v4l2_handle *h)
{
struct STRTAB *norms;
- int i;
+ unsigned int i;
norms = malloc(sizeof(struct STRTAB) * (h->nstds+1));
for (i = 0; i < h->nstds; i++) {
@@ -518,7 +517,7 @@ static struct STRTAB *
build_inputs(struct v4l2_handle *h)
{
struct STRTAB *inputs;
- int i;
+ unsigned int i;
inputs = malloc(sizeof(struct STRTAB) * (h->ninputs+1));
for (i = 0; i < h->ninputs; i++) {
@@ -533,8 +532,8 @@ build_inputs(struct v4l2_handle *h)
/* ---------------------------------------------------------------------- */
static struct V4L2_ATTR {
- int id;
- int v4l2;
+ unsigned int id;
+ unsigned int v4l2;
} v4l2_attr[] = {
{ ATTR_ID_VOLUME, V4L2_CID_AUDIO_VOLUME },
{ ATTR_ID_MUTE, V4L2_CID_AUDIO_MUTE },
@@ -573,7 +572,7 @@ v4l2_add_attr(struct v4l2_handle *h, struct v4l2_queryctrl *ctl,
int id, struct STRTAB *choices)
{
static int private_ids = ATTR_ID_COUNT;
- int i;
+ unsigned int i;
h->attr = realloc(h->attr,(h->nattr+2) * sizeof(struct ng_attribute));
memset(h->attr+h->nattr,0,sizeof(struct ng_attribute)*2);
@@ -729,7 +728,7 @@ v4l2_open(char *device)
if (h->cap.flags & V4L2_FLAG_TUNER)
v4l2_add_attr(h, NULL, ATTR_ID_AUDIO_MODE, stereo);
for (i = 0; i < MAX_CTRL*2; i++) {
- if (h->ctl[i].id == -1)
+ if (h->ctl[i].id == UNSET)
continue;
v4l2_add_attr(h, &h->ctl[i], 0, NULL);
}
@@ -1146,7 +1145,7 @@ v4l2_setformat(void *handle, struct ng_video_fmt *fmt)
/* start/stop video */
static int
-v4l2_startvideo(void *handle, int fps, int buffers)
+v4l2_startvideo(void *handle, int fps, unsigned int buffers)
{
struct v4l2_handle *h = handle;
diff --git a/libng/plugins/drv0-v4l2.c b/libng/plugins/drv0-v4l2.c
index bde242f..205eaf1 100644
--- a/libng/plugins/drv0-v4l2.c
+++ b/libng/plugins/drv0-v4l2.c
@@ -49,7 +49,7 @@ static int v4l2_overlay(void *handle, struct ng_video_fmt *fmt, int x, int y,
/* capture video */
static int v4l2_setformat(void *handle, struct ng_video_fmt *fmt);
-static int v4l2_startvideo(void *handle, int fps, int buffers);
+static int v4l2_startvideo(void *handle, int fps, unsigned int buffers);
static void v4l2_stopvideo(void *handle);
static struct ng_video_buf* v4l2_nextframe(void *handle);
static struct ng_video_buf* v4l2_getimage(void *handle);
@@ -92,7 +92,7 @@ struct v4l2_handle {
struct v4l2_requestbuffers reqbufs;
struct v4l2_buffer buf_v4l2[WANTED_BUFFERS];
struct ng_video_buf buf_me[WANTED_BUFFERS];
- int queue,waiton;
+ unsigned int queue,waiton;
/* overlay */
struct v4l2_framebuffer ov_fb;
@@ -271,8 +271,8 @@ build_inputs(struct v4l2_handle *h)
/* ---------------------------------------------------------------------- */
static struct V4L2_ATTR {
- int id;
- int v4l2;
+ unsigned int id;
+ unsigned int v4l2;
} v4l2_attr[] = {
{ ATTR_ID_VOLUME, V4L2_CID_AUDIO_VOLUME },
{ ATTR_ID_MUTE, V4L2_CID_AUDIO_MUTE },
@@ -311,7 +311,7 @@ v4l2_add_attr(struct v4l2_handle *h, struct v4l2_queryctrl *ctl,
int id, struct STRTAB *choices)
{
static int private_ids = ATTR_ID_COUNT;
- int i;
+ unsigned int i;
h->attr = realloc(h->attr,(h->nattr+2) * sizeof(struct ng_attribute));
memset(h->attr+h->nattr,0,sizeof(struct ng_attribute)*2);
@@ -470,7 +470,7 @@ v4l2_open(char *device)
if (h->cap.capabilities & V4L2_CAP_TUNER)
v4l2_add_attr(h, NULL, ATTR_ID_AUDIO_MODE, stereo);
for (i = 0; i < MAX_CTRL*2; i++) {
- if (h->ctl[i].id == -1)
+ if (h->ctl[i].id == UNSET)
continue;
v4l2_add_attr(h, &h->ctl[i], 0, NULL);
}
@@ -659,9 +659,9 @@ v4l2_overlay(void *handle, struct ng_video_fmt *fmt, int x, int y,
/* check against max. size */
xioctl(h->fd,VIDIOC_TRY_FMT,&win,0);
- if (win.fmt.win.w.width != fmt->width)
+ if (win.fmt.win.w.width != (int)fmt->width)
win.fmt.win.w.left = x + (fmt->width - win.fmt.win.w.width)/2;
- if (win.fmt.win.w.height != fmt->height)
+ if (win.fmt.win.w.height != (int)fmt->height)
win.fmt.win.w.top = y + (fmt->height - win.fmt.win.w.height)/2;
if (aspect)
ng_ratio_fixup(&win.fmt.win.w.width,&win.fmt.win.w.height,
@@ -770,7 +770,7 @@ static int
v4l2_start_streaming(struct v4l2_handle *h, int buffers)
{
int disable_overlay = 0;
- int i;
+ unsigned int i;
/* setup buffers */
h->reqbufs.count = buffers;
@@ -825,7 +825,7 @@ v4l2_start_streaming(struct v4l2_handle *h, int buffers)
static void
v4l2_stop_streaming(struct v4l2_handle *h)
{
- int i;
+ unsigned int i;
/* stop capture */
if (-1 == ioctl(h->fd,VIDIOC_STREAMOFF,&h->fmt_v4l2.type))
@@ -892,7 +892,7 @@ v4l2_setformat(void *handle, struct ng_video_fmt *fmt)
/* start/stop video */
static int
-v4l2_startvideo(void *handle, int fps, int buffers)
+v4l2_startvideo(void *handle, int fps, unsigned int buffers)
{
struct v4l2_handle *h = handle;
diff --git a/libng/plugins/drv1-v4l.c b/libng/plugins/drv1-v4l.c
index c41f7ad..9998969 100644
--- a/libng/plugins/drv1-v4l.c
+++ b/libng/plugins/drv1-v4l.c
@@ -50,7 +50,7 @@ static int v4l_overlay(void *handle, struct ng_video_fmt *fmt, int x, int y,
/* capture video */
static int v4l_setformat(void *handle, struct ng_video_fmt *fmt);
-static int v4l_startvideo(void *handle, int fps, int buffers);
+static int v4l_startvideo(void *handle, int fps, unsigned int buffers);
static void v4l_stopvideo(void *handle);
static struct ng_video_buf* v4l_nextframe(void *handle);
static struct ng_video_buf* v4l_getimage(void *handle);
@@ -118,8 +118,6 @@ static unsigned short format2palette[VIDEO_FMT_COUNT] = {
VIDEO_PALETTE_YUV422P, /* YUV422P */
VIDEO_PALETTE_YUV420P, /* YUV420P */
};
-#define FMT2PAL(fmt) ((fmt < sizeof(format2palette)/sizeof(unsigned short)) ?\
- format2palette[fmt] : 0);
/* pass 0/1 by reference */
static int one = 1, zero = 0;
@@ -127,7 +125,7 @@ static int one = 1, zero = 0;
/* ---------------------------------------------------------------------- */
struct v4l_handle {
- int fd;
+ int fd;
/* general informations */
struct video_capability capability;
@@ -146,7 +144,7 @@ struct v4l_handle {
struct video_buffer fbuf;
struct video_window win;
int ov_error;
- int ov_fmtid;
+ unsigned int ov_fmtid;
int ov_enabled;
int ov_on;
@@ -159,14 +157,14 @@ struct v4l_handle {
/* capture via read() */
struct ng_video_fmt rd_fmt;
struct video_window rd_win;
- int rd_fmtid;
+ unsigned int rd_fmtid;
/* capture to mmap()'ed buffers */
struct video_mbuf mbuf;
unsigned char *mmap;
- int nbuf;
- int queue;
- int waiton;
+ unsigned int nbuf;
+ unsigned int queue;
+ unsigned int waiton;
int probe[VIDEO_FMT_COUNT];
struct video_mmap *buf_v4l;
struct ng_video_buf *buf_me;
@@ -265,7 +263,8 @@ v4l_open(char *device)
struct v4l_handle *h;
struct STRTAB *inputs;
struct STRTAB *norms;
- int i,rc;
+ unsigned int i;
+ int rc;
h = malloc(sizeof(*h));
if (NULL == h)
@@ -750,7 +749,7 @@ v4l_overlay_set(struct v4l_handle *h, int state)
} else {
/* on */
h->pict.depth = ng_vfmt_to_depth[h->ov_fmtid];
- h->pict.palette = FMT2PAL(h->ov_fmtid);
+ h->pict.palette = GETELEM(format2palette,h->ov_fmtid,0);
xioctl(h->fd, VIDIOCSPICT, &h->pict);
rc = xioctl(h->fd, VIDIOCSWIN, &h->win);
if (0 == rc) {
@@ -914,7 +913,7 @@ mm_clear(struct v4l_handle *h)
}
static int
-mm_probe(struct v4l_handle *h, int fmtid)
+mm_probe(struct v4l_handle *h, unsigned int fmtid)
{
if (0 != h->probe[fmtid])
goto done;
@@ -926,7 +925,7 @@ mm_probe(struct v4l_handle *h, int fmtid)
h->buf_v4l[0].frame = 0;
h->buf_v4l[0].width = h->capability.minwidth;
h->buf_v4l[0].height = h->capability.minheight;
- h->buf_v4l[0].format = FMT2PAL(fmtid);
+ h->buf_v4l[0].format = GETELEM(format2palette,fmtid,0);
#if 1 /* bug compatibility: bttv up to 0.7.67 reports wrong minwidth */
if (h->buf_v4l[0].width == 32)
h->buf_v4l[0].width = 48;
@@ -957,7 +956,7 @@ mm_probe(struct v4l_handle *h, int fmtid)
static int
mm_setparams(struct v4l_handle *h, struct ng_video_fmt *fmt)
{
- int i;
+ unsigned int i;
/* verify parameters */
xioctl(h->fd,VIDIOCGCAP,&h->capability);
@@ -974,7 +973,7 @@ mm_setparams(struct v4l_handle *h, struct ng_video_fmt *fmt)
/* initialize everything */
h->nbuf = h->mbuf.frames;
for (i = 0; i < h->nbuf; i++) {
- h->buf_v4l[i].format = FMT2PAL(fmt->fmtid);
+ h->buf_v4l[i].format = GETELEM(format2palette,fmt->fmtid,0);
h->buf_v4l[i].frame = i;
h->buf_v4l[i].width = fmt->width;
h->buf_v4l[i].height = fmt->height;
@@ -1002,7 +1001,7 @@ read_setformat(struct v4l_handle *h, struct ng_video_fmt *fmt)
h->rd_fmtid = fmt->fmtid;
h->pict.depth = ng_vfmt_to_depth[h->rd_fmtid];
- h->pict.palette = FMT2PAL(h->rd_fmtid);
+ h->pict.palette = GETELEM(format2palette,h->rd_fmtid,0);
if (-1 == xioctl(h->fd, VIDIOCSPICT, &h->pict))
return -1;
if (-1 == xioctl(h->fd, VIDIOCSWIN, &h->rd_win))
@@ -1022,7 +1021,7 @@ read_getframe(struct v4l_handle *h)
int size;
h->pict.depth = ng_vfmt_to_depth[h->rd_fmtid];
- h->pict.palette = FMT2PAL(h->rd_fmtid);
+ h->pict.palette = GETELEM(format2palette,h->rd_fmtid,0);
xioctl(h->fd, VIDIOCSPICT, &h->pict);
xioctl(h->fd, VIDIOCSWIN, &h->rd_win);
size = h->rd_fmt.bytesperline * h->rd_fmt.height;
@@ -1068,7 +1067,7 @@ v4l_setformat(void *handle, struct ng_video_fmt *fmt)
}
int
-v4l_startvideo(void *handle, int fps, int buffers)
+v4l_startvideo(void *handle, int fps, unsigned int buffers)
{
struct v4l_handle *h = handle;
diff --git a/libng/plugins/flt-disor.c b/libng/plugins/flt-disor.c
index 30ad723..6d29aa3 100644
--- a/libng/plugins/flt-disor.c
+++ b/libng/plugins/flt-disor.c
@@ -41,7 +41,7 @@ frame(void *handle, struct ng_video_buf *in)
uint16_t *dst16;
uint16_t *src16;
- int i, j, di, dj, cx, cy;
+ int i, j, cx, cy, di, dj;
float dr, cr,ca, sx, zoom, k;
out = ng_malloc_video_buf(&in->fmt, in->fmt.height * in->fmt.bytesperline);
@@ -71,8 +71,8 @@ frame(void *handle, struct ng_video_buf *in)
k = k * 100.0;
#endif
- for (j = 0; j < in->fmt.height ; j++) {
- for (i = 0; i < in->fmt.width ; i++) {
+ for (j = 0; j < (int)in->fmt.height ; j++) {
+ for (i = 0; i < (int)in->fmt.width ; i++) {
// compute radial distortion / parameters of center of image
cr = sqrt((i-cx)/sx*(i-cx)/sx+(j-cy)*(j-cy));
@@ -87,8 +87,8 @@ frame(void *handle, struct ng_video_buf *in)
dj = (j-cy) * dr / cr + cy;
}
- if (dj >= in->fmt.height || dj < 0 ||
- di >= in->fmt.width || di < 0)
+ if (dj >= (int)in->fmt.height || dj < 0 ||
+ di >= (int)in->fmt.width || di < 0)
continue;
switch (in->fmt.fmtid) {
diff --git a/libng/plugins/flt-gamma.c b/libng/plugins/flt-gamma.c
index d4575cf..c045000 100644
--- a/libng/plugins/flt-gamma.c
+++ b/libng/plugins/flt-gamma.c
@@ -73,7 +73,7 @@ frame(void *handle, struct ng_video_buf *in)
struct ng_video_buf *out;
unsigned char *dst;
unsigned char *src;
- int y,cnt;
+ unsigned int y,cnt;
out = ng_malloc_video_buf(&in->fmt, in->fmt.height * in->fmt.bytesperline);
out->info = in->info;
diff --git a/libng/plugins/flt-invert.c b/libng/plugins/flt-invert.c
index 87c2289..af97b01 100644
--- a/libng/plugins/flt-invert.c
+++ b/libng/plugins/flt-invert.c
@@ -69,7 +69,7 @@ frame(void *handle, struct ng_video_buf *in)
struct ng_video_buf *out;
unsigned char *dst;
unsigned char *src;
- int y,cnt;
+ unsigned int y,cnt;
out = ng_malloc_video_buf(&in->fmt, in->fmt.height * in->fmt.bytesperline);
out->info = in->info;
diff --git a/libng/plugins/read-avi.c b/libng/plugins/read-avi.c
index 4b0f17a..fefb84f 100644
--- a/libng/plugins/read-avi.c
+++ b/libng/plugins/read-avi.c
@@ -49,10 +49,10 @@ struct avi_handle {
/* ----------------------------------------------------------------------- */
-#define FCC(a,b,c,d) (((int32_t)a << 24) |\
- ((int32_t)b << 16) |\
- ((int32_t)c << 8) |\
- (int32_t)d)
+#define FCC(a,b,c,d) (((uint32_t)a << 24) |\
+ ((uint32_t)b << 16) |\
+ ((uint32_t)c << 8) |\
+ (uint32_t)d)
#define FCCS(str) FCC(str[0],str[1],str[2],str[3])
static void avi_add_movi(struct avi_handle *h, int level,
@@ -317,13 +317,13 @@ static struct ng_audio_fmt* avi_afmt(void *handle)
return AUDIO_NONE != h->afmt.fmtid ? &h->afmt : NULL;
}
-static struct ng_video_buf* avi_vdata(void *handle, int drop)
+static struct ng_video_buf* avi_vdata(void *handle, unsigned int drop)
{
struct avi_handle *h = handle;
struct ng_video_buf *buf;
struct iovec *line;
uint32_t size;
- int i,y;
+ unsigned int i,y;
/* drop frames */
for (i = 0; i < drop; i++) {
diff --git a/libng/plugins/read-dv.c b/libng/plugins/read-dv.c
index 6388756..f0901bf 100644
--- a/libng/plugins/read-dv.c
+++ b/libng/plugins/read-dv.c
@@ -45,7 +45,7 @@ struct dv_handle {
/* ----------------------------------------------------------------------- */
static enum color_space_e fmtid_to_colorspace[VIDEO_FMT_COUNT] = {
- [ 0 ... VIDEO_FMT_COUNT-1 ] = -1,
+ [ 0 ... VIDEO_FMT_COUNT-1 ] = UNSET,
[ VIDEO_YUV422 ] = e_dv_color_yuv,
[ VIDEO_RGB24 ] = e_dv_color_rgb,
[ VIDEO_BGR32 ] = e_dv_color_bgr0,
@@ -93,7 +93,7 @@ static void dv_fmt(struct dv_handle *h, int *vfmt, int vn)
if (ng_debug)
fprintf(stderr,"dv: trying: %d [%s]\n",
vfmt[i],ng_vfmt_to_desc[vfmt[i]]);
- if (-1 == fmtid_to_colorspace[vfmt[i]])
+ if (UNSET == fmtid_to_colorspace[vfmt[i]])
continue;
h->vfmt.fmtid = vfmt[i];
break;
@@ -122,7 +122,7 @@ static void dv_fmt(struct dv_handle *h, int *vfmt, int vn)
len - (off_t)h->frames * h->dec->frame_size);
fprintf(stderr,
"dv: quality=%d system=%d std=%d sampling=%d num_dif_seqs=%d\n"
- "dv: height=%d width=%d frame_size=%d\n",
+ "dv: height=%d width=%d frame_size=%ld\n",
h->dec->quality, h->dec->system, h->dec->std,
h->dec->sampling, h->dec->num_dif_seqs, h->dec->height,
h->dec->width, h->dec->frame_size);
@@ -190,7 +190,7 @@ static struct ng_audio_fmt* dv_afmt(void *handle)
return h->afmt.fmtid ? &h->afmt : NULL;
}
-static struct ng_video_buf* dv_vdata(void *handle, int drop)
+static struct ng_video_buf* dv_vdata(void *handle, unsigned int drop)
{
struct dv_handle *h = handle;
struct ng_video_buf *buf;
diff --git a/libng/plugins/read-qt.c b/libng/plugins/read-qt.c
index 2a3e2a0..c3d5981 100644
--- a/libng/plugins/read-qt.c
+++ b/libng/plugins/read-qt.c
@@ -169,11 +169,11 @@ static struct ng_audio_fmt* qt_afmt(void *handle)
return h->afmt.fmtid ? &h->afmt : NULL;
}
-static struct ng_video_buf* qt_vdata(void *handle, int drop)
+static struct ng_video_buf* qt_vdata(void *handle, unsigned int drop)
{
struct qt_handle *h = handle;
struct ng_video_buf *buf;
- int i;
+ unsigned int i;
if (quicktime_video_position(h->qt,0) >= quicktime_video_length(h->qt,0))
return NULL;
diff --git a/libng/plugins/snd-oss.c b/libng/plugins/snd-oss.c
index 9a742a0..044048e 100644
--- a/libng/plugins/snd-oss.c
+++ b/libng/plugins/snd-oss.c
@@ -241,9 +241,9 @@ struct oss_handle {
int fd;
/* oss */
- struct ng_audio_fmt ifmt;
- int afmt,channels,rate;
- int blocksize;
+ struct ng_audio_fmt ifmt;
+ unsigned int afmt,channels,rate;
+ unsigned int blocksize;
/* me */
struct ng_audio_fmt ofmt;
@@ -252,7 +252,7 @@ struct oss_handle {
int bytes_per_sec;
};
-static const int afmt_to_oss[AUDIO_FMT_COUNT] = {
+static const unsigned int afmt_to_oss[AUDIO_FMT_COUNT] = {
0,
AFMT_U8,
AFMT_U8,
@@ -479,7 +479,7 @@ oss_read(void *handle, int64_t stopby)
if (bytes <= 0)
return NULL;
bytes = (bytes + 3) & ~3;
- if (bytes > h->blocksize)
+ if (bytes > (int)h->blocksize)
bytes = h->blocksize;
} else {
bytes = h->blocksize;
diff --git a/libng/plugins/write-qt.c b/libng/plugins/write-qt.c
index 3700d7a..6600b48 100644
--- a/libng/plugins/write-qt.c
+++ b/libng/plugins/write-qt.c
@@ -122,7 +122,7 @@ qt_video(void *handle, struct ng_video_buf *buf)
int rc,i,n;
if (h->lib_video) {
- int row,len;
+ unsigned int row,len;
char *line;
/* QuickTime library expects an array of pointers to image rows (RGB) */
@@ -311,7 +311,7 @@ static void dump_codecs(void)
#endif
static struct ng_format_list*
-list_add(struct ng_format_list* list,
+qt_list_add(struct ng_format_list* list,
char *name, char *desc, char *ext, int fmtid, void *priv)
{
int n;
@@ -333,7 +333,8 @@ static struct ng_format_list* video_list(void)
static int debug = 0;
lqt_codec_info_t **info;
struct ng_format_list *video;
- int i,j,k,skip,fmtid,cmodel;
+ int i,j,k,skip,fmtid;
+ unsigned int cmodel;
struct qt_video_priv *vp;
/* handle video encoders */
@@ -401,7 +402,7 @@ static struct ng_format_list* video_list(void)
strcpy(vp->fcc,info[i]->fourccs[0]);
vp->libencode = 1;
vp->cmodel = cmodel;
- video = list_add(video,vp->fcc,info[i]->long_name,"mov",fmtid,vp);
+ video = qt_list_add(video,vp->fcc,info[i]->long_name,"mov",fmtid,vp);
}
lqt_destroy_codec_info(info);
return video;
@@ -452,8 +453,8 @@ static struct ng_format_list* audio_list(void)
memset(ap,0,sizeof(*ap));
strcpy(ap->fcc,info[i]->fourccs[0]);
ap->libencode = 1;
- audio = list_add(audio,ap->fcc,info[i]->long_name,"mov",
- AUDIO_S16_NATIVE_MONO,ap);
+ audio = qt_list_add(audio,ap->fcc,info[i]->long_name,"mov",
+ AUDIO_S16_NATIVE_MONO,ap);
}
lqt_destroy_codec_info(info);
return audio;
diff --git a/libng/videodev.h b/libng/videodev.h
index 0176509..e9a7c0c 100644
--- a/libng/videodev.h
+++ b/libng/videodev.h
@@ -21,13 +21,13 @@
struct video_capability
{
char name[32];
- int type;
- int channels; /* Num channels */
- int audios; /* Num audio devices */
- int maxwidth; /* Supported width */
- int maxheight; /* And height */
- int minwidth; /* Supported width */
- int minheight; /* And height */
+ unsigned int type;
+ unsigned int channels; /* Num channels */
+ unsigned int audios; /* Num audio devices */
+ unsigned int maxwidth; /* Supported width */
+ unsigned int maxheight; /* And height */
+ unsigned int minwidth; /* Supported width */
+ unsigned int minheight; /* And height */
};
@@ -152,10 +152,10 @@ struct video_capture
struct video_buffer
{
- void *base;
- int height,width;
- int depth;
- int bytesperline;
+ void *base;
+ unsigned int height,width;
+ unsigned int depth;
+ unsigned int bytesperline;
};
struct video_mmap
diff --git a/libng/videodev2-old.h b/libng/videodev2-old.h
index a40b207..af7cef6 100644
--- a/libng/videodev2-old.h
+++ b/libng/videodev2-old.h
@@ -41,18 +41,18 @@ typedef __s64 stamp_t;
*/
struct v4l2_capability
{
- char name[32]; /* Descriptive, and unique */
- int type; /* Device type, see below */
- int inputs; /* Num video inputs */
- int outputs; /* Num video outputs */
- int audios; /* Num audio devices */
- int maxwidth;
- int maxheight;
- int minwidth;
- int minheight;
- int maxframerate;
- __u32 flags; /* Feature flags, see below */
- __u32 reserved[4];
+ char name[32]; /* Descriptive, and unique */
+ unsigned int type; /* Device type, see below */
+ unsigned int inputs; /* Num video inputs */
+ unsigned int outputs; /* Num video outputs */
+ unsigned int audios; /* Num audio devices */
+ unsigned int maxwidth;
+ unsigned int maxheight;
+ unsigned int minwidth;
+ unsigned int minheight;
+ unsigned int maxframerate;
+ __u32 flags; /* Feature flags, see below */
+ __u32 reserved[4];
};
/* Values for 'type' field */
#define V4L2_TYPE_CAPTURE 0 /* Is a video capture device */
@@ -316,8 +316,8 @@ struct v4l2_window
{
int x;
int y;
- int width;
- int height;
+ unsigned int width;
+ unsigned int height;
__u32 chromakey;
struct v4l2_clip *clips;
int clipcount;
diff --git a/libng/writefile.c b/libng/writefile.c
index abd8679..4570d26 100644
--- a/libng/writefile.c
+++ b/libng/writefile.c
@@ -88,7 +88,7 @@ static int do_write_jpeg(FILE *fp, struct ng_video_buf *buf,
{
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
- int i;
+ unsigned int i;
unsigned char *line;
int line_length;
@@ -410,7 +410,8 @@ raw_open(char *videoname, char *audioname,
{
struct raw_handle *h;
int frame_rate_code = 0;
- int frame_rate_div = 1000;
+ int frame_rate_mul = fps;
+ int frame_rate_div = 1000;
if (NULL == (h = malloc(sizeof(*h))))
return NULL;
@@ -436,16 +437,22 @@ raw_open(char *videoname, char *audioname,
if (h->video.fmtid != VIDEO_NONE) {
if (h->vpriv && h->vpriv->yuv4mpeg) {
switch (fps) {
- case 23976: frame_rate_code = 1;
- frame_rate_div=1001; break; /* 24000 / 1001 */
+ case 23976: frame_rate_code = 1; /* 24000 / 1001 */
+ frame_rate_mul = 24000;
+ frame_rate_div = 1001;
+ break;
+ case 29970: frame_rate_code = 4; /* 30000 / 1001 */
+ frame_rate_mul = 30000;
+ frame_rate_div = 1001;
+ break;
+ case 59940: frame_rate_code = 7; /* 60000 / 1001 */
+ frame_rate_mul = 60000;
+ frame_rate_div = 1001;
+ break;
case 24000: frame_rate_code = 2; break;
case 25000: frame_rate_code = 3; break;
- case 29970: frame_rate_code = 4;
- frame_rate_div=1001; break; /* 30000 / 1001 */
case 30000: frame_rate_code = 5; break;
case 50000: frame_rate_code = 6; break;
- case 59940: frame_rate_code = 7;
- frame_rate_div=1001; break; /* 60000 / 1001 */
case 60000: frame_rate_code = 8; break;
default:
fprintf(stderr,"illegal frame rate\n");
@@ -474,7 +481,8 @@ raw_open(char *videoname, char *audioname,
break;
case 2:
sprintf(header, "YUV4MPEG2 W%d H%d F%d:%d\n",
- h->video.width, h->video.height,fps, frame_rate_div);
+ h->video.width, h->video.height,
+ frame_rate_mul, frame_rate_div);
break;
}
write(h->fd, header, strlen(header));
diff --git a/man/scantv.1 b/man/scantv.1
index 4a03391..2482386 100644
--- a/man/scantv.1
+++ b/man/scantv.1
@@ -30,6 +30,10 @@ specify vbi device file. Default is /dev/vbi.
.B -s
skip channel \fBs\fPcan, just write norm + freqtab to the
config file.
+.TP
+.B -a
+Do a full scan (i.e. all frequencies, not just the ones from the
+frequency table).
.SH SEE ALSO
xawtv(1), fbtv(1)
.SH AUTHOR
diff --git a/capture-test b/scripts/capture-test
index 531b15b..531b15b 100644
--- a/capture-test
+++ b/scripts/capture-test
diff --git a/structs/struct-dump.c b/structs/struct-dump.c
index be3e312..5650812 100644
--- a/structs/struct-dump.c
+++ b/structs/struct-dump.c
@@ -45,7 +45,7 @@ int print_struct(FILE *fp, struct struct_desc *desc, void *data,
int8_t s8;
int al = sizeof(long)-1; /* struct + union alignment */
void *p;
- int i,j,first;
+ unsigned int i,j,first;
for (i = 0; desc[i].name != NULL; i++) {
sprintf(name,"%s%s",prefix,desc[i].name);
diff --git a/structs/struct-dump.h b/structs/struct-dump.h
index 62b6d4b..a2ef587 100644
--- a/structs/struct-dump.h
+++ b/structs/struct-dump.h
@@ -25,12 +25,12 @@ enum desc_type {
struct struct_desc {
enum desc_type type;
char *name;
- int length;
+ unsigned int length;
char **enums;
char **bits;
struct struct_desc *desc;
struct {
- int value;
+ unsigned int value;
char *name;
struct struct_desc *desc;
} u[16];
diff --git a/todo/tmohan/webcam.c.orig b/todo/tmohan/webcam.c.orig
new file mode 100644
index 0000000..c80caab
--- /dev/null
+++ b/todo/tmohan/webcam.c.orig
@@ -0,0 +1,993 @@
+/*
+ * (c) 1998-2002 Gerd Knorr
+ *
+ * capture a image, compress as jpeg and upload to the webserver
+ * using the ftp utility or ssh
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <pthread.h>
+#include <math.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+
+#include "grab-ng.h"
+#include "jpeglib.h"
+#include "ftp.h"
+#include "parseconfig.h"
+#include "list.h"
+
+
+/* ---------------------------------------------------------------------- */
+/* configuration */
+
+int daemonize = 0;
+char *archive = NULL;
+char *tmpdir;
+struct list_head connections;
+
+char *grab_text = "webcam %Y-%m-%d %H:%M:%S"; /* strftime */
+char *grab_infofile = NULL;
+int grab_width = 320;
+int grab_height = 240;
+int grab_delay = 3;
+int grab_wait = 0;
+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_times = -1;
+int grab_fg_r = 255;
+int grab_fg_g = 255;
+int grab_fg_b = 255;
+int grab_bg_r = -1;
+int grab_bg_g = -1;
+int grab_bg_b = -1;
+char *grab_input = NULL;
+char *grab_norm = NULL;
+
+/* ---------------------------------------------------------------------- */
+/* jpeg stuff */
+
+static int
+write_file (int fd, char *data, int width, int height)
+{
+ struct jpeg_compress_struct cinfo;
+ struct jpeg_error_mgr jerr;
+ FILE *fp;
+ int i;
+ unsigned char *line;
+
+ fp = fdopen (fd, "w");
+ 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;
+}
+
+/* ---------------------------------------------------------------------- */
+/* image transfer */
+
+struct xfer_ops;
+
+struct xfer_state
+{
+ char *name;
+ struct list_head list;
+
+ /* xfer options */
+ char *host;
+ char *user;
+ char *pass;
+ char *dir;
+ char *file;
+ char *tmpfile;
+ int debug;
+
+ /* ftp options */
+ int passive, autologin;
+
+ /* function pointers + private date */
+ struct xfer_ops *ops;
+ void *data;
+};
+
+struct xfer_ops
+{
+ int (*open) (struct xfer_state *);
+ void (*info) (struct xfer_state *);
+ int (*xfer) (struct xfer_state *, char *image, int width, int height);
+ void (*close) (struct xfer_state *);
+};
+
+static int
+ftp_open (struct xfer_state *s)
+{
+ s->data = ftp_init (s->name, s->autologin, s->passive, s->debug);
+ ftp_connect (s->data, s->host, s->user, s->pass, s->dir);
+ return 0;
+}
+
+static void
+ftp_info (struct xfer_state *s)
+{
+ fprintf (stderr, "ftp config [%s]:\n %s@%s:%s\n %s => %s\n",
+ s->name, s->user, s->host, s->dir, s->tmpfile, s->file);
+}
+
+static int
+ftp_xfer (struct xfer_state *s, char *image, int width, int height)
+{
+ char filename[1024];
+ int fh;
+
+ sprintf (filename, "%s/webcamXXXXXX", tmpdir);
+ if (-1 == (fh = mkstemp (filename)))
+ {
+ perror ("mkstemp");
+ exit (1);
+ }
+ write_file (fh, image, width, height);
+ if (ftp_connected (s->data))
+ ftp_connect (s->data, s->host, s->user, s->pass, s->dir);
+ ftp_upload (s->data, filename, s->file, s->tmpfile);
+ unlink (filename);
+ return 0;
+}
+
+static void
+ftp_close (struct xfer_state *s)
+{
+ ftp_fini (s->data);
+}
+
+static struct xfer_ops ftp_ops = {
+ open:ftp_open,
+ info:ftp_info,
+ xfer:ftp_xfer,
+ close:ftp_close,
+};
+
+static int
+ssh_open (struct xfer_state *s)
+{
+ s->data =
+ malloc (strlen (s->user) + strlen (s->host) + strlen (s->tmpfile) * 2 +
+ strlen (s->dir) + strlen (s->file) + 32);
+ sprintf (s->data, "ssh %s@%s \"cat >%s && mv %s %s/%s\"", s->user, s->host,
+ s->tmpfile, s->tmpfile, s->dir, s->file);
+ return 0;
+}
+
+static void
+ssh_info (struct xfer_state *s)
+{
+ fprintf (stderr, "ssh config [%s]:\n %s@%s:%s\n %s => %s\n",
+ s->name, s->user, s->host, s->dir, s->tmpfile, s->file);
+}
+
+static int
+ssh_xfer (struct xfer_state *s, char *image, int width, int height)
+{
+ char filename[1024];
+ char *cmd = s->data;
+ unsigned char buf[4096];
+ FILE *sshp, *imgdata;
+ int len, fh;
+
+ sprintf (filename, "%s/webcamXXXXXX", tmpdir);
+ if (-1 == (fh = mkstemp (filename)))
+ {
+ perror ("mkstemp");
+ exit (1);
+ }
+ write_file (fh, image, width, height);
+
+ if ((sshp = popen (cmd, "w")) == NULL)
+ {
+ perror ("popen");
+ exit (1);
+ }
+ if ((imgdata = fopen (filename, "rb")) == NULL)
+ {
+ perror ("fopen");
+ exit (1);
+ }
+ for (;;)
+ {
+ len = fread (buf, 1, sizeof (buf), imgdata);
+ if (len <= 0)
+ break;
+ fwrite (buf, 1, len, sshp);
+ }
+ fclose (imgdata);
+ pclose (sshp);
+
+ unlink (filename);
+ return 0;
+}
+
+static void
+ssh_close (struct xfer_state *s)
+{
+ char *cmd = s->data;
+ free (cmd);
+}
+
+static struct xfer_ops ssh_ops = {
+ open:ssh_open,
+ info:ssh_info,
+ xfer:ssh_xfer,
+ close:ssh_close,
+};
+
+static int
+local_open (struct xfer_state *s)
+{
+ char *t;
+
+ if (s->dir != NULL && s->dir[0] != '\0')
+ {
+ t = malloc (strlen (s->tmpfile) + strlen (s->dir) + 2);
+ sprintf (t, "%s/%s", s->dir, s->tmpfile);
+ s->tmpfile = t;
+
+ t = malloc (strlen (s->file) + strlen (s->dir) + 2);
+ sprintf (t, "%s/%s", s->dir, s->file);
+ s->file = t;
+ }
+ return 0;
+}
+
+static void
+local_info (struct xfer_state *s)
+{
+ fprintf (stderr, "write config [%s]:\n local transfer %s => %s\n",
+ s->name, s->tmpfile, s->file);
+}
+
+static int
+local_xfer (struct xfer_state *s, char *image, int width, int height)
+{
+ int fh;
+
+ if (-1 == (fh = open (s->tmpfile, O_CREAT | O_WRONLY | O_TRUNC, 0666)))
+ {
+ fprintf (stderr, "open %s: %s\n", s->tmpfile, strerror (errno));
+ exit (1);
+ }
+ write_file (fh, image, width, height);
+ if (rename (s->tmpfile, s->file))
+ {
+ fprintf (stderr, "can't move %s -> %s\n", s->tmpfile, s->file);
+ exit (1);
+ }
+ return 0;
+}
+
+static void
+local_close (struct xfer_state *s)
+{
+ /* nothing */
+}
+
+static struct xfer_ops local_ops = {
+ open:local_open,
+ info:local_info,
+ xfer:local_xfer,
+ close:local_close,
+};
+
+/* ---------------------------------------------------------------------- */
+/* capture stuff */
+
+const struct ng_vid_driver *drv;
+void *h_drv;
+struct ng_video_fmt fmt, gfmt;
+struct ng_video_conv *conv;
+void *hconv;
+
+static void
+grab_init (void)
+{
+ struct ng_attribute *attr;
+ int val, i;
+
+ drv = ng_vid_open (ng_dev.video, NULL, NULL, 0, &h_drv);
+ if (NULL == drv)
+ {
+ fprintf (stderr, "no grabber device available\n");
+ exit (1);
+ }
+ if (!(drv->capabilities (h_drv) & CAN_CAPTURE))
+ {
+ fprintf (stderr, "device does'nt support capture\n");
+ exit (1);
+ }
+
+ if (grab_input)
+ {
+ attr = ng_attr_byid (drv->list_attrs (h_drv), ATTR_ID_INPUT);
+ val = ng_attr_getint (attr, grab_input);
+ if (-1 == val)
+ {
+ fprintf (stderr, "invalid input: %s\n", grab_input);
+ exit (1);
+ }
+ attr->write (attr, val);
+ }
+ if (grab_norm)
+ {
+ attr = ng_attr_byid (drv->list_attrs (h_drv), ATTR_ID_NORM);
+ val = ng_attr_getint (attr, grab_norm);
+ if (-1 == val)
+ {
+ fprintf (stderr, "invalid norm: %s\n", grab_norm);
+ exit (1);
+ }
+ attr->write (attr, val);
+ }
+
+ /* try native */
+ fmt.fmtid = VIDEO_RGB24;
+ fmt.width = grab_width;
+ fmt.height = grab_height;
+ if (0 == drv->setformat (h_drv, &fmt))
+ return;
+
+ /* check all available conversion functions */
+ fmt.bytesperline = fmt.width * ng_vfmt_to_depth[fmt.fmtid] / 8;
+ for (i = 0;;)
+ {
+ conv = ng_conv_find_to (fmt.fmtid, &i);
+ if (NULL == conv)
+ break;
+ gfmt = fmt;
+ gfmt.fmtid = conv->fmtid_in;
+ gfmt.bytesperline = 0;
+ if (0 == drv->setformat (h_drv, &gfmt))
+ {
+ fmt.width = gfmt.width;
+ fmt.height = gfmt.height;
+ hconv = conv->init (&fmt, conv->priv);
+ return;
+ }
+ }
+ fprintf (stderr, "can't get rgb24 data\n");
+ exit (1);
+}
+
+static unsigned char *
+grab_one (int *width, int *height)
+{
+ static struct ng_video_buf *cap, *buf;
+
+ if (NULL != buf)
+ ng_release_video_buf (buf);
+ if (NULL == (cap = drv->getimage (h_drv)))
+ {
+ fprintf (stderr, "capturing image failed\n");
+ exit (1);
+ }
+
+ if (NULL != conv)
+ {
+ buf = ng_malloc_video_buf (&fmt, 3 * fmt.width * fmt.height);
+ conv->frame (hconv, buf, cap);
+ buf->info = cap->info;
+ ng_release_video_buf (cap);
+ }
+ else
+ {
+ buf = cap;
+ }
+
+ *width = buf->fmt.width;
+ *height = buf->fmt.height;
+ return buf->data;
+}
+
+/* ---------------------------------------------------------------------- */
+
+#define MSG_MAXLEN 256
+
+#define CHAR_HEIGHT 11
+#define CHAR_WIDTH 6
+#define CHAR_START 4
+#include "font-6x11.h"
+
+static char *
+get_message (void)
+{
+ static char buffer[MSG_MAXLEN + 1];
+ FILE *fp;
+ char *p;
+
+ if (NULL == grab_infofile)
+ return grab_text;
+
+ if (NULL == (fp = fopen (grab_infofile, "r")))
+ {
+ fprintf (stderr, "open %s: %s\n", grab_infofile, strerror (errno));
+ return grab_text;
+ }
+
+ fgets (buffer, MSG_MAXLEN, fp);
+ fclose (fp);
+ if (NULL != (p = strchr (buffer, '\n')))
+ *p = '\0';
+ return buffer;
+}
+
+static void
+add_text (char *image, int width, int height)
+{
+ time_t t;
+ struct tm *tm;
+ char line[MSG_MAXLEN + 1], *ptr;
+ int i, x, y, f, len;
+
+ time (&t);
+ tm = localtime (&t);
+ len = strftime (line, MSG_MAXLEN, get_message (), 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] = grab_fg_r;
+ ptr[1] = grab_fg_g;
+ ptr[2] = grab_fg_b;
+ }
+ else if (grab_bg_r != -1)
+ {
+ ptr[0] = grab_bg_r;
+ ptr[1] = grab_bg_g;
+ ptr[2] = grab_bg_b;
+ }
+ ptr += 3;
+ }
+ }
+ }
+}
+
+/* ---------------------------------------------------------------------- */
+/* Frederic Helin <Frederic.Helin@inrialpes.fr> - 15/07/2002 */
+/* Correction fonction of stereographic radial distortion */
+
+int grab_dist_on = 0;
+int grab_dist_k = 700;
+int grab_dist_cx = -1;
+int grab_dist_cy = -1;
+int grab_dist_zoom = 50;
+int grab_dist_sensorw = 640;
+int grab_dist_sensorh = 480;
+
+static unsigned char *
+correct_distor (unsigned char *in, int width, int height,
+ int grab_zoom, int grap_k, int cx, int cy,
+ int grab_sensorw, int grab_sensorh)
+{
+ static unsigned char *corrimg = NULL;
+
+ int i, j, di, dj;
+ float dr, cr, ca, sensor_w, sensor_h, sx, zoom, k;
+
+ sensor_w = grab_dist_sensorw / 100.0;
+ sensor_h = grab_dist_sensorh / 100.0;
+ zoom = grab_zoom / 100.0;
+ k = grap_k / 100.0;
+
+ if (corrimg == NULL && (corrimg = malloc (width * height * 3)) == NULL)
+ {
+ fprintf (stderr, "out of memory\n");
+ exit (1);
+ }
+
+ sensor_w = 6.4;
+ sensor_h = 4.8;
+
+ // calc ratio x/y
+ sx = width * sensor_h / (height * sensor_w);
+
+ // calc new value of k in the coordonates systeme of computer
+ k = k * height / sensor_h;
+
+ // Clear image
+ for (i = 0; i < height * width * 3; i++)
+ corrimg[i] = 255;
+
+ for (j = 0; j < height; j++)
+ {
+ for (i = 0; i < width; i++)
+ {
+
+ // compute radial distortion / parameters of center of image
+ cr = sqrt ((i - cx) / sx * (i - cx) / sx + (j - cy) * (j - cy));
+ ca = atan (cr / k / zoom);
+ dr = k * tan (ca / 2);
+
+ if (i == cx && j == cy)
+ {
+ di = cx;
+ dj = cy;
+ }
+ else
+ {
+ di = (i - cx) * dr / cr + cx;
+ dj = (j - cy) * dr / cr + cy;
+ }
+
+ if (dj < height && di < width && di >= 0 && dj >= 0 &&
+ j < height && i < width && i >= 0 && j >= 0)
+ {
+ corrimg[3 * (j * width + i)] = in[3 * (dj * width + di)];
+ corrimg[3 * (j * width + i) + 1] = in[3 * (dj * width + di) + 1];
+ corrimg[3 * (j * width + i) + 2] = in[3 * (dj * width + di) + 2];
+ }
+ }
+ }
+ return corrimg;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static 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;
+}
+
+
+static 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;
+}
+
+
+/* ---------------------------------------------------------------------- */
+
+static int
+make_dirs (char *filename)
+{
+ char *dirname, *h;
+ int retval = -1;
+
+ dirname = strdup (filename);
+ if (NULL == dirname)
+ goto done;
+ h = strrchr (dirname, '/');
+ if (NULL == h)
+ goto done;
+ *h = 0;
+
+ if (-1 == (retval = mkdir (dirname, 0777)))
+ if (ENOENT == errno)
+ if (0 == make_dirs (dirname))
+ retval = mkdir (dirname, 0777);
+
+done:
+ free (dirname);
+ return retval;
+}
+
+int
+main (int argc, char *argv[])
+{
+ unsigned char *image, *val, *gimg, *lastimg = NULL;
+ int width, height, i, fh;
+ char filename[1024];
+ char **sections;
+ struct list_head *item;
+ struct xfer_state *s;
+
+ /* read config */
+ if (argc > 1)
+ {
+ strcpy (filename, argv[1]);
+ }
+ else
+ {
+ sprintf (filename, "%s/%s", getenv ("HOME"), ".webcamrc");
+ }
+ fprintf (stderr, "reading config file: %s\n", filename);
+ cfg_parse_file (filename);
+ ng_init ();
+
+ if (NULL != (val = cfg_get_str ("grab", "device")))
+ ng_dev.video = val;
+ if (NULL != (val = cfg_get_str ("grab", "text")))
+ grab_text = val;
+ if (NULL != (val = cfg_get_str ("grab", "infofile")))
+ grab_infofile = val;
+ if (NULL != (val = cfg_get_str ("grab", "input")))
+ grab_input = val;
+ if (NULL != (val = cfg_get_str ("grab", "norm")))
+ grab_norm = 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", "wait")))
+ grab_wait = 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_times = 1;
+ if (-1 != (i = cfg_get_int ("grab", "times")))
+ grab_times = i;
+ if (NULL != (val = cfg_get_str ("grab", "archive")))
+ archive = val;
+
+ if (-1 != (i = cfg_get_int ("grab", "fg_red")))
+ if (i >= 0 && i <= 255)
+ grab_fg_r = i;
+ if (-1 != (i = cfg_get_int ("grab", "fg_green")))
+ if (i >= 0 && i <= 255)
+ grab_fg_g = i;
+ if (-1 != (i = cfg_get_int ("grab", "fg_blue")))
+ if (i >= 0 && i <= 255)
+ grab_fg_b = i;
+ if (-1 != (i = cfg_get_int ("grab", "bg_red")))
+ if (i >= 0 && i <= 255)
+ grab_bg_r = i;
+ if (-1 != (i = cfg_get_int ("grab", "bg_green")))
+ if (i >= 0 && i <= 255)
+ grab_bg_g = i;
+ if (-1 != (i = cfg_get_int ("grab", "bg_blue")))
+ if (i >= 0 && i <= 255)
+ grab_bg_b = i;
+
+ if (-1 != (i = cfg_get_int ("grab", "distor")))
+ grab_dist_on = i;
+ if (-1 != (i = cfg_get_int ("grab", "distor_k")))
+ grab_dist_k = i;
+ if (-1 != (i = cfg_get_int ("grab", "distor_cx")))
+ grab_dist_cx = i;
+ if (-1 != (i = cfg_get_int ("grab", "distor_cy")))
+ grab_dist_cy = i;
+ if (-1 != (i = cfg_get_int ("grab", "distor_zoom")))
+ grab_dist_zoom = i;
+ if (-1 != (i = cfg_get_int ("grab", "distor_sensorw")))
+ grab_dist_sensorw = i;
+ if (-1 != (i = cfg_get_int ("grab", "distor_sensorh")))
+ grab_dist_sensorh = 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 (grab_dist_k < 1 || grab_dist_k > 10000)
+ grab_dist_k = 700;
+ if (grab_dist_cx < 0 || grab_dist_cx > grab_width)
+ grab_dist_cx = grab_width / 2;
+ if (grab_dist_cy < 0 || grab_dist_cy > grab_height)
+ grab_dist_cy = grab_height / 2;
+ if (grab_dist_zoom < 1 || grab_dist_zoom > 1000)
+ grab_dist_zoom = 100;
+ if (grab_dist_sensorw < 1 || grab_dist_sensorw > 9999)
+ grab_dist_sensorw = 640;
+ if (grab_dist_sensorh < 1 || grab_dist_sensorh > 9999)
+ grab_dist_sensorh = 480;
+
+ INIT_LIST_HEAD (&connections);
+ for (sections = cfg_list_sections (); *sections != NULL; sections++)
+ {
+ if (0 == strcasecmp (*sections, "grab"))
+ continue;
+
+ /* init + set defaults */
+ s = malloc (sizeof (*s));
+ memset (s, 0, sizeof (*s));
+ s->name = *sections;
+ s->host = "www";
+ s->user = "webcam";
+ s->pass = "xxxxxx";
+ s->dir = "public_html/images";
+ s->file = "webcam.jpeg";
+ s->tmpfile = "uploading.jpeg";
+ s->passive = 1;
+ s->autologin = 0;
+ s->ops = &ftp_ops;
+
+ /* from config */
+ if (NULL != (val = cfg_get_str (*sections, "host")))
+ s->host = val;
+ if (NULL != (val = cfg_get_str (*sections, "user")))
+ s->user = val;
+ if (NULL != (val = cfg_get_str (*sections, "pass")))
+ s->pass = val;
+ if (NULL != (val = cfg_get_str (*sections, "dir")))
+ s->dir = val;
+ if (NULL != (val = cfg_get_str (*sections, "file")))
+ s->file = val;
+ if (NULL != (val = cfg_get_str (*sections, "tmp")))
+ s->tmpfile = val;
+ if (-1 != (i = cfg_get_int (*sections, "passive")))
+ s->passive = i;
+ if (-1 != (i = cfg_get_int (*sections, "auto")))
+ s->autologin = i;
+ if (-1 != (i = cfg_get_int (*sections, "debug")))
+ s->debug = i;
+ if (-1 != (i = cfg_get_int (*sections, "local")))
+ if (i)
+ s->ops = &local_ops;
+ if (-1 != (i = cfg_get_int (*sections, "ssh")))
+ if (i)
+ s->ops = &ssh_ops;
+
+ /* all done */
+ list_add_tail (&s->list, &connections);
+ }
+
+ /* init everything */
+ grab_init ();
+ sleep (grab_wait);
+ tmpdir = (NULL != getenv ("TMPDIR")) ? getenv ("TMPDIR") : "/tmp";
+ list_for_each (item, &connections)
+ {
+ s = list_entry (item, struct xfer_state, list);
+ s->ops->open (s);
+ }
+
+ /* print config */
+ fprintf (stderr, "video4linux webcam v1.5 - (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",
+ 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);
+ list_for_each (item, &connections)
+ {
+ s = list_entry (item, struct xfer_state, list);
+ s->ops->info (s);
+ }
+
+ /* run as daemon - detach from terminal */
+ if (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 */
+ gimg = grab_one (&width, &height);
+
+ if (grab_dist_on)
+ gimg = correct_distor (gimg, width, height,
+ grab_dist_zoom, grab_dist_k,
+ grab_dist_cx, grab_dist_cy,
+ grab_dist_sensorw, grab_dist_sensorh);
+
+ 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);
+ list_for_each (item, &connections)
+ {
+ s = list_entry (item, struct xfer_state, list);
+ s->ops->xfer (s, image, width, height);
+ }
+ if (archive)
+ {
+ time_t t;
+ struct tm *tm;
+
+ time (&t);
+ tm = localtime (&t);
+ strftime (filename, sizeof (filename) - 1, archive, tm);
+ again:
+ if (-1 == (fh = open (filename, O_CREAT | O_WRONLY | O_TRUNC, 0666)))
+ {
+ if (ENOENT == errno)
+ {
+ if (0 == make_dirs (filename))
+ goto again;
+ }
+ fprintf (stderr, "open %s: %s\n", filename, strerror (errno));
+ exit (1);
+ }
+ write_file (fh, image, width, height);
+ }
+
+ if (-1 != grab_times && --grab_times == 0)
+ break;
+ if (grab_delay > 0)
+ sleep (grab_delay);
+ }
+ list_for_each (item, &connections)
+ {
+ s = list_entry (item, struct xfer_state, list);
+ s->ops->close (s);
+ }
+ return 0;
+}
diff --git a/vbistuff/alevtd.c b/vbistuff/alevtd.c
index dbd1992..40bc944 100644
--- a/vbistuff/alevtd.c
+++ b/vbistuff/alevtd.c
@@ -48,7 +48,7 @@ char server_host[256];
char user[17];
char group[17];
char *logfile = NULL;
-FILE *log = NULL;
+FILE *logfd = NULL;
int flushlog = 0;
int usesyslog = 0;
int have_tty = 1;
@@ -197,12 +197,12 @@ access_log(struct REQUEST *req, time_t now)
if (0 == req->status)
req->status = 400; /* bad request */
if (400 == req->status) {
- fprintf(log,"%s - - %s \"-\" 400 %d\n",
+ fprintf(logfd,"%s - - %s \"-\" 400 %d\n",
req->peerhost,
timestamp,
req->bc);
} else {
- fprintf(log,"%s - - %s \"%s %s HTTP/%d.%d\" %d %d\n",
+ fprintf(logfd,"%s - - %s \"%s %s HTTP/%d.%d\" %d %d\n",
req->peerhost,
timestamp,
req->type,
@@ -213,7 +213,7 @@ access_log(struct REQUEST *req, time_t now)
req->bc);
}
if (flushlog)
- fflush(log);
+ fflush(logfd);
}
/*
@@ -308,8 +308,9 @@ mainloop(void)
if (NULL != logfile && 0 != strcmp(logfile,"-")) {
if (debug)
fprintf(stderr,"got SIGHUP, reopen logfile %s\n",logfile);
- if (log) fclose(log);
- if (NULL == (log = fopen(logfile,"a")))
+ if (logfd)
+ fclose(logfd);
+ if (NULL == (logfd = fopen(logfile,"a")))
xperror(LOG_WARNING,"reopen access log",NULL);
}
got_sighup = 0;
@@ -456,7 +457,7 @@ header_parsing:
if (req->state == STATE_FINISHED && !req->keep_alive)
req->state = STATE_CLOSE;
if (req->state == STATE_FINISHED) {
- if (log)
+ if (logfd)
access_log(req,now);
/* cleanup */
if (req->free_the_mallocs)
@@ -489,7 +490,7 @@ header_parsing:
/* connections to close */
if (req->state == STATE_CLOSE) {
- if (log)
+ if (logfd)
access_log(req,now);
/* cleanup */
close(req->fd);
@@ -694,9 +695,9 @@ main(int argc, char *argv[])
if (logfile) {
if (0 == strcmp(logfile,"-")) {
- log = stdout;
+ logfd = stdout;
} else {
- if (NULL == (log = fopen(logfile,"a")))
+ if (NULL == (logfd = fopen(logfile,"a")))
xperror(LOG_WARNING,"open access log",NULL);
}
}
@@ -749,8 +750,8 @@ main(int argc, char *argv[])
start = time(NULL);
mainloop();
- if (log)
- fclose(log);
+ if (logfd)
+ fclose(logfd);
if (debug)
fprintf(stderr,"bye...\n");
exit(0);
diff --git a/x11/MoTV-fixed b/x11/MoTV-fixed
index a21affe..36742e4 100644
--- a/x11/MoTV-fixed
+++ b/x11/MoTV-fixed
@@ -79,6 +79,14 @@ MoTV.tv.translations: #replace \n\
<Key>V: Command(capture,toggle) \n\
<Key>space: Command(setstation,next) \n\
\
+ <Key>XF86AudioRaiseVolume: Command(volume,inc) \n\
+ <Key>XF86AudioLowerVolume: Command(volume,dec) \n\
+ <Key>XF86AudioMute: Command(volume,mute) \n\
+ <Key>XF86AudioNext: Command(setstation,next) \n\
+ <Key>XF86AudioPrev: Command(setstation,prev) \n\
+ <Key>XF86AudioPlay: Command(capture,on) \n\
+ <Key>XF86AudioStop: Command(capture,off) \n\
+ \
<Key>KP_0: Command(keypad,0) \n\
<Key>KP_1: Command(keypad,1) \n\
<Key>KP_2: Command(keypad,2) \n\
diff --git a/x11/Xawtv.ad b/x11/Xawtv.ad
index 9c256a7..3c6538e 100644
--- a/x11/Xawtv.ad
+++ b/x11/Xawtv.ad
@@ -161,6 +161,14 @@ xawtv.tv.translations: #override \n\
<Key>V: Command(capture,toggle) \n\
<Key>D: Command(showtime) \n\
\
+ <Key>XF86AudioRaiseVolume: Command(volume,inc) \n\
+ <Key>XF86AudioLowerVolume: Command(volume,dec) \n\
+ <Key>XF86AudioMute: Command(volume,mute) \n\
+ <Key>XF86AudioNext: Command(setstation,next) \n\
+ <Key>XF86AudioPrev: Command(setstation,prev) \n\
+ <Key>XF86AudioPlay: Command(capture,on) \n\
+ <Key>XF86AudioStop: Command(capture,off) \n\
+ \
<Key>F5: Command(bright,dec) \n\
<Key>F6: Command(bright,inc) \n\
<Key>F7: Command(hue,dec) \n\
@@ -218,7 +226,15 @@ Options.paned.translations: #override\n\
<Key>BackSpace: Command(setstation,back) \n\
<Btn4Up>: Command(setstation,next) \n\
<Btn5Up>: Command(setstation,prev) \n\
- <Key>V: Command(capture,toggle)
+ <Key>V: Command(capture,toggle) \n\
+ \
+ <Key>XF86AudioRaiseVolume: Command(volume,inc) \n\
+ <Key>XF86AudioLowerVolume: Command(volume,dec) \n\
+ <Key>XF86AudioMute: Command(volume,mute) \n\
+ <Key>XF86AudioNext: Command(setstation,next) \n\
+ <Key>XF86AudioPrev: Command(setstation,prev) \n\
+ <Key>XF86AudioPlay: Command(capture,on) \n\
+ <Key>XF86AudioStop: Command(capture,off)
Options*Command.testcolor: red
Options*Command.translations: #override \n\
@@ -332,7 +348,15 @@ Channels.viewport.translations: #override\n\
<Key>BackSpace: Command(setstation,back) \n\
<Btn4Up>: Command(setstation,next) \n\
<Btn5Up>: Command(setstation,prev) \n\
- <Key>V: Command(capture,toggle)
+ <Key>V: Command(capture,toggle) \n\
+ \
+ <Key>XF86AudioRaiseVolume: Command(volume,inc) \n\
+ <Key>XF86AudioLowerVolume: Command(volume,dec) \n\
+ <Key>XF86AudioMute: Command(volume,mute) \n\
+ <Key>XF86AudioNext: Command(setstation,next) \n\
+ <Key>XF86AudioPrev: Command(setstation,prev) \n\
+ <Key>XF86AudioPlay: Command(capture,on) \n\
+ <Key>XF86AudioStop: Command(capture,off)
! ----------------------------------------------------------------------------
! onscreen + vtx window
diff --git a/x11/blit.c b/x11/blit.c
index 601669e..d2bd37b 100644
--- a/x11/blit.c
+++ b/x11/blit.c
@@ -36,12 +36,12 @@
extern XtAppContext app_context;
extern int debug;
-int x11_dpy_fmtid;
+unsigned int x11_dpy_fmtid;
static int display_bits = 0;
-static int display_bytes = 0;
-static int pixmap_bytes = 0;
-static int x11_byteswap = 0;
+static unsigned int display_bytes = 0;
+static unsigned int pixmap_bytes = 0;
+static bool x11_byteswap = 0;
static int no_mitshm = 0;
#if HAVE_LIBXV
@@ -52,16 +52,16 @@ static XvImageFormatValues *fo;
static XvAdaptorInfo *ai;
#endif
-static int im_adaptor,im_port = -1;
-static unsigned int im_formats[VIDEO_FMT_COUNT];
+static unsigned int im_adaptor,im_port = UNSET;
+static unsigned int im_formats[VIDEO_FMT_COUNT];
static struct SEARCHFORMAT {
- int depth;
- unsigned long order;
- unsigned long red;
- unsigned long green;
- unsigned long blue;
- int format;
+ unsigned int depth;
+ int order;
+ unsigned long red;
+ unsigned long green;
+ unsigned long blue;
+ unsigned int format;
} fmt[] = {
{ 2, MSBFirst, 0x7c00, 0x03e0, 0x001f, VIDEO_RGB15_BE },
{ 2, MSBFirst, 0xf800, 0x07e0, 0x001f, VIDEO_RGB16_BE },
@@ -357,12 +357,12 @@ void xv_image_init(Display *dpy)
for (i = 0; i < adaptors; i++) {
if ((ai[i].type & XvInputMask) &&
(ai[i].type & XvImageMask) &&
- (im_port == -1)) {
+ (im_port == UNSET)) {
im_port = ai[i].base_id;
im_adaptor = i;
}
}
- if (-1 == im_port)
+ if (UNSET == im_port)
return;
fo = XvListImageFormats(dpy, im_port, &formats);
diff --git a/x11/blit.h b/x11/blit.h
index cf44aaf..7de6e20 100644
--- a/x11/blit.h
+++ b/x11/blit.h
@@ -1,5 +1,5 @@
/* plain X11 */
-extern int x11_dpy_fmtid;
+extern unsigned int x11_dpy_fmtid;
Visual* x11_find_visual(Display *dpy);
void x11_init_visual(Display *dpy, XVisualInfo *vinfo);
diff --git a/x11/icons.c b/x11/icons.c
index bba932b..964b8be 100644
--- a/x11/icons.c
+++ b/x11/icons.c
@@ -24,7 +24,7 @@ add_pixmap(Display *dpy, unsigned long bg,
{
XImage *image,*shape;
XpmAttributes attr;
- int x,y;
+ unsigned int x,y;
memset(&attr,0,sizeof(attr));
XpmCreateImageFromData(dpy,data,&image,&shape,&attr);
diff --git a/x11/motv.c b/x11/motv.c
index e24fd4e..81596c4 100644
--- a/x11/motv.c
+++ b/x11/motv.c
@@ -155,9 +155,11 @@ static Widget audio_menu, audio_option;
static Widget video_menu, video_option;
static Widget m_rate,m_fps,m_fvideo,m_status;
static Widget m_faudio,m_faudioL,m_faudioB;
-static int movie_driver;
-static int movie_audio;
-static int movie_video;
+
+static struct ng_writer *movie_driver;
+static unsigned int i_movie_driver;
+static unsigned int movie_audio;
+static unsigned int movie_video;
static XtWorkProcId rec_work_id;
static struct MY_TOPLEVELS {
@@ -235,7 +237,7 @@ static void delete_children(Widget widget)
{
WidgetList children,list;
Cardinal nchildren;
- int i;
+ unsigned int i;
XtVaGetValues(widget,XtNchildren,&children,
XtNnumChildren,&nchildren,NULL);
@@ -293,7 +295,7 @@ new_channel(void)
static void
do_ontop(Boolean state)
{
- int i;
+ unsigned int i;
if (!wm_stay_on_top)
return;
@@ -351,7 +353,7 @@ static void
PopupAction(Widget widget, XEvent *event,
String *params, Cardinal *num_params)
{
- int i;
+ unsigned int i;
/* which window we are talking about ? */
if (*num_params > 0) {
@@ -590,7 +592,7 @@ new_attr(struct ng_attribute *attr, int val)
struct motif_attribute *a;
WidgetList children;
Cardinal nchildren;
- int i;
+ unsigned int i;
for (a = motif_attrs; NULL != a; a = a->next) {
if (a->attr->id == attr->id)
@@ -943,7 +945,9 @@ create_filter_prop(void)
{
Widget rc1,frame,rc2;
XmString str;
- int i,j;
+ struct list_head *item;
+ struct ng_filter *filter;
+ int j;
filter_shell = XtVaAppCreateShell("filter","MoTV",
topLevelShellWidgetClass,
@@ -961,12 +965,11 @@ create_filter_prop(void)
rc1 = XtVaCreateManagedWidget("rc", xmRowColumnWidgetClass, filter_shell,
NULL);
- if (NULL == ng_filters)
- return;
- for (i = 0; NULL != ng_filters[i]; i++) {
- if (NULL == ng_filters[i]->attrs)
+ list_for_each(item,&ng_filters) {
+ filter = list_entry(item, struct ng_filter, list);
+ if (NULL == filter->attrs)
continue;
- str = XmStringGenerate(ng_filters[i]->name, NULL,
+ str = XmStringGenerate(filter->name, NULL,
XmMULTIBYTE_TEXT, NULL);
frame = XtVaCreateManagedWidget("frame",xmFrameWidgetClass,rc1,NULL);
XtVaCreateManagedWidget("label",xmLabelWidgetClass,frame,
@@ -974,8 +977,8 @@ create_filter_prop(void)
NULL);
rc2 = XtVaCreateManagedWidget("rc",xmRowColumnWidgetClass,frame,NULL);
XmStringFree(str);
- for (j = 0; NULL != ng_filters[i]->attrs[j].name; j++)
- filter_add_ctrls(rc2,ng_filters[i],&ng_filters[i]->attrs[j]);
+ for (j = 0; NULL != filter->attrs[j].name; j++)
+ filter_add_ctrls(rc2,filter,&filter->attrs[j]);
}
}
@@ -1455,7 +1458,10 @@ create_control(void)
XtVaCreateManagedWidget("sep",xmSeparatorWidgetClass,menu,NULL);
/* menu - filter */
- if ((f_drv & CAN_CAPTURE) && (NULL != ng_filters)) {
+ if ((f_drv & CAN_CAPTURE) && !list_empty(&ng_filters)) {
+ struct list_head *item;
+ struct ng_filter *filter;
+
menu = XmCreatePulldownMenu(menubar,"filterM",NULL,0);
XtVaCreateManagedWidget("filter",xmCascadeButtonWidgetClass,menubar,
XmNsubMenuId,menu,NULL);
@@ -1463,11 +1469,12 @@ create_control(void)
xmPushButtonWidgetClass,menu,
NULL);
XtAddCallback(push,XmNactivateCallback,action_cb,"Filter()");
- for (i = 0; NULL != ng_filters[i]; i++) {
- push = XtVaCreateManagedWidget(ng_filters[i]->name,
+ list_for_each(item,&ng_filters) {
+ filter = list_entry(item, struct ng_filter, list);
+ push = XtVaCreateManagedWidget(filter->name,
xmPushButtonWidgetClass,menu,
NULL);
- sprintf(action,"Filter(%s)",ng_filters[i]->name);
+ sprintf(action,"Filter(%s)",filter->name);
XtAddCallback(push,XmNactivateCallback,action_cb,strdup(action));
}
XtVaCreateManagedWidget("sep",xmSeparatorWidgetClass,menu,NULL);
@@ -1929,6 +1936,8 @@ create_strwin(void)
static void
update_movie_menus(void)
{
+ struct list_head *item;
+ struct ng_writer *writer;
static int first = 1;
Widget push;
XmString str;
@@ -1938,41 +1947,47 @@ update_movie_menus(void)
/* drivers */
if (first) {
first = 0;
- for (i = 0; NULL != ng_writers[i]; i++) {
- str = XmStringGenerate((char*)ng_writers[i]->desc,
+ i = 0;
+ list_for_each(item,&ng_writers) {
+ writer = list_entry(item, struct ng_writer, list);
+ str = XmStringGenerate((char*)writer->desc,
NULL, XmMULTIBYTE_TEXT, NULL);
- push = XtVaCreateManagedWidget(ng_writers[i]->name,
+ push = XtVaCreateManagedWidget(writer->name,
xmPushButtonWidgetClass,driver_menu,
XmNlabelString,str,
NULL);
XmStringFree(str);
add_cmd_callback(push,XmNactivateCallback,
- "movie","driver",ng_writers[i]->name);
- if (NULL != mov_driver)
- if (0 == strcasecmp(mov_driver,ng_writers[i]->name)) {
- movie_driver = i;
+ "movie","driver",writer->name);
+ if (NULL != mov_driver) {
+ if (NULL == movie_driver ||
+ 0 == strcasecmp(mov_driver,writer->name)) {
+ movie_driver = writer;
+ i_movie_driver = i;
XtVaSetValues(driver_option,XmNmenuHistory,push,NULL);
}
+ }
+ i++;
}
}
/* audio formats */
delete_children(audio_menu);
- for (i = 0; NULL != ng_writers[movie_driver]->audio[i].name; i++) {
+ for (i = 0; NULL != movie_driver->audio[i].name; i++) {
str = XmStringGenerate
- ((char*)(ng_writers[movie_driver]->audio[i].desc ?
- ng_writers[movie_driver]->audio[i].desc :
- ng_afmt_to_desc[ng_writers[movie_driver]->audio[i].fmtid]),
+ ((char*)(movie_driver->audio[i].desc ?
+ movie_driver->audio[i].desc :
+ ng_afmt_to_desc[movie_driver->audio[i].fmtid]),
NULL, XmMULTIBYTE_TEXT, NULL);
- push = XtVaCreateManagedWidget(ng_writers[movie_driver]->audio[i].name,
+ push = XtVaCreateManagedWidget(movie_driver->audio[i].name,
xmPushButtonWidgetClass,audio_menu,
XmNlabelString,str,
NULL);
XmStringFree(str);
add_cmd_callback(push,XmNactivateCallback,
- "movie","audio",ng_writers[movie_driver]->audio[i].name);
+ "movie","audio",movie_driver->audio[i].name);
if (NULL != mov_audio)
- if (0 == strcasecmp(mov_audio,ng_writers[movie_driver]->audio[i].name)) {
+ if (0 == strcasecmp(mov_audio,movie_driver->audio[i].name)) {
XtVaSetValues(audio_option,XmNmenuHistory,push,NULL);
movie_audio = i;
}
@@ -1985,28 +2000,28 @@ update_movie_menus(void)
/* video formats */
delete_children(video_menu);
- for (i = 0; NULL != ng_writers[movie_driver]->video[i].name; i++) {
+ for (i = 0; NULL != movie_driver->video[i].name; i++) {
str = XmStringGenerate
- ((char*)(ng_writers[movie_driver]->video[i].desc ?
- ng_writers[movie_driver]->video[i].desc :
- ng_vfmt_to_desc[ng_writers[movie_driver]->video[i].fmtid]),
+ ((char*)(movie_driver->video[i].desc ?
+ movie_driver->video[i].desc :
+ ng_vfmt_to_desc[movie_driver->video[i].fmtid]),
NULL, XmMULTIBYTE_TEXT, NULL);
- push = XtVaCreateManagedWidget(ng_writers[movie_driver]->video[i].name,
+ push = XtVaCreateManagedWidget(movie_driver->video[i].name,
xmPushButtonWidgetClass,video_menu,
XmNlabelString,str,
NULL);
XmStringFree(str);
add_cmd_callback(push,XmNactivateCallback,
- "movie","video",ng_writers[movie_driver]->video[i].name);
+ "movie","video",movie_driver->video[i].name);
if (NULL != mov_video)
- if (0 == strcasecmp(mov_video,ng_writers[movie_driver]->video[i].name)) {
+ if (0 == strcasecmp(mov_video,movie_driver->video[i].name)) {
XtVaSetValues(video_option,XmNmenuHistory,push,NULL);
movie_video = i;
}
}
/* need audio filename? */
- sensitive = ng_writers[movie_driver]->combined ? False : True;
+ sensitive = movie_driver->combined ? False : True;
XtVaSetValues(m_faudio, XtNsensitive,sensitive, NULL);
XtVaSetValues(m_faudioL, XtNsensitive,sensitive, NULL);
XtVaSetValues(m_faudioB, XtNsensitive,sensitive, NULL);
@@ -2037,15 +2052,21 @@ do_movie_record(int argc, char **argv)
/* set parameters */
if (argc > 1 && 0 == strcasecmp(argv[0],"driver")) {
+ struct list_head *item;
+ struct ng_writer *writer;
+
if (debug)
fprintf(stderr,"set driver: %s\n",argv[1]);
XtVaGetValues(driver_menu,XtNchildren,&children,
XtNnumChildren,&nchildren,NULL);
- for (i = 0; NULL != ng_writers[i]; i++) {
- if (0 == strcasecmp(argv[1],ng_writers[i]->name)) {
- XtVaSetValues(driver_option,XmNmenuHistory,children[i],NULL);
- movie_driver = i;
+ i = 0;
+ list_for_each(item,&ng_writers) {
+ writer = list_entry(item, struct ng_writer, list);
+ if (0 == strcasecmp(argv[1],writer->name)) {
+ movie_driver = writer;
+ i_movie_driver = i;
}
+ i++;
}
update_movie_menus();
}
@@ -2054,8 +2075,8 @@ do_movie_record(int argc, char **argv)
fprintf(stderr,"set audio: %s\n",argv[1]);
XtVaGetValues(audio_menu,XtNchildren,&children,
XtNnumChildren,&nchildren,NULL);
- for (i = 0; NULL != ng_writers[movie_driver]->audio[i].name; i++) {
- if (0 == strcasecmp(argv[1],ng_writers[movie_driver]->audio[i].name)) {
+ for (i = 0; NULL != movie_driver->audio[i].name; i++) {
+ if (0 == strcasecmp(argv[1],movie_driver->audio[i].name)) {
XtVaSetValues(audio_option,XmNmenuHistory,children[i],NULL);
movie_audio = i;
}
@@ -2070,8 +2091,8 @@ do_movie_record(int argc, char **argv)
fprintf(stderr,"set video: %s\n",argv[1]);
XtVaGetValues(video_menu,XtNchildren,&children,
XtNnumChildren,&nchildren,NULL);
- for (i = 0; NULL != ng_writers[movie_driver]->video[i].name; i++) {
- if (0 == strcasecmp(argv[1],ng_writers[movie_driver]->video[i].name)) {
+ for (i = 0; NULL != movie_driver->video[i].name; i++) {
+ if (0 == strcasecmp(argv[1],movie_driver->video[i].name)) {
XtVaSetValues(video_option,XmNmenuHistory,children[i],NULL);
movie_video = i;
}
@@ -2114,7 +2135,7 @@ do_movie_record(int argc, char **argv)
memset(&video,0,sizeof(video));
memset(&audio,0,sizeof(audio));
- wr = ng_writers[movie_driver];
+ wr = movie_driver;
video.fmtid = wr->video[movie_video].fmtid;
video.width = cur_tv_width;
video.height = cur_tv_height;
@@ -2372,6 +2393,7 @@ pref_fst_cb(Widget widget, XtPointer clientdata, XtPointer call_data)
static void
pref_mix2(void)
{
+ struct ng_mix_driver *mix;
Widget push,w = NULL;
char *name;
int i,on;
@@ -2381,8 +2403,10 @@ pref_mix2(void)
XtVaGetValues(pref_mix1_menu,XmNmenuHistory,&w,NULL);
if (w) {
name = XtName(w);
- if (ng_mix_drivers && ng_mix_drivers[0] && 0 != strcmp(name,"none"))
- info = ng_mix_drivers[0]->channels(name);
+ if (!list_empty(&ng_mix_drivers) && 0 != strcmp(name,"none")) {
+ mix = list_entry(&ng_mix_drivers.next,struct ng_mix_driver,list);
+ info = mix->channels(name);
+ }
}
if (NULL != info && on) {
@@ -2409,13 +2433,16 @@ pref_mix2_cb(Widget widget, XtPointer clientdata, XtPointer call_data)
static void
pref_mix1(void)
{
+ struct ng_mix_driver *mix;
Widget push;
int on,i;
struct ng_devinfo *info = NULL;
on = XmToggleButtonGetState(pref_mix_toggle);
- if (ng_mix_drivers && ng_mix_drivers[0])
- info = ng_mix_drivers[0]->probe();
+ if (!list_empty(&ng_mix_drivers)) {
+ mix = list_entry(&ng_mix_drivers.next,struct ng_mix_driver,list);
+ info = mix->probe();
+ }
if (NULL != info && on) {
pref_menu(pref_mix1_option,pref_mix1_menu,1);
for (i = 0; 0 != strlen(info[i].name); i++) {
@@ -2620,7 +2647,7 @@ scale_rgb_buffer(struct ng_video_buf *in, int scale)
struct ng_video_fmt fmt;
struct ng_video_buf *buf;
char *src,*dst;
- int x,y;
+ unsigned int x,y;
fmt = in->fmt;
fmt.width = in->fmt.width / scale;
diff --git a/x11/pia.c b/x11/pia.c
index 06220f3..49ca063 100644
--- a/x11/pia.c
+++ b/x11/pia.c
@@ -244,7 +244,8 @@ int main(int argc, char *argv[])
{
long long start, now, delay, latency = 0, drift = 0;
struct timeval wait;
- int fmtids[2*VIDEO_FMT_COUNT], i, n, drop, droptotal, framecount, ww, wh;
+ int n, drop, droptotal, framecount, ww, wh;
+ unsigned int fmtids[2*VIDEO_FMT_COUNT], i;
XEvent event;
app_shell = XtVaAppInitialize(&app_context, "pia",
@@ -268,12 +269,6 @@ int main(int argc, char *argv[])
exit(1);
}
ng_init();
- if (ng_readers)
- reader = ng_readers[0];
- if (NULL == reader) {
- fprintf(stderr,"no reader\n");
- exit(1);
- }
/* open file */
reader = ng_find_reader(argv[1]);
diff --git a/x11/propwatch.c b/x11/propwatch.c
index 678d630..ae5dddd 100644
--- a/x11/propwatch.c
+++ b/x11/propwatch.c
@@ -402,7 +402,8 @@ static char*
PropertyToString(Display *dpy, Window win, Atom prop)
{
Atom type;
- int format,i;
+ int format;
+ unsigned int i;
unsigned long nitems,rest;
unsigned char *cdata;
unsigned long *ldata;
diff --git a/x11/rootv.c b/x11/rootv.c
index b440883..ed0bef4 100644
--- a/x11/rootv.c
+++ b/x11/rootv.c
@@ -28,6 +28,8 @@ int main(void)
#include "atoms.h"
#include "parseconfig.h"
+#define SDIMOF(array) ((signed int)(sizeof(array)/sizeof(array[0])))
+
int port=-1,bye=0,termsig=0,verbose=0;
GC gc;
@@ -398,8 +400,8 @@ main(int argc, char *argv[])
}
break;
case ClientMessage:
- if (event.xclient.message_type == WM_PROTOCOLS &&
- event.xclient.data.l[0] == WM_DELETE_WINDOW)
+ if (event.xclient.message_type == WM_PROTOCOLS &&
+ (Atom)event.xclient.data.l[0] == WM_DELETE_WINDOW)
bye = 1;
break;
case Expose:
@@ -411,7 +413,7 @@ main(int argc, char *argv[])
break;
default:
if (verbose) {
- if (event.type < sizeof(events)/sizeof(char*))
+ if (event.type < SDIMOF(events))
fprintf(stderr,"ev: %s\n",events[event.type]);
else
fprintf(stderr,"ev: #%d\n",event.type);
diff --git a/x11/vbi-gui.c b/x11/vbi-gui.c
index cb72a89..1aed9d6 100644
--- a/x11/vbi-gui.c
+++ b/x11/vbi-gui.c
@@ -208,7 +208,7 @@ vbi_subpage_menu(struct vbi_window *vw)
Widget push;
vbi_page pg;
char page[8];
- int i;
+ unsigned int i;
/* delete children */
XtVaGetValues(vw->submenu,XtNchildren,&children,
diff --git a/x11/wmhooks.c b/x11/wmhooks.c
index 5e54a75..20d4d72 100644
--- a/x11/wmhooks.c
+++ b/x11/wmhooks.c
@@ -97,7 +97,8 @@ static int
wm_check_capability(Display *dpy, Window root, Atom list, Atom wanted)
{
Atom type;
- int format,i;
+ int format;
+ unsigned int i;
unsigned long nitems, bytesafter;
unsigned char *args;
unsigned long *ldata;
diff --git a/x11/x11.c b/x11/x11.c
index 89b6383..39ece9e 100644
--- a/x11/x11.c
+++ b/x11/x11.c
@@ -48,7 +48,7 @@ extern XVisualInfo vinfo;
Pixmap
x11_capture_pixmap(Display *dpy, XVisualInfo *vinfo, Colormap colormap,
- int width, int height)
+ unsigned int width, unsigned int height)
{
struct ng_video_buf *buf;
struct ng_video_fmt fmt;
@@ -261,7 +261,7 @@ void
video_gd_configure(int width, int height)
{
struct video_handle *h = &vh;
- int i,fmtids[2*VIDEO_FMT_COUNT];
+ unsigned int i,fmtids[2*VIDEO_FMT_COUNT];
if (!(f_drv & CAN_CAPTURE))
return;
@@ -315,7 +315,7 @@ video_gd_configure(int width, int height)
/* ------------------------------------------------------------------------ */
/* video overlay stuff */
-int swidth,sheight; /* screen */
+unsigned int swidth,sheight; /* screen */
static int x11_overlay_fmtid;
/* window */
diff --git a/x11/x11.h b/x11/x11.h
index b20b915..8d3b0c4 100644
--- a/x11/x11.h
+++ b/x11/x11.h
@@ -1,9 +1,9 @@
-extern int swidth,sheight;
+extern unsigned int swidth,sheight;
void x11_label_pixmap(Display *dpy, Colormap colormap, Pixmap pixmap,
int height, char *label);
Pixmap x11_capture_pixmap(Display *dpy, XVisualInfo *vinfo, Colormap colormap,
- int width, int height);
+ unsigned int width, unsigned int height);
struct video_handle;
extern struct video_handle vh;
diff --git a/x11/xawtv-remote.c b/x11/xawtv-remote.c
index 0505782..46760b2 100644
--- a/x11/xawtv-remote.c
+++ b/x11/xawtv-remote.c
@@ -22,7 +22,8 @@ x11_error_dev_null(Display * dpy, XErrorEvent * event)
static Window
find_window(Display * dpy, Atom atom)
{
- int i,n;
+ int n;
+ unsigned int i;
Window root = RootWindowOfScreen(DefaultScreenOfDisplay(dpy));
Window root2, parent, *kids;
unsigned int nkids;
diff --git a/x11/xawtv.c b/x11/xawtv.c
index d840ca5..313c54d 100644
--- a/x11/xawtv.c
+++ b/x11/xawtv.c
@@ -124,11 +124,12 @@ struct STRTAB *m_movie_driver;
struct STRTAB *m_movie_audio;
struct STRTAB *m_movie_video;
-int movie_driver = 0;
-int movie_audio = 0;
-int movie_video = 0;
-int movie_fps = 12000;
-int movie_rate = 44100;
+struct ng_writer *movie_driver = NULL;
+unsigned int i_movie_driver = 0;
+unsigned int movie_audio = 0;
+unsigned int movie_video = 0;
+unsigned int movie_fps = 12000;
+unsigned int movie_rate = 44100;
static struct STRTAB m_movie_fps[] = {
{ 2000, " 2.0 fps" },
@@ -246,7 +247,8 @@ PopupAction(Widget widget, XEvent *event,
String *params, Cardinal *num_params)
{
Dimension h;
- int i,mh;
+ unsigned int i;
+ int mh;
/* which window we are talking about ? */
if (*num_params > 0) {
@@ -272,7 +274,7 @@ PopupAction(Widget widget, XEvent *event,
fprintf(stderr,"%s: received %s message\n",
my_toplevels[i].name,
XGetAtomName(dpy,event->xclient.data.l[0]));
- if (event->xclient.data.l[0] == WM_DELETE_WINDOW) {
+ if ((Atom)event->xclient.data.l[0] == WM_DELETE_WINDOW) {
/* fall throuth -- popdown window */
} else {
/* whats this ?? */
@@ -764,6 +766,7 @@ static void create_chanwin(void)
XtNvisual,vinfo.visual,
XtNcolormap,colormap,
XtNdepth,vinfo.depth,
+ XtNheight,XtScreen(app_shell)->height/2,
XtNmaxHeight,XtScreen(app_shell)->height-50,
NULL);
XtOverrideTranslations(chan_shell, XtParseTranslationTable
@@ -813,7 +816,7 @@ void
StayOnTop(Widget widget, XEvent *event,
String *params, Cardinal *num_params)
{
- int i;
+ unsigned int i;
if (!wm_stay_on_top)
return;
@@ -834,64 +837,75 @@ StayOnTop(Widget widget, XEvent *event,
static void
update_movie_menus(void)
{
+ struct list_head *item;
+ struct ng_writer *writer;
Boolean sensitive;
- int i;
+ unsigned int i;
/* drivers */
if (NULL == m_movie_driver) {
- for (i = 0; NULL != ng_writers[i]; i++)
- ;
+ i = 0;
+ list_for_each(item,&ng_writers)
+ i++;
m_movie_driver = malloc(sizeof(struct STRTAB)*(i+1));
memset(m_movie_driver,0,sizeof(struct STRTAB)*(i+1));
- for (i = 0; NULL != ng_writers[i]; i++) {
+ i = 0;
+ list_for_each(item,&ng_writers) {
+ writer = list_entry(item, struct ng_writer, list);
m_movie_driver[i].nr = i;
- m_movie_driver[i].str = ng_writers[i]->desc;
+ m_movie_driver[i].str = writer->desc;
if (NULL != mov_driver)
- if (0 == strcasecmp(mov_driver,ng_writers[i]->name))
- movie_driver = i;
+ if (NULL == movie_driver ||
+ 0 == strcasecmp(mov_driver,writer->name)) {
+ movie_driver = writer;
+ i_movie_driver = i;
+ }
+ i++;
}
+ m_movie_driver[i].nr = i;
+ m_movie_driver[i].str = NULL;
}
/* audio formats */
- for (i = 0; NULL != ng_writers[movie_driver]->audio[i].name; i++)
+ for (i = 0; NULL != movie_driver->audio[i].name; i++)
;
if (m_movie_audio)
free(m_movie_audio);
movie_audio = 0;
m_movie_audio = malloc(sizeof(struct STRTAB)*(i+2));
memset(m_movie_audio,0,sizeof(struct STRTAB)*(i+2));
- for (i = 0; NULL != ng_writers[movie_driver]->audio[i].name; i++) {
+ for (i = 0; NULL != movie_driver->audio[i].name; i++) {
m_movie_audio[i].nr = i;
- m_movie_audio[i].str = ng_writers[movie_driver]->audio[i].desc ?
- ng_writers[movie_driver]->audio[i].desc :
- ng_afmt_to_desc[ng_writers[movie_driver]->audio[i].fmtid];
+ m_movie_audio[i].str = movie_driver->audio[i].desc ?
+ movie_driver->audio[i].desc :
+ ng_afmt_to_desc[movie_driver->audio[i].fmtid];
if (NULL != mov_audio)
- if (0 == strcasecmp(mov_audio,ng_writers[movie_driver]->audio[i].name))
+ if (0 == strcasecmp(mov_audio,movie_driver->audio[i].name))
movie_audio = i;
}
m_movie_audio[i].nr = i;
m_movie_audio[i].str = "no sound";
/* video formats */
- for (i = 0; NULL != ng_writers[movie_driver]->video[i].name; i++)
+ for (i = 0; NULL != movie_driver->video[i].name; i++)
;
if (m_movie_video)
free(m_movie_video);
movie_video = 0;
m_movie_video = malloc(sizeof(struct STRTAB)*(i+2));
memset(m_movie_video,0,sizeof(struct STRTAB)*(i+2));
- for (i = 0; NULL != ng_writers[movie_driver]->video[i].name; i++) {
+ for (i = 0; NULL != movie_driver->video[i].name; i++) {
m_movie_video[i].nr = i;
- m_movie_video[i].str = ng_writers[movie_driver]->video[i].desc ?
- ng_writers[movie_driver]->video[i].desc :
- ng_vfmt_to_desc[ng_writers[movie_driver]->video[i].fmtid];
+ m_movie_video[i].str = movie_driver->video[i].desc ?
+ movie_driver->video[i].desc :
+ ng_vfmt_to_desc[movie_driver->video[i].fmtid];
if (NULL != mov_video)
- if (0 == strcasecmp(mov_video,ng_writers[movie_driver]->video[i].name))
+ if (0 == strcasecmp(mov_video,movie_driver->video[i].name))
movie_video = i;
}
/* need audio filename? */
- sensitive = ng_writers[movie_driver]->combined ? False : True;
+ sensitive = movie_driver->combined ? False : True;
XtVaSetValues(w_movie_flabel,
XtNsensitive,sensitive,
NULL);
@@ -909,7 +923,7 @@ init_movie_menus(void)
do_va_cmd(3,"movie","rate",mov_rate);
if (mov_fps)
do_va_cmd(3,"movie","fps",mov_fps);
- set_menu_val(w_movie_driver,MOVIE_DRIVER,m_movie_driver,movie_driver);
+ set_menu_val(w_movie_driver,MOVIE_DRIVER,m_movie_driver,i_movie_driver);
set_menu_val(w_movie_audio,MOVIE_AUDIO,m_movie_audio,movie_audio);
set_menu_val(w_movie_rate,MOVIE_RATE,m_movie_rate,movie_rate);
set_menu_val(w_movie_video,MOVIE_VIDEO,m_movie_video,movie_video);
@@ -978,14 +992,23 @@ menu_cb(Widget widget, XtPointer clientdata, XtPointer call_data)
break;
case 20:
- if (-1 != (j=popup_menu(widget,MOVIE_DRIVER,m_movie_driver)))
- do_va_cmd(3,"movie","driver",ng_writers[j]->name);
+ if (-1 != (j=popup_menu(widget,MOVIE_DRIVER,m_movie_driver))) {
+ int i = 0;
+ struct list_head *item;
+ struct ng_writer *writer = NULL;
+
+ list_for_each(item,&ng_writers) {
+ if (i++ == j)
+ writer = list_entry(item,struct ng_writer, list);
+ }
+ do_va_cmd(3,"movie","driver",writer->name);
+ }
break;
case 21:
if (-1 != (j=popup_menu(widget,MOVIE_AUDIO,m_movie_audio)))
do_va_cmd(3,"movie","audio",
- ng_writers[movie_driver]->audio[j].name ?
- ng_writers[movie_driver]->audio[j].name :
+ movie_driver->audio[j].name ?
+ movie_driver->audio[j].name :
"none");
break;
case 22:
@@ -994,7 +1017,7 @@ menu_cb(Widget widget, XtPointer clientdata, XtPointer call_data)
break;
case 23:
if (-1 != (j=popup_menu(widget,MOVIE_VIDEO,m_movie_video)))
- do_va_cmd(3,"movie","video",ng_writers[movie_driver]->video[j].name);
+ do_va_cmd(3,"movie","video",movie_driver->video[j].name);
break;
case 24:
if (-1 != (j=popup_menu(widget,MOVIE_FPS,m_movie_fps)))
@@ -1283,11 +1306,20 @@ do_movie_record(int argc, char **argv)
/* set parameters */
if (argc > 1 && 0 == strcasecmp(argv[0],"driver")) {
- for (i = 0; m_movie_driver[i].str != NULL; i++)
- if (0 == strcasecmp(argv[1],ng_writers[i]->name))
- movie_driver = m_movie_driver[i].nr;
+ struct list_head *item;
+ struct ng_writer *writer;
+ i = 0;
+ list_for_each(item,&ng_writers) {
+ writer = list_entry(item, struct ng_writer, list);
+ if (0 == strcasecmp(argv[1],writer->name)) {
+ movie_driver = writer;
+ i_movie_driver = i;
+ }
+ i++;
+ }
+
set_menu_val(w_movie_driver,MOVIE_DRIVER,
- m_movie_driver,movie_driver);
+ m_movie_driver,i_movie_driver);
update_movie_menus();
set_menu_val(w_movie_audio,MOVIE_AUDIO,
m_movie_audio,movie_audio);
@@ -1304,8 +1336,8 @@ do_movie_record(int argc, char **argv)
return;
}
if (argc > 1 && 0 == strcasecmp(argv[0],"audio")) {
- for (i = 0; NULL != ng_writers[movie_driver]->audio[i].name; i++) {
- if (0 == strcasecmp(argv[1],ng_writers[movie_driver]->audio[i].name))
+ for (i = 0; NULL != movie_driver->audio[i].name; i++) {
+ if (0 == strcasecmp(argv[1],movie_driver->audio[i].name))
movie_audio = m_movie_audio[i].nr;
}
if (0 == strcmp(argv[1],"none"))
@@ -1322,8 +1354,8 @@ do_movie_record(int argc, char **argv)
m_movie_rate,movie_rate);
}
if (argc > 1 && 0 == strcasecmp(argv[0],"video")) {
- for (i = 0; NULL != ng_writers[movie_driver]->video[i].name; i++)
- if (0 == strcasecmp(argv[1],ng_writers[movie_driver]->video[i].name))
+ for (i = 0; NULL != movie_driver->video[i].name; i++)
+ if (0 == strcasecmp(argv[1],movie_driver->video[i].name))
movie_video = m_movie_video[i].nr;
set_menu_val(w_movie_video,MOVIE_VIDEO,
m_movie_video,movie_video);
@@ -1355,7 +1387,7 @@ do_movie_record(int argc, char **argv)
memset(&video,0,sizeof(video));
memset(&audio,0,sizeof(audio));
- wr = ng_writers[movie_driver];
+ wr = movie_driver;
video.fmtid = wr->video[movie_video].fmtid;
video.width = cur_tv_width;
video.height = cur_tv_height;
diff --git a/x11/xt.c b/x11/xt.c
index c7c3ca4..06c7c02 100644
--- a/x11/xt.c
+++ b/x11/xt.c
@@ -353,7 +353,7 @@ CloseMainAction(Widget widget, XEvent *event,
if (debug)
fprintf(stderr,"CloseMainAction: received %s message\n",
XGetAtomName(dpy,event->xclient.data.l[0]));
- if (event->xclient.data.l[0] == WM_DELETE_WINDOW) {
+ if ((Atom)event->xclient.data.l[0] == WM_DELETE_WINDOW) {
/* fall throuth -- popdown window */
} else {
/* whats this ?? */
@@ -368,7 +368,8 @@ RemoteAction(Widget widget, XEvent * event,
String * params, Cardinal * num_params)
{
Atom type;
- int format, argc, i;
+ int format, argc;
+ unsigned int i;
char *argv[32];
unsigned long nitems, bytesafter;
unsigned char *args = NULL;
@@ -910,7 +911,8 @@ do_fullscreen(void)
0, 0, 0, 0, rpx, rpy);
fs = 0;
} else {
- int vp_x, vp_y, vp_width, vp_height;
+ unsigned int vp_width, vp_height;
+ int vp_x, vp_y;
if (debug)
fprintf(stderr,"turning fs on\n");
@@ -1159,20 +1161,19 @@ void
FilterAction(Widget widget, XEvent *event,
String *params, Cardinal *num_params)
{
- int i;
+ struct list_head *item;
+ struct ng_filter *filter;
- if (NULL == ng_filters)
- return;
- if (0 == *num_params) {
- cur_filter = NULL;
+ cur_filter = NULL;
+ if (0 == *num_params)
return;
- }
- for (i = 0; NULL != ng_filters[i]; i++)
- if (0 == strcasecmp(ng_filters[i]->name,params[0]))
+ list_for_each(item,&ng_filters) {
+ filter = list_entry(item, struct ng_filter, list);
+ if (0 == strcasecmp(filter->name,params[0])) {
+ cur_filter = filter;
break;
- if (NULL == ng_filters[i])
- return;
- cur_filter = ng_filters[i];
+ }
+ }
}
/*----------------------------------------------------------------------*/
@@ -1262,7 +1263,7 @@ grabber_init()
#ifdef HAVE_LIBXXF86DGA
if (have_dga) {
int bar,fred;
- XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(int*)&base,
+ XF86DGAGetVideoLL(dpy,XDefaultScreen(dpy),(void*)&base,
&screen.bytesperline,&bar,&fred);
}
#endif
@@ -1916,14 +1917,14 @@ int xt_joystick_init(void)
void xt_kbd_init(Widget tv)
{
- char **list,key[16],str[128];
+ char **list,key[32],str[128];
list = cfg_list_entries("eventmap");
if (NULL == list)
return;
for (; *list != NULL; list++) {
- if (1 != sscanf(*list,"kbd-key-%15s",key))
+ if (1 != sscanf(*list,"kbd-key-%31s",key))
continue;
sprintf(str,"<Key>%s: Event(%s)",key,*list);
XtOverrideTranslations(tv,XtParseTranslationTable(str));
diff --git a/x11/xv.c b/x11/xv.c
index 74c27cb..ec2ff22 100644
--- a/x11/xv.c
+++ b/x11/xv.c
@@ -308,7 +308,7 @@ static struct ng_attribute* xv_attrs(void *handle)
/* ********************************************************************* */
-void xv_video_init(int port, int hwscan)
+void xv_video_init(unsigned int port, int hwscan)
{
struct xv_handle *handle;
struct STRTAB *norms = NULL;
diff --git a/x11/xv.h b/x11/xv.h
index 918d211..8f20689 100644
--- a/x11/xv.h
+++ b/x11/xv.h
@@ -1,5 +1,5 @@
extern int have_xv;
-void xv_video_init(int port, int hwscan);
+void xv_video_init(unsigned int port, int hwscan);
#ifdef HAVE_LIBXV
void xv_video(Window win, int width, int height, int on);
diff --git a/xawtv.spec b/xawtv.spec
index 4344906..6bf58bd 100644
--- a/xawtv.spec
+++ b/xawtv.spec
@@ -1,7 +1,7 @@
Name: xawtv
Group: Applications/Multimedia
Autoreqprov: on
-Version: 3.83
+Version: 3.84
Release: 0
License: GPL
Summary: v4l applications

Privacy Policy