*/
#include <sys/types.h>
+#ifndef _WIN32
#include <sys/time.h>
+#include <sys/file.h>
+#else
+#include <fcntl.h>
+#include <io.h>
+#define L_SET SEEK_SET
+#endif
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
-#include <sys/file.h>
#include <afsconfig.h>
#include <afs/param.h>
+#include <afs/com_err.h>
RCSID
("$Header$");
#include <afs/afsutil.h>
#include <errno.h>
#include <lock.h>
+#ifndef _WIN32
#include <netinet/in.h>
+#endif
#define UBIK_INTERNALS
#include <ubik.h>
#include <rx/xdr.h>
#include "ptint.h"
#include "ptserver.h"
#include "pterror.h"
+#include "ptprototypes.h"
#define IDHash(x) (abs(x) % HASHSIZE)
#define print_id(x) ( ((flags&DO_SYS)==0 && (x<-32767 || x>97536)) || \
extern int optind;
int restricted = 0;
-int display_entry();
-void add_group();
-void display_groups();
-void display_group();
-void fix_pre();
-char *checkin();
-char *check_core();
-char *id_to_name();
-int CommandProc(struct cmd_syndesc *, void *);
+
+static int display_entry(int);
+static void add_group(long);
+static void display_groups(void);
+static void display_group(int);
+static void fix_pre(struct prentry *);
+static char *id_to_name(int);
+static char *checkin(struct prentry *);
+static char *check_core(int);
+static int CommandProc(struct cmd_syndesc *, void *);
struct hash_entry {
char h_name[PR_MAXNAMELEN];
}
-int
+static int
CommandProc(register struct cmd_syndesc *a_as, void *arock)
{
register int i;
long code = 0;
- long cc, upos;
+ long upos;
long gpos = 0;
struct prentry uentry, gentry;
struct ubik_hdr *uh;
exit(0);
}
-int
+static int
display_entry(int offset)
{
- register int i;
-
lseek(dbase_fd, offset + HDRSIZE, L_SET);
read(dbase_fd, &pre, sizeof(struct prentry));
return (nflag ? pre.nextName : pre.nextID);
}
-void
+static void
add_group(long id)
{
struct grp_list *g;
g->groups[i] = id;
}
-void
-display_groups()
+static void
+display_groups(void)
{
register int i, id;
struct grp_list *g;
}
}
-void
+static void
display_group(int id)
{
register int i, offset;
}
}
-void
+static void
fix_pre(struct prentry *pre)
{
register int i;
}
}
-char *
+static char *
id_to_name(int id)
{
register int offset;
return 0;
}
-char *
+static char *
checkin(struct prentry *pre)
{
struct hash_entry *he, *last;
return (he->h_name);
}
-char *
+static char *
check_core(register int id)
{
struct hash_entry *he;