evr.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2007, Novell Inc.
00003  *
00004  * This program is licensed under the BSD license, read LICENSE.BSD
00005  * for further information
00006  */
00007 
00008 /*
00009  * evr.h
00010  * 
00011  */
00012 
00013 #ifndef SATSOLVER_EVR_H
00014 #define SATSOLVER_EVR_H
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 
00020 #include "pooltypes.h"
00021 
00022 #define EVRCMP_COMPARE                  0
00023 #define EVRCMP_MATCH_RELEASE            1
00024 #define EVRCMP_MATCH                    2
00025 #define EVRCMP_COMPARE_EVONLY           3
00026 
00027 extern int sat_vercmp(const char *s1, const char *q1, const char *s2, const char *q2);
00028 
00029 extern int pool_evrcmp_str(const Pool *pool, const char *evr1, const char *evr2, int mode);
00030 extern int pool_evrcmp(const Pool *pool, Id evr1id, Id evr2id, int mode);
00031 extern int pool_evrmatch(const Pool *pool, Id evrid, const char *epoch, const char *version, const char *release);
00032 
00033 /* obsolete, do not use in new code */
00034 static inline int vercmp(const char *s1, const char *q1, const char *s2, const char *q2)
00035 {
00036   return sat_vercmp(s1, q1, s2, q2);
00037 }
00038 static inline int evrcmp_str(const Pool *pool, const char *evr1, const char *evr2, int mode)
00039 {
00040   return pool_evrcmp_str(pool, evr1, evr2, mode);
00041 }
00042 static inline int evrcmp(const Pool *pool, Id evr1id, Id evr2id, int mode)
00043 {
00044   return pool_evrcmp(pool, evr1id, evr2id, mode);
00045 }
00046 static inline int evrmatch(const Pool *pool, Id evrid, const char *epoch, const char *version, const char *release)
00047 {
00048   return pool_evrmatch(pool, evrid, epoch, version, release);
00049 }
00050 
00051 #ifdef __cplusplus
00052 }
00053 #endif
00054 
00055 #endif /* SATSOLVER_EVR_H */

Generated on Mon Dec 15 17:56:24 2014 for satsolver by  doxygen 1.5.6