The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

fprint.h (3)
  • >> fprint.h (3) ( Linux man: Библиотечные вызовы )
  •  

    NAME

    rpmdb/fprint.h - Identify a file name path by a unique 'finger print'. 
     
    

    SYNOPSIS


    #include 'rpmhash.h'
    #include 'header.h'
     

    Data Structures


    struct fingerPrint_s
    Associates a trailing sub-directory and final base name with an existing directory finger print.
    struct fprintCache_s
    Finger print cache.
    struct fprintCacheEntry_s
    Finger print cache entry.  

    Defines


    #define fpFree(a) free((void *)(a).baseName)

    #define FP_ENTRY_EQUAL(a, b) (((a)->dev == (b)->dev) && ((a)->ino == (b)->ino))

    #define FP_EQUAL(a, b)
     

    Typedefs


    typedef fprintCache_s * fingerPrintCache

    typedef fingerPrint_s fingerPrint
     

    Functions


    int rpmdbFindFpList (rpmdb db, fingerPrint *fpList, dbiIndexSet *matchList, int numItems)

    fingerPrintCache fpCacheCreate (int sizeHint)
    Create finger print cache.
    void fpCacheFree (fingerPrintCache cache)
    Destroy finger print cache.
    fingerPrint fpLookup (fingerPrintCache cache, const char *dirName, const char *baseName, int scareMemory)
    Return finger print of a file path.
    unsigned int fpHashFunction (const void *key)
    Return hash value for a finger print.
    int fpEqual (const void *key1, const void *key2)
    Compare two finger print entries.
    void fpLookupList (fingerPrintCache cache, const char **dirNames, const char **baseNames, const int *dirIndexes, int fileCount, fingerPrint *fpList)
    Return finger prints of an array of file paths.
    void fpLookupHeader (fingerPrintCache cache, Header h, fingerPrint *fpList)
    Return finger prints of all file names in header.  

    DETAILED DESCRIPTION

    Identify a file name path by a unique 'finger print'.

    Definition in file fprint.h.  

    DEFINE DOCUMENTATION

     

    #define FP_ENTRY_EQUAL(a, b) (((a)->dev == (b)->dev) && ((a)->ino == (b)->ino))

    Definition at line 58 of file fprint.h.  

    #define FP_EQUAL(a, b)

    Value:

    (         FP_ENTRY_EQUAL((a).entry, (b).entry) &&         !strcmp((a).baseName, (b).baseName) && (             ((a).subDir == (b).subDir) ||             ((a).subDir && (b).subDir && !strcmp((a).subDir, (b).subDir))         )     )
    

    Definition at line 61 of file fprint.h.

    Referenced by fpEqual(), handleOverlappedFiles(), rpmdbFindByFile(), and rpmdbFindFpList().  

    #define fpFree(a) free((void *)(a).baseName)

    Definition at line 55 of file fprint.h.  

    TYPEDEF DOCUMENTATION

     

    typedef struct fingerPrint_s fingerPrint

    Todo:
     Convert to pointer and make abstract.  

    Definition at line 19 of file fprint.h.  

    typedef struct fprintCache_s* fingerPrintCache

    Definition at line 14 of file fprint.h.  

    FUNCTION DOCUMENTATION

     

    fingerPrintCache fpCacheCreate (int sizeHint)

    Create finger print cache.

    Parameters:

    sizeHint
    number of elements expected

    Returns: pointer to initialized fingerprint cache

    Definition at line 13 of file fprint.c.

    References fprintCache_s::ht, htCreate(), and xmalloc().

    Referenced by rpmdbFindByFile(), rpmdbFindFpList(), and rpmRunTransactions().  

    void fpCacheFree (fingerPrintCache cache)

    Destroy finger print cache.

    Parameters:

    cache
    pointer to fingerprint cache

    Definition at line 23 of file fprint.c.

    References fprintCache_s::ht, and htFree().

    Referenced by rpmdbFindByFile(), rpmdbFindFpList(), and rpmRunTransactions().  

    int fpEqual (const void * key1, const void * key2)

    Compare two finger print entries.

    exactly equivalent to FP_EQUAL macro.

    Parameters:

    key1
    finger print 1
    key2
    finger print 2

    Returns: result of comparing key1 and key2

    Definition at line 209 of file fprint.c.

    References FP_EQUAL.  

    unsigned int fpHashFunction (const void * key)

    Return hash value for a finger print.

    Hash based on dev and inode only!

    Parameters:

    key
    pointer to finger print entry

    Returns: hash value

    Definition at line 191 of file fprint.c.

    References fingerPrint_s::baseName, fprintCacheEntry_s::dev, fingerPrint_s::entry, and fprintCacheEntry_s::ino.  

    fingerPrint fpLookup (fingerPrintCache cache, const char * dirName, const char * baseName, int scareMemory)

    Return finger print of a file path.

    Parameters:

    cache
    pointer to fingerprint cache
    dirName
    leading directory name of file path
    baseName
    base name of file path
    scareMemory
    Returns: pointer to the finger print associated with a file path.

    Definition at line 185 of file fprint.c.

    References doLookup().

    Referenced by rpmdbFindByFile().  

    void fpLookupHeader (fingerPrintCache cache, Header h, fingerPrint * fpList)

    Return finger prints of all file names in header.

    @warning: scareMemory is assumed!

    Parameters:

    cache
    pointer to fingerprint cache
    h
    package header

    Return values:

    fpList
    pointer to array of finger prints

    Definition at line 247 of file fprint.c.

    References fpLookupList(), HFD_t, HGE_t, int_32, RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, and rpmTagType.  

    void fpLookupList (fingerPrintCache cache, const char ** dirNames, const char ** baseNames, const int * dirIndexes, int fileCount, fingerPrint * fpList)

    Return finger prints of an array of file paths.

    @warning: scareMemory is assumed!

    Parameters:

    cache
    pointer to fingerprint cache
    dirNames
    directory names
    baseNames
    file base names
    dirIndexes
    index into dirNames for each baseNames
    fileCount
    number of file entries

    Return values:

    fpList
    pointer to array of finger prints

    Definition at line 227 of file fprint.c.

    References fingerPrint_s::baseName, doLookup(), fingerPrint_s::entry, and fingerPrint_s::subDir.

    Referenced by fpLookupHeader(), rpmdbFindFpList(), and rpmRunTransactions().  

    AUTHOR

    Generated automatically by Doxygen for rpm from the source code.


     

    Index

    NAME
    SYNOPSIS
    Data Structures
    Defines
    Typedefs
    Functions
    DETAILED DESCRIPTION
    DEFINE DOCUMENTATION
    #define FP_ENTRY_EQUAL(a, b) (((a)->dev == (b)->dev) && ((a)->ino == (b)->ino))
    #define FP_EQUAL(a, b)
    #define fpFree(a) free((void *)(a).baseName)
    TYPEDEF DOCUMENTATION
    typedef struct fingerPrint_s fingerPrint
    typedef struct fprintCache_s* fingerPrintCache
    FUNCTION DOCUMENTATION
    fingerPrintCache fpCacheCreate (int sizeHint)
    void fpCacheFree (fingerPrintCache cache)
    int fpEqual (const void * key1, const void * key2)
    unsigned int fpHashFunction (const void * key)
    fingerPrint fpLookup (fingerPrintCache cache, const char * dirName, const char * baseName, int scareMemory)
    void fpLookupHeader (fingerPrintCache cache, Header h, fingerPrint * fpList)
    void fpLookupList (fingerPrintCache cache, const char ** dirNames, const char ** baseNames, const int * dirIndexes, int fileCount, fingerPrint * fpList)
    AUTHOR


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру