- sprintf(buf,"%s/files/%s/filedir",BBSDIR,CC->quickroom.QRdirname);
- fd = fopen(buf,"r");
- if (fd==NULL) fd=fopen("/dev/null","r");
-
- ls = fopen(CC->temp,"r");
- while (fgets(flnm,256,ls)!=NULL) {
- flnm[strlen(flnm)-1]=0;
- if (strcasecmp(flnm,"filedir")) {
- sprintf(buf,"%s/files/%s/%s",
- BBSDIR,CC->quickroom.QRdirname,flnm);
- stat(buf,&statbuf);
- strcpy(comment,"");
- fseek(fd,0L,0);
- while ((fgets(buf,256,fd)!=NULL)
- &&(strlen(comment)==0)) {
- buf[strlen(buf)-1] = 0;
- if ((!strncasecmp(buf,flnm,strlen(flnm)))
- && (buf[strlen(flnm)]==' '))
+ sprintf(buf, "%s/files/%s/filedir", BBSDIR, CC->quickroom.QRdirname);
+ fd = fopen(buf, "r");
+ if (fd == NULL)
+ fd = fopen("/dev/null", "r");
+
+ ls = fopen(CC->temp, "r");
+ while (fgets(flnm, 256, ls) != NULL) {
+ flnm[strlen(flnm) - 1] = 0;
+ if (strcasecmp(flnm, "filedir")) {
+ sprintf(buf, "%s/files/%s/%s",
+ BBSDIR, CC->quickroom.QRdirname, flnm);
+ stat(buf, &statbuf);
+ strcpy(comment, "");
+ fseek(fd, 0L, 0);
+ while ((fgets(buf, 256, fd) != NULL)
+ && (strlen(comment) == 0)) {
+ buf[strlen(buf) - 1] = 0;
+ if ((!strncasecmp(buf, flnm, strlen(flnm)))
+ && (buf[strlen(flnm)] == ' '))