Merge remote-tracking branch 'origin/master' into 0.10

This commit is contained in:
Hans de Goede 2012-01-18 11:19:15 +01:00
commit c05523462f
240 changed files with 4062 additions and 2934 deletions

4
.mailmap Normal file
View File

@ -0,0 +1,4 @@
<agilboa@redhat.com> <agilboa@agilboa.usersys.redhat.com>
<cfergeau@redhat.com> <cfergeau@gmail.com>
<yhalperi@redhat.com> <yhalperi@yhalperi.tlv.redhat.com>
<alexl@redhat.com> <Larsson@.(none)>

33
AUTHORS
View File

@ -0,0 +1,33 @@
Spice Authors
=============
The current active Spice maintainers are
Alon Levy <alevy@redhat.com>
Christophe Fergeau <cfergeau@redhat.com>
Gerd Hoffmann <kraxel@redhat.com>
Marc-André Lureau <marcandre.lureau@redhat.com>
Uri Lublin <uril@redhat.com>
Yonit Halperin <yhalperi@redhat.com>
Previous Spice maintainers were
Izik Eidus <ieidus@redhat.com>
Yaniv Kamay <ykamay@redhat.com> (Original project author)
Patches also contributed by
Alexander Larsson <alexl@redhat.com>
Arnon Gilboa <agilboa@redhat.com>
Daniel P. Berrange <berrange@redhat.com>
Dan Kenigsberg <danken@redhat.com>
Gal Hammer <ghammer@redhat.com>
Hans de Goede <hdegoede@redhat.com>
Jürg Billeter <j@bitron.ch>
Liang Guo <bluestonechina@gmail.com>
Søren Sandmann Pedersen <ssp@redhat.com>
Thomas Tyminski <thomast@cs.tu-berlin.de>
Tiziano Mueller <dev-zero@gentoo.org>
Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
....send patches to get your name here...

132
GNUmakefile Normal file
View File

@ -0,0 +1,132 @@
# Having a separate GNUmakefile lets me `include' the dynamically
# generated rules created via cfg.mk (package-local configuration)
# as well as maint.mk (generic maintainer rules).
# This makefile is used only if you run GNU Make.
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
# Copyright (C) 2001, 2003, 2006-2011 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Systems where /bin/sh is not the default shell need this. The $(shell)
# command below won't work with e.g. stock DOS/Windows shells.
ifeq ($(wildcard /bin/s[h]),/bin/sh)
SHELL = /bin/sh
else
# will be used only with the next shell-test line, then overwritten
# by a configured-in value
SHELL = sh
endif
# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
_have-Makefile := $(shell test -f Makefile && echo yes)
ifeq ($(_have-Makefile),yes)
# Make tar archive easier to reproduce.
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
# Allow the user to add to this in the Makefile.
ALL_RECURSIVE_TARGETS =
include Makefile
# Some projects override e.g., _autoreconf here.
-include $(srcdir)/cfg.mk
# Allow cfg.mk to override these.
_build-aux ?= build-aux
_autoreconf ?= autoreconf -v
include $(srcdir)/maint.mk
# Ensure that $(VERSION) is up to date for dist-related targets, but not
# for others: rerunning autoreconf and recompiling everything isn't cheap.
_have-git-version-gen := \
$(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
_is-dist-target ?= $(filter-out %clean, \
$(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS)))
_is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
ifneq (,$(_is-dist-target)$(_is-install-target))
_curr-ver := $(shell cd $(srcdir) \
&& $(_build-aux)/git-version-gen \
.tarball-version \
$(git-version-gen-tag-sed-script))
ifneq ($(_curr-ver),$(VERSION))
ifeq ($(_curr-ver),UNKNOWN)
$(info WARNING: unable to verify if $(VERSION) is the correct version)
else
ifneq (,$(_is-install-target))
# GNU Coding Standards state that 'make install' should not cause
# recompilation after 'make all'. But as long as changing the version
# string alters config.h, the cost of having 'make all' always have an
# up-to-date version is prohibitive. So, as a compromise, we merely
# warn when installing a version string that is out of date; the user
# should run 'autoreconf' (or something like 'make distcheck') to
# fix the version, 'make all' to propagate it, then 'make install'.
$(info WARNING: version string $(VERSION) is out of date;)
$(info run '$(MAKE) _version' to fix it)
else
$(info INFO: running autoreconf for new version string: $(_curr-ver))
GNUmakefile: _version
touch GNUmakefile
endif
endif
endif
endif
endif
.PHONY: _version
_version:
cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
$(MAKE) $(AM_MAKEFLAGS) Makefile
else
.DEFAULT_GOAL := abort-due-to-no-makefile
srcdir = .
# The package can override .DEFAULT_GOAL to run actions like autoreconf.
-include ./cfg.mk
include ./maint.mk
ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
$(MAKECMDGOALS): abort-due-to-no-makefile
endif
abort-due-to-no-makefile:
@echo There seems to be no Makefile in this directory. 1>&2
@echo "You must run ./configure before running \`make'." 1>&2
@exit 1
endif
# Tell version 3.79 and up of GNU make to not build goals in this
# directory in parallel, in case someone tries to build multiple
# targets, and one of them can cause a recursive target to be invoked.
# Only set this if Automake doesn't provide it.
AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) \
dist distcheck tags ctags
ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS)
ifneq ($(word 2, $(MAKECMDGOALS)), )
ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), )
.NOTPARALLEL:
endif
endif

