rpm  4.10.90
spooltest.c
Go to the documentation of this file.
00001 #include "system.h"
00002 
00003 #include <stdio.h>
00004 #include "lib/rpmsidpool.h"
00005 
00006 #include "debug.h"
00007 
00008 int main(int argc, char *argv[])
00009 {
00010     rpmsidPool pool;
00011     rpmsid sid;
00012     const char *zz = "foo";
00013     const char *yy = "bar";
00014     const char *s;
00015 
00016     pool = rpmsidPoolCreate();
00017     printf("pool at elevel %p\n", pool);
00018     sid = rpmsidPoolId(pool, zz, 1);
00019     printf("got id %u for %s\n", sid, zz);
00020     s = rpmsidPoolStr(pool, sid);
00021     printf("got string %s\n", s);
00022     sid = rpmsidPoolId(pool, zz, 1);
00023     printf("got id %u for %s\n", sid, zz);
00024 
00025     sid = rpmsidPoolId(pool, yy, 1);
00026     printf("got id %u for %s\n", sid, yy);
00027     s = rpmsidPoolStr(pool, sid);
00028     printf("got string %s\n", s);
00029 
00030     rpmsidPoolFree(pool);
00031 }