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 str2id (Pool *pool, const char *str, int create)
Id strn2id (Pool *pool, const char *str, unsigned int len, int create)
Id rel2id (Pool *pool, Id name, Id evr, int flags, int create)
const char * id2str (const Pool *pool, Id id)
const char * id2rel (const Pool *pool, Id id)
const char * 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 * 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 str2id ( Pool pool,
const char *  str,
int  create 
)

Id strn2id ( Pool pool,
const char *  str,
unsigned int  len,
int  create 
)

Id rel2id ( Pool pool,
Id  name,
Id  evr,
int  flags,
int  create 
)

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

const char* 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 dep2strcpy(), and dep2strlen().

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

static int dep2strlen ( const Pool pool,
Id  id 
) [static]

static void dep2strcpy ( const Pool pool,
char *  p,
Id  id,
int  oldrel 
) [static]

const char* 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 id2rel().


doxygen