86
README
View File

@ -1,14 +1,82 @@
Copyright 2009 Red Hat, Inc. and/or its affiliates.
SPICE: Simple Protocol for Independent Computing Environments
=============================================================
This program and libraries is free software; you can redistribute it
and/or modify it under the terms of the GNU Lesser General Public
SPICE is a remote display system built for virtual environments which
allows you to view a computing 'desktop' environment not only on the
machine where it is running, but from anywhere on the Internet and
from a wide variety of machine architectures.
Installation
------------
The SPICE package uses GNU autotools, so the build install process
follows the standard process documented in the INSTALL file. As a
quick start you can do
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --libdir=/usr/lib
make
sudo make install
Or to install into a private user specific location
./configure --prefix=$HOME/spice
make
make install
The following mandatory dependancies are required in order to
build SPICE
Spice protocol >= 0.9.0
Celt >= 0.5.1.1, < 0.6.0
Pixman >= 0.17.7
OpenSSL
libjpeg
zlib
Cyrus-SASL
The following optional dependancies increase the available
functionality
GE Gui >= 0.6.0, < 0.7.0 (GUI app support)
OpenGL (GUI app support)
Alsa (Linux support)
XRandR >= 1.2 (X11 support)
Xinerama >= 1.0 (X11 support)
libcacard >= 0.1.2 (Smartcard support)
Slirp (Tunnelling support)
Communication
-------------
To communicate with the development team, or to post patches
there is a technical mailing list:
http://lists.freedesktop.org/mailman/listinfo/spice-devel
There is also a mailing list for new release announcements:
http://lists.freedesktop.org/archives/spice-announce/
To view known bugs, or report new bugs, in SPICE visit
https://bugs.freedesktop.org/describecomponents.cgi?product=Spice
Bugs found when using an OS distribution's binary packages should
be reported to the OS vendors' own bug tracker first.
The latest SPICE code can be found in GIT at:
http://cgit.freedesktop.org/spice/
Licensing
---------
SPICE is provided under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
Please see the COPYING file for the complete LGPLv2+ license
terms, or visit <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
-- End of readme

View File

@ -10,7 +10,6 @@ SPICE_MSG_MAIN_CHANNEL_NEW
single user only, so only one of the clients can use it.
Chardev channel: allow adding a chardev channel without any server changes:
qemu -spicevmc name=generic,channelname=bla,id=bla -mon chardev=bla
qemu -spicevmc name=generic,channelname=bla,id=bla -mon chardev=bla
Note: client will still need to decide what to do with it of course. So the channelname
will have to have a predefined meaning.

View File

@ -93,35 +93,35 @@ version_check() {
vc_checkprog=`eval echo "\\$$vc_variable"`
if [ -n "$vc_checkprog" ]; then
printbold "using $vc_checkprog for $vc_package"
return 0
printbold "using $vc_checkprog for $vc_package"
return 0
fi
printbold "checking for $vc_package >= $vc_min_version..."
for vc_checkprog in $vc_checkprogs; do
echo $ECHO_N " testing $vc_checkprog... "
if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then
vc_actual_version=`$vc_checkprog --version | head -n 1 | \
echo $ECHO_N " testing $vc_checkprog... "
if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then
vc_actual_version=`$vc_checkprog --version | head -n 1 | \
sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'`
if compare_versions $vc_min_version $vc_actual_version; then
echo "found $vc_actual_version"
# set variable
eval "$vc_variable=$vc_checkprog"
vc_status=0
break
else
echo "too old (found version $vc_actual_version)"
fi
else
echo "not found."
fi
if compare_versions $vc_min_version $vc_actual_version; then
echo "found $vc_actual_version"
# set variable
eval "$vc_variable=$vc_checkprog"
vc_status=0
break
else
echo "too old (found version $vc_actual_version)"
fi
else
echo "not found."
fi
done
if [ "$vc_status" != 0 ]; then
printerr "***Error***: You must have $vc_package >= $vc_min_version installed"
printerr " to build $PROJECT. Download the appropriate package for"
printerr " from your distribution or get the source tarball at"
printerr "***Error***: You must have $vc_package >= $vc_min_version installed"
printerr " to build $PROJECT. Download the appropriate package for"
printerr " from your distribution or get the source tarball at"
printerr " $vc_source"
printerr
printerr
fi
return $vc_status
}
@ -164,4 +164,3 @@ cd $ORIGDIR || exit $?
rm -f config.cache
do_cmd $srcdir/configure --enable-maintainer-mode ${1+"$@"} || exit 1

207
build-aux/useless-if-before-free Executable file
View File

