dbindex.h   dbindex.h 
skipping to change at line 22 skipping to change at line 22
#endif #endif
/* this will break if sizeof(int) != 4 */ /* this will break if sizeof(int) != 4 */
typedef /*@abstract@*/ struct { typedef /*@abstract@*/ struct {
unsigned int recOffset; unsigned int recOffset;
unsigned int fileNumber; unsigned int fileNumber;
} dbiIndexRecord; } dbiIndexRecord;
typedef /*@abstract@*/ struct { typedef /*@abstract@*/ struct {
dbiIndexRecord * recs; /*@only@*/ dbiIndexRecord * recs;
int count; int count;
} dbiIndexSet; } dbiIndexSet;
typedef /*@abstract@*/ struct { typedef /*@abstract@*/ struct {
DB * db; DB * db;
const char * indexname; const char * indexname;
} dbiIndex; } dbiIndex;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 header.h   header.h 
skipping to change at line 56 skipping to change at line 56
enum headerSprintfExtenstionType { HEADER_EXT_LAST = 0, HEADER_EXT_FORMAT, enum headerSprintfExtenstionType { HEADER_EXT_LAST = 0, HEADER_EXT_FORMAT,
HEADER_EXT_MORE, HEADER_EXT_TAG }; HEADER_EXT_MORE, HEADER_EXT_TAG };
/* This will only ever be passed RPM_TYPE_INT32 or RPM_TYPE_STRING to /* This will only ever be passed RPM_TYPE_INT32 or RPM_TYPE_STRING to
help keep things simple */ help keep things simple */
typedef char * (*headerTagFormatFunction)(int_32 type, const void * data, typedef char * (*headerTagFormatFunction)(int_32 type, const void * data,
char * formatPrefix, char * formatPrefix,
int padding, int element); int padding, int element);
/* This is allowed to fail, which indicates the tag doesn't exist */ /* This is allowed to fail, which indicates the tag doesn't exist */
typedef int (*headerTagTagFunction)(Header h, int_32 * type, void ** data, typedef int (*headerTagTagFunction)(Header h, int_32 * type, const void ** data,
int_32 * count, int * freeData); int_32 * count, int * freeData);
struct headerSprintfExtension { struct headerSprintfExtension {
enum headerSprintfExtenstionType type; enum headerSprintfExtenstionType type;
char * name; char * name;
union { union {
void * generic; void * generic;
headerTagFormatFunction formatFunction; headerTagFormatFunction formatFunction;
headerTagTagFunction tagFunction; headerTagTagFunction tagFunction;
struct headerSprintfExtension * more; struct headerSprintfExtension * more;
skipping to change at line 127 skipping to change at line 127
as a version. as a version.
2) If the tag occurs multiple times in entry, which tag is affected 2) If the tag occurs multiple times in entry, which tag is affected
by the operation is undefined. by the operation is undefined.
2) If the tag is in the header w/ this language, the entry is 2) If the tag is in the header w/ this language, the entry is
*replaced* (like headerModifyEntry()). *replaced* (like headerModifyEntry()).
This function is intended to just "do the right thing". If you need This function is intended to just "do the right thing". If you need
more fine grained control use headerAddEntry() and headerModifyEntry() more fine grained control use headerAddEntry() and headerModifyEntry()
but be careful! but be careful!
*/ */
int headerAddI18NString(Header h, int_32 tag, char * string, char * lang); int headerAddI18NString(Header h, int_32 tag, const char * string,
const char * lang);
/* Appends item p to entry w/ tag and type as passed. Won't work on /* Appends item p to entry w/ tag and type as passed. Won't work on
RPM_STRING_TYPE. Any pointers from headerGetEntry() for this entry RPM_STRING_TYPE. Any pointers from headerGetEntry() for this entry
are invalid after this call has been made! */ are invalid after this call has been made! */
int headerAppendEntry(Header h, int_32 tag, int_32 type, void * p, int_32 c ); int headerAppendEntry(Header h, int_32 tag, int_32 type, void * p, int_32 c );
int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type, int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type,
void * p, int_32 c); void * p, int_32 c);
/* Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements w/ /* Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements w/
RPM_I18NSTRING_TYPE equivalent enreies are translated (if HEADER_I18NTAB LE RPM_I18NSTRING_TYPE equivalent enreies are translated (if HEADER_I18NTAB LE
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 popt.h   popt.h 
skipping to change at line 33 skipping to change at line 33
to callback, descrip points to to callback, descrip points to
callback data to pass */ callback data to pass */
#define POPT_ARG_INTL_DOMAIN 6 /* set the translation domain #define POPT_ARG_INTL_DOMAIN 6 /* set the translation domain
for this table and any for this table and any
included tables; arg points included tables; arg points
to the domain string */ to the domain string */
#define POPT_ARG_VAL 7 /* arg should take value val */ #define POPT_ARG_VAL 7 /* arg should take value val */
#define POPT_ARG_MASK 0x0000FFFF #define POPT_ARG_MASK 0x0000FFFF
#define POPT_ARGFLAG_ONEDASH 0x80000000 /* allow -longoption */ #define POPT_ARGFLAG_ONEDASH 0x80000000 /* allow -longoption */
#define POPT_ARGFLAG_DOC_HIDDEN 0x40000000 /* don't show in help/usage */ #define POPT_ARGFLAG_DOC_HIDDEN 0x40000000 /* don't show in help/usage */
#define POPT_ARGFLAG_STRIP 0x20000000 /* strip this arg from argv (onl y applies to long args) */
#define POPT_CBFLAG_PRE 0x80000000 /* call the callback bef ore parse */ #define POPT_CBFLAG_PRE 0x80000000 /* call the callback bef ore parse */
#define POPT_CBFLAG_POST 0x40000000 /* call the callback after parse */ #define POPT_CBFLAG_POST 0x40000000 /* call the callback after parse */
#define POPT_CBFLAG_INC_DATA 0x20000000 /* use data from the include lin e, #define POPT_CBFLAG_INC_DATA 0x20000000 /* use data from the include lin e,
not the subtable */ not the subtable */
#define POPT_ERROR_NOARG -10 #define POPT_ERROR_NOARG -10
#define POPT_ERROR_BADOPT -11 #define POPT_ERROR_BADOPT -11
#define POPT_ERROR_OPTSTOODEEP -13 #define POPT_ERROR_OPTSTOODEEP -13
#define POPT_ERROR_BADQUOTE -15 /* only from poptParseArgString() */ #define POPT_ERROR_BADQUOTE -15 /* only from poptParseArgString() */
#define POPT_ERROR_ERRNO -16 /* only from poptParseArgString() */ #define POPT_ERROR_ERRNO -16 /* only from poptParseArgString() */
skipping to change at line 55 skipping to change at line 56
/* poptBadOption() flags */ /* poptBadOption() flags */
#define POPT_BADOPTION_NOALIAS (1 << 0) /* don't go into an alias */ #define POPT_BADOPTION_NOALIAS (1 << 0) /* don't go into an alias */
/* poptGetContext() flags */ /* poptGetContext() flags */
#define POPT_CONTEXT_NO_EXEC (1 << 0) /* ignore exec expansions */ #define POPT_CONTEXT_NO_EXEC (1 << 0) /* ignore exec expansions */
#define POPT_CONTEXT_KEEP_FIRST (1 << 1) /* pay attention to argv[0 ] */ #define POPT_CONTEXT_KEEP_FIRST (1 << 1) /* pay attention to argv[0 ] */
#define POPT_CONTEXT_POSIXMEHARDER (1 << 2) /* options can't follow args */ #define POPT_CONTEXT_POSIXMEHARDER (1 << 2) /* options can't follow args */
struct poptOption { struct poptOption {
const char * longName; /* may be NULL */ /*@observer@*/ /*@null@*/ const char * longName; /* may be NULL */
char shortName; /* may be '\0' */ char shortName; /* may be '\0' */
int argInfo; int argInfo;
void * arg; /* depends on argInfo */ /*@shared@*/ /*@null@*/ void * arg; /* depends on argInf o */
int val; /* 0 means don't return, just update flag */ int val; /* 0 means don't return, just update flag */
const char * descrip; /* description for autohelp -- may be NULL * /*@shared@*/ /*@null@*/ const char * descrip; /* description for a
/ utohelp -- may be NULL */
const char * argDescrip; /* argument description for autohelp */ /*@shared@*/ /*@null@*/ const char * argDescrip; /* argument descript
ion for autohelp */
}; };
struct poptAlias { struct poptAlias {
const char * longName; /* may be NULL */ /*@owned@*/ /*@null@*/ const char * longName; /* may be NULL */
char shortName; /* may be '\0' */ char shortName; /* may be '\0' */
int argc; int argc;
const char ** argv; /* must be free()able */ /*@owned@*/ const char ** argv; /* must be free()able */
}; };
extern struct poptOption poptHelpOptions[]; extern struct poptOption poptHelpOptions[];
#define POPT_AUTOHELP { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptHelpOptions , \ #define POPT_AUTOHELP { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptHelpOptions , \
0, "Help options", NULL }, 0, "Help options", NULL },
typedef struct poptContext_s * poptContext; typedef struct poptContext_s * poptContext;
#ifndef __cplusplus #ifndef __cplusplus
typedef struct poptOption * poptOption; typedef struct poptOption * poptOption;
#endif #endif
enum poptCallbackReason { POPT_CALLBACK_REASON_PRE, enum poptCallbackReason { POPT_CALLBACK_REASON_PRE,
POPT_CALLBACK_REASON_POST, POPT_CALLBACK_REASON_POST,
POPT_CALLBACK_REASON_OPTION }; POPT_CALLBACK_REASON_OPTION };
typedef void (*poptCallbackType)(poptContext con, typedef void (*poptCallbackType)(poptContext con,
enum poptCallbackReason reason, enum poptCallbackReason reason,
const struct poptOption * opt, const struct poptOption * opt,
const char * arg, const void * data); const char * arg, const void * data);
poptContext poptGetContext(const char * name, int argc, char ** argv, /*@only@*/ poptContext poptGetContext(/*@keep@*/ const char * name,
const struct poptOption * options, int flags); int argc, /*@keep@*/ const char ** argv,
/*@keep@*/ const struct poptOption * options, int flags);
void poptResetContext(poptContext con); void poptResetContext(poptContext con);
/* returns 'val' element, -1 on last item, POPT_ERROR_* on error */ /* returns 'val' element, -1 on last item, POPT_ERROR_* on error */
int poptGetNextOpt(poptContext con); int poptGetNextOpt(poptContext con);
/* returns NULL if no argument is available */ /* returns NULL if no argument is available */
char * poptGetOptArg(poptContext con); /*@observer@*/ /*@null@*/ const char * poptGetOptArg(poptContext con);
/* returns NULL if no more options are available */ /* returns NULL if no more options are available */
char * poptGetArg(poptContext con); /*@observer@*/ /*@null@*/ const char * poptGetArg(poptContext con);
const char * poptPeekArg(poptContext con); /*@observer@*/ /*@null@*/ const char * poptPeekArg(poptContext con);
const char ** poptGetArgs(poptContext con); /*@observer@*/ /*@null@*/ const char ** poptGetArgs(poptContext con);
/* returns the option which caused the most recent error */ /* returns the option which caused the most recent error */
const char * poptBadOption(poptContext con, int flags); /*@observer@*/ const char * poptBadOption(poptContext con, int flags);
void poptFreeContext(poptContext con); void poptFreeContext( /*@only@*/ poptContext con);
int poptStuffArgs(poptContext con, const char ** argv); int poptStuffArgs(poptContext con, /*@keep@*/ const char ** argv);
int poptAddAlias(poptContext con, struct poptAlias alias, int flags); int poptAddAlias(poptContext con, struct poptAlias alias, int flags);
int poptReadConfigFile(poptContext con, const char * fn); int poptReadConfigFile(poptContext con, const char * fn);
/* like above, but reads /etc/popt and $HOME/.popt along with environment /* like above, but reads /etc/popt and $HOME/.popt along with environment
vars */ vars */
int poptReadDefaultConfig(poptContext con, int useEnv); int poptReadDefaultConfig(poptContext con, int useEnv);
/* argv should be freed -- this allows ', ", and \ quoting, but ' is treate d /* argv should be freed -- this allows ', ", and \ quoting, but ' is treate d
the same as " and both may include \ quotes */ the same as " and both may include \ quotes */
int poptDupArgv(int argc, const char **argv,
/*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr);
int poptParseArgvString(const char * s, int poptParseArgvString(const char * s,
/*@out@*/ int * argcPtr, /*@out@*/ char *** argvPtr); /*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr);
const char * poptStrerror(const int error); /*@observer@*/ const char *const poptStrerror(const int error);
void poptSetExecPath(poptContext con, const char * path, int allowAbsolute) ; void poptSetExecPath(poptContext con, const char * path, int allowAbsolute) ;
void poptPrintHelp(poptContext con, FILE * f, int flags); void poptPrintHelp(poptContext con, FILE * f, int flags);
void poptPrintUsage(poptContext con, FILE * f, int flags); void poptPrintUsage(poptContext con, FILE * f, int flags);
void poptSetOtherOptionHelp(poptContext con, const char * text); void poptSetOtherOptionHelp(poptContext con, const char * text);
const char * poptGetInvocationName(poptContext con); /*@observer@*/ const char * poptGetInvocationName(poptContext con);
/* shuffles argv pointers to remove stripped args, returns new argc */
int poptStrippedArgv(poptContext con, int argc, char **argv);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 13 change blocks. 
19 lines changed or deleted 26 lines changed or added


 rpmio.h   rpmio.h 
