RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: popt Date: 11-Dec-2007 23:02:41
Branch: HEAD Handle: 2007121122024000
Modified files:
popt CHANGES configure.ac popt.3 popt.c popt.h
popt.spec poptint.h
Log:
- jbj: add a %track section (as in rpm-5.0) to popt.spec.
- jbj: chg poptGetOptArg() to "char *", document application needs to free.
Summary:
Revision Changes Path
1.31 +5 -0 popt/CHANGES
1.34 +1 -1 popt/configure.ac
1.17 +2 -1 popt/popt.3
1.106 +5 -5 popt/popt.c
1.62 +1 -1 popt/popt.h
1.39 +8 -1 popt/popt.spec
1.27 +1 -1 popt/poptint.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: popt/CHANGES
============================================================================
$ cvs diff -u -r1.30 -r1.31 CHANGES
--- popt/CHANGES 14 Nov 2007 20:23:04 -0000 1.30
+++ popt/CHANGES 11 Dec 2007 22:02:40 -0000 1.31
@@ -1,4 +1,9 @@
+1.13 -> 1.14:
+
1.12 -> 1.13:
+ - release popt-1.13.
+ - jbj: add a %track section (as in rpm-5.0) to popt.spec.
+ - jbj: chg poptGetOptArg() to "char *", document application needs to free.
- jbj: re-add it.po (from Sandro Bonazzola <sandro.bonazzola@gmail.com>).
- jbj: rescuscitate the splint annotations.
- jbj: change sizeof to use the type implicitly, rather than explicitly.
@@ .
patch -p0 <<'@@ .'
Index: popt/configure.ac
============================================================================
$ cvs diff -u -r1.33 -r1.34 configure.ac
--- popt/configure.ac 14 Nov 2007 20:23:04 -0000 1.33
+++ popt/configure.ac 11 Dec 2007 22:02:40 -0000 1.34
@@ -1,5 +1,5 @@
AC_PREREQ(2.57)
-AC_INIT(popt, 1.12, popt-devel@rpm5.org)
+AC_INIT(popt, 1.13, popt-devel@rpm5.org)
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([popt.h])
AC_CONFIG_HEADERS([config.h])
@@ .
patch -p0 <<'@@ .'
Index: popt/popt.3
============================================================================
$ cvs diff -u -r1.16 -r1.17 popt.3
--- popt/popt.3 15 Sep 2001 13:49:37 -0000 1.16
+++ popt/popt.3 11 Dec 2007 22:02:40 -0000 1.17
@@ -362,11 +362,12 @@
.sp
.nf
.B #include <popt.h>
-.BI "const char * poptGetOptArg(poptContext " con ");"
+.BI "char * poptGetOptArg(poptContext " con ");"
.fi
.sp
This function returns the argument given for the final option returned by
.BR poptGetNextOpt() ", or it returns " NULL " if no argument was specified."
+The calling function is responsible for deallocating this string.
.sp
.SS "4. LEFTOVER ARGUMENTS"
Many applications take an arbitrary number of command-line arguments,
@@ .
patch -p0 <<'@@ .'
Index: popt/popt.c
============================================================================
$ cvs diff -u -r1.105 -r1.106 popt.c
--- popt/popt.c 4 Nov 2007 15:57:20 -0000 1.105
+++ popt/popt.c 11 Dec 2007 22:02:40 -0000 1.106
@@ -869,10 +869,10 @@
con->os->nextArg = _free(con->os->nextArg);
if (longArg) {
longArg = expandNextArg(con, longArg);
- con->os->nextArg = longArg;
+ con->os->nextArg = (char *) longArg;
} else if (con->os->nextCharArg) {
longArg = expandNextArg(con, con->os->nextCharArg);
- con->os->nextArg = longArg;
+ con->os->nextArg = (char *) longArg;
con->os->nextCharArg = NULL;
} else {
while (con->os->next == con->os->argc &&
@@ -903,7 +903,7 @@
/* XXX watchout: subtle side-effects live here. */
longArg = con->os->argv[con->os->next++];
longArg = expandNextArg(con, longArg);
- con->os->nextArg = longArg;
+ con->os->nextArg = (char *) longArg;
}
}
}
@@ -1025,9 +1025,9 @@
return (opt ? opt->val : -1); /* XXX can't happen */
}
-const char * poptGetOptArg(poptContext con)
+char * poptGetOptArg(poptContext con)
{
- const char * ret = NULL;
+ char * ret = NULL;
if (con) {
ret = con->os->nextArg;
con->os->nextArg = NULL;
@@ .
patch -p0 <<'@@ .'
Index: popt/popt.h
============================================================================
$ cvs diff -u -r1.61 -r1.62 popt.h
--- popt/popt.h 4 Nov 2007 15:57:20 -0000 1.61
+++ popt/popt.h 11 Dec 2007 22:02:40 -0000 1.62
@@ -271,7 +271,7 @@
* @return option argument, NULL if no argument is available
*/
/*@observer@*/ /*@null@*/ /*@unused@*/
-const char * poptGetOptArg(/*@null@*/poptContext con)
+char * poptGetOptArg(/*@null@*/poptContext con)
/*@modifies con @*/;
/** \ingroup popt
@@ .
patch -p0 <<'@@ .'
Index: popt/popt.spec
============================================================================
$ cvs diff -u -r1.38 -r1.39 popt.spec
--- popt/popt.spec 13 Jul 2007 12:45:24 -0000 1.38
+++ popt/popt.spec 11 Dec 2007 22:02:40 -0000 1.39
@@ -1,6 +1,6 @@
Summary: A C library for parsing command line parameters.
Name: popt
-Version: 1.12
+Version: 1.13
Release: 1
License: X Consortium
Group: System Environment/Libraries
@@ -30,6 +30,13 @@
make DESTDIR=$RPM_BUILD_ROOT install
%find_lang popt
+%track
+prog popt = {
+ version = %{version}
+ url = http://rpm5.org/%{name}
+ regex = %{name}-(\d+\.\d+\.\d+)\.tar\.gz
+}
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ .
patch -p0 <<'@@ .'
Index: popt/poptint.h
============================================================================
$ cvs diff -u -r1.26 -r1.27 poptint.h
--- popt/poptint.h 4 Nov 2007 15:57:20 -0000 1.26
+++ popt/poptint.h 11 Dec 2007 22:02:40 -0000 1.27
@@ -50,7 +50,7 @@
pbm_set * argb;
int next;
/*@only@*/ /*@null@*/
- const char * nextArg;
+ char * nextArg;
/*@observer@*/ /*@null@*/
const char * nextCharArg;
/*@dependent@*/ /*@null@*/
@@ .
Received on Tue Dec 11 23:02:41 2007