home *** CD-ROM | disk | FTP | other *** search
-
-
- #include <stdio.h>
- #include <string.h>
-
-
- #include "f2lfunz.h"
-
-
- typedef unsigned short bit;
- typedef unsigned short word;
- typedef unsigned char byte;
- typedef long dword;
-
-
- #include "sb116.h"
-
-
- #define LORASIZE 0x280
- struct _lora
- {
- char file_name[70]; /* File area name */
- short file_num; /* File area number */
- char uppath[40]; /* Upload path */
- char filepath[40]; /* Download path */
- char filelist[50]; /* CD-ROM list file name */
- char filler[LORASIZE-(70+2+40+40+50)];
-
- } lora;
-
-
- struct FLSearchRec fbbs;
-
-
- #define MAXLEN 100
-
-
- char lorapath[MAXLEN];
-
-
-
-
-
- int main(int argc, char **argv)
- {
- FILE *fin;
- FILE *fout;
-
- char in[MAXLEN];
- char out[MAXLEN];
- char a[MAXLEN];
-
-
- puts("\nL2FEBBS V1.00");
- puts("Written by Maurizio Giunti (2:332/102.3@fidonet.org)");
- puts("This utility is FREEWARE: copy and use it freely.\n");
-
-
- if(argc!=2)
- {
- puts("Usage:");
- puts(" L2FEBBS <Lora_path>");
- return 0;
- }
-
- Slash(strcpy(lorapath,argv[1]));
-
- sprintf(in,"%sSYSFILE.DAT",lorapath);
- sprintf(out,"%sFLSEARCH.BBS",lorapath);
-
-
- if((fin=fopen(in,"rb"))==NULL)
- {
- puts("Can't open INPUT file !");
- }
- if((fout=fopen(out,"wb"))==NULL)
- {
- puts("Can't open OUTPUT file !");
- fclose(fin);
- return 0;
- }
-
-
- while(fread((void *)&lora,LORASIZE,1,fin)==1)
- {
- if(feof(fin)) break;
- if(lora.file_name[0]=='\0') continue;
-
- // Opera la conversione e la copia dei dati
-
- strcpy(a,lora.file_name);
- a[60]='\0';
- C2P(fbbs.Name,a);
-
- puts(a);
-
- C2P(fbbs.Directory,NoSlash(lora.filepath));
-
- fbbs.Security=0;
- fbbs.Flags=0;
- fbbs.PFilesSec=0;
- fbbs.PFlags=0;
- fbbs.Attrib=0;
- fbbs.Age=0;
- //fbbs.ListName[0]=0;
- C2P(fbbs.ListName,NoSlash(lora.filelist));
-
- // Scrive area
- fwrite((void *)&fbbs,sizeof(struct FLSearchRec),1,fout);
-
-
- if(*lora.uppath!='\0')
- {
- // Se c'e' una dir di upload la usa
- a[55]='\0';
- strcat(a," (UP)");
- puts(a);
- C2P(fbbs.Name,a);
- C2P(fbbs.Directory,lora.uppath);
- fbbs.ListName[0]=0;
- fwrite((void *)&fbbs,sizeof(struct FLSearchRec),1,fout);
- }
-
-
-
-
- }
-
-
- fclose(fout);
- fclose(fin);
-
- return 0;
- }
-
-
-
-
-
-
-