3 * Declarations for Moira database consistancy checker
5 * (c) Copyright 1988 by the Massachusetts Institute of Technology.
6 * For copying and distribution information, please see the file
10 #include <mit-copyright.h>
11 #include <moira_site.h>
18 extern int debug, mode, fast, dcmenable, warn;
19 extern struct hash *users, *machines, *clusters, *lists;
20 extern struct hash *filesys, *nfsphys, *strings, *subnets, *string_dups;
22 #define MAX_ID_VALUE 32765
23 #define MIN_ID_VALUE 100
25 #define dprintf if (debug) printf
102 void out_of_mem(char *msg);
105 void modified(char *table);
111 void count_only_setup(void);
113 /* prototypes from fix.pc */
114 void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
115 char *idfield, int preen);
116 void single_delete(char *table, char *idfield, int id);
117 void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
118 int single_fix(char *msg, int preen);
119 void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
120 void (*ffunc)(void *), int preen);
121 int prompt(char *msg);
122 int set_next_object_id(char *object, char *tablename);
123 int generic_fix_id(char *tbl, char *idfield, char *txtfield,
124 int oldid, char *name);
126 /* prototypes from phase3.pc */
127 struct string *string_check(int id);