@ -0,0 +1,207 @@
eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
& eval 'exec perl -wST "$0" $argv:q'
if 0;
# Detect instances of "if (p) free (p);".
# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
my $VERSION = '2011-04-20 13:43'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
# Copyright (C) 2008-2011 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Written by Jim Meyering
use strict;
use warnings;
use Getopt::Long;
(my $ME = $0) =~ s|.*/||;
# use File::Coda; # http://meyering.net/code/Coda/
END {
defined fileno STDOUT or return;
close STDOUT and return;
warn "$ME: failed to close standard output: $!\n";
$? ||= 1;
}
sub usage ($)
{
my ($exit_code) = @_;
my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
if ($exit_code != 0)
{
print $STREAM "Try `$ME --help' for more information.\n";
}
else
{
print $STREAM <<EOF;
Usage: $ME [OPTIONS] FILE...
Detect any instance in FILE of a useless "if" test before a free call, e.g.,
"if (p) free (p);". Any such test may be safely removed without affecting
the semantics of the C code in FILE. Use --name=FOO --name=BAR to also
detect free-like functions named FOO and BAR.
OPTIONS:
--list print only the name of each matching FILE (\\0-terminated)
--name=N add name N to the list of \`free\'-like functions to detect;
may be repeated
--help display this help and exit
--version output version information and exit
Exit status:
0 one or more matches
1 no match
2 an error
EXAMPLE:
For example, this command prints all removable "if" tests before "free"
and "kfree" calls in the linux kernel sources:
git ls-files -z |xargs -0 $ME --name=kfree
EOF
}
exit $exit_code;
}
sub is_NULL ($)
{
my ($expr) = @_;
return ($expr eq 'NULL' || $expr eq '0');
}
{
sub EXIT_MATCH {0}
sub EXIT_NO_MATCH {1}
sub EXIT_ERROR {2}
my $err = EXIT_NO_MATCH;
my $list;
my @name = qw(free);
GetOptions
(
help => sub { usage 0 },
version => sub { print "$ME version $VERSION\n"; exit },
list => \$list,
'name=s@' => \@name,
) or usage 1;
# Make sure we have the right number of non-option arguments.
# Always tell the user why we fail.
@ARGV < 1
and (warn "$ME: missing FILE argument\n"), usage EXIT_ERROR;
my $or = join '|', @name;
my $regexp = qr/(?:$or)/;
# Set the input record separator.
# Note: this makes it impractical to print line numbers.
$/ = '"';
my $found_match = 0;
FILE:
foreach my $file (@ARGV)
{
open FH, '<', $file
or (warn "$ME: can't open `$file' for reading: $!\n"),
$err = EXIT_ERROR, next;
while (defined (my $line = <FH>))
{
while ($line =~
/\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\)
# 1 2 3
(?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;|
\s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg)
{
my $all = $1;
my ($lhs, $rhs) = ($2, $3);
my ($free_opnd, $braced_free_opnd) = ($4, $5);
my $non_NULL;
if (!defined $rhs) { $non_NULL = $lhs }
elsif (is_NULL $rhs) { $non_NULL = $lhs }
elsif (is_NULL $lhs) { $non_NULL = $rhs }
else { next }
# Compare the non-NULL part of the "if" expression and the
# free'd expression, without regard to white space.
$non_NULL =~ tr/ \t//d;
my $e2 = defined $free_opnd ? $free_opnd : $braced_free_opnd;
$e2 =~ tr/ \t//d;
if ($non_NULL eq $e2)
{
$found_match = 1;
$list
and (print "$file\0"), next FILE;
print "$file: $all\n";
}
}
}
}
continue
{
close FH;
}
$found_match && $err == EXIT_NO_MATCH
and $err = EXIT_MATCH;
exit $err;
}
my $foo = <<'EOF';
# The above is to *find* them.
# This adjusts them, removing the unnecessary "if (p)" part.
# FIXME: do something like this as an option (doesn't do braces):
free=xfree
git grep -l -z "$free *(" \
| xargs -0 useless-if-before-free -l --name="$free" \
| xargs -0 perl -0x3b -pi -e \
's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\)\s*;)/$2/s'
# Use the following to remove redundant uses of kfree inside braces.
# Note that -0777 puts perl in slurp-whole-file mode;
# but we have plenty of memory, these days...
free=kfree
git grep -l -z "$free *(" \
| xargs -0 useless-if-before-free -l --name="$free" \
| xargs -0 perl -0777 -pi -e \
's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s*\{\s*('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\);)\s*\}[^\n]*$/$2/gms'
Be careful that the result of the above transformation is valid.
If the matched string is followed by "else", then obviously, it won't be.
When modifying files, refuse to process anything other than a regular file.
EOF
## Local Variables:
## mode: perl
## indent-tabs-mode: nil
## eval: (add-hook 'write-file-hooks 'time-stamp)
## time-stamp-start: "my $VERSION = '"
## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
## time-stamp-time-zone: "UTC"
## time-stamp-end: "'; # UTC"
## End:

113
build-aux/vc-list-files Executable file
View File

