diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-09-25 22:46:02 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-09-25 22:46:02 +0300 |
commit | d16bdb1550c3c3c13a40ad9cb6869564a6abbc38 (patch) | |
tree | 149fe2ff6115db97e435b09a4809995f6cf464e1 /build | |
parent | b813710a4ca26743291cbdbbb3831d5a3e103356 (diff) | |
download | rpm-d16bdb1550c3c3c13a40ad9cb6869564a6abbc38.tar.gz rpm-d16bdb1550c3c3c13a40ad9cb6869564a6abbc38.tar.bz2 rpm-d16bdb1550c3c3c13a40ad9cb6869564a6abbc38.zip |
Hide rpmfc structure internals from the API
Diffstat (limited to 'build')
-rw-r--r-- | build/rpmfc.c | 41 | ||||
-rw-r--r-- | build/rpmfc.h | 44 |
2 files changed, 55 insertions, 30 deletions
diff --git a/build/rpmfc.c b/build/rpmfc.c index 40aa9e261..2db0b42d3 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -21,6 +21,36 @@ #include "debug.h" +/** + */ +struct rpmfc_s { + int nfiles; /*!< no. of files */ + int fknown; /*!< no. of classified files */ + int fwhite; /*!< no. of "white" files */ + int ix; /*!< current file index */ + int skipProv; /*!< Don't auto-generate Provides:? */ + int skipReq; /*!< Don't auto-generate Requires:? */ + int tracked; /*!< Versioned Provides: tracking dependency added? */ + size_t brlen; /*!< strlen(spec->buildRoot) */ + + ARGV_t fn; /*!< (#files) file names */ + ARGI_t fcolor; /*!< (#files) file colors */ + ARGI_t fcdictx; /*!< (#files) file class dictionary indices */ + ARGI_t fddictx; /*!< (#files) file depends dictionary start */ + ARGI_t fddictn; /*!< (#files) file depends dictionary no. entries */ + ARGV_t cdict; /*!< (#classes) file class dictionary */ + ARGV_t ddict; /*!< (#dependencies) file depends dictionary */ + ARGI_t ddictx; /*!< (#dependencies) file->dependency mapping */ + + rpmds provides; /*!< (#provides) package provides */ + rpmds requires; /*!< (#requires) package requires */ + + StringBuf sb_java; /*!< concatenated list of java colored files. */ + StringBuf sb_perl; /*!< concatenated list of perl colored files. */ + StringBuf sb_python;/*!< concatenated list of python colored files. */ + +}; + /** */ @@ -616,6 +646,17 @@ rpmfc rpmfcNew(void) return fc; } +rpmds rpmfcProvides(rpmfc fc) +{ + return (fc != NULL ? fc->provides : NULL); +} + +rpmds rpmfcRequires(rpmfc fc) +{ + return (fc != NULL ? fc->requires : NULL); +} + + /** * Extract script dependencies. * @param fc file classifier diff --git a/build/rpmfc.h b/build/rpmfc.h index cd621daef..aa79fd279 100644 --- a/build/rpmfc.h +++ b/build/rpmfc.h @@ -11,36 +11,6 @@ typedef struct rpmfc_s * rpmfc; /** */ -struct rpmfc_s { - int nfiles; /*!< no. of files */ - int fknown; /*!< no. of classified files */ - int fwhite; /*!< no. of "white" files */ - int ix; /*!< current file index */ - int skipProv; /*!< Don't auto-generate Provides:? */ - int skipReq; /*!< Don't auto-generate Requires:? */ - int tracked; /*!< Versioned Provides: tracking dependency added? */ - size_t brlen; /*!< strlen(spec->buildRoot) */ - - ARGV_t fn; /*!< (#files) file names */ - ARGI_t fcolor; /*!< (#files) file colors */ - ARGI_t fcdictx; /*!< (#files) file class dictionary indices */ - ARGI_t fddictx; /*!< (#files) file depends dictionary start */ - ARGI_t fddictn; /*!< (#files) file depends dictionary no. entries */ - ARGV_t cdict; /*!< (#classes) file class dictionary */ - ARGV_t ddict; /*!< (#dependencies) file depends dictionary */ - ARGI_t ddictx; /*!< (#dependencies) file->dependency mapping */ - - rpmds provides; /*!< (#provides) package provides */ - rpmds requires; /*!< (#requires) package requires */ - - StringBuf sb_java; /*!< concatenated list of java colored files. */ - StringBuf sb_perl; /*!< concatenated list of perl colored files. */ - StringBuf sb_python;/*!< concatenated list of python colored files. */ - -}; - -/** - */ enum FCOLOR_e { RPMFC_BLACK = 0, RPMFC_ELF32 = (1 << 0), @@ -159,6 +129,20 @@ int rpmfcApply(rpmfc fc); */ int rpmfcGenerateDepends(const rpmSpec spec, Package pkg); +/** + * Retrieve file classification provides + * @param fc file classifier + * @return rpmds dependency set of fc provides + */ +rpmds rpmfcProvides(rpmfc fc); + +/** + * Retrieve file classification requires + * @param fc file classifier + * @return rpmds dependency set of fc requires + */ +rpmds rpmfcRequires(rpmfc fc); + #ifdef __cplusplus } #endif |