diff --git a/ChangeLog b/ChangeLog index 17d8b763..501283f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -55,6 +55,8 @@ v0.51.2 06-Mar-2004 mbsetup: Added auto upgrade for the files database. Changed menus 14, 7.n.6, 10.1 and 8.4. + Changed default charset for new mailgroups and message areas + to CP437. examples: Updated English, German, Spanish and Dutch macro files: diff --git a/TODO b/TODO index 55de55e8..e8e7702d 100644 --- a/TODO +++ b/TODO @@ -172,6 +172,8 @@ mbsetup: N: Add global setup in menus 9.1 and 10.1 at least to change uplink data. + N: When a message area is deleted, delete the rulesfile too. + X: Generate crossreference document: File Areas <=> BBS groups File Areas <=> Newfiles groups diff --git a/mbfido/createf.c b/mbfido/createf.c index b0f81e10..d4206912 100644 --- a/mbfido/createf.c +++ b/mbfido/createf.c @@ -325,15 +325,19 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f) /* * Create download database */ - sprintf(temp, "%s/fdb/fdb%ld.data", getenv("MBSE_ROOT"), AreaNr); + sprintf(temp, "%s/fdb/file%ld.data", getenv("MBSE_ROOT"), AreaNr); if ((fp = fopen(temp, "r+")) == NULL) { Syslog('f', "Creating new %s", temp); if ((fp = fopen(temp, "a+")) == NULL) { WriteError("$Can't create %s", temp); } else { + fdbhdr.hdrsize = sizeof(fdbhdr); + fdbhdr.recsize = sizeof(fdb); + fwrite(&fdbhdr, sizeof(fdbhdr), 1, fp); fclose(fp); } } else { + fread(&fdbhdr, sizeof(fdbhdr), 1, fp); fclose(fp); } chmod(temp, 0660); diff --git a/mbfido/mbfdel.c b/mbfido/mbfdel.c index 468f8dff..fa780c2b 100644 --- a/mbfido/mbfdel.c +++ b/mbfido/mbfdel.c @@ -79,7 +79,7 @@ void Delete(int UnDel, int Area, char *File) die(MBERR_GENERAL); temp = calloc(PATH_MAX, sizeof(char)); - sprintf(temp, "%s/fdb/fdb%d.data", getenv("MBSE_ROOT"), Area); + sprintf(temp, "%s/fdb/file%d.data", getenv("MBSE_ROOT"), Area); if ((fp = fopen(temp, "r+")) == NULL) die(MBERR_GENERAL); diff --git a/mbfido/mbfkill.c b/mbfido/mbfkill.c index 546d75d3..98ba8b20 100644 --- a/mbfido/mbfkill.c +++ b/mbfido/mbfkill.c @@ -230,7 +230,7 @@ void Kill(void) * we run into trouble later on. */ fseek(pFile, 0, SEEK_SET); - sprintf(sTemp, "%s/fdb/fdbtmp.data", getenv("MBSE_ROOT")); + sprintf(sTemp, "%s/fdb/filetmp.data", getenv("MBSE_ROOT")); if ((pTemp = fopen(sTemp, "a+")) != NULL) { fwrite(&fdbhdr, fdbhdr.hdrsize, 1, pTemp); diff --git a/mbfido/mbfutil.c b/mbfido/mbfutil.c index cb0a6753..0dab56bf 100644 --- a/mbfido/mbfutil.c +++ b/mbfido/mbfutil.c @@ -443,7 +443,7 @@ int CheckFDB(int Area, char *Path) int rc = FALSE; temp = calloc(PATH_MAX, sizeof(char)); - sprintf(temp, "%s/fdb/fdb%d.data", getenv("MBSE_ROOT"), Area); + sprintf(temp, "%s/fdb/file%d.data", getenv("MBSE_ROOT"), Area); /* * Open the file database, create new one if it doesn't excist. @@ -454,9 +454,13 @@ int CheckFDB(int Area, char *Path) WriteError("$Can't create %s", temp); rc = TRUE; } else { + fdbhdr.hdrsize = sizeof(fdbhdr); + fdbhdr.recsize = sizeof(fdb); + fwrite(&fdbhdr, sizeof(fdbhdr), 1, fp); fclose(fp); } } else { + fread(&fdbhdr, sizeof(fdbhdr), 1, fp); fclose(fp); } diff --git a/mbsetup/m_farea.c b/mbsetup/m_farea.c index 1ea1453a..b787504f 100644 --- a/mbsetup/m_farea.c +++ b/mbsetup/m_farea.c @@ -580,8 +580,8 @@ void EditFilearea(void) offset = areahdr.hdrsize + ((from - 1) * areahdr.recsize); fseek(fil, offset, 0); fwrite(&area, areahdr.recsize, 1, fil); - sprintf(temp, "%s/fdb/fdb%ld.data", getenv("MBSE_ROOT"), from); - sprintf(new, "%s/fdb/fdb%ld.data", getenv("MBSE_ROOT"), too); + sprintf(temp, "%s/fdb/file%ld.data", getenv("MBSE_ROOT"), from); + sprintf(new, "%s/fdb/file%ld.data", getenv("MBSE_ROOT"), too); rename(temp, new); /* diff --git a/mbsetup/m_marea.c b/mbsetup/m_marea.c index 7d129fff..2f1c51d2 100644 --- a/mbsetup/m_marea.c +++ b/mbsetup/m_marea.c @@ -99,7 +99,7 @@ int CountMsgarea(void) */ memset(&msgs, 0, sizeof(msgs)); sprintf(msgs.Name, "Bad mail"); - sprintf(msgs.Base, "/opt/mbse/var/mail/badmail"); + sprintf(msgs.Base, "%s/var/mail/badmail", getenv("MBSE_ROOT")); sprintf(msgs.QWKname, "BADMAIL"); sprintf(msgs.Group, "LOCAL"); msgs.Active = TRUE; @@ -122,7 +122,7 @@ int CountMsgarea(void) */ memset(&msgs, 0, sizeof(msgs)); sprintf(msgs.Name, "Dupe mail"); - sprintf(msgs.Base, "/opt/mbse/var/mail/dupemail"); + sprintf(msgs.Base, "%s/var/mail/dupemail", getenv("MBSE_ROOT")); sprintf(msgs.QWKname, "DUPEMAIL"); sprintf(msgs.Group, "LOCAL"); msgs.Active = TRUE; @@ -294,7 +294,7 @@ void InitMsgRec(void) msgs.Type = ECHOMAIL; msgs.MsgKinds = PUBLIC; msgs.UsrDelete = TRUE; - msgs.Charset = FTNC_LATIN_1; + msgs.Charset = FTNC_CP437; msgs.MaxArticles = CFG.maxarticles; strcpy(msgs.Origin, CFG.origin); msgs.LinkSec.level = 1; diff --git a/mbsetup/m_mgroup.c b/mbsetup/m_mgroup.c index 6f12c1af..06593a8f 100644 --- a/mbsetup/m_mgroup.c +++ b/mbsetup/m_mgroup.c @@ -230,7 +230,7 @@ int AppendMGroup(void) mgroup.StartDate = time(NULL); mgroup.LinkSec.level = 1; mgroup.LinkSec.flags = 1; - mgroup.Charset = FTNC_LATIN_1; + mgroup.Charset = FTNC_CP437; fwrite(&mgroup, sizeof(mgroup), 1, fil); fclose(fil); MGrpUpdated = 1;