-/*
- * for performance optimization, netproc loads the list of room names (and
- * their corresponding directory names, if applicable) into a table in memory.
- */
-int load_roomnames(void) {
- FILE *fp;
- struct quickroom qbuf;
- int i;
-
- fp=fopen("./quickroom","rb");
- if (fp==NULL) return(1);
- for (i=0; i<MAXROOMS; ++i) {
- if (fread((char *)&qbuf,sizeof(struct quickroom),1,fp)!=1)
- return(1);
- strcpy(roomnames[i],qbuf.QRname);
- if (qbuf.QRflags & QR_DIRECTORY)
- strcpy(roomdirs[i],qbuf.QRdirname);
- else
- strcpy(roomdirs[i],config.c_bucket_dir);
- }
- fclose(fp);
- return(0);
- }
-