#ifndef H_RPMIO #ifndef H_RPMIO
#define H_RPMIO #define H_RPMIO
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <glob.h>
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h>
typedef /*@abstract@*/ struct _FD {
int fd_fd;
void * fd_bzd;
void * fd_gzd;
void * fd_url;
} *FD_t;
#endif /* H_RPMIO */
#ifndef H_RPMIO_F typedef /*@abstract@*/ /*@refcounted@*/ struct _FD_s * FD_t;
#define H_RPMIO_F typedef /*@observer@*/ struct FDIO_s * FDIO_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
int timedRead(FD_t fd, /*@out@*/void * bufptr, int length); typedef ssize_t fdio_read_function_t (void *cookie, char *buf, size_t nbyte
s);
typedef ssize_t fdio_write_function_t (void *cookie, const char *buf, size_
t nbytes);
typedef int fdio_seek_function_t (void *cookie, off_t offset, int whence);
typedef int fdio_close_function_t (void *cookie);
extern /*@only@*/ /*@null@*/ FD_t fdNew(void); typedef /*@null@*/ FD_t fdio_ref_function_t ( /*@only@*/ void * cookie,
extern int fdValid(FD_t fd); const char * msg, const char * file, unsigned line);
extern int fdFileno(FD_t fd); typedef /*@null@*/ FD_t fdio_deref_function_t ( /*@only@*/ FD_t fd,
const char * msg, const char * file, unsigned line);
extern /*@only@*/ /*@null@*/ FD_t fdOpen(const char *pathname, int flags, m typedef /*@null@*/ FD_t fdio_new_function_t (const char * msg,
ode_t mode); const char * file, unsigned line);
extern /*@only@*/ /*@null@*/ FD_t fdDup(int fdno);
extern off_t fdLseek(FD_t fd, off_t offset, int whence); typedef int fdio_fileno_function_t (void * cookie);
extern ssize_t fdRead(FD_t fd, /*@out@*/void * buf, size_t count);
extern ssize_t fdWrite(FD_t fd, const void * buf, size_t count);
extern int fdClose(/*@only@*/ FD_t fd);
extern /*@null@*/ FILE *fdFdopen(FD_t fd, const char *mode); typedef FD_t fdio_open_function_t (const char * path, int flags, mode_t mod
e);
typedef FD_t fdio_fopen_function_t (const char * path, const char * fmode);
typedef void * fdio_ffileno_function_t (FD_t fd);
typedef int fdio_fflush_function_t (FD_t fd);
/* typedef int fdio_mkdir_function_t (const char * path, mode_t mode);
* Support for GZIP library. typedef int fdio_chdir_function_t (const char * path);
*/ typedef int fdio_rmdir_function_t (const char * path);
#ifdef HAVE_ZLIB_H typedef int fdio_rename_function_t (const char * oldpath, const char * newp
ath);
typedef int fdio_unlink_function_t (const char * path);
#include <zlib.h> typedef int fdio_stat_function_t (const char * path, struct stat * st);
typedef int fdio_lstat_function_t (const char * path, struct stat * st);
typedef int fdio_access_function_t (const char * path, int amode);
extern gzFile * gzdFileno(FD_t fd); struct FDIO_s {
fdio_read_function_t * read;
fdio_write_function_t * write;
fdio_seek_function_t * seek;
fdio_close_function_t * close;
extern /*@only@*/ /*@null@*/ FD_t gzdOpen(const char *pathname, const char fdio_ref_function_t * _fdref;
*mode); fdio_deref_function_t * _fdderef;
fdio_new_function_t * _fdnew;
fdio_fileno_function_t * _fileno;
extern /*@only@*/ /*@null@*/ FD_t gzdFdopen(FD_t fd, const char *mode); fdio_open_function_t * _open;
fdio_fopen_function_t * _fopen;
fdio_ffileno_function_t * _ffileno;
fdio_fflush_function_t * _fflush;
extern ssize_t gzdRead(FD_t fd, /*@out@*/void * buf, size_t count); fdio_mkdir_function_t * _mkdir;
fdio_chdir_function_t * _chdir;
fdio_rmdir_function_t * _rmdir;
fdio_rename_function_t * _rename;
fdio_unlink_function_t * _unlink;
};
extern ssize_t gzdWrite(FD_t fd, const void * buf, size_t count); /*@observer@*/ const char * Fstrerror(FD_t fd);
extern off_t gzdLseek(FD_t fd, off_t offset, int whence); size_t Fread (/*@out@*/ void * buf, size_t size, size_t nmemb, FD_t fd);
size_t Fwrite (const void *buf, size_t size, size_t nmemb, FD_t fd);
int Fseek (FD_t fd, long int offset, int whence);
int Fclose ( /*@killref@*/ FD_t fd);
FD_t Fdopen (FD_t fd, const char * fmode);
FD_t Fopen (const char * path, const char * fmode);
extern int gzdFlush(FD_t fd); int Fflush (FD_t fd);
int Ferror (FD_t fd);
int Fileno (FD_t fd);
extern /*@only@*/ /*@observer@*/ const char * gzdStrerror(FD_t fd); int Fcntl (FD_t, int op, void *lip);
ssize_t Pread (FD_t fd, /*@out@*/ void * buf, size_t count, off_t offset);
ssize_t Pwrite (FD_t fd, const void * buf, size_t count, off_t offset);
int Mkdir (const char * path, mode_t mode);
int Chdir (const char * path);
int Rmdir (const char * path);
int Rename (const char * oldpath, const char * newpath);
int Link (const char * oldpath, const char * newpath);
int Unlink (const char * path);
int Readlink(const char * path, char * buf, size_t bufsiz);
extern int gzdClose(/*@only@*/ FD_t fd); int Stat (const char * path, struct stat * st);
int Lstat (const char * path, struct stat * st);
int Access (const char * path, int amode);
#endif /* HAVE_ZLIB_H */ int Glob (const char * pattern, int flags,
int errfunc(const char * epath, int eerrno), glob_t * pglob)
;
void Globfree(glob_t * pglob);
DIR * Opendir (const char * name);
struct dirent * Readdir (DIR * dir);
int Closedir(DIR * dir);
/*@observer@*/ extern FDIO_t gzdio;
void fdPush (FD_t fd, FDIO_t io, void * fp, int fdno);
void fdPop (FD_t fd);
/*@dependent@*/ /*@null@*/ void * fdGetFp (FD_t fd);
void fdSetFdno(FD_t fd, int fdno);
void fdSetContentLength(FD_t fd, ssize_t contentLength);
off_t fdSize (FD_t fd);
void fdSetSyserrno(FD_t fd, int syserrno, const void * errcookie);
/*@null@*/ const FDIO_t fdGetIo(FD_t fd);
void fdSetIo (FD_t fd, FDIO_t io);
int fdGetRdTimeoutSecs(FD_t fd);
long int fdGetCpioPos(FD_t fd);
void fdSetCpioPos(FD_t fd, long int cpioPos);
extern /*@null@*/ FD_t fdDup(int fdno);
#ifdef UNUSED
extern /*@null@*/ FILE *fdFdopen( /*@only@*/ void * cookie, const char * mo
de);
#endif
/* Legacy interfaces needed by gnorpm, rpmfind et al */
int fdFileno(void * cookie);
/*@null@*/ FD_t fdOpen(const char *path, int flags, mode_t mode);
ssize_t fdRead(void * cookie, /*@out@*/ char * buf, size_t count);
ssize_t fdWrite(void * cookie, const char * buf, size_t count);
int fdClose( /*@only@*/ void * cookie);
#define fdLink(_fd, _msg) fdio->_fdref(_fd, _msg, __FILE__, __
LINE__)
#define fdFree(_fd, _msg) fdio->_fdderef(_fd, _msg, __FILE__,
__LINE__)
#define fdNew(_msg) fdio->_fdnew(_msg, __FILE__, __LINE_
_)
int fdWritable(FD_t fd, int secs);
int fdReadable(FD_t fd, int secs);
/*@observer@*/ extern FDIO_t fdio;
/*@observer@*/ extern FDIO_t fpio;
/* /*
* Support for BZIP2 library. * Support for FTP and HTTP I/O.
*/ */
#ifdef HAVE_BZLIB_H #define FTPERR_BAD_SERVER_RESPONSE -1
#define FTPERR_SERVER_IO_ERROR -2
#define FTPERR_SERVER_TIMEOUT -3
#define FTPERR_BAD_HOST_ADDR -4
#define FTPERR_BAD_HOSTNAME -5
#define FTPERR_FAILED_CONNECT -6
#define FTPERR_FILE_IO_ERROR -7
#define FTPERR_PASSIVE_ERROR -8
#define FTPERR_FAILED_DATA_CONNECT -9
#define FTPERR_FILE_NOT_FOUND -10
#define FTPERR_NIC_ABORT_IN_PROGRESS -11
#define FTPERR_UNKNOWN -100
#include <bzlib.h> /*@dependent@*/ /*@null@*/ void * ufdGetUrlinfo(FD_t fd);
/*@observer@*/ const char * urlStrerror(const char * url);
extern BZFILE * bzdFileno(FD_t fd); int ufdCopy(FD_t sfd, FD_t tfd);
int ufdGetFile( /*@killref@*/ FD_t sfd, FD_t tfd);
/*@observer@*/ const char *const ftpStrerror(int errorNumber);
extern /*@only@*/ /*@null@*/ FD_t bzdOpen(const char *pathname, const char int timedRead(FD_t fd, /*@out@*/ void * bufptr, int length);
*mode); #define timedRead ufdio->read
extern /*@only@*/ /*@null@*/ FD_t bzdFdopen(FD_t fd, const char *mode); /*@observer@*/ extern FDIO_t ufdio;
extern ssize_t bzdRead(FD_t fd, /*@out@*/void * buf, size_t count); /*
* Support for first fit File Allocation I/O.
*/
extern ssize_t bzdWrite(FD_t fd, const void * buf, size_t count); long int fadGetFileSize(FD_t fd);
void fadSetFileSize(FD_t fd, long int fileSize);
unsigned int fadGetFirstFree(FD_t fd);
void fadSetFirstFree(FD_t fd, unsigned int firstFree);
extern int bzdFlush(FD_t fd); /*@observer@*/ extern FDIO_t fadio;
extern /*@only@*/ /*@observer@*/ const char * bzdStrerror(FD_t fd); #ifdef HAVE_ZLIB_H
/*
* Support for GZIP library.
*/
extern int bzdClose(/*@only@*/ FD_t fd); #include <zlib.h>
/*@observer@*/ extern FDIO_t gzdio;
#endif /* HAVE_ZLIB_H */
#ifdef HAVE_BZLIB_H
/*
* Support for BZIP2 library.
*/
#include <bzlib.h>
/*@observer@*/ extern FDIO_t bzdio;
#endif /* HAVE_BZLIB_H */ #endif /* HAVE_BZLIB_H */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* H_RPMIO_F */ #endif /* H_RPMIO */
 End of changes. 32 change blocks. 