@ -0,0 +1,113 @@
#!/bin/sh
# List version-controlled file names.
# Print a version string.
scriptversion=2011-05-16.22; # UTC
# Copyright (C) 2006-2011 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# List the specified version-controlled files.
# With no argument, list them all. With a single DIRECTORY argument,
# list the version-controlled files in that directory.
# If there's an argument, it must be a single, "."-relative directory name.
# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
postprocess=
case $1 in
--help) cat <<EOF
Usage: $0 [-C SRCDIR] [DIR...]
Output a list of version-controlled files in DIR (default .), relative to
SRCDIR (default .). SRCDIR must be the top directory of a checkout.
Options:
--help print this help, then exit
--version print version number, then exit
-C SRCDIR change directory to SRCDIR before generating list
Report bugs and patches to <bug-gnulib@gnu.org>.
EOF
exit ;;
--version)
year=`echo "$scriptversion" | sed 's/[^0-9].*//'`
cat <<EOF
vc-list-files $scriptversion
Copyright (C) $year Free Software Foundation, Inc,
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
EOF
exit ;;
-C)
test "$2" = . || postprocess="| sed 's|^|$2/|'"
cd "$2" || exit 1
shift; shift ;;
esac
test $# = 0 && set .
for dir
do
if test -d .git; then
test "x$dir" = x. \
&& dir= sed_esc= \
|| { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
# Ignore git symlinks - either they point into the tree, in which case
# we don't need to visit the target twice, or they point somewhere
# else (often into a submodule), in which case the content does not
# belong to this package.
eval exec git ls-tree -r 'HEAD:"$dir"' \
\| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess
elif test -d .hg; then
eval exec hg locate '"$dir/*"' $postprocess
elif test -d .bzr; then
test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
eval exec bzr ls -R --versioned '"$dir"' $postprocess
elif test -d CVS; then
test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
if test -x build-aux/cvsu; then
eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
elif (cvsu --help) >/dev/null 2>&1; then
eval cvsu --find --types=AFGM '"$dir"' $postprocess
else
eval awk -F/ \''{ \
if (!$1 && $3 !~ /^-/) { \
f=FILENAME; \
if (f ~ /CVS\/Entries$/) \
f = substr(f, 1, length(f)-11); \
print f $2; \
}}'\'' \
`find "$dir" -name Entries -print` /dev/null' $postprocess
fi
elif test -d .svn; then
eval exec svn list -R '"$dir"' $postprocess
else
echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
exit 1
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

150
cfg.mk Normal file
View File

@ -0,0 +1,150 @@
# Customize Makefile.maint. -*- makefile -*-
# Copyright (C) 2008-2011 Red Hat, Inc.
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Tests not to run as part of "make distcheck".
local-checks-to-skip = \
changelog-check \
check-AUTHORS \
makefile-check \
makefile_path_separator_check \
patch-check \
sc_GPL_version \
sc_always_defined_macros \
sc_cast_of_alloca_return_value \
sc_cross_check_PATH_usage_in_tests \
sc_dd_max_sym_length \
sc_error_exit_success \
sc_file_system \
sc_immutable_NEWS \
sc_makefile_path_separator_check \
sc_obsolete_symbols \
sc_prohibit_always_true_header_tests \
sc_prohibit_S_IS_definition \
sc_prohibit_atoi_atof \
sc_prohibit_hash_without_use \
sc_prohibit_jm_in_m4 \
sc_prohibit_quote_without_use \
sc_prohibit_quotearg_without_use \
sc_prohibit_stat_st_blocks \
sc_prohibit_magic_number_exit \
sc_prohibit_strcmp \
sc_prohibit_undesirable_word_seq \
sc_root_tests \
sc_space_tab \
sc_sun_os_names \
sc_system_h_headers \
sc_texinfo_acronym \
sc_tight_scope \
sc_two_space_separator_in_usage \
sc_error_message_uppercase \
sc_program_name \
sc_require_test_exit_idiom \
sc_makefile_check \
sc_useless_cpp_parens \
sc_Wundef_boolean
# Files that should never cause syntax check failures.
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
(^HACKING|\.po|maint.mk)$$
# Functions like free() that are no-ops on NULL arguments.
useless_free_options = \
--name=xfree \
--name=g_free \
--name=xmlBufferFree \
--name=xmlFree \
--name=xmlFreeDoc \
--name=xmlXPathFreeContext \
--name=xmlXPathFreeObject
# Ensure that no C source file, docs, or rng schema uses TABs for
# indentation. Also match *.h.in files, to get libvirt.h.in. Exclude
# files in gnulib, since they're imported.
space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py)|(daemon|tools)/.*\.in)
sc_TAB_in_indentation:
@prohibit='^ * ' \
in_vc_files='$(space_indent_files)$$' \
halt='indent with space, not TAB, in C, sh, html, py, and RNG schemas' \
$(_sc_search_regexp)
# G_GNUC_UNUSED should only be applied in implementations, not
# header declarations
sc_avoid_attribute_unused_in_header:
@prohibit='^[^#]*G_GNUC_UNUSED([^:]|$$)' \
in_vc_files='\.h$$' \
halt='use G_GNUC_UNUSED in .c rather than .h files' \
$(_sc_search_regexp)
# Enforce recommended preprocessor indentation style.
sc_preprocessor_indentation:
@if cppi --version >/dev/null 2>&1; then \
$(VC_LIST_EXCEPT) | grep '\.[ch]$$' | xargs cppi -a -c \
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
exit 1; }; \
else \
echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
fi
sc_copyright_format:
@require='Copyright .*Red 'Hat', Inc\.' \
containing='Copyright .*Red 'Hat \
halt='Red Hat copyright is missing Inc.' \
$(_sc_search_regexp)
@prohibit='Copyright [^(].*Red 'Hat \
halt='consistently use (C) in Red Hat copyright' \
$(_sc_search_regexp)
@prohibit='\<Red''Hat\>' \
halt='spell Red Hat as two words' \
$(_sc_search_regexp)
# We don't use this feature of maint.mk.
prev_version_file = /dev/null
# Give credit where due:
# Ensure that each commit author email address (possibly mapped via
# git log's .mailmap) appears in our AUTHORS file.
sc_check_author_list:
@fail=0; \
for i in $$(git log --pretty=format:%aE%n|sort -u|grep -v '^$$'); do \
sanitized=$$(echo "$$i"|LC_ALL=C sed 's/\([^a-zA-Z0-9_@-]\)/\\\1/g'); \
grep -iq "<$$sanitized>" $(srcdir)/AUTHORS \
|| { printf '%s\n' "$$i" >&2; fail=1; }; \
done; \
test $$fail = 1 \
&& echo '$(ME): committer(s) not listed in AUTHORS' >&2; \
test $$fail = 0
# XXX some of these tools/ programs probably ought to bindtextdomain ?
exclude_file_name_regexp--sc_bindtextdomain = ^server/tests|common/region.c|common/win/my_getopt-1.5/main.c|tools/(bitmap_to_c.c|icon_to_c.c|reds_stat.c)
exclude_file_name_regexp--sc_preprocessor_indentation = ^*/*.[ch]
exclude_file_name_regexp--sc_const_long_option = ^common/win/my_getopt-1.5/getopt.(3|txt)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^common/win/my_getopt-1.5/getopt.(3|txt)|client/windows/(spice.ico|sticky_alt.bmp)|client/tests/controller_test/build
# XXX this should be removed & all cases fixde
exclude_file_name_regexp--sc_prohibit_have_config_h = ^*/.*(c|cpp|h)
exclude_file_name_regexp--sc_require_config_h = ^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
exclude_file_name_regexp--sc_require_config_h_first = ^client/gui/.*\.(ttf|font)\.c|client/gui/taharez.*\.c|client/x11/images/(alt_image|red_icon)\.c|common/win/my_getopt-1.5
exclude_file_name_regexp--sc_trailing_blank = ^common/win/my_getopt-1.5/getopt.3
exclude_file_name_regexp--sc_unmarked_diagnostics = ^.*\.(c|py|h)

