Changed newfiles and filefind setup for Templates

This commit is contained in:
Michiel Broek 2002-03-30 12:00:00 +00:00
parent 263096b71c
commit faea9ec83a
3 changed files with 18 additions and 0 deletions

View File

@ -4635,6 +4635,10 @@ v0.33.20 10-Feb-2002
Corrected screen layout in menu 1.4.11. Corrected screen layout in menu 1.4.11.
When editing analogue modem lines, the locked portspeed was When editing analogue modem lines, the locked portspeed was
in a lot of cases set to 0. in a lot of cases set to 0.
In newfiles and filefind reports sets default template files
during init.
When adding a new newfiles or filefind record some defaults
are automatic filled in.
mbfido: mbfido:
In AreaMgr and FileMgr changed aka matching for area In AreaMgr and FileMgr changed aka matching for area

View File

@ -120,6 +120,10 @@ int OpenFilefind(void)
*/ */
memset(&scanmgr, 0, sizeof(scanmgr)); memset(&scanmgr, 0, sizeof(scanmgr));
while (fread(&scanmgr, oldsize, 1, fin) == 1) { while (fread(&scanmgr, oldsize, 1, fin) == 1) {
if (!strlen(scanmgr.template)) {
sprintf(scanmgr.template, "filefind");
FilefindUpdated = 1;
}
fwrite(&scanmgr, sizeof(scanmgr), 1, fout); fwrite(&scanmgr, sizeof(scanmgr), 1, fout);
memset(&scanmgr, 0, sizeof(scanmgr)); memset(&scanmgr, 0, sizeof(scanmgr));
} }
@ -190,6 +194,9 @@ int AppendFilefind(void)
/* /*
* Fill in default values * Fill in default values
*/ */
scanmgr.Language = 'E';
sprintf(scanmgr.template, "filefind");
strncpy(scanmgr.Origin, CFG.origin, 50);
fwrite(&scanmgr, sizeof(scanmgr), 1, fil); fwrite(&scanmgr, sizeof(scanmgr), 1, fil);
fclose(fil); fclose(fil);
FilefindUpdated = 1; FilefindUpdated = 1;

View File

@ -149,6 +149,10 @@ int OpenNewfiles(void)
*/ */
memset(&newfiles, 0, sizeof(newfiles)); memset(&newfiles, 0, sizeof(newfiles));
while (fread(&newfiles, oldsize, 1, fin) == 1) { while (fread(&newfiles, oldsize, 1, fin) == 1) {
if (!strlen(newfiles.Template)) {
sprintf(newfiles.Template, "newfiles");
NewUpdated = 1;
}
fwrite(&newfiles, sizeof(newfiles), 1, fout); fwrite(&newfiles, sizeof(newfiles), 1, fout);
memset(&newfiles, 0, sizeof(newfiles)); memset(&newfiles, 0, sizeof(newfiles));
/* /*
@ -244,6 +248,9 @@ int AppendNewfiles(void)
* Fill in default values * Fill in default values
*/ */
sprintf(newfiles.From, "%s", CFG.sysop_name); sprintf(newfiles.From, "%s", CFG.sysop_name);
newfiles.Language = 'E';
sprintf(newfiles.Template, "newfiles");
strncpy(newfiles.Origin, CFG.origin, 50);
fwrite(&newfiles, sizeof(newfiles), 1, fil); fwrite(&newfiles, sizeof(newfiles), 1, fil);
memset(&group, 0, 13); memset(&group, 0, 13);
for (i = 1; i <= CFG.new_groups; i++) for (i = 1; i <= CFG.new_groups; i++)