52 lines changed or deleted 176 lines changed or added


 rpmlib.h   rpmlib.h 
skipping to change at line 25 skipping to change at line 25
#endif #endif
int rpmReadPackageInfo(FD_t fd, /*@out@*/ Header * signatures, int rpmReadPackageInfo(FD_t fd, /*@out@*/ Header * signatures,
/*@out@*/ Header * hdr); /*@out@*/ Header * hdr);
int rpmReadPackageHeader(FD_t fd, /*@out@*/ Header * hdr, int rpmReadPackageHeader(FD_t fd, /*@out@*/ Header * hdr,
/*@out@*/ int * isSource, /*@out@*/ int * major, /*@out@*/ int * min or); /*@out@*/ int * isSource, /*@out@*/ int * major, /*@out@*/ int * min or);
int headerNVR(Header h, /*@out@*/ const char **np, /*@out@*/ const char **v p, int headerNVR(Header h, /*@out@*/ const char **np, /*@out@*/ const char **v p,
/*@out@*/ const char **rp); /*@out@*/ const char **rp);
void rpmBuildFileList(Header h, /*@out@*/ const char *** fileListPtr,
/*@out@*/ int * fileCountPtr);
/*
* XXX This is a "dressed" entry to headerGetEntry to do:
* 1) DIRNAME/BASENAME/DIRINDICES -> FILENAMES tag conversions.
* 2) i18n lookaside (if enabled).
*/
int rpmHeaderGetEntry(Header h, int_32 tag, /*@out@*/ int_32 *type,
/*@out@*/ void **p, /*@out@*/int_32 *c);
/* 0 = success */ /* 0 = success */
/* 1 = bad magic */ /* 1 = bad magic */
/* 2 = error */ /* 2 = error */
extern const struct headerTagTableEntry rpmTagTable[]; extern const struct headerTagTableEntry rpmTagTable[];
extern const int rpmTagTableSize; extern const int rpmTagTableSize;
/* this chains to headerDefaultFormats[] */ /* this chains to headerDefaultFormats[] */
extern const struct headerSprintfExtension rpmHeaderFormats[]; extern const struct headerSprintfExtension rpmHeaderFormats[];
skipping to change at line 67 skipping to change at line 78
#define RPMTAG_CHANGELOG 1017 /* internal */ #define RPMTAG_CHANGELOG 1017 /* internal */
#define RPMTAG_SOURCE 1018 #define RPMTAG_SOURCE 1018
#define RPMTAG_PATCH 1019 #define RPMTAG_PATCH 1019
#define RPMTAG_URL 1020 #define RPMTAG_URL 1020
#define RPMTAG_OS 1021 #define RPMTAG_OS 1021
#define RPMTAG_ARCH 1022 #define RPMTAG_ARCH 1022
#define RPMTAG_PREIN 1023 #define RPMTAG_PREIN 1023
#define RPMTAG_POSTIN 1024 #define RPMTAG_POSTIN 1024
#define RPMTAG_PREUN 1025 #define RPMTAG_PREUN 1025
#define RPMTAG_POSTUN 1026 #define RPMTAG_POSTUN 1026
#define RPMTAG_FILENAMES 1027 #define RPMTAG_OLDFILENAMES 1027 /* obsolete */
#define RPMTAG_FILESIZES 1028 #define RPMTAG_FILESIZES 1028
#define RPMTAG_FILESTATES 1029 #define RPMTAG_FILESTATES 1029
#define RPMTAG_FILEMODES 1030 #define RPMTAG_FILEMODES 1030
#define RPMTAG_FILEUIDS 1031 /* internal */ #define RPMTAG_FILEUIDS 1031 /* internal */
#define RPMTAG_FILEGIDS 1032 /* internal */ #define RPMTAG_FILEGIDS 1032 /* internal */
#define RPMTAG_FILERDEVS 1033 #define RPMTAG_FILERDEVS 1033
#define RPMTAG_FILEMTIMES 1034 #define RPMTAG_FILEMTIMES 1034
#define RPMTAG_FILEMD5S 1035 #define RPMTAG_FILEMD5S 1035
#define RPMTAG_FILELINKTOS 1036 #define RPMTAG_FILELINKTOS 1036
#define RPMTAG_FILEFLAGS 1037 #define RPMTAG_FILEFLAGS 1037
#define RPMTAG_ROOT 1038 #define RPMTAG_ROOT 1038 /* obsolete */
#define RPMTAG_FILEUSERNAME 1039 #define RPMTAG_FILEUSERNAME 1039
#define RPMTAG_FILEGROUPNAME 1040 #define RPMTAG_FILEGROUPNAME 1040
#define RPMTAG_EXCLUDE 1041 /* internal - depricate d */ #define RPMTAG_EXCLUDE 1041 /* internal - depricate d */
#define RPMTAG_EXCLUSIVE 1042 /* internal - depricate d */ #define RPMTAG_EXCLUSIVE 1042 /* internal - depricate d */
#define RPMTAG_ICON 1043 #define RPMTAG_ICON 1043
#define RPMTAG_SOURCERPM 1044 #define RPMTAG_SOURCERPM 1044
#define RPMTAG_FILEVERIFYFLAGS 1045 #define RPMTAG_FILEVERIFYFLAGS 1045
#define RPMTAG_ARCHIVESIZE 1046 #define RPMTAG_ARCHIVESIZE 1046
#define RPMTAG_PROVIDENAME 1047 #define RPMTAG_PROVIDENAME 1047
#define RPMTAG_PROVIDES RPMTAG_PROVIDENAME /* backward comaptib ility */ #define RPMTAG_PROVIDES RPMTAG_PROVIDENAME /* backward comaptib ility */
skipping to change at line 138 skipping to change at line 149
#define RPMTAG_FILEDEVICES 1095 #define RPMTAG_FILEDEVICES 1095
#define RPMTAG_FILEINODES 1096 #define RPMTAG_FILEINODES 1096
#define RPMTAG_FILELANGS 1097 #define RPMTAG_FILELANGS 1097
#define RPMTAG_PREFIXES 1098 #define RPMTAG_PREFIXES 1098
#define RPMTAG_INSTPREFIXES 1099 #define RPMTAG_INSTPREFIXES 1099
#define RPMTAG_TRIGGERIN 1100 /* internal */ #define RPMTAG_TRIGGERIN 1100 /* internal */
#define RPMTAG_TRIGGERUN 1101 /* internal */ #define RPMTAG_TRIGGERUN 1101 /* internal */
#define RPMTAG_TRIGGERPOSTUN 1102 /* internal */ #define RPMTAG_TRIGGERPOSTUN 1102 /* internal */
#define RPMTAG_AUTOREQ 1103 /* internal */ #define RPMTAG_AUTOREQ 1103 /* internal */
#define RPMTAG_AUTOPROV 1104 /* internal */ #define RPMTAG_AUTOPROV 1104 /* internal */
#define RPMTAG_CAPABILITY 1105 #define RPMTAG_CAPABILITY 1105 /* unused internal */
#define RPMTAG_SOURCEPACKAGE 1106 /* internal */ #define RPMTAG_SOURCEPACKAGE 1106 /* internal */
#define RPMTAG_ORIGFILENAMES 1107 #define RPMTAG_OLDORIGFILENAMES 1107 /* obsolete */
#define RPMTAG_BUILDPREREQ 1108 /* internal */ #define RPMTAG_BUILDPREREQ 1108 /* internal */
#define RPMTAG_BUILDREQUIRES 1109 /* internal */ #define RPMTAG_BUILDREQUIRES 1109 /* internal */
#define RPMTAG_BUILDCONFLICTS 1110 /* internal */ #define RPMTAG_BUILDCONFLICTS 1110 /* internal */
#define RPMTAG_BUILDMACROS 1111 #define RPMTAG_BUILDMACROS 1111
#define RPMTAG_PROVIDEFLAGS 1112 #define RPMTAG_PROVIDEFLAGS 1112
#define RPMTAG_PROVIDEVERSION 1113 #define RPMTAG_PROVIDEVERSION 1113
#define RPMTAG_OBSOLETEFLAGS 1114 #define RPMTAG_OBSOLETEFLAGS 1114
#define RPMTAG_OBSOLETEVERSION 1115 #define RPMTAG_OBSOLETEVERSION 1115
#define RPMTAG_DIRINDEXES 1116
#define RPMTAG_BASENAMES 1117
#define RPMTAG_DIRNAMES 1118
#define RPMTAG_ORIGDIRINDEXES 1119 /* internal */
#define RPMTAG_ORIGBASENAMES 1120 /* internal */
#define RPMTAG_ORIGDIRNAMES 1121 /* internal */
#define RPMTAG_OPTFLAGS 1122
#define RPMTAG_DISTURL 1123
#define RPMTAG_PAYLOADFORMAT 1124
#define RPMTAG_PAYLOADCOMPRESSOR 1125
#define RPMTAG_PAYLOADFLAGS 1126
#define RPMTAG_FIRSTFREE_TAG 1116 /* internal */ #define RPMTAG_FIRSTFREE_TAG 1127 /* internal */
#define RPMTAG_EXTERNAL_TAG 1000000 #define RPMTAG_EXTERNAL_TAG 1000000
#define RPMFILE_STATE_NORMAL 0 #define RPMFILE_STATE_NORMAL 0
#define RPMFILE_STATE_REPLACED 1 #define RPMFILE_STATE_REPLACED 1
#define RPMFILE_STATE_NOTINSTALLED 2 #define RPMFILE_STATE_NOTINSTALLED 2
#define RPMFILE_STATE_NETSHARED 3 #define RPMFILE_STATE_NETSHARED 3
/* these can be ORed together */ /* these can be ORed together */
#define RPMFILE_CONFIG (1 << 0) #define RPMFILE_CONFIG (1 << 0)
#define RPMFILE_DOC (1 << 1) #define RPMFILE_DOC (1 << 1)
skipping to change at line 263 skipping to change at line 285
#define RPMVAR_MACROFILES 49 #define RPMVAR_MACROFILES 49
/* #define RPMVAR_GPG_PATH 51 -- No longer used */ /* #define RPMVAR_GPG_PATH 51 -- No longer used */
/* #define RPMVAR_GPG_NAME 52 -- No longer used */ /* #define RPMVAR_GPG_NAME 52 -- No longer used */
/* #define RPMVAR_HTTPPROXY 53 -- No longer used */ /* #define RPMVAR_HTTPPROXY 53 -- No longer used */
/* #define RPMVAR_HTTPPORT 54 -- No longer used */ /* #define RPMVAR_HTTPPORT 54 -- No longer used */
#define RPMVAR_NUM 55 /* number of RPMVAR entries */ #define RPMVAR_NUM 55 /* number of RPMVAR entries */
#define xfree(_p) free((void *)_p) #define xfree(_p) free((void *)_p)
char * rpmGetVar(int var); const char * rpmGetVar(int var);
void rpmSetVar(int var, const char *val); void rpmSetVar(int var, const char *val);
/** rpmrc.c **/ /** rpmrc.c **/
#define RPM_MACHTABLE_INSTARCH 0 #define RPM_MACHTABLE_INSTARCH 0
#define RPM_MACHTABLE_INSTOS 1 #define RPM_MACHTABLE_INSTOS 1
#define RPM_MACHTABLE_BUILDARCH 2 #define RPM_MACHTABLE_BUILDARCH 2
#define RPM_MACHTABLE_BUILDOS 3 #define RPM_MACHTABLE_BUILDOS 3
#define RPM_MACHTABLE_COUNT 4 /* number of arch/os tables */ #define RPM_MACHTABLE_COUNT 4 /* number of arch/os tables */
int rpmReadConfigFiles(const char * file, const char * target); int rpmReadConfigFiles(const char * file, const char * target);
int rpmReadRC(const char * file); int rpmReadRC(const char * file);
void rpmGetArchInfo( /*@out@*/ char ** name, /*@out@*/ int * num); void rpmGetArchInfo( /*@out@*/ const char ** name, /*@out@*/ int * num);
void rpmGetOsInfo( /*@out@*/ char ** name, /*@out@*/ int * num); void rpmGetOsInfo( /*@out@*/ const char ** name, /*@out@*/ int * num);
int rpmMachineScore(int type, char * name); int rpmMachineScore(int type, const char * name);
int rpmShowRC(FILE *f); int rpmShowRC(FILE *f);
void rpmSetTables(int archTable, int osTable); /* only used by build code */ void rpmSetTables(int archTable, int osTable); /* only used by build code */
/* if either are NULL, they are set to the default value (munged uname()) /* if either are NULL, they are set to the default value (munged uname())
pushed through a translation table (if appropriate) */ pushed through a translation table (if appropriate) */
void rpmSetMachine(const char * arch, const char * os); void rpmSetMachine(const char * arch, const char * os);
void rpmGetMachine( /*@out@*/ char **arch, /*@out@*/ char **os); void rpmGetMachine( /*@out@*/ const char **arch, /*@out@*/ const char **os) ;
void rpmFreeRpmrc(void); void rpmFreeRpmrc(void);
/** **/ /** **/
typedef /*@abstract@*/ struct rpmdb_s * rpmdb; typedef /*@abstract@*/ struct rpmdb_s * rpmdb;
typedef enum rpmCallbackType_e { typedef enum rpmCallbackType_e {
RPMCALLBACK_INST_PROGRESS, RPMCALLBACK_INST_START, RPMCALLBACK_INST_PROGRESS, RPMCALLBACK_INST_START,
RPMCALLBACK_INST_OPEN_FILE, RPMCALLBACK_INST_CLOSE_FILE, RPMCALLBACK_INST_OPEN_FILE, RPMCALLBACK_INST_CLOSE_FILE,
RPMCALLBACK_TRANS_PROGRESS, RPMCALLBACK_TRANS_START, RPMCALLBACK_TRANS_ STOP, RPMCALLBACK_TRANS_PROGRESS, RPMCALLBACK_TRANS_START, RPMCALLBACK_TRANS_ STOP,
RPMCALLBACK_UNINST_PROGRESS, RPMCALLBACK_UNINST_START, RPMCALLBACK_UNIN ST_STOP RPMCALLBACK_UNINST_PROGRESS, RPMCALLBACK_UNINST_START, RPMCALLBACK_UNIN ST_STOP
} rpmCallbackType; } rpmCallbackType;
typedef void * (*rpmCallbackFunction)(const Header h, typedef void * (*rpmCallbackFunction)(const Header h,
const rpmCallbackType what, const rpmCallbackType what,
const unsigned long amount, const unsigned long amount,
const unsigned long total, const unsigned long total,
const void * pkgKey, void * data); const void * pkgKey, void * data);
void urlSetCallback(rpmCallbackFunction notify, void *notifyData, int not
ifyCount);
int rpmdbOpen (const char * root, /*@out@*/ rpmdb * dbp, int mode, int perm s); int rpmdbOpen (const char * root, /*@out@*/ rpmdb * dbp, int mode, int perm s);
/* 0 on error */ /* 0 on error */
int rpmdbInit(const char * root, int perms); int rpmdbInit(const char * root, int perms);
/* nonzero on error */ /* nonzero on error */
void rpmdbClose ( /*@only@*/ rpmdb db); void rpmdbClose ( /*@only@*/ rpmdb db);
/* Databases like this should only have rpmdb*RecNum and rpmdbGetRecord /* Databases like this should only have rpmdb*RecNum and rpmdbGetRecord
used on them. Anything else could fail! */ used on them. Anything else could fail! */
int rpmdbOpenForTraversal(const char * prefix, rpmdb * rpmdbp); int rpmdbOpenForTraversal(const char * prefix, /*@out@*/ rpmdb * rpmdbp);
int rpmdbFirstRecNum(rpmdb db); int rpmdbFirstRecNum(rpmdb db);
int rpmdbNextRecNum(rpmdb db, unsigned int lastOffset); int rpmdbNextRecNum(rpmdb db, unsigned int lastOffset);
/* 0 at end, -1 on error */ /* 0 at end, -1 on error */
Header rpmdbGetRecord(rpmdb db, unsigned int offset); Header rpmdbGetRecord(rpmdb db, unsigned int offset);
int rpmdbFindByFile(rpmdb db, const char * filespec, int rpmdbFindByFile(rpmdb db, const char * filespec,
/*@out@*/ dbiIndexSet * matches); /*@out@*/ dbiIndexSet * matches);
int rpmdbFindByGroup(rpmdb db, const char * group, int rpmdbFindByGroup(rpmdb db, const char * group,
/*@out@*/ dbiIndexSet * matches); /*@out@*/ dbiIndexSet * matches);
skipping to change at line 367 skipping to change at line 391
strict removals, and prerequisite ordering is done on installs/upgrades. */ strict removals, and prerequisite ordering is done on installs/upgrades. */
typedef /*@abstract@*/ struct rpmTransactionSet_s * rpmTransactionSet; typedef /*@abstract@*/ struct rpmTransactionSet_s * rpmTransactionSet;
struct rpmDependencyConflict { struct rpmDependencyConflict {
char * byName, * byVersion, * byRelease; char * byName, * byVersion, * byRelease;
Header byHeader; Header byHeader;
/* these needs fields are misnamed -- they are used for the package /* these needs fields are misnamed -- they are used for the package
which isn't needed as well */ which isn't needed as well */
char * needsName, * needsVersion; char * needsName, * needsVersion;
int needsFlags; int needsFlags;
const void * suggestedPackage; /* NULL if none */ /*@observer@*/ /*@null@*/ const void * suggestedPackage; /* NULL if non e */
enum { RPMDEP_SENSE_REQUIRES, RPMDEP_SENSE_CONFLICTS } sense; enum { RPMDEP_SENSE_REQUIRES, RPMDEP_SENSE_CONFLICTS } sense;
} ; } ;
/* db may be NULL, but don't do things which require the database! */ /* db may be NULL, but don't do things which require the database! */
/*@only@*/ rpmTransactionSet rpmtransCreateSet( /*@only@*/ rpmdb db, /*@only@*/ rpmTransactionSet rpmtransCreateSet( /*@only@*/ rpmdb db,
const char * rootdir); const char * rootdir);
/* if fd is NULL, the callback specified in rpmtransCreateSet() is used to /* if fd is NULL, the callback specified in rpmtransCreateSet() is used to
open and close the file descriptor. If Header is NULL, the fd is always open and close the file descriptor. If Header is NULL, the fd is always
used, otherwise fd is only needed (and only opened) for actual package used, otherwise fd is only needed (and only opened) for actual package
installation installation
returns 0 on success, 1 on I/O error, 2 if the package needs capabilitie s returns 0 on success, 1 on I/O error, 2 if the package needs capabilitie s
which are not implemented */ which are not implemented */
int rpmtransAddPackage(rpmTransactionSet rpmdep, Header h, FD_t fd, int rpmtransAddPackage(rpmTransactionSet rpmdep, Header h, FD_t fd,
const void * key, int update, rpmRelocation * relocs /*@owned@*/ const void * key, int update,
); rpmRelocation * relocs);
void rpmtransAvailablePackage(rpmTransactionSet rpmdep, Header h, void * ke void rpmtransAvailablePackage(rpmTransactionSet rpmdep, Header h,
y); /*@owned@*/ const void * key);
void rpmtransRemovePackage(rpmTransactionSet rpmdep, int dboffset); void rpmtransRemovePackage(rpmTransactionSet rpmdep, int dboffset);
void rpmtransFree( /*@only@*/ rpmTransactionSet rpmdep); void rpmtransFree( /*@only@*/ rpmTransactionSet rpmdep);
void rpmtransSetScriptFd(rpmTransactionSet ts, FD_t fd); void rpmtransSetScriptFd(rpmTransactionSet ts, FD_t fd);
/* this checks for dependency satisfaction, but *not* ordering */ /* this checks for dependency satisfaction, but *not* ordering */
int rpmdepCheck(rpmTransactionSet rpmdep, int rpmdepCheck(rpmTransactionSet rpmdep,
/*@exposed@*/ /*@out@*/ struct rpmDependencyConflict ** conflicts, /*@exposed@*/ /*@out@*/ struct rpmDependencyConflict ** conflicts,
/*@exposed@*/ /*@out@*/ int * numConflicts); /*@exposed@*/ /*@out@*/ int * numConflicts);
/* Orders items, returns error on circle, finals keys[] is NULL. No depende ncy /* Orders items, returns error on circle, finals keys[] is NULL. No depende ncy
skipping to change at line 410 skipping to change at line 436
#define RPMTRANS_FLAG_TEST (1 << 0) #define RPMTRANS_FLAG_TEST (1 << 0)
#define RPMTRANS_FLAG_BUILD_PROBS (1 << 1) #define RPMTRANS_FLAG_BUILD_PROBS (1 << 1)
#define RPMTRANS_FLAG_NOSCRIPTS (1 << 2) #define RPMTRANS_FLAG_NOSCRIPTS (1 << 2)
#define RPMTRANS_FLAG_JUSTDB (1 << 3) #define RPMTRANS_FLAG_JUSTDB (1 << 3)
#define RPMTRANS_FLAG_NOTRIGGERS (1 << 4) #define RPMTRANS_FLAG_NOTRIGGERS (1 << 4)
#define RPMTRANS_FLAG_NODOCS (1 << 5) #define RPMTRANS_FLAG_NODOCS (1 << 5)
#define RPMTRANS_FLAG_ALLFILES (1 << 6) #define RPMTRANS_FLAG_ALLFILES (1 << 6)
#define RPMTRANS_FLAG_KEEPOBSOLETE (1 << 7) #define RPMTRANS_FLAG_KEEPOBSOLETE (1 << 7)
/**
*/
int rpmRangesOverlap(const char *AName, const char *AEVR, int AFlags,
const char *BName, const char *BEVR, int BFlags);
/**
*/
int rpmCheckRpmlibProvides(const char * keyName, const char * keyEVR,
int keyFlags);
/**
*/
void rpmShowRpmlibProvides(FILE * fp);
typedef enum rpmProblemType_e { RPMPROB_BADARCH, typedef enum rpmProblemType_e { RPMPROB_BADARCH,
RPMPROB_BADOS, RPMPROB_BADOS,
RPMPROB_PKG_INSTALLED, RPMPROB_PKG_INSTALLED,
RPMPROB_BADRELOCATE, RPMPROB_BADRELOCATE,
RPMPROB_REQUIRES, RPMPROB_REQUIRES,
RPMPROB_CONFLICT, RPMPROB_CONFLICT,
RPMPROB_NEW_FILE_CONFLICT, RPMPROB_NEW_FILE_CONFLICT,
RPMPROB_FILE_CONFLICT, RPMPROB_FILE_CONFLICT,
RPMPROB_OLDPACKAGE, RPMPROB_OLDPACKAGE,
RPMPROB_DISKSPACE RPMPROB_DISKSPACE
} rpmProblemType; } rpmProblemType;
typedef /*@abstract@*/ struct rpmProblem_s { typedef /*@abstract@*/ struct rpmProblem_s {
Header h, altH; Header h, altH;
const void * key; /*@dependent@*/ const void * key;
rpmProblemType type; rpmProblemType type;
int ignoreProblem; int ignoreProblem;
char * str1; /*@only@*/ const char * str1;
unsigned long ulong1; unsigned long ulong1;
} rpmProblem; } rpmProblem;
typedef /*@abstract@*/ struct rpmProblemSet_s { typedef /*@abstract@*/ struct rpmProblemSet_s {
int numProblems; int numProblems;
int numProblemsAlloced; int numProblemsAlloced;
rpmProblem * probs; rpmProblem * probs;
} * rpmProblemSet; } * rpmProblemSet;
void printDepFlags(FILE *fp, const char *version, int flags); void printDepFlags(FILE *fp, const char *version, int flags);
skipping to change at line 648 skipping to change at line 688
#define RPMSIG_UNKNOWN 1 #define RPMSIG_UNKNOWN 1
#define RPMSIG_BAD 2 #define RPMSIG_BAD 2
#define RPMSIG_NOKEY 3 /* Do not have the key to check t his signature */ #define RPMSIG_NOKEY 3 /* Do not have the key to check t his signature */
#define RPMSIG_NOTTRUSTED 4 /* We have the key but it is not trusted */ #define RPMSIG_NOTTRUSTED 4 /* We have the key but it is not trusted */
void rpmFreeSignature(Header h); void rpmFreeSignature(Header h);
int rpmVerifySignature(const char *file, int_32 sigTag, void *sig, int coun t, int rpmVerifySignature(const char *file, int_32 sigTag, void *sig, int coun t,
char *result); char *result);
void freeFilesystems(void);
int rpmGetFilesystemList( /*@out@*/ const char *** listptr, /*@out@*/int * num); int rpmGetFilesystemList( /*@out@*/ const char *** listptr, /*@out@*/int * num);
int rpmGetFilesystemUsage(const char ** filelist, int_32 * fssizes, int rpmGetFilesystemUsage(const char ** filelist, int_32 * fssizes,
int numFiles, /*@out@*/ uint_32 ** usagesPtr, int flags); int numFiles, /*@out@*/ uint_32 ** usagesPtr, int flags);
/* ==================================================================== */ /* ==================================================================== */
/* --- query/verify */ /* --- query/verify */
/* XXX SPECFILE is not verify sources */ /* XXX SPECFILE is not verify sources */
enum rpmQVSources { RPMQV_PACKAGE = 0, RPMQV_PATH, RPMQV_ALL, RPMQV_RPM, enum rpmQVSources { RPMQV_PACKAGE = 0, RPMQV_PATH, RPMQV_ALL, RPMQV_RPM,
RPMQV_GROUP, RPMQV_WHATPROVIDES, RPMQV_WHATREQUIRES, RPMQV_GROUP, RPMQV_WHATPROVIDES, RPMQV_WHATREQUIRES,
skipping to change at line 681 skipping to change at line 722
typedef int (*QVF_t) (QVA_t *qva, rpmdb db, Header h); typedef int (*QVF_t) (QVA_t *qva, rpmdb db, Header h);
int showMatches(QVA_t *qva, rpmdb db, dbiIndexSet matches, QVF_t showPackag e); int showMatches(QVA_t *qva, rpmdb db, dbiIndexSet matches, QVF_t showPackag e);
#define QUERY_FOR_LIST (1 << 1) #define QUERY_FOR_LIST (1 << 1)
#define QUERY_FOR_STATE (1 << 2) #define QUERY_FOR_STATE (1 << 2)
#define QUERY_FOR_DOCS (1 << 3) #define QUERY_FOR_DOCS (1 << 3)
#define QUERY_FOR_CONFIG (1 << 4) #define QUERY_FOR_CONFIG (1 << 4)
#define QUERY_FOR_DUMPFILES (1 << 8) #define QUERY_FOR_DUMPFILES (1 << 8)
const char *tagName(int tag); /*@observer@*/ const char *const tagName(int tag);
extern char *specedit; extern int specedit;
extern struct poptOption rpmQueryPoptTable[]; extern struct poptOption rpmQueryPoptTable[];
void rpmDisplayQueryTags(FILE * f); void rpmDisplayQueryTags(FILE * f);
int rpmQueryVerify(QVA_t *qva, enum rpmQVSources source, const char * arg, int rpmQueryVerify(QVA_t *qva, enum rpmQVSources source, const char * arg,
rpmdb db, QVF_t showPackage); rpmdb db, QVF_t showPackage);
int showQueryPackage(QVA_t *qva, rpmdb db, Header h); int showQueryPackage(QVA_t *qva, rpmdb db, Header h);
int rpmQuery(QVA_t *qva, enum rpmQVSources source, const char * arg); int rpmQuery(QVA_t *qva, enum rpmQVSources source, const char * arg);
#define VERIFY_FILES (1 << 9) #define VERIFY_FILES (1 << 9)
skipping to change at line 711 skipping to change at line 752
/* ==================================================================== */ /* ==================================================================== */
/* --- install/upgrade/erase */ /* --- install/upgrade/erase */
#define INSTALL_PERCENT (1 << 0) #define INSTALL_PERCENT (1 << 0)
#define INSTALL_HASH (1 << 1) #define INSTALL_HASH (1 << 1)
#define INSTALL_NODEPS (1 << 2) #define INSTALL_NODEPS (1 << 2)
#define INSTALL_NOORDER (1 << 3) #define INSTALL_NOORDER (1 << 3)
#define INSTALL_LABEL (1 << 4) /* set if we're being verbose */ #define INSTALL_LABEL (1 << 4) /* set if we're being verbose */
#define INSTALL_UPGRADE (1 << 5) #define INSTALL_UPGRADE (1 << 5)
#define INSTALL_FRESHEN (1 << 6)
#define UNINSTALL_NODEPS (1 << 0) #define UNINSTALL_NODEPS (1 << 0)
#define UNINSTALL_ALLMATCHES (1 << 1) #define UNINSTALL_ALLMATCHES (1 << 1)
int rpmInstall(const char * rootdir, const char ** argv, int installFlags, int rpmInstall(const char * rootdir, const char ** argv, int installFlags,
int interfaceFlags, int probFilter, rpmRelocation * relocation s); int interfaceFlags, int probFilter, rpmRelocation * relocation s);
int rpmInstallSource(const char * prefix, const char * arg, const char ** s pecFile, int rpmInstallSource(const char * prefix, const char * arg, const char ** s pecFile,
char ** cookie); char ** cookie);
int rpmErase(const char * rootdir, const char ** argv, int uninstallFlags, int rpmErase(const char * rootdir, const char ** argv, int uninstallFlags,
int interfaceFlags); int interfaceFlags);
void printDepFlags(FILE * fp, const char * version, int flags);
void printDepProblems(FILE * fp, struct rpmDependencyConflict * conflicts,
int numConflicts);
/* ==================================================================== */ /* ==================================================================== */
/* --- checksig/resign */ /* --- checksig/resign */
#define CHECKSIG_PGP (1 << 0) #define CHECKSIG_PGP (1 << 0)
#define CHECKSIG_MD5 (1 << 1) #define CHECKSIG_MD5 (1 << 1)
#define CHECKSIG_GPG (1 << 2) #define CHECKSIG_GPG (1 << 2)
int rpmCheckSig(int flags, const char **argv); int rpmCheckSig(int flags, const char **argv);
int rpmReSign(int add, char *passPhrase, const char **argv); int rpmReSign(int add, char *passPhrase, const char **argv);
 End of changes. 21 change blocks. 
24 lines changed or deleted 61 lines changed or added