View File

@ -136,6 +136,11 @@ spicec_SOURCES += \
windows/stdint.h \
windows/win_platform.h \
$(NULL)
spicec_resource_LDADD = windows/redc.o
windows/redc.o: windows/redc.rc
$(WINDRES) $< -o $@
else
spicec_SOURCES += \
x11/atomic_count.h \
@ -167,6 +172,12 @@ spicec_SOURCES += \
$(NULL)
endif
if OS_WIN32
PLATFORM_INCLUDES=-I$(top_srcdir)/client/windows
else
PLATFORM_INCLUDES=-I$(top_srcdir)/client/x11
endif
if SUPPORT_TUNNEL
spicec_SOURCES += \
tunnel_channel.cpp \
@ -210,7 +221,7 @@ endif
INCLUDES = \
-D__STDC_LIMIT_MACROS \
-I$(top_srcdir)/client/x11 \
$(PLATFORM_INCLUDES) \
-I$(top_srcdir)/common \
$(ALSA_CFLAGS) \
$(CEGUI_CFLAGS) \
@ -227,6 +238,7 @@ INCLUDES = \
$(XFIXES_CFLAGS) \
$(WARN_CFLAGS) \
$(XINERAMA_CFLAGS) \
$(CXIMAGE_CFLAGS) \
$(NULL)
spicec_LDFLAGS = $(SPICEC_STATIC_LINKAGE_BSTATIC)
@ -248,6 +260,7 @@ spicec_LDADD = \
$(XRANDR_LIBS) \
$(Z_LIBS) \
$(XINERAMA_LIBS) \
$(spicec_resource_LDADD) \
$(NULL)
EXTRA_DIST = \

View File

@ -2645,6 +2645,13 @@ int Application::main(int argc, char** argv, const char* version_str)
init_globals();
LOG_INFO("starting %s", version_str);
std::string command_line = argv[0];
for (int i = 1 ; i < argc ; ++i) {
command_line += " ";
command_line += argv[i];
}
LOG_INFO("command line: %s", command_line.c_str());
std::auto_ptr<Application> app(new Application());
AutoAbort auto_abort(*app.get());
if (app->process_cmd_line(argc, argv, full_screen)) {
@ -2663,4 +2670,3 @@ int Application::main(int argc, char** argv, const char* version_str)
cleanup_globals();
return ret;
}

View File

@ -407,4 +407,3 @@ private:
};
#endif

View File

@ -106,4 +106,3 @@ private:
};
#endif

View File

@ -49,4 +49,3 @@ public:
};
#endif

View File

@ -118,4 +118,3 @@ private:
};
#endif

View File

@ -350,4 +350,3 @@ private:
#endif

View File

@ -386,4 +386,3 @@ void ClientNetSocket::apply_disconnect()
_close_pending = false;
_fin_pending = false;
}

View File

@ -517,4 +517,3 @@ void CmdLineParser::show_help()
os << "\n";
Platform::term_printf(os.str().c_str());
}

View File

@ -102,4 +102,3 @@ private:
};
#endif

View File

@ -58,12 +58,12 @@
#pragma warning(disable:4355)
#pragma warning(disable:4996)
#pragma warning(disable:4200)
extern const char* PACKAGE_VERSION;
#endif
#define strcasecmp stricmp
extern const char* PACKAGE_VERSION;
#else
#include <unistd.h>
#include <X11/X.h>
@ -88,4 +88,3 @@ extern const char* PACKAGE_VERSION;
#include "red_types.h"
#endif

View File

@ -113,4 +113,3 @@ int LocalCursor::get_size_bits(const SpiceCursorHeader& header, int& size)
return 0;
}
}

View File

@ -70,4 +70,3 @@ private:
};
#endif

