satsolver  0.17.2
Functions | Variables
poolid.c File Reference
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "pool.h"
#include "poolid.h"
#include "poolid_private.h"
#include "util.h"

Go to the source code of this file.

Functions

Id pool_str2id (Pool *pool, const char *str, int create)
 
Id pool_strn2id (Pool *pool, const char *str, unsigned int len, int create)
 
Id pool_rel2id (Pool *pool, Id name, Id evr, int flags, int create)
 
const char * pool_id2str (const Pool *pool, Id id)
 
const char * pool_id2rel (const Pool *pool, Id id)
 
const char * pool_id2evr (const Pool *pool, Id id)
 
static int dep2strlen (const Pool *pool, Id id)
 
static void dep2strcpy (const Pool *pool, char *p, Id id, int oldrel)
 
const char * pool_dep2str (Pool *pool, Id id)
 
void pool_shrink_strings (Pool *pool)
 
void pool_shrink_rels (Pool *pool)
 
void pool_freeidhashes (Pool *pool)
 

Variables

static const char * rels []
 

Function Documentation

Id pool_str2id ( Pool pool,
const char *  str,
int  create 
)
Id pool_strn2id ( Pool pool,
const char *  str,
unsigned int  len,
int  create 
)
Id pool_rel2id ( Pool pool,
Id  name,
Id  evr,
int  flags,
int  create 
)
const char* pool_id2str ( const Pool pool,
Id  id 
)

Definition at line 124 of file poolid.c.

References GETRELDEP, ISRELDEP, _Reldep::name, _Pool::ss, _Stringpool::strings, and _Stringpool::stringspace.

Referenced by id2str().

const char* pool_id2rel ( const Pool pool,
Id  id 
)

Definition at line 158 of file poolid.c.

References _Reldep::flags, GETRELDEP, ISRELDEP, REL_AND, REL_ARCH, REL_FILECONFLICT, REL_NAMESPACE, REL_OR, REL_WITH, and rels.

Referenced by id2rel().

const char* pool_id2evr ( const Pool pool,
Id  id 
)

Definition at line 191 of file poolid.c.

References _Reldep::evr, GETRELDEP, ISRELDEP, _Pool::ss, _Stringpool::strings, and _Stringpool::stringspace.

Referenced by id2evr().

static int dep2strlen ( const Pool pool,
Id  id 
)
static
static void dep2strcpy ( const Pool pool,
char *  p,
Id  id,
int  oldrel 
)
static
const char* pool_dep2str ( Pool pool,
Id  id 
)
void pool_shrink_strings ( Pool pool)

Definition at line 270 of file poolid.c.

References _Pool::ss, and stringpool_shrink().

Referenced by repo_add_solv_flags().

void pool_shrink_rels ( Pool pool)

Definition at line 276 of file poolid.c.

References _Pool::nrels, REL_BLOCK, _Pool::rels, and sat_extend_resize().

Referenced by repo_add_solv_flags().

void pool_freeidhashes ( Pool pool)

Variable Documentation

const char* rels[]
static
Initial value:
= {
" ! ",
" > ",
" = ",
" >= ",
" < ",
" <> ",
" <= ",
" <=> "
}

Definition at line 136 of file poolid.c.

Referenced by pool_id2rel().