 rpmmacro.h   rpmmacro.h 
#ifndef _H_MACRO_ #ifndef _H_MACRO_
#define _H_MACRO_ #define _H_MACRO_
/*! The structure used to store a macro. */
typedef /*@abstract@*/ struct MacroEntry { typedef /*@abstract@*/ struct MacroEntry {
struct MacroEntry *prev; struct MacroEntry *prev;/*!< Macro entry stack. */
const char *name; /* Macro name */ const char *name; /*!< Macro name. */
const char *opts; /* Macro parameters (ala getopt) */ const char *opts; /*!< Macro parameters (a la getopt) */
const char *body; /* Macro body */ const char *body; /*!< Macro body. */
int used; /* No. of expansions */ int used; /*!< No. of expansions. */
int level; int level; /*!< Scoping level. */
} MacroEntry; } MacroEntry;
/*! The structure used to store the set of macros in a context. */
typedef /*@abstract@*/ struct MacroContext { typedef /*@abstract@*/ struct MacroContext {
MacroEntry ** macroTable; MacroEntry ** macroTable; /*!< Macro entry table for context.
int macrosAllocated; */
int firstFree; int macrosAllocated;/*!< No. of allocated macros. */
int firstFree; /*!< No. of macros. */
} MacroContext; } MacroContext;
/* /*
* Markers for types of macros added throughout rpm. * Markers for types of macros added throughout rpm.
*/ */
#define RMIL_DEFAULT -15 #define RMIL_DEFAULT -15
#define RMIL_MACROFILES -13 #define RMIL_MACROFILES -13
#define RMIL_RPMRC -11 #define RMIL_RPMRC -11
#define RMIL_CMDLINE -7 #define RMIL_CMDLINE -7
#define RMIL_TARBALL -5 #define RMIL_TARBALL -5
#define RMIL_SPEC -3 #define RMIL_SPEC -3
#define RMIL_OLDSPEC -1 #define RMIL_OLDSPEC -1
#define RMIL_GLOBAL 0 #define RMIL_GLOBAL 0
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void dumpMacroTable (MacroContext *mc, FILE *f); void rpmDumpMacroTable (MacroContext * mc, FILE * fp);
/* XXX this is used only in build/expression.c and will go away. */ /* XXX this is used only in build/expression.c and will go away. */
const char *getMacroBody (MacroContext *mc, const char *name); const char *getMacroBody (MacroContext *mc, const char *name);
int expandMacros (void *spec, MacroContext *mc, char *sbuf, size_t sb int expandMacros (void * spec, MacroContext * mc, char * sbuf,
uflen); size_t sbuflen);
void addMacro (MacroContext *mc, const char *n, const char *o, con void addMacro (MacroContext * mc, const char * n, const char * o,
st char *b, int depth); const char * b, int depth);
void delMacro (MacroContext *mc, const char *n); void delMacro (MacroContext * mc, const char * n);
int rpmDefineMacro (MacroContext *mc, const char *macro, int level); int rpmDefineMacro (MacroContext * mc, const char * macro, int level);
void initMacros (MacroContext *mc, const char *macrofile); void rpmLoadMacros (MacroContext *mc, int level);
void freeMacros (MacroContext *mc); void rpmInitMacros (MacroContext * mc, const char * macrofiles);
void rpmFreeMacros (MacroContext * mc);
#define COMPRESSED_NOT 0 #define COMPRESSED_NOT 0
#define COMPRESSED_OTHER 1 #define COMPRESSED_OTHER 1
#define COMPRESSED_BZIP2 2 #define COMPRESSED_BZIP2 2
int isCompressed (const char *file, int *compressed); int isCompressed (const char * file, int * compressed);
char * rpmExpand (const char *arg, ...); char * rpmExpand (const char * arg, ...);
const char *rpmGetPath (const char *path, ...); char * rpmCleanPath (char * path);
int rpmExpandNumeric (const char *arg); const char *rpmGetPath (const char * path, ...);
const char *rpmGenPath (const char * root, const char * mdir,
const char * file);
int rpmExpandNumeric (const char * arg);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _H_ MACRO_ */ #endif /* _H_ MACRO_ */
 End of changes. 9 change blocks. 
22 lines changed or deleted 29 lines changed or added