View File

@ -667,4 +667,3 @@ ChannelFactory& CursorChannel::Factory()
{
return factory;
}

View File

@ -91,4 +91,3 @@ private:
};
#endif

View File

@ -90,4 +90,3 @@ void spice_log_cleanup(void);
}
#endif // _H_DEBUG

View File

@ -19,10 +19,9 @@
typedef void (*message_destructor_t)(uint8_t *message);
typedef uint8_t * (*spice_parse_channel_func_t)(uint8_t *message_start, uint8_t *message_end, uint16_t message_type, int minor,
size_t *size_out, message_destructor_t *free_message);
size_t *size_out, message_destructor_t *free_message);
spice_parse_channel_func_t spice_get_server_channel_parser(uint32_t channel, unsigned int *max_message_type);
spice_parse_channel_func_t spice_get_server_channel_parser1(uint32_t channel, unsigned int *max_message_type);
#endif

View File

@ -1306,7 +1306,7 @@ void DisplayChannel::reset_screen()
AutoRef<ResetTimer> reset_timer(new ResetTimer(screen()->ref(), get_client()));
detach_from_screen(get_client().get_application());
get_client().activate_interval_timer(*reset_timer, RESET_TIMEOUT);
}
@ -1840,4 +1840,3 @@ ChannelFactory& DisplayChannel::Factory()
{
return factory;
}

View File

@ -241,4 +241,3 @@ private:
};
#endif

View File

@ -92,4 +92,3 @@ class EventSources::Handle: public EventSource, public Handle_p {
};
#endif

View File

@ -136,7 +136,7 @@
out->b = (out->b << 3) | ((out->b >> 2) & 0x07); \
out->pad = 0; \
out++; \
}
}
#endif
#endif
@ -335,4 +335,3 @@ static size_t FNAME(decode)(GlzDecoderWindow &window, uint8_t* in_buf,
#undef COPY_COMP_PIXEL
#undef COPY_PLT_ENTRY
#undef CAST_PLT_DISTANCE

View File

@ -62,4 +62,3 @@ inline uint8_t* GlzDecodedImage::get_pixel_ref(int offset)
}
#endif

View File

@ -299,4 +299,3 @@ void GlzDecoder::decode(uint8_t *data, SpicePalette *palette, void *opaque_usr_i
_images_window.post_decode(decoded_image);
}

View File

@ -82,4 +82,3 @@ private:
};
#endif // _H_GLZ_DECODER

View File

@ -48,12 +48,12 @@ public:
#ifdef RED_DEBUG
#define GLZ_ASSERT(debug, x) { \
if (!(x)) { \
std::ostringstream os; \
os << __FUNCTION__ << ": ASSERT " << #x << " failed\n"; \
(debug).error(os.str()); \
} \
#define GLZ_ASSERT(debug, x) { \
if (!(x)) { \
std::ostringstream os; \
os << __FUNCTION__ << ": ASSERT " << #x << " failed\n"; \
(debug).error(os.str()); \
} \
}
#else
@ -64,4 +64,3 @@ public:
#define GLZ_DECODE_TO_RGB32
#endif //_H_GLZ_DECODER_CONFIG

View File

@ -327,4 +327,3 @@ inline int GlzDecoderWindow::calc_image_win_idx(uint64_t image_id)
{
return (int)((_head_idx + _n_images - 1 - (_tail_image_id - image_id)) % _images_capacity);
}

View File

@ -120,4 +120,3 @@ inline uint8_t *GlzDecoderWindow::get_ref_pixel(DecodedImageWinId decoded_image_
}
#endif // _H_GLZ_DECODER_WINDOW

View File

@ -18,4 +18,3 @@ EXTRA_DIST = \
taharez_look.scheme.c \
taharez_look.tga.c \
$(NULL)

View File

@ -1412,4 +1412,3 @@ bool GUI::message_box(MessageType type, const char *text, const ButtonsList& but
}
return _dialog->message_box(type, text, buttons, _response_handler);
}

View File

@ -141,4 +141,3 @@ private:
};
#endif

View File

@ -146,4 +146,3 @@ const char* res_get_string(int id)
return NULL;
}

View File

@ -57,4 +57,3 @@ enum {
const char* res_get_string(int id);
#endif

View File

@ -388,4 +388,3 @@ uint SoftRenderer::getVertScreenDPI() const
}
}

View File

@ -146,4 +146,3 @@ namespace CEGUI
}
#endif

View File

@ -137,4 +137,3 @@ void SoftTexture::loadFromMemory(const void* buffPtr, uint buffWidth,
}

View File

@ -56,4 +56,3 @@ namespace CEGUI
}
#endif

View File

@ -147,4 +147,3 @@ void HotKeysParser::add_hotkey(const std::string& hotkey, const CommandsMap& com
std::string keys = hotkey.substr(key_start + 1);
parse_keys(command_id, keys);
}

View File

@ -46,4 +46,3 @@ private:
};
#endif

View File

@ -33,4 +33,3 @@ private:
};
#endif

View File

@ -609,4 +609,3 @@ ChannelFactory& InputsChannel::Factory()
{
return factory;
}

View File

@ -94,4 +94,3 @@ private:
#endif

View File

@ -40,4 +40,3 @@ public:
};
#endif

View File

