Hello community,
here is the log from the commit of package newt for openSUSE:Factory checked in at 2013-11-14 08:43:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/newt (Old)
and /work/SRC/openSUSE:Factory/.newt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "newt"
Changes:
--------
--- /work/SRC/openSUSE:Factory/newt/newt.changes 2013-03-10 08:35:36.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.newt.new/newt.changes 2013-11-14 08:43:02.000000000 +0100
@@ -1,0 +2,24 @@
+Wed Nov 6 19:13:27 UTC 2013 - lars@linux-schulserver.de
+
+- update to 0.52.16
+ + add newtComponentGetSize and newtComponentGetPosition
+ + modify Makefile to use SOEXT
+ + free gpm socket name and unlink gpm socket on form exit
+ + fix memory leaks in whiptail
+ + add missing whiptail options to help and man page
+ + fix errors found by gcc-with-cpychecker
+ + fix building with tcl8.6
+ + add fallback to python-config
+ + replace tabs in snack.py
+ + compile snackmodule.c with flag -fPIC (Kang Kai)
+ + include new translations from transifex
+ + allow newtWinMenu and newtWinEntries with no buttons or items
+ + don't draw scale when not mapped
+ + build with large-file support for stat64
+ + remove unused variables in test code
+ + update FSF address
+ + remove obsolete macros
+ + make some dependencies arch-specific
+- removed upstream newt-0.52.14-incorrect-fsf-address.patch
+
+-------------------------------------------------------------------
Old:
----
newt-0.52.14-incorrect-fsf-address.patch
newt-0.52.14.tar.bz2
New:
----
newt-0.52.16.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ newt.spec ++++++
--- /var/tmp/diff_new_pack.9rf2TQ/_old 2013-11-14 08:43:02.000000000 +0100
+++ /var/tmp/diff_new_pack.9rf2TQ/_new 2013-11-14 08:43:02.000000000 +0100
@@ -23,13 +23,12 @@
Summary: A library for text mode user interfaces
License: LGPL-2.1+
Group: System/Libraries
-Version: 0.52.14
+Version: 0.52.16
Release: 0
Url: https://fedorahosted.org/newt/
Source: %{name}-%{version}.tar.bz2
Source2: baselibs.conf
Source10: %{name}-rpmlintrc
-Patch0: newt-0.52.14-incorrect-fsf-address.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkg-config
BuildRequires: popt-devel
@@ -143,7 +142,6 @@
%prep
%setup -q
-%patch0 -p0
%build
# gpm support seems to smash the stack
++++++ newt-0.52.14.tar.bz2 -> newt-0.52.16.tar.bz2 ++++++
++++ 2017 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/.gitignore new/newt-0.52.16/.gitignore
--- old/newt-0.52.14/.gitignore 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/.gitignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-*.o
-*.so
-*.cache
-configure
-config.*
-.depend
-install-sh
-Makefile
-po/*.mo
-test
-testgrid
-whiptail
-libnewt.a
-libnewt.pc
-libnewt.so*
-snack.pyc
-shared
-testtree
-showkey
-showchars
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/COPYING new/newt-0.52.16/COPYING
--- old/newt-0.52.14/COPYING 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/COPYING 2013-08-06 17:46:42.000000000 +0200
@@ -1,15 +1,15 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -99,7 +99,7 @@
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
- GNU LIBRARY GENERAL PUBLIC LICENSE
+ GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
@@ -411,7 +411,7 @@
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -434,9 +434,9 @@
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
- Appendix: How to Apply These Terms to Your New Libraries
+ How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
@@ -463,8 +463,8 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/checkbox.c new/newt-0.52.16/checkbox.c
--- old/newt-0.52.14/checkbox.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/checkbox.c 2013-08-06 17:46:42.000000000 +0200
@@ -183,7 +183,7 @@
static void cbDraw(newtComponent c) {
struct checkbox * cb = c->data;
- if (c->top == -1 || !c->isMapped) return;
+ if (!c->isMapped) return;
if (cb->flags & NEWT_FLAG_DISABLED) {
cb->inactive = NEWT_COLORSET_DISENTRY;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/config.h.in new/newt-0.52.16/config.h.in
--- old/newt-0.52.14/config.h.in 2011-11-11 12:00:56.000000000 +0100
+++ new/newt-0.52.16/config.h.in 2013-08-06 17:47:09.000000000 +0200
@@ -74,3 +74,14 @@
/* NEWT Version String */
#undef VERSION
+
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/configure.ac new/newt-0.52.16/configure.ac
--- old/newt-0.52.14/configure.ac 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/configure.ac 2013-08-06 17:46:42.000000000 +0200
@@ -14,6 +14,7 @@
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_GREP
+AC_SYS_LARGEFILE
# Are we using GNU ld?
AC_MSG_CHECKING([for GNU ld])
@@ -66,7 +67,7 @@
AC_ARG_WITH([tcl], [ --without-tcl do not compile whiptcl.so])
if test "x$with_tcl" = "xno"; then
- WHIPTCLSO=
+ WHIPTCLLIB=
else
AC_MSG_CHECKING([for tcl configuration])
@@ -95,12 +96,14 @@
AC_MSG_RESULT([found])
. ${ac_cv_c_tclconfig}/tclConfig.sh
AC_SUBST([TCL_LIB_FLAG])
- WHIPTCLSO=whiptcl.so
+ WHIPTCLLIB=whiptcl
+ # needed with tcl8.6
+ CPPFLAGS="$CPPFLAGS -DUSE_INTERP_RESULT"
else
AC_MSG_RESULT([NOT found])
fi
fi
-AC_SUBST([WHIPTCLSO])
+AC_SUBST([WHIPTCLLIB])
AC_ARG_WITH([gpm-support], [ --with-gpm-support compile with GPM support])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/dialogboxes.c new/newt-0.52.16/dialogboxes.c
--- old/newt-0.52.14/dialogboxes.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/dialogboxes.c 2013-08-06 17:46:42.000000000 +0200
@@ -376,7 +376,7 @@
*result = NULL;
if (answer == cancel)
rc = DLG_CANCEL;
- if (answer == NULL)
+ else if (answer == NULL)
rc = DLG_ESCAPE;
else {
i = (long) newtListboxGetCurrent(listBox);
@@ -487,7 +487,7 @@
*selections = NULL;
if (answer == cancel)
rc = DLG_CANCEL;
- if (answer == NULL)
+ else if (answer == NULL)
rc = DLG_ESCAPE;
else {
if (useRadio) {
@@ -569,7 +569,7 @@
answer = newtFormGetCurrent(form);
if (answer == no)
- return DLG_CANCEL;
+ rc = DLG_CANCEL;
}
else {
newtDrawForm(form);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/form.c new/newt-0.52.16/form.c
--- old/newt-0.52.14/form.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/form.c 2013-08-06 17:46:42.000000000 +0200
@@ -83,6 +83,7 @@
static int gpm_flag=0;
static int gpm_tried=0;
Gpm_Stst *gpm_stack=NULL;
+static char *gpm_sock_name=NULL;
static struct sigaction gpm_saved_suspend_hook;
static struct sigaction gpm_saved_winch_hook;
@@ -155,7 +156,6 @@
int i;
struct sockaddr_un addr;
Gpm_Stst *new;
- char* sock_name = 0;
/*....................................... First of all, check xterm */
@@ -228,10 +228,10 @@
bzero((char *)&addr,sizeof(addr));
addr.sun_family=AF_UNIX;
- if (!(sock_name = tempnam (0, "gpm"))) {
+ if (!(gpm_sock_name = tempnam (0, "gpm"))) {
goto err;
} /*if*/
- strncpy (addr.sun_path, sock_name, sizeof (addr.sun_path));
+ strncpy (addr.sun_path, gpm_sock_name, sizeof (addr.sun_path));
if (bind (gpm_fd, (struct sockaddr*)&addr,
sizeof (addr.sun_family) + strlen (addr.sun_path))==-1) {
goto err;
@@ -302,10 +302,10 @@
}
while(gpm_stack);
if (gpm_fd>=0) close(gpm_fd);
- if (sock_name) {
- unlink(sock_name);
- free(sock_name);
- sock_name = 0;
+ if (gpm_sock_name) {
+ unlink(gpm_sock_name);
+ free(gpm_sock_name);
+ gpm_sock_name = NULL;
} /*if*/
gpm_flag=0;
gpm_fd=-1;
@@ -334,6 +334,11 @@
if (gpm_fd>=0) close(gpm_fd);
gpm_fd=-1;
+ if (gpm_sock_name) {
+ unlink(gpm_sock_name);
+ free(gpm_sock_name);
+ gpm_sock_name = NULL;
+ }
#ifdef SIGTSTP
sigaction(SIGTSTP, &gpm_saved_suspend_hook, 0);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/newt.0.52.ver new/newt-0.52.16/newt.0.52.ver
--- old/newt-0.52.14/newt.0.52.ver 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/newt.0.52.ver 2013-08-06 17:46:42.000000000 +0200
@@ -161,3 +161,9 @@
newtScrollbarSetColors;
newtTextboxSetColors;
} NEWT_0.52.11;
+
+NEWT_0.52.16 {
+ global:
+ newtComponentGetPosition;
+ newtComponentGetSize;
+} NEWT_0.52.13;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/newt.c new/newt-0.52.16/newt.c
--- old/newt-0.52.14/newt.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/newt.c 2013-08-06 17:46:42.000000000 +0200
@@ -1160,3 +1160,12 @@
SLsmg_touch_lines(0, SLtt_Screen_Rows);
}
+void newtComponentGetPosition(newtComponent co, int * left, int * top) {
+ if (left) *left = co->left;
+ if (top) *top = co->top;
+}
+
+void newtComponentGetSize(newtComponent co, int * width, int * height) {
+ if (width) *width = co->width;
+ if (height) *height = co->height;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/newt.h new/newt-0.52.16/newt.h
--- old/newt-0.52.14/newt.h 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/newt.h 2013-08-06 17:46:42.000000000 +0200
@@ -263,6 +263,9 @@
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
void newtComponentTakesFocus(newtComponent co, int val);
+void newtComponentGetPosition(newtComponent co, int * left, int * top);
+void newtComponentGetSize(newtComponent co, int * width, int * height);
+
/* This callback is called when a component is destroyed. */
void newtComponentAddDestroyCallback(newtComponent co,
newtCallback f, void * data);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/newt.spec new/newt-0.52.16/newt.spec
--- old/newt-0.52.14/newt.spec 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/newt.spec 2013-08-06 17:46:42.000000000 +0200
@@ -1,7 +1,7 @@
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Summary: A library for text mode user interfaces
Name: newt
-Version: 0.52.14
+Version: 0.52.16
Release: 1%{?dist}
License: LGPLv2
Group: System Environment/Libraries
@@ -10,18 +10,17 @@
BuildRequires: popt-devel python-devel slang-devel
BuildRequires: docbook-utils
Provides: snack = %{version}-%{release}
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%package devel
Summary: Newt windowing toolkit development files
-Requires: slang-devel %{name} = %{version}-%{release}
+Requires: slang-devel %{name}%{?_isa} = %{version}-%{release}
Group: Development/Libraries
# The loader portion of the installer needs to link statically against libnewt,
# so the static library must be shipped.
%package static
Summary: Newt windowing toolkit static library
-Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Group: Development/Libraries
%Description
@@ -49,7 +48,7 @@
%package python
Summary: Python bindings for newt
Group: Development/Libraries
-Requires: newt = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description python
The newt-python package contains the Python bindings for the newt library
@@ -67,43 +66,72 @@
docbook2txt tutorial.sgml
%install
-rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%find_lang %{name}
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f %{name}.lang
-%defattr (-,root,root)
%doc COPYING
%{_bindir}/whiptail
%{_libdir}/libnewt.so.*
%{_mandir}/man1/whiptail.1*
%files devel
-%defattr (-,root,root)
%doc tutorial.*
%{_includedir}/newt.h
%{_libdir}/libnewt.so
%{_libdir}/pkgconfig/libnewt.pc
%files static
-%defattr(-,root,root)
%{_libdir}/libnewt.a
%files python
-%defattr(-,root,root)
%doc peanuts.py popcorn.py
%{python_sitearch}/*.so
%{python_sitearch}/*.py*
%changelog
+* Tue Aug 06 2013 Miroslav Lichvar - 0.52.16-1
+- add newtComponentGetSize and newtComponentGetPosition (#987596)
+- modify Makefile to use SOEXT (#971168)
+- free gpm socket name and unlink gpm socket on form exit
+- fix memory leaks in whiptail
+- fix weekdays in spec changelog
+
+* Sat Aug 03 2013 Fedora Release Engineering - 0.52.15-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Fri Apr 05 2013 Miroslav Lichvar - 0.52.15-2
+- add missing whiptail options to help and man page
+
+* Mon Mar 25 2013 Miroslav Lichvar - 0.52.15-1
+- fix errors found by gcc-with-cpychecker (#800075)
+- fix building with tcl8.6 (#902561)
+- add fallback to python-config (#783627)
+- replace tabs in snack.py (#870647)
+- compile snackmodule.c with flag -fPIC (Kang Kai)
+- include new translations from transifex
+- allow newtWinMenu and newtWinEntries with no buttons or items
+- don't draw scale when not mapped
+- build with large-file support for stat64
+- remove unused variables in test code
+- update FSF address
+- remove obsolete macros
+- make some dependencies arch-specific
+
+* Thu Feb 14 2013 Fedora Release Engineering - 0.52.14-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Fri Jul 20 2012 Fedora Release Engineering - 0.52.14-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Fri Jan 13 2012 Fedora Release Engineering - 0.52.14-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
* Fri Nov 11 2011 Miroslav Lichvar - 0.52.14-1
- fix returning strings in whiptail and whiptcl (#752818)
- fix configure to work with multiple python versions (#737998)
@@ -323,7 +351,7 @@
* Thu Nov 24 2005 Jindrich Novy - 0.52.2-1
- rebuild because of the new slang-2.0.5
-* Fri Nov 22 2005 Petr Rockai - 0.52.2-0
+* Tue Nov 22 2005 Petr Rockai - 0.52.2-0
- new upstream version (minor fixes for the source tarball
and build system)
@@ -409,7 +437,7 @@
- fix textwrap for UTF-8 in general
- bump soname to avoid shared library collisions with slang
-* Wed Jul 01 2002 Michael Fulbright 0.50.39-1
+* Mon Jul 01 2002 Michael Fulbright 0.50.39-1
- Changed a test to check for 'None' the correct way
* Wed Jun 26 2002 Bill Nottingham 0.50.38-1
@@ -426,7 +454,7 @@
* Mon Mar 18 2002 Bill Nottingham 0.50.35-1
- build for whatever version of python happens to be installed
-* Fri Sep 15 2001 Trond Eivind GlomsrÞd 0.50.34-1
+* Sat Sep 15 2001 Trond Eivind GlomsrÞd 0.50.34-1
- remove python2 subpackage
- compile package for python 2.2
@@ -611,7 +639,7 @@
* Mon Mar 15 1999 Matt Wilson
- fix from Jakub Jelinek for listbox keypresses
-* Fri Feb 27 1999 Matt Wilson
+* Sat Feb 27 1999 Matt Wilson
- fixed support for navigating listboxes with alphabetical keypresses
* Thu Feb 25 1999 Matt Wilson
@@ -673,7 +701,7 @@
- Added patched from Clarence Smith for setting the size of a listbox
- Version 0.9
-* Tue May 28 1997 Elliot Lee 0.8-2
+* Wed May 28 1997 Elliot Lee 0.8-2
- Touchups on Makefile
- Cleaned up NEWT_FLAGS_*
Files old/newt-0.52.14/po/ia.mo and new/newt-0.52.16/po/ia.mo differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/po/ia.po new/newt-0.52.16/po/ia.po
--- old/newt-0.52.14/po/ia.po 1970-01-01 01:00:00.000000000 +0100
+++ new/newt-0.52.16/po/ia.po 2013-08-06 17:46:42.000000000 +0200
@@ -0,0 +1,35 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+# Nik Kalach , 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: newt\n"
+"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/\n"
+"POT-Creation-Date: 2006-09-14 16:03+0200\n"
+"PO-Revision-Date: 2012-09-26 23:04+0000\n"
+"Last-Translator: Nik Kalach \n"
+"Language-Team: Interlingua \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ia\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../dialogboxes.c:43 ../dialogboxes.c:48 ../dialogboxes.c:493
+msgid "Ok"
+msgstr "Ok"
+
+#: ../dialogboxes.c:51
+msgid "Cancel"
+msgstr "Annullar"
+
+#: ../dialogboxes.c:498
+msgid "Yes"
+msgstr "Si"
+
+#: ../dialogboxes.c:500
+msgid "No"
+msgstr "No"
Files old/newt-0.52.14/po/lv.mo and new/newt-0.52.16/po/lv.mo differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/po/lv.po new/newt-0.52.16/po/lv.po
--- old/newt-0.52.14/po/lv.po 1970-01-01 01:00:00.000000000 +0100
+++ new/newt-0.52.16/po/lv.po 2013-08-06 17:46:42.000000000 +0200
@@ -0,0 +1,35 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+# RÅ«dolfs Mazurs , 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: newt\n"
+"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/\n"
+"POT-Creation-Date: 2006-09-14 16:03+0200\n"
+"PO-Revision-Date: 2012-05-26 19:48+0000\n"
+"Last-Translator: RÅ«dolfs Mazurs \n"
+"Language-Team: Latvian (http://www.transifex.com/projects/p/fedora/language/lv/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: lv\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n"
+
+#: ../dialogboxes.c:43 ../dialogboxes.c:48 ../dialogboxes.c:493
+msgid "Ok"
+msgstr "Labi"
+
+#: ../dialogboxes.c:51
+msgid "Cancel"
+msgstr "Atcelt"
+
+#: ../dialogboxes.c:498
+msgid "Yes"
+msgstr "JÄ"
+
+#: ../dialogboxes.c:500
+msgid "No"
+msgstr "NÄ"
Files old/newt-0.52.14/po/tg.mo and new/newt-0.52.16/po/tg.mo differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/po/tg.po new/newt-0.52.16/po/tg.po
--- old/newt-0.52.14/po/tg.po 1970-01-01 01:00:00.000000000 +0100
+++ new/newt-0.52.16/po/tg.po 2013-08-06 17:46:42.000000000 +0200
@@ -0,0 +1,34 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: newt\n"
+"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/\n"
+"POT-Creation-Date: 2006-09-14 16:03+0200\n"
+"PO-Revision-Date: 2011-12-09 09:57+0000\n"
+"Last-Translator: Victor Ibragimov \n"
+"Language-Team: Tajik (http://www.transifex.com/projects/p/fedora/language/tg/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: tg\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../dialogboxes.c:43 ../dialogboxes.c:48 ../dialogboxes.c:493
+msgid "Ok"
+msgstr "Ð¥Ñб"
+
+#: ../dialogboxes.c:51
+msgid "Cancel"
+msgstr "ÐÐµÐºÐŸÑ ÐºÐ°ÑЎаМ"
+
+#: ../dialogboxes.c:498
+msgid "Yes"
+msgstr "Ҳа"
+
+#: ../dialogboxes.c:500
+msgid "No"
+msgstr "Ðе"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/scale.c new/newt-0.52.16/scale.c
--- old/newt-0.52.14/scale.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/scale.c 2013-08-06 17:46:42.000000000 +0200
@@ -39,6 +39,7 @@
co->top = top;
co->left = left;
co->takesFocus = 0;
+ co->isMapped = 0;
sc->fullValue = fullValue;
sc->charsSet = 0;
@@ -85,7 +86,7 @@
int xlabel = (co->width-4) /2;
char percent[10];
- if (co->top == -1) return;
+ if (!co->isMapped) return;
newtGotorc(co->top, co->left);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/snack.py new/newt-0.52.16/snack.py
--- old/newt-0.52.14/snack.py 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/snack.py 2013-08-06 17:46:42.000000000 +0200
@@ -480,7 +480,7 @@
self.helpCb(self, arg)
def helpCallback(self, cb):
- self.helpCb = cb
+ self.helpCb = cb
return _snack.helpcallback(self.doHelpCallback)
def suspendCallback(self, cb, data = None):
@@ -627,7 +627,7 @@
for (button, value) in self.list:
if result == button:
- return value
+ return value
return None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/snackmodule.c new/newt-0.52.16/snackmodule.c
--- old/newt-0.52.14/snackmodule.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/snackmodule.c 2013-08-06 17:46:42.000000000 +0200
@@ -276,6 +276,8 @@
snackWidget * widget;
widget = PyObject_NEW(snackWidget, &snackWidgetType);
+ if (!widget)
+ return NULL;
widget->scs.cb = NULL;
widget->scs.data = NULL;
@@ -328,6 +330,8 @@
if (!PyArg_ParseTuple(args, "ii", &width, &fullAmount)) return NULL;
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
widget->co = newtScale(-1, -1, width, fullAmount);
return (PyObject *) widget;
@@ -624,6 +628,8 @@
if (!PyArg_ParseTuple(args, "s", &label)) return NULL;
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
widget->co = newtButton(-1, -1, label);
return widget;
@@ -636,6 +642,8 @@
if (!PyArg_ParseTuple(args, "s", &label)) return NULL;
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
widget->co = newtCompactButton(-1, -1, label);
return widget;
@@ -648,6 +656,8 @@
if (!PyArg_ParseTuple(args, "s", &label)) return NULL;
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
widget->co = newtLabel(-1, -1, label);
return widget;
@@ -707,6 +717,8 @@
return NULL;
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
widget->co = newtListbox(-1, -1, height,
(doScroll ? NEWT_FLAG_SCROLL : 0) |
(returnExit ? NEWT_FLAG_RETURNEXIT : 0) |
@@ -730,6 +742,8 @@
return NULL;
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
widget->co = newtTextbox(-1, -1, width, height,
(scrollBar ? NEWT_FLAG_SCROLL : 0) |
(wrap ? NEWT_FLAG_WRAP : 0));
@@ -747,6 +761,8 @@
return NULL;
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
if ((PyObject *) group == Py_None)
widget->co = newtRadiobutton(-1, -1, text, isOn, NULL);
@@ -764,6 +780,8 @@
if (!PyArg_ParseTuple(args, "si", &text, &isOn)) return NULL;
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
widget->co = newtCheckbox(-1, -1, text, isOn ? '*' : ' ', NULL,
&widget->achar);
@@ -802,6 +820,8 @@
&isHidden, &isPassword, &isScrolled, &returnExit)) return NULL;
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
widget->co = newtEntry(-1, -1, initial, width,
(const char **) &widget->apointer,
(isHidden ? NEWT_FLAG_HIDDEN : 0) |
@@ -1088,7 +1108,7 @@
void ** selection;
int numselected;
int i;
- PyObject * sel;
+ PyObject * sel, * int_obj;
if (!PyArg_ParseTuple(args, ""))
return NULL;
@@ -1098,12 +1118,13 @@
sel = PyList_New(0);
if (!selection) {
- return sel;
+ return sel;
}
- sel = PyList_New(0);
for (i = 0; i < numselected; i++) {
- PyList_Append(sel, PyInt_FromLong((long) selection[i]));
+ int_obj = PyInt_FromLong((long) selection[i]);
+ PyList_Append(sel, int_obj);
+ Py_DECREF(int_obj);
}
free(selection);
@@ -1165,6 +1186,8 @@
(unselectable ? NEWT_CHECKBOXTREE_UNSELECTABLE : 0);
widget = snackWidgetNew ();
+ if (!widget)
+ return NULL;
widget->co = newtCheckboxTree(-1, -1, height, flags);
widget->anint = 1;
@@ -1263,7 +1286,10 @@
selection = newtCheckboxTreeGetEntryValue(s->co, I2P(data));
- if (selection == -1) return NULL;
+ if (selection == -1) {
+ PyErr_SetString(PyExc_KeyError, "unknown entry");
+ return NULL;
+ }
switch (selection) {
case NEWT_CHECKBOXTREE_EXPANDED:
@@ -1285,7 +1311,7 @@
void ** selection;
int numselected;
int i;
- PyObject * sel;
+ PyObject * sel, * int_obj;
if (!PyArg_ParseTuple(args, ""))
return NULL;
@@ -1298,9 +1324,10 @@
return sel;
}
- sel = PyList_New(0);
for (i = 0; i < numselected; i++) {
- PyList_Append(sel, PyInt_FromLong((long) selection[i]));
+ int_obj = PyInt_FromLong((long) selection[i]);
+ PyList_Append(sel, int_obj);
+ Py_DECREF(int_obj);
}
free(selection);
@@ -1317,84 +1344,91 @@
return PyInt_FromLong(wstrlen(str, len));
}
+static void setitemstring_decref(PyObject * dict,
+ const char * s, PyObject * o)
+{
+ PyDict_SetItemString(dict, s, o);
+ Py_DECREF(o);
+}
+
void init_snack(void) {
PyObject * d, * m;
m = Py_InitModule("_snack", snackModuleMethods);
d = PyModule_GetDict(m);
- PyDict_SetItemString(d, "ANCHOR_LEFT", PyInt_FromLong(NEWT_ANCHOR_LEFT));
- PyDict_SetItemString(d, "ANCHOR_TOP", PyInt_FromLong(NEWT_ANCHOR_TOP));
- PyDict_SetItemString(d, "ANCHOR_RIGHT", PyInt_FromLong(NEWT_ANCHOR_RIGHT));
- PyDict_SetItemString(d, "ANCHOR_BOTTOM",
+ setitemstring_decref(d, "ANCHOR_LEFT", PyInt_FromLong(NEWT_ANCHOR_LEFT));
+ setitemstring_decref(d, "ANCHOR_TOP", PyInt_FromLong(NEWT_ANCHOR_TOP));
+ setitemstring_decref(d, "ANCHOR_RIGHT", PyInt_FromLong(NEWT_ANCHOR_RIGHT));
+ setitemstring_decref(d, "ANCHOR_BOTTOM",
PyInt_FromLong(NEWT_ANCHOR_BOTTOM));
- PyDict_SetItemString(d, "GRID_GROWX", PyInt_FromLong(NEWT_GRID_FLAG_GROWX));
- PyDict_SetItemString(d, "GRID_GROWY", PyInt_FromLong(NEWT_GRID_FLAG_GROWY));
+ setitemstring_decref(d, "GRID_GROWX", PyInt_FromLong(NEWT_GRID_FLAG_GROWX));
+ setitemstring_decref(d, "GRID_GROWY", PyInt_FromLong(NEWT_GRID_FLAG_GROWY));
- PyDict_SetItemString(d, "FD_READ", PyInt_FromLong(NEWT_FD_READ));
- PyDict_SetItemString(d, "FD_WRITE", PyInt_FromLong(NEWT_FD_WRITE));
- PyDict_SetItemString(d, "FD_EXCEPT", PyInt_FromLong(NEWT_FD_EXCEPT));
-
- PyDict_SetItemString(d, "FORM_EXIT_HOTKEY", PyString_FromString("hotkey"));
- PyDict_SetItemString(d, "FORM_EXIT_WIDGET", PyString_FromString("widget"));
- PyDict_SetItemString(d, "FORM_EXIT_TIMER", PyString_FromString("timer"));
- PyDict_SetItemString(d, "FORM_EXIT_FDREADY", PyString_FromString("fdready"));
-
- PyDict_SetItemString(d, "KEY_TAB", PyInt_FromLong(NEWT_KEY_TAB));
- PyDict_SetItemString(d, "KEY_ENTER", PyInt_FromLong(NEWT_KEY_ENTER));
- PyDict_SetItemString(d, "KEY_SUSPEND", PyInt_FromLong(NEWT_KEY_SUSPEND));
- PyDict_SetItemString(d, "KEY_UP", PyInt_FromLong(NEWT_KEY_UP));
- PyDict_SetItemString(d, "KEY_DOWN", PyInt_FromLong(NEWT_KEY_DOWN));
- PyDict_SetItemString(d, "KEY_LEFT", PyInt_FromLong(NEWT_KEY_LEFT));
- PyDict_SetItemString(d, "KEY_RIGHT", PyInt_FromLong(NEWT_KEY_RIGHT));
- PyDict_SetItemString(d, "KEY_BACKSPACE", PyInt_FromLong(NEWT_KEY_BKSPC));
- PyDict_SetItemString(d, "KEY_DELETE", PyInt_FromLong(NEWT_KEY_DELETE));
- PyDict_SetItemString(d, "KEY_HOME", PyInt_FromLong(NEWT_KEY_HOME));
- PyDict_SetItemString(d, "KEY_END", PyInt_FromLong(NEWT_KEY_END));
- PyDict_SetItemString(d, "KEY_UNTAB", PyInt_FromLong(NEWT_KEY_UNTAB));
- PyDict_SetItemString(d, "KEY_PAGEUP", PyInt_FromLong(NEWT_KEY_PGUP));
- PyDict_SetItemString(d, "KEY_PAGEGDOWN", PyInt_FromLong(NEWT_KEY_PGDN));
- PyDict_SetItemString(d, "KEY_INSERT", PyInt_FromLong(NEWT_KEY_INSERT));
- PyDict_SetItemString(d, "KEY_F1", PyInt_FromLong(NEWT_KEY_F1));
- PyDict_SetItemString(d, "KEY_F2", PyInt_FromLong(NEWT_KEY_F2));
- PyDict_SetItemString(d, "KEY_F3", PyInt_FromLong(NEWT_KEY_F3));
- PyDict_SetItemString(d, "KEY_F4", PyInt_FromLong(NEWT_KEY_F4));
- PyDict_SetItemString(d, "KEY_F5", PyInt_FromLong(NEWT_KEY_F5));
- PyDict_SetItemString(d, "KEY_F6", PyInt_FromLong(NEWT_KEY_F6));
- PyDict_SetItemString(d, "KEY_F7", PyInt_FromLong(NEWT_KEY_F7));
- PyDict_SetItemString(d, "KEY_F8", PyInt_FromLong(NEWT_KEY_F8));
- PyDict_SetItemString(d, "KEY_F9", PyInt_FromLong(NEWT_KEY_F9));
- PyDict_SetItemString(d, "KEY_F10", PyInt_FromLong(NEWT_KEY_F10));
- PyDict_SetItemString(d, "KEY_F11", PyInt_FromLong(NEWT_KEY_F11));
- PyDict_SetItemString(d, "KEY_F12", PyInt_FromLong(NEWT_KEY_F12));
- PyDict_SetItemString(d, "KEY_ESC", PyInt_FromLong(NEWT_KEY_ESCAPE));
-
- PyDict_SetItemString(d, "FLAG_DISABLED", PyInt_FromLong(NEWT_FLAG_DISABLED));
- PyDict_SetItemString(d, "FLAGS_SET", PyInt_FromLong(NEWT_FLAGS_SET));
- PyDict_SetItemString(d, "FLAGS_RESET", PyInt_FromLong(NEWT_FLAGS_RESET));
- PyDict_SetItemString(d, "FLAGS_TOGGLE", PyInt_FromLong(NEWT_FLAGS_TOGGLE));
-
- PyDict_SetItemString(d, "COLORSET_ROOT", PyInt_FromLong(NEWT_COLORSET_ROOT));
- PyDict_SetItemString(d, "COLORSET_BORDER", PyInt_FromLong(NEWT_COLORSET_BORDER));
- PyDict_SetItemString(d, "COLORSET_WINDOW", PyInt_FromLong(NEWT_COLORSET_WINDOW));
- PyDict_SetItemString(d, "COLORSET_SHADOW", PyInt_FromLong(NEWT_COLORSET_SHADOW));
- PyDict_SetItemString(d, "COLORSET_TITLE", PyInt_FromLong(NEWT_COLORSET_TITLE));
- PyDict_SetItemString(d, "COLORSET_BUTTON", PyInt_FromLong(NEWT_COLORSET_BUTTON));
- PyDict_SetItemString(d, "COLORSET_ACTBUTTON", PyInt_FromLong(NEWT_COLORSET_ACTBUTTON));
- PyDict_SetItemString(d, "COLORSET_CHECKBOX", PyInt_FromLong(NEWT_COLORSET_CHECKBOX));
- PyDict_SetItemString(d, "COLORSET_ACTCHECKBOX", PyInt_FromLong(NEWT_COLORSET_ACTCHECKBOX));
- PyDict_SetItemString(d, "COLORSET_ENTRY", PyInt_FromLong(NEWT_COLORSET_ENTRY));
- PyDict_SetItemString(d, "COLORSET_LABEL", PyInt_FromLong(NEWT_COLORSET_LABEL));
- PyDict_SetItemString(d, "COLORSET_LISTBOX", PyInt_FromLong(NEWT_COLORSET_LISTBOX));
- PyDict_SetItemString(d, "COLORSET_ACTLISTBOX", PyInt_FromLong(NEWT_COLORSET_ACTLISTBOX));
- PyDict_SetItemString(d, "COLORSET_TEXTBOX", PyInt_FromLong(NEWT_COLORSET_TEXTBOX));
- PyDict_SetItemString(d, "COLORSET_ACTTEXTBOX", PyInt_FromLong(NEWT_COLORSET_ACTTEXTBOX));
- PyDict_SetItemString(d, "COLORSET_HELPLINE", PyInt_FromLong(NEWT_COLORSET_HELPLINE));
- PyDict_SetItemString(d, "COLORSET_ROOTTEXT", PyInt_FromLong(NEWT_COLORSET_ROOTTEXT));
- PyDict_SetItemString(d, "COLORSET_EMPTYSCALE", PyInt_FromLong(NEWT_COLORSET_EMPTYSCALE));
- PyDict_SetItemString(d, "COLORSET_FULLSCALE", PyInt_FromLong(NEWT_COLORSET_FULLSCALE));
- PyDict_SetItemString(d, "COLORSET_DISENTRY", PyInt_FromLong(NEWT_COLORSET_DISENTRY));
- PyDict_SetItemString(d, "COLORSET_COMPACTBUTTON", PyInt_FromLong(NEWT_COLORSET_COMPACTBUTTON));
- PyDict_SetItemString(d, "COLORSET_ACTSELLISTBOX", PyInt_FromLong(NEWT_COLORSET_ACTSELLISTBOX));
- PyDict_SetItemString(d, "COLORSET_SELLISTBOX", PyInt_FromLong(NEWT_COLORSET_SELLISTBOX));
+ setitemstring_decref(d, "FD_READ", PyInt_FromLong(NEWT_FD_READ));
+ setitemstring_decref(d, "FD_WRITE", PyInt_FromLong(NEWT_FD_WRITE));
+ setitemstring_decref(d, "FD_EXCEPT", PyInt_FromLong(NEWT_FD_EXCEPT));
+
+ setitemstring_decref(d, "FORM_EXIT_HOTKEY", PyString_FromString("hotkey"));
+ setitemstring_decref(d, "FORM_EXIT_WIDGET", PyString_FromString("widget"));
+ setitemstring_decref(d, "FORM_EXIT_TIMER", PyString_FromString("timer"));
+ setitemstring_decref(d, "FORM_EXIT_FDREADY", PyString_FromString("fdready"));
+
+ setitemstring_decref(d, "KEY_TAB", PyInt_FromLong(NEWT_KEY_TAB));
+ setitemstring_decref(d, "KEY_ENTER", PyInt_FromLong(NEWT_KEY_ENTER));
+ setitemstring_decref(d, "KEY_SUSPEND", PyInt_FromLong(NEWT_KEY_SUSPEND));
+ setitemstring_decref(d, "KEY_UP", PyInt_FromLong(NEWT_KEY_UP));
+ setitemstring_decref(d, "KEY_DOWN", PyInt_FromLong(NEWT_KEY_DOWN));
+ setitemstring_decref(d, "KEY_LEFT", PyInt_FromLong(NEWT_KEY_LEFT));
+ setitemstring_decref(d, "KEY_RIGHT", PyInt_FromLong(NEWT_KEY_RIGHT));
+ setitemstring_decref(d, "KEY_BACKSPACE", PyInt_FromLong(NEWT_KEY_BKSPC));
+ setitemstring_decref(d, "KEY_DELETE", PyInt_FromLong(NEWT_KEY_DELETE));
+ setitemstring_decref(d, "KEY_HOME", PyInt_FromLong(NEWT_KEY_HOME));
+ setitemstring_decref(d, "KEY_END", PyInt_FromLong(NEWT_KEY_END));
+ setitemstring_decref(d, "KEY_UNTAB", PyInt_FromLong(NEWT_KEY_UNTAB));
+ setitemstring_decref(d, "KEY_PAGEUP", PyInt_FromLong(NEWT_KEY_PGUP));
+ setitemstring_decref(d, "KEY_PAGEGDOWN", PyInt_FromLong(NEWT_KEY_PGDN));
+ setitemstring_decref(d, "KEY_INSERT", PyInt_FromLong(NEWT_KEY_INSERT));
+ setitemstring_decref(d, "KEY_F1", PyInt_FromLong(NEWT_KEY_F1));
+ setitemstring_decref(d, "KEY_F2", PyInt_FromLong(NEWT_KEY_F2));
+ setitemstring_decref(d, "KEY_F3", PyInt_FromLong(NEWT_KEY_F3));
+ setitemstring_decref(d, "KEY_F4", PyInt_FromLong(NEWT_KEY_F4));
+ setitemstring_decref(d, "KEY_F5", PyInt_FromLong(NEWT_KEY_F5));
+ setitemstring_decref(d, "KEY_F6", PyInt_FromLong(NEWT_KEY_F6));
+ setitemstring_decref(d, "KEY_F7", PyInt_FromLong(NEWT_KEY_F7));
+ setitemstring_decref(d, "KEY_F8", PyInt_FromLong(NEWT_KEY_F8));
+ setitemstring_decref(d, "KEY_F9", PyInt_FromLong(NEWT_KEY_F9));
+ setitemstring_decref(d, "KEY_F10", PyInt_FromLong(NEWT_KEY_F10));
+ setitemstring_decref(d, "KEY_F11", PyInt_FromLong(NEWT_KEY_F11));
+ setitemstring_decref(d, "KEY_F12", PyInt_FromLong(NEWT_KEY_F12));
+ setitemstring_decref(d, "KEY_ESC", PyInt_FromLong(NEWT_KEY_ESCAPE));
+
+ setitemstring_decref(d, "FLAG_DISABLED", PyInt_FromLong(NEWT_FLAG_DISABLED));
+ setitemstring_decref(d, "FLAGS_SET", PyInt_FromLong(NEWT_FLAGS_SET));
+ setitemstring_decref(d, "FLAGS_RESET", PyInt_FromLong(NEWT_FLAGS_RESET));
+ setitemstring_decref(d, "FLAGS_TOGGLE", PyInt_FromLong(NEWT_FLAGS_TOGGLE));
+
+ setitemstring_decref(d, "COLORSET_ROOT", PyInt_FromLong(NEWT_COLORSET_ROOT));
+ setitemstring_decref(d, "COLORSET_BORDER", PyInt_FromLong(NEWT_COLORSET_BORDER));
+ setitemstring_decref(d, "COLORSET_WINDOW", PyInt_FromLong(NEWT_COLORSET_WINDOW));
+ setitemstring_decref(d, "COLORSET_SHADOW", PyInt_FromLong(NEWT_COLORSET_SHADOW));
+ setitemstring_decref(d, "COLORSET_TITLE", PyInt_FromLong(NEWT_COLORSET_TITLE));
+ setitemstring_decref(d, "COLORSET_BUTTON", PyInt_FromLong(NEWT_COLORSET_BUTTON));
+ setitemstring_decref(d, "COLORSET_ACTBUTTON", PyInt_FromLong(NEWT_COLORSET_ACTBUTTON));
+ setitemstring_decref(d, "COLORSET_CHECKBOX", PyInt_FromLong(NEWT_COLORSET_CHECKBOX));
+ setitemstring_decref(d, "COLORSET_ACTCHECKBOX", PyInt_FromLong(NEWT_COLORSET_ACTCHECKBOX));
+ setitemstring_decref(d, "COLORSET_ENTRY", PyInt_FromLong(NEWT_COLORSET_ENTRY));
+ setitemstring_decref(d, "COLORSET_LABEL", PyInt_FromLong(NEWT_COLORSET_LABEL));
+ setitemstring_decref(d, "COLORSET_LISTBOX", PyInt_FromLong(NEWT_COLORSET_LISTBOX));
+ setitemstring_decref(d, "COLORSET_ACTLISTBOX", PyInt_FromLong(NEWT_COLORSET_ACTLISTBOX));
+ setitemstring_decref(d, "COLORSET_TEXTBOX", PyInt_FromLong(NEWT_COLORSET_TEXTBOX));
+ setitemstring_decref(d, "COLORSET_ACTTEXTBOX", PyInt_FromLong(NEWT_COLORSET_ACTTEXTBOX));
+ setitemstring_decref(d, "COLORSET_HELPLINE", PyInt_FromLong(NEWT_COLORSET_HELPLINE));
+ setitemstring_decref(d, "COLORSET_ROOTTEXT", PyInt_FromLong(NEWT_COLORSET_ROOTTEXT));
+ setitemstring_decref(d, "COLORSET_EMPTYSCALE", PyInt_FromLong(NEWT_COLORSET_EMPTYSCALE));
+ setitemstring_decref(d, "COLORSET_FULLSCALE", PyInt_FromLong(NEWT_COLORSET_FULLSCALE));
+ setitemstring_decref(d, "COLORSET_DISENTRY", PyInt_FromLong(NEWT_COLORSET_DISENTRY));
+ setitemstring_decref(d, "COLORSET_COMPACTBUTTON", PyInt_FromLong(NEWT_COLORSET_COMPACTBUTTON));
+ setitemstring_decref(d, "COLORSET_ACTSELLISTBOX", PyInt_FromLong(NEWT_COLORSET_ACTSELLISTBOX));
+ setitemstring_decref(d, "COLORSET_SELLISTBOX", PyInt_FromLong(NEWT_COLORSET_SELLISTBOX));
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/test.c new/newt-0.52.16/test.c
--- old/newt-0.52.14/test.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/test.c 2013-08-06 17:46:42.000000000 +0200
@@ -34,7 +34,7 @@
int main(void) {
newtComponent b1, b2, r1, r2, r3, e2, e3, l1, l2, l3, scale;
- newtComponent lb, t, rsf, answer, timeLabel;
+ newtComponent lb, t, rsf, timeLabel;
newtComponent cs[10];
newtComponent f, chklist, e1;
struct callbackInfo cbis[3];
@@ -129,7 +129,6 @@
if (es.reason == NEWT_EXIT_COMPONENT && es.u.co == b2) {
newtScaleSet(scale, atoi(scaleVal));
newtRefresh();
- answer = NULL;
} else if (es.reason == NEWT_EXIT_TIMER) {
spinState++;
if (!*spinState) spinState = spinner;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/testgrid.c new/newt-0.52.16/testgrid.c
--- old/newt-0.52.14/testgrid.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/testgrid.c 2013-08-06 17:46:42.000000000 +0200
@@ -7,7 +7,7 @@
int main(void) {
newtComponent b1, b2, b3, b4;
- newtComponent answer, f, t;
+ newtComponent f, t;
newtGrid grid, subgrid;
char * flowedText;
int textWidth, textHeight, rc, i;
@@ -45,7 +45,7 @@
newtGridWrappedWindow(grid, "first window");
newtGridFree(grid, 1);
- answer = newtRunForm(f);
+ newtRunForm(f);
newtFormDestroy(f);
newtPopWindow();
@@ -79,7 +79,7 @@
f = newtForm(NULL, NULL, 0);
newtFormAddComponents(f, b1, t, b2, NULL);
- answer = newtRunForm(f);
+ newtRunForm(f);
newtPopWindow();
newtFormDestroy(f);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/testtree.c new/newt-0.52.16/testtree.c
--- old/newt-0.52.14/testtree.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/testtree.c 2013-08-06 17:46:42.000000000 +0200
@@ -10,7 +10,6 @@
newtComponent checktree;
newtComponent button;
newtComponent form;
- newtComponent answer;
const void **result, **ptr;
int numselected, i, j;
int * list;
@@ -104,7 +103,7 @@
form = newtForm(NULL, NULL, 0);
newtFormAddComponents(form, checktree, button, NULL);
- answer = newtRunForm(form);
+ newtRunForm(form);
newtFinished();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/whiptail.1 new/newt-0.52.16/whiptail.1
--- old/newt-0.52.14/whiptail.1 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/whiptail.1 2013-08-06 17:46:42.000000000 +0200
@@ -87,7 +87,7 @@
Set the default item in a menu box.
Normally the first item in the box is the default.
.TP
-.B \-\-fb
+\fB\-\-fb\fR, \fB\-\-fullbuttons\fR
Use full buttons. (By default,
.B whiptail
uses compact buttons).
@@ -117,6 +117,9 @@
the item strings. The menu widget still needs some items specified,
but checklist and radiolist expect only tag and status.
.TP
+.B \-\-notags
+Don't display tags in the menu, checklist and radiolist widgets.
+.TP
.BI \-\-separate\-output
For checklist widgets, output result one line at a time, with no
quoting. This facilitates parsing by another program.
@@ -144,6 +147,12 @@
.BI \-\-topleft
Put window in top-left corner.
.TP
+\fB\-h\fR, \fB\-\-help\fR
+Print a help message and exit.
+.TP
+\fB\-v\fR, \fB\-\-version\fR
+Print version information and exit.
+.TP
.B Box Options
.TP
.BI \-\-yesno " text height width"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/whiptail.c new/newt-0.52.16/whiptail.c
--- old/newt-0.52.14/whiptail.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/whiptail.c 2013-08-06 17:46:42.000000000 +0200
@@ -51,19 +51,22 @@
"\t--clear clear screen on exit\n"
"\t--defaultno default no button\n"
"\t--default-item <string> set default string\n"
- "\t--fb use full buttons\n"
+ "\t--fb, --fullbuttons use full buttons\n"
"\t--nocancel no cancel button\n"
"\t--yes-button <text> set text of yes button\n"
"\t--no-button <text> set text of no button\n"
"\t--ok-button <text> set text of ok button\n"
"\t--cancel-button <text> set text of cancel button\n"
- "\t--noitem display tags only\n"
+ "\t--noitem don't display items\n"
+ "\t--notags don't display tags\n"
"\t--separate-output output one line at a time\n"
"\t--output-fd <fd> output to fd, not stdout\n"
"\t--title <title> display title\n"
"\t--backtitle <backtitle> display backtitle\n"
"\t--scrolltext force vertical scrollbars\n"
- "\t--topleft put window in top-left corner\n\n"));
+ "\t--topleft put window in top-left corner\n"
+ "\t-h, --help print this message\n"
+ "\t-v, --version print version information\n\n"));
exit(err ? DLG_ERROR : 0 );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/newt-0.52.14/windows.c new/newt-0.52.16/windows.c
--- old/newt-0.52.14/windows.c 2011-11-11 12:00:15.000000000 +0100
+++ new/newt-0.52.16/windows.c 2013-08-06 17:46:42.000000000 +0200
@@ -173,7 +173,7 @@
buttons[numButtons++] = newtButton(-1, -1, buttonName);
va_end(args);
- buttonBar = newtCreateGrid(numButtons, 1);
+ buttonBar = newtCreateGrid(numButtons ? numButtons : 1, 1);
for (i = 0; i < numButtons; i++) {
newtGridSetField(buttonBar, i, 0, NEWT_GRID_COMPONENT,
buttons[i],
@@ -232,14 +232,14 @@
buttons[numButtons++] = newtButton(-1, -1, buttonName);
va_end(args);
- buttonBar = newtCreateGrid(numButtons, 1);
+ buttonBar = newtCreateGrid(numButtons ? numButtons : 1, 1);
for (i = 0; i < numButtons; i++) {
newtGridSetField(buttonBar, i, 0, NEWT_GRID_COMPONENT,
buttons[i],
i ? 1 : 0, 0, 0, 0, 0, 0);
}
- subgrid = newtCreateGrid(2, numItems);
+ subgrid = newtCreateGrid(2, numItems ? numItems : 1);
for (i = 0; i < numItems; i++) {
newtGridSetField(subgrid, 0, i, NEWT_GRID_COMPONENT,
newtLabel(-1, -1, items[i].text),
@@ -268,7 +268,8 @@
for (rc = 0; rc < numItems; rc++)
*items[rc].value = strdup(*items[rc].value);
- for (rc = 0; result != buttons[rc] && rc < numButtons; rc++);
+ for (rc = 0; rc < numButtons && result != buttons[rc]; rc++)
+ ;
if (rc == numButtons)
rc = 0; /* F12 */
else
N§²æìržyéZ)z{.±ç(húéì¹»®&Þ¢§²ë¢ž¢¶v+b¢v¥rŠjwlzf¢^ˬyÊ&+~
éi¢§²ë¢ž