 rpmspec.h   rpmspec.h 
#ifndef _H_SPEC_ #ifndef _H_SPEC_
#define _H_SPEC_ #define _H_SPEC_
/** \file build/rpmspec.h
* The Spec and Package data structures used during build.
*/
typedef struct SpecStruct *Spec; typedef struct SpecStruct *Spec;
#include "rpmmacro.h" #include "rpmmacro.h"
#if 0 #if 0
struct ReqProvTrigger { struct ReqProvTrigger {
int flags; int flags;
char *name; char *name;
char *version; char *version;
int index; /* Only used for triggers */ int index; /* Only used for triggers */
struct ReqProvTrigger *next; struct ReqProvTrigger *next;
}; };
#endif #endif
/** */
struct TriggerFileEntry { struct TriggerFileEntry {
/*@{*/
int index; int index;
/*@only@*/ char *fileName; /*@only@*/ char *fileName;
/*@only@*/ char *script; /*@only@*/ char *script;
/*@only@*/ char *prog; /*@only@*/ char *prog;
/*@owned@*/ struct TriggerFileEntry *next; /*@owned@*/ struct TriggerFileEntry *next;
/*@}*/
}; };
#define RPMBUILD_ISSOURCE 1 #define RPMBUILD_ISSOURCE 1
#define RPMBUILD_ISPATCH (1 << 1) #define RPMBUILD_ISPATCH (1 << 1)
#define RPMBUILD_ISICON (1 << 2) #define RPMBUILD_ISICON (1 << 2)
#define RPMBUILD_ISNO (1 << 3) #define RPMBUILD_ISNO (1 << 3)
#define RPMBUILD_DEFAULT_LANG "C" #define RPMBUILD_DEFAULT_LANG "C"
/** */
struct Source { struct Source {
/*@{*/
/*@owned@*/ char *fullSource; /*@owned@*/ char *fullSource;
/*@dependent@*/ char *source; /* Pointer into fullSource */ /*@dependent@*/ char *source; /* Pointer into fullSource */
int flags; int flags;
int num; int num;
/*@owned@*/ struct Source *next; /*@owned@*/ struct Source *next;
/*@}*/
}; };
/** */
typedef struct ReadLevelEntry { typedef struct ReadLevelEntry {
/*@{*/
int reading; int reading;
/*@dependent@*/ struct ReadLevelEntry *next; /*@dependent@*/ struct ReadLevelEntry *next;
/*@}*/
} RLE_t; } RLE_t;
/** */
typedef struct OpenFileInfo { typedef struct OpenFileInfo {
/*@{*/
/*@only@*/ char *fileName; /*@only@*/ char *fileName;
/*@dependent@*/ FILE *file; FD_t fd;
int lineNum; int lineNum;
char readBuf[BUFSIZ]; char readBuf[BUFSIZ];
/*@dependent@*/ char *readPtr; /*@dependent@*/ char *readPtr;
/*@owned@*/ struct OpenFileInfo *next; /*@owned@*/ struct OpenFileInfo *next;
/*@}*/
} OFI_t; } OFI_t;
/** */
struct spectag { struct spectag {
/*@{*/
int t_tag; int t_tag;
int t_startx; int t_startx;
int t_nlines; int t_nlines;
/*@only@*/ const char *t_lang; /*@only@*/ const char *t_lang;
/*@only@*/ const char *t_msgid; /*@only@*/ const char *t_msgid;
/*@}*/
}; };
/** */
struct spectags { struct spectags {
/*@{*/
/*@owned@*/ struct spectag *st_t; /*@owned@*/ struct spectag *st_t;
int st_nalloc; int st_nalloc;
int st_ntags; int st_ntags;
/*@}*/
}; };
/** */
struct speclines { struct speclines {
/*@{*/
/*@only@*/ char **sl_lines; /*@only@*/ char **sl_lines;
int sl_nalloc; int sl_nalloc;
int sl_nlines; int sl_nlines;
/*@}*/
}; };
/** The structure used to store values parsed from a spec file. */
struct SpecStruct { struct SpecStruct {
/*@only@*/ const char *specFile; /*@{*/
/*@only@*/ const char *specFile; /*!< Name of the spec file. */
/*@only@*/ const char *sourceRpmName; /*@only@*/ const char *sourceRpmName;
/*@owned@*/ struct speclines *sl; /*@owned@*/ struct speclines *sl;
/*@owned@*/ struct spectags *st; /*@owned@*/ struct spectags *st;
/*@owned@*/ struct OpenFileInfo *fileStack; /*@owned@*/ struct OpenFileInfo *fileStack;
char lbuf[BUFSIZ]; char lbuf[BUFSIZ];
char nextpeekc; char nextpeekc;
char *nextline; /*@dependent@*/ char *nextline;
char *line; /*@dependent@*/ char *line;
int lineNum; int lineNum;
/*@only@*/ struct ReadLevelEntry *readStack; /*@owned@*/ struct ReadLevelEntry *readStack;
/*@refcounted@*/ Header buildRestrictions; /*@refcounted@*/ Header buildRestrictions;
/*@owned@*/ struct SpecStruct **buildArchitectureSpecs; /*@owned@*/ struct SpecStruct **buildArchitectureSpecs;
char ** buildArchitectures; /*@only@*/ const char ** buildArchitectures;
int buildArchitectureCount; int buildArchitectureCount;
int inBuildArchitectures; int inBuildArchitectures;
int force; int force;
int anyarch; int anyarch;
int gotBuildRoot; int gotBuildRootURL;
/*@only@*/ const char *buildRoot; /*@only@*/ const char *buildRootURL;
/*@only@*/ const char *buildSubdir; /*@only@*/ const char *buildSubdir;
char *passPhrase; char *passPhrase;
int timeCheck; int timeCheck;
char *cookie; char *cookie;
/*@owned@*/ struct Source *sources; /*@owned@*/ struct Source *sources;
int numSources; int numSources;
int noSource; int noSource;
/*@refcounted@*/ Header sourceHeader; /*@refcounted@*/ Header sourceHeader;
int sourceCpioCount; int sourceCpioCount;
/*@owned@*/ struct cpioFileMapping *sourceCpioList; /*@owned@*/ struct cpioFileMapping *sourceCpioList;
/*@dependent@*/ struct MacroContext *macros; /*@dependent@*/ struct MacroContext *macros;
/*@only@*/ StringBuf prep; /*@only@*/ const char *rootURL;
/*@only@*/ StringBuf build; /*@only@*/ StringBuf prep; /*!< %prep scriptlet. */
/*@only@*/ StringBuf install; /*@only@*/ StringBuf build; /*!< %build scriptlet. */
/*@only@*/ StringBuf clean; /*@only@*/ StringBuf install; /*!< %install scriptlet. */
/*@only@*/ StringBuf clean; /*!< %clean scriptlet. */
/*@owned@*/ struct PackageStruct *packages; /*@owned@*/ struct PackageStruct *packages; /*!< Package list. *
/
/*@}*/
}; };
/** The structure used to store values for a package. */
struct PackageStruct { struct PackageStruct {
/*@{*/
/*@refcounted@*/ Header header; /*@refcounted@*/ Header header;
int cpioCount; int cpioCount;
/*@only@*/ struct cpioFileMapping *cpioList; /*@owned@*/ struct cpioFileMapping *cpioList;
/*@owned@*/ struct Source *icon; /*@owned@*/ struct Source *icon;
int autoReq; int autoReq;
int autoProv; int autoProv;
char *preInFile; char *preInFile; /*!< %pre scriptlet. */
char *postInFile; char *postInFile; /*!< %post scriptlet. */
char *preUnFile; char *preUnFile; /*!< %preun scriptlet. */
char *postUnFile; char *postUnFile; /*!< %postun scriptlet. */
char *verifyFile; char *verifyFile; /*!< %verifyscript scriptlet. */
/*@only@*/ StringBuf specialDoc; /*@only@*/ StringBuf specialDoc;
#if 0 #if 0
struct ReqProvTrigger *triggers; struct ReqProvTrigger *triggers;
char *triggerScripts; char *triggerScripts;
#endif #endif
/*@only@*/ struct TriggerFileEntry *triggerFiles; /*@only@*/ struct TriggerFileEntry *triggerFiles;
/*@only@*/ char *fileFile; /*@only@*/ const char *fileFile;
/*@only@*/ StringBuf fileList; /* If NULL, package will not be written */ /*@only@*/ StringBuf fileList; /* If NULL, package will not be written */
/*@keep@*/ struct PackageStruct *next; /*@dependent@*/ struct PackageStruct *next;
/*@}*/
}; };
/** */
typedef struct PackageStruct *Package; typedef struct PackageStruct *Package;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/*@only@*/ Spec newSpec(void); /*@only@*/ Spec newSpec(void);
void freeSpec(/*@only@*/ Spec spec); void freeSpec(/*@only@*/ Spec spec);
extern void (*freeSpecVec) (Spec spec); /* XXX FIXME */ extern void (*freeSpecVec) (Spec spec); /* XXX FIXME */
 End of changes. 38 change blocks. 
21 lines changed or deleted 55 lines changed or added


