evr.h
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
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 
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