14 main(int argc, char **argv)
20 if (db_create(&db, 0, 0))
25 if (db->open(db, 0, "/var/lib/rpm/Name", 0, DB_UNKNOWN, DB_RDONLY, 0664))
32 if (db->cursor(db, NULL, &dbc, 0))
37 while (dbc->c_get(dbc, &key, &data, DB_NEXT) == 0)
38 printf("%*.*s\n", (int)key.size, (int)key.size, (char *)key.data);
47 key.data = (void *)*argv;
48 key.size = strlen(*argv);
51 if (db->get(db, 0, &key, &data, 0) == 0)
52 printf("%s\n", *argv);