 rpmurl.h   rpmurl.h 
#ifndef H_RPMURL #ifndef H_RPMURL
#define H_RPMURL #define H_RPMURL
#ifndef IPPORT_FTP #include <assert.h>
#define IPPORT_FTP 21
#endif
#ifndef IPPORT_HTTP
#define IPPORT_HTTP 80
#endif
#define FTPERR_BAD_SERVER_RESPONSE -1
#define FTPERR_SERVER_IO_ERROR -2
#define FTPERR_SERVER_TIMEOUT -3
#define FTPERR_BAD_HOST_ADDR -4
#define FTPERR_BAD_HOSTNAME -5
#define FTPERR_FAILED_CONNECT -6
#define FTPERR_FILE_IO_ERROR -7
#define FTPERR_PASSIVE_ERROR -8
#define FTPERR_FAILED_DATA_CONNECT -9
#define FTPERR_FILE_NOT_FOUND -10
#define FTPERR_NIC_ABORT_IN_PROGRESS -11
#define FTPERR_UNKNOWN -100
typedef enum { typedef enum {
URL_IS_UNKNOWN = 0, URL_IS_UNKNOWN = 0,
URL_IS_DASH = 1, URL_IS_DASH = 1,
URL_IS_PATH = 2, URL_IS_PATH = 2,
URL_IS_FTP = 3, URL_IS_FTP = 3,
URL_IS_HTTP = 4 URL_IS_HTTP = 4
} urltype; } urltype;
typedef struct urlinfo { #define URLMAGIC 0xd00b1ed0
const char *url; /* copy of original url */ #define URLSANE(u) assert(u && u->magic == URLMAGIC)
const char *service;
const char *user; typedef /*@abstract@*/ /*@refcounted@*/ struct urlinfo {
const char *password; /*@refs@*/ int nrefs;
const char *host; const char * url; /* copy of original url */
const char *portstr; const char * service;
const char *path; const char * user;
const char *proxyu; /* FTP: proxy user */ const char * password;
const char *proxyh; /* FTP/HTTP: proxy host */ const char * host;
const char * portstr;
const char * proxyu; /* FTP: proxy user */
const char * proxyh; /* FTP/HTTP: proxy host */
int proxyp; /* FTP/HTTP: proxy port */ int proxyp; /* FTP/HTTP: proxy port */
int port; int port;
int ftpControl; int urltype;
int ftpGetFileDoneNeeded; FD_t ctrl; /* control channel */
FD_t data; /* per-xfer data channel */
int bufAlloced; /* sizeof I/O buffer */
char *buf; /* I/O buffer */
int openError; /* Type of open failure */ int openError; /* Type of open failure */
} urlinfo; int httpVersion;
int httpHasRange;
int magic;
} *urlinfo;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/*@only@*/ /*@observer@*/ const char * ftpStrerror(int ftpErrno); extern int url_iobuf_size;
void urlSetCallback(rpmCallbackFunction notify, void *notifyData, int not urlinfo urlLink(urlinfo u, const char * msg);
ifyCount); urlinfo XurlLink(urlinfo u, const char * msg, const char * file, uns
int httpOpen(urlinfo *u); igned line);
int ftpOpen(urlinfo *u); #define urlLink(_u, _msg) XurlLink(_u, _msg, __FILE__, __LINE__)
int httpGetFile( /*@only@*/ FD_t sfd, FD_t tfd); urlinfo urlNew(const char * msg);
int ftpGetFile( /*@only@*/ FD_t sfd, FD_t tfd); urlinfo XurlNew(const char * msg, const char * file, unsigned line);
int ftpGetFileDesc(FD_t); #define urlNew(_msg) XurlNew(_msg, __FILE__, __LINE__)
int ftpAbort( /*@only@*/ FD_t fd);
int ftpClose( /*@only@*/ FD_t fd);
urltype urlIsURL(const char * url); urlinfo urlFree( /*@killref@*/ urlinfo u, const char * msg);
int urlSplit(const char *url, /*@out@*/ urlinfo **u); urlinfo XurlFree( /*@killref@*/ urlinfo u, const char * msg, const c
/*@only@*/ urlinfo *newUrlinfo(void); har * file, unsigned line);
void freeUrlinfo( /*@only@*/ urlinfo *u); #define urlFree(_u, _msg) XurlFree(_u, _msg, __FILE__, __LINE__)
/*@only@*/ FD_t ufdOpen(const char * pathname, int flags, mode_t mod void urlFreeCache(void);
e);
int ufdClose( /*@only@*/ FD_t fd); urltype urlIsURL(const char * url);
const char *urlStrerror(const char *url); int urlPath(const char * url, /*@out@*/ const char ** pathp);
int urlSplit(const char * url, /*@out@*/ urlinfo * u);
int urlGetFile(const char * url, const char * dest); int urlGetFile(const char * url, const char * dest);
void urlInvalidateCache(const char * url);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* H_RPMURL */ #endif /* H_RPMURL */
 End of changes. 10 change blocks. 
51 lines changed or deleted 40 lines changed or added


