diff options
author | jbj <devnull@localhost> | 2002-10-14 14:52:45 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-10-14 14:52:45 +0000 |
commit | a0bdebee4dad4cae17a8585cf9be74fb7093a3c5 (patch) | |
tree | c901b42ba16683908e0ee12c3c7495913453892f /build/rpmfc.h | |
parent | 627873989525aa2c713a1a755d82b3ad79575d8e (diff) | |
download | librpm-tizen-a0bdebee4dad4cae17a8585cf9be74fb7093a3c5.tar.gz librpm-tizen-a0bdebee4dad4cae17a8585cf9be74fb7093a3c5.tar.bz2 librpm-tizen-a0bdebee4dad4cae17a8585cf9be74fb7093a3c5.zip |
Spin mostly complete file classifier off to rpmfc.[ch].
CVS patchset: 5773
CVS date: 2002/10/14 14:52:45
Diffstat (limited to 'build/rpmfc.h')
-rw-r--r-- | build/rpmfc.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/build/rpmfc.h b/build/rpmfc.h new file mode 100644 index 000000000..c9229725b --- /dev/null +++ b/build/rpmfc.h @@ -0,0 +1,86 @@ +#ifndef _H_RPMFC_ +#define _H_RPMFC_ + +typedef struct fclass_s * FCLASS_t; + +struct fclass_s { + ARGV_t av; /*!< file(1) output lines */ + int ac; /*!< no. of lines */ + int ix; /*!< current lineno */ + ARGV_t fn; /*!< file names */ + ARGI_t fcolor; /*!< file colors */ + ARGI_t fdictx; /*!< file class dictionary indices */ + ARGV_t dict; /*!< file class dictionary */ +}; + + +enum FCOLOR_e { + RPMFC_BLACK = 0, + RPMFC_ELF32 = (1 << 0), + RPMFC_ELF64 = (1 << 1), + + RPMFC_EXECUTABLE = (1 << 2), + RPMFC_SCRIPT = (1 << 3), + RPMFC_TEXT = (1 << 4), + + RPMFC_DIRECTORY = (1 << 8), + RPMFC_LIBRARY = (1 << 9), + RPMFC_DOCUMENT = (1 << 10), + + RPMFC_STATIC = (1 << 16), + RPMFC_NOTSTRIPPED = (1 << 18), + RPMFC_COMPRESSED = (1 << 19), + + RPMFC_SYMLINK = (1 << 24), + RPMFC_ARCHIVE = (1 << 25), + RPMFC_FONT = (1 << 26), + + RPMFC_WHITE = (1 << 29), + RPMFC_INCLUDE = (1 << 30), + RPMFC_ERROR = (1 << 31) +}; +typedef enum FCOLOR_e FCOLOR_t; + +struct fclassTokens_s { +/*@observer@*/ + const char * token; + int colors; +}; + +typedef struct fclassTokens_s * fclassToken; + +#ifdef __cplusplus +extern "C" { +#endif + +/** + */ +int fclassColoring(const char * fmstr) + /*@*/; + +/** + */ +void fclassPrint(const char * msg, FCLASS_t fc, FILE * fp) + /*@globals fileSystem @*/ + /*@modifies *fp, fileSystem @*/; +/** + */ +/*@null@*/ +FCLASS_t fclassFree(/*@only@*/ /*@null@*/ FCLASS_t fc) + /*@modifies fc @*/; + +/** + */ +FCLASS_t fclassNew(void) + /*@*/; + +/** + */ +int fclassClassify(/*@out@*/ FCLASS_t *fcp, ARGV_t argv) + /*@modifies *fcp @*/; + +#ifdef __cplusplus +} +#endif + +#endif /* _H_RPMFC_ */ |