[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 16-Aug-2013 21:40:27 Branch: rpm-5_4 Handle: 2013081619402700 Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Log: - ignore built rpmgenbasedir. Summary: RevisionChanges Path 1.41.2.6+1 -0 rpm/rpmio/.cvsignore patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.5 -r1.41.2.6 .cvsignore --- rpm/rpmio/.cvsignore 4 Aug 2013 21:48:41 - 1.41.2.5 +++ rpm/rpmio/.cvsignore 16 Aug 2013 19:40:27 - 1.41.2.6 @@ -24,6 +24,7 @@ rpmcurl rpmdigest rpmdpkg +rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 16-Feb-2015 22:43:44 Branch: rpm-5_4 Handle: 2015021621434400 Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Log: - ignore cruft. Summary: RevisionChanges Path 1.41.2.10 +1 -0 rpm/rpmio/.cvsignore patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.9 -r1.41.2.10 .cvsignore --- rpm/rpmio/.cvsignore 17 Nov 2013 02:11:35 - 1.41.2.9 +++ rpm/rpmio/.cvsignore 16 Feb 2015 21:43:44 - 1.41.2.10 @@ -47,6 +47,7 @@ tdir tfts tget +tgfs tgit tglob thkp @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 07-May-2016 17:29:32 Branch: rpm-5_4 Handle: 2016050715293200 Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Log: - ignore cruft. Summary: RevisionChanges Path 1.41.2.15 +1 -0 rpm/rpmio/.cvsignore patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.14 -r1.41.2.15 .cvsignore --- rpm/rpmio/.cvsignore 17 May 2015 03:59:36 - 1.41.2.14 +++ rpm/rpmio/.cvsignore 7 May 2016 15:29:32 - 1.41.2.15 @@ -77,3 +77,4 @@ ttcl ttpm twitter +y.tab.h @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 20-May-2017 21:25:27 Branch: rpm-5_4 Handle: 2017052019252700 Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Log: - ignore cruft. Summary: RevisionChanges Path 1.41.2.17 +6 -0 rpm/rpmio/.cvsignore patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.16 -r1.41.2.17 .cvsignore --- rpm/rpmio/.cvsignore 17 Apr 2017 18:21:53 - 1.41.2.16 +++ rpm/rpmio/.cvsignore 20 May 2017 19:25:27 - 1.41.2.17 @@ -46,6 +46,9 @@ tblake2bp tblake2s tblake2sp +tcap +tcpuid +tder tdigest tdir tfts @@ -61,6 +64,8 @@ tmagic tmicrojson tmire +tmq +tmqtt todbc toid tperl @@ -76,6 +81,7 @@ tsw ttcl ttpm +turg twitter y.tab.h cppcheck.out @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore Makefile.am set.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Mar-2012 18:55:11 Branch: rpm-5_4 Handle: 2012032516551100 Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Makefile.am set.c Log: - set: achieve SELF_TEST compilation. Summary: RevisionChanges Path 1.41.2.3+1 -0 rpm/rpmio/.cvsignore 1.293.2.12 +5 -1 rpm/rpmio/Makefile.am 1.1.2.2 +15 -22 rpm/rpmio/set.c patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.2 -r1.41.2.3 .cvsignore --- rpm/rpmio/.cvsignore 17 Mar 2012 19:25:03 - 1.41.2.2 +++ rpm/rpmio/.cvsignore 25 Mar 2012 16:55:11 - 1.41.2.3 @@ -54,6 +54,7 @@ tring trpmio truby +tset tsexp tsvn tsw @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.11 -r1.293.2.12 Makefile.am --- rpm/rpmio/Makefile.am 25 Mar 2012 16:37:24 - 1.293.2.11 +++ rpm/rpmio/Makefile.am 25 Mar 2012 16:55:11 - 1.293.2.12 @@ -20,7 +20,7 @@ rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \ rpmpbzip2 rpmpigz rpmtar rpmz \ tasn tdir tfts tget tglob thkp thtml tinv tkey tmacro tmagic \ - tmire todbc tperl tpython tput tpw trpmio tsexp tsvn tsw ttcl \ + tmire todbc tperl tpython tput tpw trpmio tset tsexp tsvn tsw ttcl \ dumpasn1 lookup3 noinst_PROGRAMS = @@ -393,6 +393,10 @@ trpmio_SOURCES = trpmio.c trpmio_LDADD = $(RPMIO_LDADD_COMMON) +tset_SOURCES = set.c +tset_CFLAGS = $(CFLAGS) -DSELF_TEST -Wmissing-field-initializers +tset_LDFLAGS = $(RPMIO_LDADD_COMMON) + tsexp_SOURCES = tsexp.c tsexp_LDFLAGS = $(RPMIO_LDADD_COMMON) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/set.c $ cvs diff -u -r1.1.2.1 -r1.1.2.2 set.c --- rpm/rpmio/set.c 25 Mar 2012 16:37:24 - 1.1.2.1 +++ rpm/rpmio/set.c 25 Mar 2012 16:55:11 - 1.1.2.2 @@ -6,14 +6,13 @@ * License: GPLv2+ or LGPL, see RPM COPYING */ -#ifdef SELF_TEST -#undef NDEBUG -#include -#endif +#include "system.h" + +#include +#define _SET_INTERNAL +#include "set.h" -#include -#include -#include +#include "debug.h" /* * Base62 routines - encode bits with alnum characters. @@ -187,7 +186,7 @@ #ifdef SELF_TEST static -void test_base62() +void test_base62(void) { const char rnd_bitv[] = { 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, @@ -352,7 +351,7 @@ #ifdef SELF_TEST static -void test_golomb() +void test_golomb(void) { const unsigned rnd_v[] = { // do re mi fa sol la si @@ -417,7 +416,6 @@ }; // Combine two characters into array index (with respect to endianness). -#include #if BYTE_ORDER && BYTE_ORDER == LITTLE_ENDIAN #define CCI(c1, c2) ((c1) | ((c2) << 8)) #elif BYTE_ORDER && BYTE_ORDER == BIG_ENDIAN @@ -707,7 +705,7 @@ #ifdef SELF_TEST static -void test_word_table() +void test_word_table(void) { int i, j; for (i = 0; i < 256; i++) @@ -724,7 +722,7 @@ } static -void test_base62_golomb() +void test_base62_golomb(void) { const char str[] = "set:hdf7q2P5VZwtLGr9TKxhrEM1"; const char *base62 = str + 4 + 2; @@ -776,7 +774,7 @@ #ifdef SELF_TEST static -void test_delta() +void test_delta(void) { unsigned v[] = { 1, 3, 7, 0 @@ -1042,7 +1040,7 @@ #ifdef SELF_TEST static -void test_set() +void test_set(void) { unsigned rnd_v[] = { 0x020a, 0x07e5, 0x3305, 0x35f5, @@ -1086,8 +1084,6 @@ * API routines start here. */ -#include "set.h" - // main API routine int rpmsetcmp(const char *str1, const char *str2) { @@ -1231,9 +1227,6 @@ * Simple API for creating set-versions. */ -#include "system.h" -#include "rpmlib.h" - // Internally, "struct set" is just a bag of strings and their hash values. struct set { int c; @@ -1243,7 +1236,7 @@ } *sv; }; -struct set *set_new() +struct set *set_new(void) { struct set *set = xmalloc(sizeof *set); set->c = 0; @@ -1346,7 +1339,7 @@ #ifdef SELF_TEST static -void test_api() +void test_api(void) { struct set *set1 = set_new();
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore Makefile.am toid.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 04-Aug-2013 23:48:41 Branch: rpm-5_4 Handle: 2013080421484100 Added files: (Branch: rpm-5_4) rpm/rpmio toid.c Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Makefile.am Log: - rpmio: scrub out some bit rot. Summary: RevisionChanges Path 1.41.2.5+1 -0 rpm/rpmio/.cvsignore 1.293.2.20 +16 -9 rpm/rpmio/Makefile.am 1.1.2.1 +298 -0 rpm/rpmio/toid.c patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.4 -r1.41.2.5 .cvsignore --- rpm/rpmio/.cvsignore 4 Jul 2013 00:17:40 - 1.41.2.4 +++ rpm/rpmio/.cvsignore 4 Aug 2013 21:48:41 - 1.41.2.5 @@ -48,6 +48,7 @@ tmagic tmire todbc +toid tperl tput tpw @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.19 -r1.293.2.20 Makefile.am --- rpm/rpmio/Makefile.am 8 Jul 2013 04:43:02 - 1.293.2.19 +++ rpm/rpmio/Makefile.am 4 Aug 2013 21:48:41 - 1.293.2.20 @@ -15,14 +15,18 @@ tmire.c todbc.c tput.c trpmio.c tsexp.c tsvn.c tsw.c lookup3.c tpw.c \ librpmio.vers testit.sh -EXTRA_PROGRAMS = bsdiff bspatch rpmborg rpmcpio rpmcurl rpmdpkg \ +EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz +EXTRA_PROGRAMS += thtml tinv tkey tmacro tpw +noinst_PROGRAMS = + +EXTRA_PROGRAMS += bsdiff bspatch rpmborg rpmcurl \ rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \ - rpmpbzip2 rpmpigz rpmtar rpmz \ - tasn tdir tfts tget tglob thkp thtml tinv tkey tmacro tmagic \ - tmire todbc tperl tpython tput tpw trpmio tsexp tsvn tsw ttcl \ + rpmpbzip2 rpmpigz \ + tasn tdir tfts tget tglob thkp tmagic \ + tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \ dumpasn1 lookup3 -noinst_PROGRAMS = tset +noinst_PROGRAMS += tset if WITH_LIBGIT2 noinst_PROGRAMS += tgit else @@ -448,6 +452,9 @@ todbc_SOURCES = todbc.c todbc_LDADD = $(RPMIO_LDADD_COMMON) +toid_SOURCES = toid.c +toid_LDADD = $(RPMIO_LDADD_COMMON) + tperl_SOURCES = tperl.c tperl_LDADD = $(RPMIO_LDADD_COMMON) @@ -458,7 +465,7 @@ tput_LDADD = $(RPMIO_LDADD_COMMON) tpw_SOURCES = tpw.c -tpw_LDFLAGS = $(RPM_LDADD_COMMON) $(RPMIO_LDADD_COMMON) +tpw_LDADD = $(RPM_LDADD_COMMON) $(RPMIO_LDADD_COMMON) trpmio_SOURCES = trpmio.c trpmio_LDADD = $(RPMIO_LDADD_COMMON) @@ -469,13 +476,13 @@ $(COMPILE) -DSELF_TEST --std=c99 -o $@ -c $< tsexp_SOURCES = tsexp.c -tsexp_LDFLAGS = $(RPMIO_LDADD_COMMON) +tsexp_LDADD = $(RPMIO_LDADD_COMMON) tsvn_SOURCES = tsvn.c tsvn_LDADD = $(RPMIO_LDADD_COMMON) tsw_SOURCES = tsw.c -tsw_LDFLAGS = $(RPMIO_LDADD_COMMON) +tsw_LDADD = $(RPMIO_LDADD_COMMON) ttcl_SOURCES = ttcl.c ttcl_LDADD = $(RPMIO_LDADD_COMMON) -ltcl @@ -486,7 +493,7 @@ endif dumpasn1_SOURCES = dumpasn1.c -dumpasn1_LDFLAGS = $(RPMIO_LDADD_COMMON) +dumpasn1_LDADD = $(RPMIO_LDADD_COMMON) lookup3_SOURCES = lookup3.c lookup3_CFLAGS = $(CFLAGS) -D_JLU3_SELFTEST @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/toid.c $ cvs diff -u -r0 -r1.1.2.1 toid.c --- /dev/null 2013-08-04 23:46:14.0 +0200 +++ toid.c2013-08-04 23:48:41.760332338 +0200 @@ -0,0 +1,298 @@ +#include "system.h" + +#include +#define _RPMGC_INTERNAL +#include + +#include "debug.h" + +/* Helper for openpgp_oid_from_str. */ +static size_t +make_flagged_int(unsigned long value, unsigned char * b, size_t nb) +{ +int more = 0; +int shift; + +/* fixme: figure out the number of bits in an ulong and start with + that value as shift (after making it a multiple of 7) a more + straigtforward implementation is to do it in reverse order using + a temporary buffer - saves a lot of compares */ +for (more = 0, shift = 28; shift > 0; shift -= 7) { + if (more || value >= (1UL << shift)) { + b[nb++] = 0x80 | (value >> shift); + value -= (value >> shift) << shift; + more = 1; + } +} +b[nb++] = value; +return nb; +} + +/* + * Convert the OID given in dotted decimal form in STRING to an DER + * encoding and store it
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore Makefile.am bdes.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 17-Nov-2013 03:11:37 Branch: rpm-5_4 Handle: 2013111702113500 Added files: (Branch: rpm-5_4) rpm/rpmio bdes.c Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Makefile.am Log: - swipe a copy of FreeBSD for development. Summary: RevisionChanges Path 1.41.2.9+1 -0 rpm/rpmio/.cvsignore 1.293.2.28 +4 -1 rpm/rpmio/Makefile.am 1.1.2.1 +992 -0 rpm/rpmio/bdes.c patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.8 -r1.41.2.9 .cvsignore --- rpm/rpmio/.cvsignore 1 Nov 2013 14:51:29 - 1.41.2.8 +++ rpm/rpmio/.cvsignore 17 Nov 2013 02:11:35 - 1.41.2.9 @@ -13,6 +13,7 @@ *.log *.trs b2sum +bdes dumpasn1 gengpg.h getdate.c @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.27 -r1.293.2.28 Makefile.am --- rpm/rpmio/Makefile.am 16 Nov 2013 18:45:55 - 1.293.2.27 +++ rpm/rpmio/Makefile.am 17 Nov 2013 02:11:35 - 1.293.2.28 @@ -16,7 +16,7 @@ librpmio.vers testit.sh EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz -EXTRA_PROGRAMS += thtml tinv tkey tmacro tpw +EXTRA_PROGRAMS += bdes thtml tinv tkey tmacro tpw noinst_PROGRAMS = EXTRA_PROGRAMS += bsdiff bspatch rpmborg rpmcurl \ @@ -372,6 +372,9 @@ b2sum_SOURCES = b2sum.c b2sum_LDADD = $(RPMIO_LDADD_COMMON) +bdes_SOURCES = bdes.c +bdes_LDADD = $(RPMIO_LDADD_COMMON) + bsdiff_SOURCES = bsdiff.c bsdiff_LDADD = $(RPMIO_LDADD_COMMON) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/bdes.c $ cvs diff -u -r0 -r1.1.2.1 bdes.c --- /dev/null 2013-11-17 03:11:01.0 +0100 +++ bdes.c2013-11-17 03:11:37.604161636 +0100 @@ -0,0 +1,992 @@ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Matt Bishop of Dartmouth College. + * + * The United States Government has rights in this work pursuant + * to contract no. NAG 2-680 between the National Aeronautics and + * Space Administration and Dartmouth College. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + *must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + *may be used to endorse or promote products derived from this software + *without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * BDES -- DES encryption package for Berkeley Software Distribution 4.4 + * options: + * -a key is in ASCII + * -b use ECB (electronic code book) mode + * -d invert (decrypt) input + * -f buse b-bit CFB (cipher feedback
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore Makefile.am jsmn.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 17-May-2015 01:31:18 Branch: rpm-5_4 Handle: 2015051623311701 Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Makefile.am jsmn.c Log: - resurrect the github testcase. Summary: RevisionChanges Path 1.41.2.12 +3 -0 rpm/rpmio/.cvsignore 1.293.2.53 +10 -2 rpm/rpmio/Makefile.am 1.1.2.2 +28 -2 rpm/rpmio/jsmn.c patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.11 -r1.41.2.12 .cvsignore --- rpm/rpmio/.cvsignore 1 May 2015 20:14:40 - 1.41.2.11 +++ rpm/rpmio/.cvsignore 16 May 2015 23:31:17 - 1.41.2.12 @@ -18,6 +18,7 @@ dumpasn1 gengpg.h getdate.c +github lcov lookup3 bsdiff @@ -53,6 +54,7 @@ tglob thkp tinv +tjsmn tkey tmacro tmagic @@ -72,3 +74,4 @@ tsw ttcl ttpm +twitter @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.52 -r1.293.2.53 Makefile.am --- rpm/rpmio/Makefile.am 16 May 2015 20:56:25 - 1.293.2.52 +++ rpm/rpmio/Makefile.am 16 May 2015 23:31:18 - 1.293.2.53 @@ -15,7 +15,7 @@ rpmjsio.msg rpmtar.c rpmtar.h \ tdir.c tfts.c tget.c tgfs.c tgit.c tglob.c thkp.c thtml.c tinv.c tkey.c \ tmire.c todbc.c tput.c tpython.c trpmio.c tsexp.c tsvn.c tsw.c \ - lookup3.c jsmn.c tjsmn.c yajl.c testit.sh mongoc-counters.defs + lookup3.c jsmn.c tjsmn.c tjson.c yajl.c testit.sh mongoc-counters.defs EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz EXTRA_PROGRAMS += bdes thtml tinv tkey tmacro tpw @@ -26,7 +26,7 @@ rpmpbzip2 rpmpigz \ tasn tbf tder tdir tfts tget tglob thkp tmagic \ tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \ - dumpasn1 lookup3 trel + dumpasn1 lookup3 trel twitter github noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs if WITH_LIBGIT2 @@ -614,3 +614,11 @@ tjsmn_SOURCES = tjsmn.c tjsmn_LDADD = $(RPMIO_LDADD_COMMON) +github_SOURCES = tjson.c +github_CFLAGS= -Wall -Werror -std=gnu99 -O2 -DJSMN_GITHUB +github_LDADD = -lcurl + +twitter_SOURCES = tjson.c +twitter_CFLAGS = -Wall -Werror -std=gnu99 -O2 -DJSMN_TWITTER +twitter_LDADD = -lcurl + @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/jsmn.c $ cvs diff -u -r1.1.2.1 -r1.1.2.2 jsmn.c --- rpm/rpmio/jsmn.c 16 May 2015 20:56:25 - 1.1.2.1 +++ rpm/rpmio/jsmn.c 16 May 2015 23:31:18 - 1.1.2.2 @@ -1,5 +1,27 @@ #define JSMN_PARENT_LINKS 1 /*==*/ +/* + * Copyright (c) 2010 Serge A. Zaitsev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +/*==*/ /* --- jsmn.h */ #ifdef __cplusplus @@ -71,9 +93,13 @@ } #endif -/*==*//* --- jsmn.c *//** +/*==*/ +/* --- jsmn.c */ + +/** * Allocates a fresh unused token from the token pull. - */ static jsmntok_t *jsmn_alloc_token(jsmn_parser * parser, +
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore Makefile.am microjson.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 17-May-2015 01:55:30 Branch: rpm-5_4 Handle: 2015051623552900 Added files: (Branch: rpm-5_4) rpm/rpmio microjson.c Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Makefile.am Log: - microjson: add microjson-1.3. Summary: RevisionChanges Path 1.41.2.13 +1 -0 rpm/rpmio/.cvsignore 1.293.2.54 +9 -4 rpm/rpmio/Makefile.am 1.1.2.1 +1743 -0rpm/rpmio/microjson.c patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.12 -r1.41.2.13 .cvsignore --- rpm/rpmio/.cvsignore 16 May 2015 23:31:17 - 1.41.2.12 +++ rpm/rpmio/.cvsignore 16 May 2015 23:55:29 - 1.41.2.13 @@ -58,6 +58,7 @@ tkey tmacro tmagic +tmicrojson.c tmire todbc toid @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.53 -r1.293.2.54 Makefile.am --- rpm/rpmio/Makefile.am 16 May 2015 23:31:18 - 1.293.2.53 +++ rpm/rpmio/Makefile.am 16 May 2015 23:55:29 - 1.293.2.54 @@ -15,7 +15,8 @@ rpmjsio.msg rpmtar.c rpmtar.h \ tdir.c tfts.c tget.c tgfs.c tgit.c tglob.c thkp.c thtml.c tinv.c tkey.c \ tmire.c todbc.c tput.c tpython.c trpmio.c tsexp.c tsvn.c tsw.c \ - lookup3.c jsmn.c tjsmn.c tjson.c yajl.c testit.sh mongoc-counters.defs + lookup3.c jsmn.c tjsmn.c tjson.c yajl.c testit.sh \ + microjson.c mongoc-counters.defs EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz EXTRA_PROGRAMS += bdes thtml tinv tkey tmacro tpw @@ -26,7 +27,7 @@ rpmpbzip2 rpmpigz \ tasn tbf tder tdir tfts tget tglob thkp tmagic \ tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \ - dumpasn1 lookup3 trel twitter github + dumpasn1 lookup3 trel twitter github tmicrojson noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs if WITH_LIBGIT2 @@ -615,10 +616,14 @@ tjsmn_LDADD = $(RPMIO_LDADD_COMMON) github_SOURCES = tjson.c -github_CFLAGS= -Wall -Werror -std=gnu99 -O2 -DJSMN_GITHUB +github_CFLAGS = -Wall -Werror -std=gnu99 -O2 -DJSMN_GITHUB github_LDADD = -lcurl twitter_SOURCES = tjson.c -twitter_CFLAGS = -Wall -Werror -std=gnu99 -O2 -DJSMN_TWITTER +twitter_CFLAGS = -Wall -Werror -std=gnu99 -O2 -DJSMN_TWITTER twitter_LDADD = -lcurl +tmicrojson_SOURCES = microjson.c +tmicrojson_CFLAGS = $(CFLAGS) -DMICROJSON_TEST +tmicrojson_LDADD = $(RPMIO_LDADD_COMMON) + @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/microjson.c $ cvs diff -u -r0 -r1.1.2.1 microjson.c --- /dev/null 2015-05-17 01:55:00.0 +0200 +++ microjson.c 2015-05-17 01:55:29.998104181 +0200 @@ -0,0 +1,1743 @@ +#include "system.h" + +#include +#include +#include +#include +#include + +#include + +#include "debug.h" + +#define MICROJSON_DEBUG_ENABLE 1 +#define MICROJSON_TIME_ENABLE 1 +/*==*/ +/* + * This file is Copyright (c) 2014 by Eric S. Raymond. + * BSD terms apply: see the file COPYING in the distribution root for details. + */ +/*==*/ +/* --- mjson.h */ +/* Structures for JSON parsing using only fixed-extent memory */ + +#define NITEMS(x) (int)(sizeof(x)/sizeof(x[0])) + +typedef enum {t_integer, t_uinteger, t_real, + t_string, t_boolean, t_character, + t_time, + t_object, t_structobject, t_array, + t_check, t_ignore} +json_type; + +struct json_enum_t { +char *name; +int value; +}; + +struct json_array_t { +json_type element_type; +union { + struct { + const struct json_attr_t *subtype; + char *base; + size_t stride; + } objects; + struct { + char **ptrs; + char *store; + int storelen; + } strings; + struct { + int *store; + } integers; + struct { + unsigned int *store; + } uintegers; + struct { + double *store; + } reals; + struct { + bool *store; + } booleans; +
[CVS] RPM: rpm-5_4: rpm/rpmio/ .cvsignore Makefile.am librpmio.vers rp...
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 17-Mar-2012 20:25:03 Branch: rpm-5_4 Handle: 2012031719250300 Added files: (Branch: rpm-5_4) rpm/rpmio todbc.c Modified files: (Branch: rpm-5_4) rpm/rpmio .cvsignore Makefile.am librpmio.vers rpmodbc.c rpmodbc.h Log: - rpmodbc: WIP. Summary: RevisionChanges Path 1.41.2.2+1 -0 rpm/rpmio/.cvsignore 1.293.2.9 +4 -1 rpm/rpmio/Makefile.am 2.199.2.7 +11 -0 rpm/rpmio/librpmio.vers 1.1.2.2 +282 -1 rpm/rpmio/rpmodbc.c 1.1.2.2 +50 -1 rpm/rpmio/rpmodbc.h 1.1.2.1 +68 -0 rpm/rpmio/todbc.c patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore $ cvs diff -u -r1.41.2.1 -r1.41.2.2 .cvsignore --- rpm/rpmio/.cvsignore 29 Feb 2012 04:22:27 - 1.41.2.1 +++ rpm/rpmio/.cvsignore 17 Mar 2012 19:25:03 - 1.41.2.2 @@ -46,6 +46,7 @@ tmacro tmagic tmire +todbc tperl tput tpw @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/Makefile.am $ cvs diff -u -r1.293.2.8 -r1.293.2.9 Makefile.am --- rpm/rpmio/Makefile.am 17 Mar 2012 15:53:15 - 1.293.2.8 +++ rpm/rpmio/Makefile.am 17 Mar 2012 19:25:03 - 1.293.2.9 @@ -19,7 +19,7 @@ rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \ rpmpbzip2 rpmpigz rpmtar rpmz \ tasn tdir tfts tget tglob thkp thtml tinv tkey tmacro tmagic \ - tmire tperl tpython tput tpw trpmio tsexp tsvn tsw ttcl \ + tmire todbc tperl tpython tput tpw trpmio tsexp tsvn tsw ttcl \ dumpasn1 lookup3 noinst_PROGRAMS = @@ -369,6 +369,9 @@ tmire_SOURCES = tmire.c tmire_LDADD = $(RPMIO_LDADD_COMMON) +todbc_SOURCES = todbc.c +todbc_LDADD = $(RPMIO_LDADD_COMMON) + tperl_SOURCES = tperl.c tperl_LDADD = $(RPMIO_LDADD_COMMON) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/librpmio.vers $ cvs diff -u -r2.199.2.6 -r2.199.2.7 librpmio.vers --- rpm/rpmio/librpmio.vers 9 Mar 2012 15:51:57 - 2.199.2.6 +++ rpm/rpmio/librpmio.vers 17 Mar 2012 19:25:03 - 2.199.2.7 @@ -553,6 +553,17 @@ rpmnixNew; _rpmnss_init; rpmnssImplVecs; +_rpmodbc_debug; +rpmodbcColumns; +rpmodbcConnect; +rpmodbcDisconnect; +rpmodbcFetch; +rpmodbcListDataSources; +rpmodbcListDrivers; +rpmodbcNCols; +rpmodbcNew; +rpmodbcPrepare; +rpmodbcTables; _rpmperl_debug; rpmperlNew; rpmperlRun; @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmodbc.c $ cvs diff -u -r1.1.2.1 -r1.1.2.2 rpmodbc.c --- rpm/rpmio/rpmodbc.c 17 Mar 2012 15:53:15 - 1.1.2.1 +++ rpm/rpmio/rpmodbc.c 17 Mar 2012 19:25:03 - 1.1.2.2 @@ -4,10 +4,15 @@ #include "system.h" +#if defined(HAVE_SQLEXT_H) +#include +#endif + #include #include/* for *Pool methods */ #include #include + #define _RPMODBC_INTERNAL #include @@ -16,12 +21,282 @@ /*@unchecked@*/ int _rpmodbc_debug = -1; +#define SPEW(_t, _rc, _odbc)\ + { if ((_t) || _rpmodbc_debug ) \ + fprintf(stderr, "<-- %s(%p) rc %d\n", __FUNCTION__, (_odbc), \ + (_rc)); \ + } + +/*==*/ + +int rpmodbcConnect(rpmodbc odbc, + const char * db, const char * u, const char * pw) +{ +int rc = -1; + +fprintf(stderr, "--> %s(%p,%s,%s,%s)\n", __FUNCTION__, odbc, db, u, pw); +odbc->db = xstrdup(db); +odbc->u = xstrdup(u); +odbc->pw = xstrdup(pw); + +#if defined(WITH_UNIXODBC) +assert(odbc->env); +if (odbc->dbc == NULL) { + SQLAllocHandle(SQL_HANDLE_DBC, odbc->env, &odbc->dbc); +assert(odbc->dbc); +} + +rc = SQLConnect(odbc->dbc, + (SQLCHAR *) db, SQL_NTS, + (SQLCHAR *) u, SQL_NTS, + (SQLCHAR *) pw, SQL_NTS); +#endif + +SPEW(0, rc, odbc); +return rc; +} + +int rpmodbcDisconnect(rpmodbc odbc) +{ +int rc = 0; + +#if defined(WITH_UNIXODBC) +assert(odbc->env); +assert(odbc->dbc); +SQLDisconnect(odbc->dbc); +SQLFreeHand