@ -23,7 +23,7 @@
#include "debug.h"
#include "utils.h"
#if !defined(jpeg_boolean) && !defined(__MINGW32__)
#if !defined(jpeg_boolean)
#define jpeg_boolean boolean
#endif
@ -85,7 +85,7 @@ JpegDecoder::JpegDecoder()
_cinfo.src->skip_input_data = jpeg_decoder_skip_input_data;
_cinfo.src->resync_to_restart = jpeg_resync_to_restart;
_cinfo.src->term_source = jpeg_decoder_term_source;
static SpiceJpegDecoderOps decoder_ops = {
op_begin_decode,
op_decode,

View File

@ -22,7 +22,7 @@
#include "common.h"
#include "red_canvas_base.h"
#ifdef WIN32
#if defined(WIN32) && !defined(__MINGW32__)
/* We need some hacks to avoid warnings from the jpeg headers */
#define XMD_H
#undef FAR
@ -89,4 +89,3 @@ private:
RGBToBGRXConverter _rgb2bgrx;
};
#endif

View File

@ -100,4 +100,3 @@ private:
};
#endif

View File

@ -24,7 +24,7 @@
#include "utils.h"
#include "mjpeg_decoder.h"
#if !defined(jpeg_boolean) && !defined(__MINGW32__)
#if !defined(jpeg_boolean)
#define jpeg_boolean boolean
#endif

View File

@ -55,4 +55,3 @@ protected:
};
#endif

View File

@ -56,4 +56,3 @@ public:
};
#endif

View File

@ -201,4 +201,3 @@ public:
};
#endif

View File

@ -368,4 +368,3 @@ ChannelFactory& PlaybackChannel::Factory()
{
return factory;
}

View File

@ -117,4 +117,3 @@ private:
};
#endif

View File

@ -291,4 +291,3 @@ ChannelFactory& RecordChannel::Factory()
{
return factory;
}

View File

@ -885,4 +885,3 @@ void RedChannel::handle_wait_for_channels(RedPeer::InMessage* message)
}
_client.wait_for_channels(wait->wait_count, wait->wait_list);
}

View File

@ -296,13 +296,13 @@ void MessageHandlerImp<HandlerClass, channel_id>::handle_message(RedPeer::Compou
message_destructor_t parsed_free;
if (_parser == NULL) {
/* We need to do this lazily rather than at constuction because we
don't know the major until we've connected */
if (_obj.get_peer_major() == 1) {
_parser = spice_get_server_channel_parser1(channel_id, NULL);
} else {
_parser = spice_get_server_channel_parser(channel_id, NULL);
}
/* We need to do this lazily rather than at constuction because we
don't know the major until we've connected */
if (_obj.get_peer_major() == 1) {
_parser = spice_get_server_channel_parser1(channel_id, NULL);
} else {
_parser = spice_get_server_channel_parser(channel_id, NULL);
}
}
if (message.sub_list()) {
@ -350,4 +350,3 @@ void MessageHandlerImp<HandlerClass, channel_id>::set_handler(unsigned int id, H
}
#endif

View File

@ -1311,7 +1311,7 @@ void RedClient::dispatch_agent_message(VDAgentMessage* msg, void* data)
default:
DBG(0, "Unsupported message type %u size %u", msg->type, msg->size);
}
}
}
void RedClient::handle_agent_tokens(RedPeer::InMessage* message)
{
@ -1407,4 +1407,3 @@ void RedClient::register_channel_factory(ChannelFactory& factory)
{
_factorys.push_back(&factory);
}

View File

@ -385,4 +385,3 @@ private:
};
#endif

View File

@ -120,4 +120,3 @@ public:
};
#endif

View File

@ -15,6 +15,9 @@
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#ifdef __MINGW32__
#undef HAVE_STDLIB_H
#endif
#include <config.h>
#endif
@ -88,4 +91,3 @@ CanvasType GDICanvas::get_pixmap_type()
{
return CANVAS_TYPE_GDI;
}

View File

@ -32,7 +32,7 @@ class RedPixmap;
class GDICanvas: public Canvas {
public:
GDICanvas(int width, int height, uint32_t format,
PixmapCache& pixmap_cache, PaletteCache& palette_cache,
PixmapCache& pixmap_cache, PaletteCache& palette_cache,
GlzDecoderWindow &glz_decoder_window, SurfacesCache &csurfaces);
virtual ~GDICanvas();
@ -53,4 +53,3 @@ private:
};
#endif

View File

@ -118,4 +118,3 @@ void GCanvas::post_gl_copy()
{
_pixmap->past_copy();
}

View File

@ -64,4 +64,3 @@ private:
};
#endif

View File

@ -147,4 +147,3 @@ enum RedKey {
};
#endif

View File

@ -69,7 +69,7 @@ public:
};
ConnectionOptions(Type in_type, int in_port, int in_sport,
int in_protocol,
int in_protocol,
const HostAuthOptions& in_host_auth,
const std::string& in_ciphers)
: type (in_type)
@ -206,4 +206,3 @@ protected:
};
#endif

View File

@ -46,4 +46,3 @@ protected:
};
#endif

View File

@ -33,4 +33,3 @@ public:
};
#endif

View File

@ -47,4 +47,3 @@ private:
};
#endif

View File

@ -28,4 +28,3 @@ public:
};
#endif

View File

@ -106,4 +106,3 @@ CanvasType SCanvas::get_pixmap_type()
{
return CANVAS_TYPE_SW;
}