 stringbuf.h   stringbuf.h 
#ifndef _STRINGBUF_H_ #ifndef _STRINGBUF_H_
#define _STRINGBUF_H_ #define _STRINGBUF_H_
typedef /*@abstract@*/ struct StringBufRec *StringBuf; typedef /*@abstract@*/ struct StringBufRec *StringBuf;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/*@only@*/ StringBuf newStringBuf(void); /*@only@*/ StringBuf newStringBuf(void);
void freeStringBuf(/*@only@*/ StringBuf sb); void freeStringBuf( /*@only@*/ StringBuf sb);
void truncStringBuf(StringBuf sb); void truncStringBuf(StringBuf sb);
char *getStringBuf(StringBuf sb); /*@observer@*/ char *getStringBuf(StringBuf sb);
void stripTrailingBlanksStringBuf(StringBuf sb); void stripTrailingBlanksStringBuf(StringBuf sb);
#define appendStringBuf(sb, s) appendStringBufAux(sb, s, 0) #define appendStringBuf(sb, s) appendStringBufAux(sb, s, 0)
#define appendLineStringBuf(sb, s) appendStringBufAux(sb, s, 1) #define appendLineStringBuf(sb, s) appendStringBufAux(sb, s, 1)
void appendStringBufAux(StringBuf sb, const char *s, int nl); void appendStringBufAux(StringBuf sb, const char *s, int nl);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/