File: db.h

package info (click to toggle)
mcelog 104-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 996 kB
  • ctags: 1,508
  • sloc: ansic: 7,739; sh: 481; makefile: 87
file content (29 lines) | stat: -rw-r--r-- 1,268 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>
struct database;
struct group;

struct database *open_db(char *fn, int wr);
int sync_db(struct database *db);
int close_db(struct database *db);
struct group *find_group(struct database *db, char *name);
char *entry_val(struct group *g, char *entry);
struct group *add_group(struct database *db, char *name, int *existed);
int delete_group(struct database *db, struct group *g);
void change_entry(struct database *db, struct group *g,
		  char *entry, char *newval);
void add_comment(struct database *db, struct group *group, char *comment);
struct group *first_group(struct database *db);
struct group *next_group(struct group *g);
void dump_group(struct group *g, FILE *out);
void dump_database(struct database *db, FILE *out);
struct group *find_entry(struct database *db, struct group *prev,
			 char *entry, char *value);
void rename_group(struct database *db, struct group *group, char *newname);
char *group_name(struct group *g);
unsigned long entry_num(struct group *g, char *entry);
void change_entry_num(struct database *db, struct group *g, char *entry,
		      unsigned long val);
void delete_entry(struct database *db, struct group *g, char *entry);
struct group *
clone_group(struct database *db, struct group *gold, char *newname);