View File

@ -50,4 +50,3 @@ private:
};
#endif

View File

@ -35,4 +35,3 @@ struct IconHeader {
class RedDrawable;
#endif

View File

@ -196,4 +196,3 @@ static bool find_anchor_point(const REGION& region, SpicePoint& pt)
}
#endif

View File

@ -88,7 +88,7 @@ RedScreen::RedScreen(Application& owner, int id, const std::string& name, int wi
, _update_by_timer (true)
, _size_locked (false)
, _menu_needs_update (false)
, _forec_update_timer (0)
, _force_update_timer (0)
, _update_timer (new UpdateTimer(this))
, _composit_area (NULL)
, _update_mark (1)
@ -402,7 +402,7 @@ void RedScreen::periodic_update()
if (is_dirty()) {
need_update = true;
} else {
if (!_forec_update_timer) {
if (!_force_update_timer) {
_owner.deactivate_interval_timer(*_update_timer);
_periodic_update = false;
}
@ -742,14 +742,14 @@ void RedScreen::on_stop_key_interception()
void RedScreen::enter_modal_loop()
{
_forec_update_timer++;
_force_update_timer++;
activate_timer();
}
void RedScreen::exit_modal_loop()
{
ASSERT(_forec_update_timer > 0)
_forec_update_timer--;
ASSERT(_force_update_timer > 0)
_force_update_timer--;
}
void RedScreen::pre_migrate()
@ -939,4 +939,3 @@ void RedScreen::unset_type_gl()
_window.unset_type_gl();
}
#endif // USE_OPENGL

View File

@ -179,7 +179,7 @@ private:
bool _update_by_timer;
bool _size_locked;
bool _menu_needs_update;
int _forec_update_timer;
int _force_update_timer;
AutoRef<UpdateTimer> _update_timer;
RedDrawable* _composit_area;
uint64_t _update_mark;
@ -208,4 +208,3 @@ private:
};
#endif

View File

@ -237,4 +237,3 @@ void ScreenLayer::detach_from_screen(Application& application)
}
ASSERT(!_screen);
}

View File

@ -85,4 +85,3 @@ private:
};
#endif

View File

@ -221,4 +221,3 @@ private:
};
#endif

View File

@ -551,4 +551,3 @@ ChannelFactory& SmartCardChannel::Factory()
{
return factory;
}

View File

@ -157,4 +157,3 @@ private:
};
#endif // __SMART_CARD_H__

View File

@ -166,7 +166,7 @@ int main(int argc, char *argv[])
//send_data(CONTROLLER_HOST_SUBJECT, (uint8_t*)HOST_SUBJECT, sizeof(HOST_SUBJECT));
send_data(CONTROLLER_SET_TITLE, (uint8_t*)TITLE, sizeof(TITLE));
send_data(CONTROLLER_HOTKEYS, (uint8_t*)HOTKEYS, sizeof(HOTKEYS));
send_data(CONTROLLER_CREATE_MENU, (uint8_t*)MENU, sizeof(MENU));
send_value(CONTROLLER_FULL_SCREEN, /*CONTROLLER_SET_FULL_SCREEN |*/ CONTROLLER_AUTO_DISPLAY_RES);
@ -194,7 +194,7 @@ int main(int argc, char *argv[])
printf("Press <Enter> to close connection\n");
getchar();
#ifdef WIN32
CloseHandle(pipe);
CloseHandle(pipe);
#else
close(sock);
#endif

View File

@ -133,4 +133,3 @@ Mutex::~Mutex()
{
pthread_mutex_destroy(&_mutex);
}

View File

@ -132,4 +132,3 @@ private:
#endif

View File

@ -42,4 +42,3 @@ int str_to_port(const char *str)
}
return port;
}

View File

@ -148,4 +148,3 @@ class EmptyBase {
};
#endif

View File

@ -39,4 +39,3 @@ private:
};
#endif

View File

@ -209,4 +209,3 @@ void EventSources::add_file(File& file)
void EventSources::remove_file(File& file)
{
}

View File

@ -49,4 +49,3 @@ class Trigger_p: public Handle_p {
};
#endif

View File

@ -41,6 +41,13 @@ static void init_winsock()
}
}
#ifdef __MINGW32__
// XXX: for mingw32 we can do both actually, but it seems easier
// to just use the autoconf provided PACKAGE_VERSION.
static void init_version_string()
{
}
#else
const char* PACKAGE_VERSION = "???";
static char _version_string[40];
@ -68,6 +75,7 @@ static void init_version_string()
(int)(file_info->dwFileVersionLS & 0x0ffff));
PACKAGE_VERSION = _version_string;
}
#endif
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
@ -100,4 +108,3 @@ int WINAPI WinMain(HINSTANCE hInstance,
return exit_val;
}

View File

@ -20,4 +20,3 @@
#include "common.h"
#include "../../common/win/my_getopt-1.5/my_getopt.c"

View File

@ -230,4 +230,3 @@ void WinListener::create_pipe()
THROW("ConnectNamedPipe() failed %u", GetLastError());
}
}

View File

@ -92,4 +92,3 @@ private:
};
#endif

View File

@ -108,4 +108,3 @@ SpicePoint AlphaImageFromRes::get_size()
Lock lock(*p_data->source_p._mutex);
return get_bitmap_size(p_data->source_p.dc);
}

Some files were not shown because too many files have changed in this diff Show More