All fidonet domain names are now max. 8 characters

This commit is contained in:
Michiel Broek 2003-11-02 12:38:50 +00:00
parent 773d74d55c
commit ca5a7607d4
4 changed files with 182 additions and 193 deletions

View File

@ -25,6 +25,8 @@ v0.39.1 22-Oct-2003
In node editor, fixed error message when there was no more
room for new nodes to point to the right menus.
Added support for tar compressed archives.
Changed all fidonet domain names to maximum 8 characters so
that we now follow the FTSC specs.
v0.39.0 09-Oct-2003 - 22-Oct-2003

3
TODO
View File

@ -145,9 +145,6 @@ mbnewusr:
mbsetup:
N: Add a check for double areatag names.
U: PickAka function lets mbsetup crash if domain is 12 characters
-- Check, still so?
N: Use some sort of sorting for the system aka's and make sure the
main aka with zone's is listed first. Having zone's mixed gives
too high outbound stats and the outbound is scanned multiple times.

View File

@ -227,149 +227,139 @@ int AppendFidonet(void)
*/
int EditFidoRec(int Area)
{
FILE *fil;
char mfile[PATH_MAX], *temp;
long offset;
int i, j = 0;
unsigned long crc, crc1;
FILE *fil;
char mfile[PATH_MAX], *temp;
long offset;
int i, j = 0;
unsigned long crc, crc1;
clr_index();
working(1, 0, 0);
IsDoing("Edit Fidonet");
clr_index();
working(1, 0, 0);
IsDoing("Edit Fidonet");
sprintf(mfile, "%s/etc/fidonet.temp", getenv("MBSE_ROOT"));
if ((fil = fopen(mfile, "r")) == NULL) {
working(2, 0, 0);
return -1;
}
sprintf(mfile, "%s/etc/fidonet.temp", getenv("MBSE_ROOT"));
if ((fil = fopen(mfile, "r")) == NULL) {
working(2, 0, 0);
return -1;
}
offset = sizeof(fidonethdr) + ((Area -1) * sizeof(fidonet));
if (fseek(fil, offset, 0) != 0) {
working(2, 0, 0);
return -1;
}
offset = sizeof(fidonethdr) + ((Area -1) * sizeof(fidonet));
if (fseek(fil, offset, 0) != 0) {
working(2, 0, 0);
return -1;
}
fread(&fidonet, sizeof(fidonet), 1, fil);
fclose(fil);
crc = 0xffffffff;
crc = upd_crc32((char *)&fidonet, crc, sizeof(fidonet));
working(0, 0, 0);
fread(&fidonet, sizeof(fidonet), 1, fil);
fclose(fil);
crc = 0xffffffff;
crc = upd_crc32((char *)&fidonet, crc, sizeof(fidonet));
working(0, 0, 0);
set_color(WHITE, BLACK);
mvprintw( 5, 6, "2. EDIT FIDONET NETWORK");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. Comment");
mvprintw( 8, 6, "2. Domain name");
mvprintw( 9, 6, "3. Available");
mvprintw(10, 6, "4. Deleted");
mvprintw(11, 6, "5. Main Nodelist");
mvprintw(12, 6, "6. Merge list #1");
mvprintw(13, 6, "7. Merge list #2");
mvprintw(14, 6, "8. Merge list #3");
mvprintw(15, 6, "9. Merge list #4");
mvprintw(16, 6, "10. Merge list #5");
mvprintw(17, 6, "11. Merge list #6");
mvprintw(12,55, "12. Primary zone");
mvprintw(13,55, "13. Zone number #2");
mvprintw(14,55, "14. Zone number #3");
mvprintw(15,55, "15. Zone number #4");
mvprintw(16,55, "16. Zone number #5");
mvprintw(17,55, "17. Zone number #6");
temp = calloc(18, sizeof(char));
for (;;) {
set_color(WHITE, BLACK);
mvprintw( 5, 6, "2. EDIT FIDONET NETWORK");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. Comment");
mvprintw( 8, 6, "2. Domain name");
mvprintw( 9, 6, "3. Available");
mvprintw(10, 6, "4. Deleted");
mvprintw(11, 6, "5. Main Nodelist");
mvprintw(12, 6, "6. Merge list #1");
mvprintw(13, 6, "7. Merge list #2");
mvprintw(14, 6, "8. Merge list #3");
mvprintw(15, 6, "9. Merge list #4");
mvprintw(16, 6, "10. Merge list #5");
mvprintw(17, 6, "11. Merge list #6");
mvprintw(12,55, "12. Primary zone");
mvprintw(13,55, "13. Zone number #2");
mvprintw(14,55, "14. Zone number #3");
mvprintw(15,55, "15. Zone number #4");
mvprintw(16,55, "16. Zone number #5");
mvprintw(17,55, "17. Zone number #6");
temp = calloc(18, sizeof(char));
for (;;) {
set_color(WHITE, BLACK);
show_str( 7,26,40, fidonet.comment);
show_str( 8,26,12, fidonet.domain);
show_bool(9,26, fidonet.available);
show_bool(10,26, fidonet.deleted);
show_str(11,26,8, fidonet.nodelist);
for (i = 0; i < 6; i++) {
if ((fidonet.seclist[i].zone) || strlen(fidonet.seclist[i].nodelist)) {
show_str(i + 12,26,8, fidonet.seclist[i].nodelist);
sprintf(temp, "%d:%d/%d", fidonet.seclist[i].zone, fidonet.seclist[i].net, fidonet.seclist[i].node);
show_str(i + 12, 36,17, temp);
} else
show_str(i + 12,26,27, (char *)" ");
show_int(i + 12,74, fidonet.zone[i]);
}
j = select_menu(17);
switch(j) {
case 0:
crc1 = 0xffffffff;
crc1 = upd_crc32((char *)&fidonet, crc1, sizeof(fidonet));
if (crc != crc1) {
if (yes_no((char *)"Record is changed, save") == 1) {
working(1, 0, 0);
if ((fil = fopen(mfile, "r+")) == NULL) {
working(2, 0, 0);
free(temp);
return -1;
}
fseek(fil, offset, 0);
fwrite(&fidonet, sizeof(fidonet), 1, fil);
fclose(fil);
FidoUpdated = 1;
working(1, 0, 0);
working(0, 0, 0);
}
}
IsDoing("Browsing Menu");
free(temp);
return 0;
case 1:
E_STR(7,26,40, fidonet.comment, "The ^Comment^ for this network name")
case 2:
E_STR(8, 26,12, fidonet.domain, "The ^Name^ of the network without dots")
case 3:
E_BOOL(9,26, fidonet.available, "Is this network ^Available^ for use")
case 4:
E_BOOL(10,26, fidonet.deleted, "Is this netword ^Deleted^")
case 5:
E_STR(11,26,8, fidonet.nodelist, "The name of the ^Primary Nodelist^ for this network")
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
strcpy(fidonet.seclist[j-6].nodelist, edit_str(j+6,26,8, fidonet.seclist[j-6].nodelist, (char *)"The secondary ^nodelist^ or ^pointlist^ name for this domain"));
if (strlen(fidonet.seclist[j-6].nodelist)) {
do {
sprintf(temp, "%d:%d/%d", fidonet.seclist[j-6].zone, fidonet.seclist[j-6].net, fidonet.seclist[j-6].node);
strcpy(temp, edit_str(j+6,36,17, temp, (char *)"The top ^fidonet aka^ for this nodelist (zone:net/node)"));
if ((strstr(temp, ":") == NULL) || (strstr(temp, "/") == NULL)) {
working(2, 0, 0);
working(0, 0, 0);
}
} while ((strstr(temp, ":") == NULL) || (strstr(temp, "/") == NULL));
fidonet.seclist[j-6].zone = atoi(strtok(temp, ":"));
fidonet.seclist[j-6].net = atoi(strtok(NULL, "/"));
fidonet.seclist[j-6].node = atoi(strtok(NULL, ""));
} else {
fidonet.seclist[j-6].zone = 0;
fidonet.seclist[j-6].net = 0;
fidonet.seclist[j-6].node = 0;
}
break;
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
E_INT(j,74, fidonet.zone[j-12], "A ^Zone number^ which belongs to this domain (1..4095)")
}
show_str( 7,26,40, fidonet.comment);
show_str( 8,26,8, fidonet.domain);
show_bool(9,26, fidonet.available);
show_bool(10,26, fidonet.deleted);
show_str(11,26,8, fidonet.nodelist);
for (i = 0; i < 6; i++) {
if ((fidonet.seclist[i].zone) || strlen(fidonet.seclist[i].nodelist)) {
show_str(i + 12,26,8, fidonet.seclist[i].nodelist);
sprintf(temp, "%d:%d/%d", fidonet.seclist[i].zone, fidonet.seclist[i].net, fidonet.seclist[i].node);
show_str(i + 12, 36,17, temp);
} else
show_str(i + 12,26,27, (char *)" ");
show_int(i + 12,74, fidonet.zone[i]);
}
return 0;
j = select_menu(17);
switch(j) {
case 0: crc1 = 0xffffffff;
crc1 = upd_crc32((char *)&fidonet, crc1, sizeof(fidonet));
if (crc != crc1) {
if (yes_no((char *)"Record is changed, save") == 1) {
working(1, 0, 0);
if ((fil = fopen(mfile, "r+")) == NULL) {
working(2, 0, 0);
free(temp);
return -1;
}
fseek(fil, offset, 0);
fwrite(&fidonet, sizeof(fidonet), 1, fil);
fclose(fil);
FidoUpdated = 1;
working(1, 0, 0);
working(0, 0, 0);
}
}
IsDoing("Browsing Menu");
free(temp);
return 0;
case 1: E_STR(7,26,40, fidonet.comment, "The ^Comment^ for this network name")
case 2: E_STR(8, 26,8, fidonet.domain, "The ^Name^ of the network without dots")
case 3: E_BOOL(9,26, fidonet.available, "Is this network ^Available^ for use")
case 4: E_BOOL(10,26, fidonet.deleted, "Is this netword ^Deleted^")
case 5: E_STR(11,26,8, fidonet.nodelist, "The name of the ^Primary Nodelist^ for this network")
case 6:
case 7:
case 8:
case 9:
case 10:
case 11: strcpy(fidonet.seclist[j-6].nodelist,
edit_str(j+6,26,8, fidonet.seclist[j-6].nodelist,
(char *)"The secondary ^nodelist^ or ^pointlist^ name for this domain"));
if (strlen(fidonet.seclist[j-6].nodelist)) {
do {
sprintf(temp, "%d:%d/%d", fidonet.seclist[j-6].zone,
fidonet.seclist[j-6].net, fidonet.seclist[j-6].node);
strcpy(temp, edit_str(j+6,36,17, temp,
(char *)"The top ^fidonet aka^ for this nodelist (zone:net/node)"));
if ((strstr(temp, ":") == NULL) || (strstr(temp, "/") == NULL)) {
working(2, 0, 0);
working(0, 0, 0);
}
} while ((strstr(temp, ":") == NULL) || (strstr(temp, "/") == NULL));
fidonet.seclist[j-6].zone = atoi(strtok(temp, ":"));
fidonet.seclist[j-6].net = atoi(strtok(NULL, "/"));
fidonet.seclist[j-6].node = atoi(strtok(NULL, ""));
} else {
fidonet.seclist[j-6].zone = 0;
fidonet.seclist[j-6].net = 0;
fidonet.seclist[j-6].node = 0;
}
break;
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:E_INT(j,74, fidonet.zone[j-12], "A ^Zone number^ which belongs to this domain (1..4095)")
}
}
return 0;
}

View File

@ -934,36 +934,36 @@ void s_intmailcfg(void)
*/
void e_uucp(void)
{
int j;
int j;
clr_index();
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "1.12 EDIT UUCP GATEWAY");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. Zone");
mvprintw( 8, 6, "2. Net");
mvprintw( 9, 6, "3. Node");
mvprintw(10, 6, "4. Point");
mvprintw(11, 6, "5. Domain");
for (;;) {
set_color(WHITE, BLACK);
mvprintw( 5, 6, "1.12 EDIT UUCP GATEWAY");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. Zone");
mvprintw( 8, 6, "2. Net");
mvprintw( 9, 6, "3. Node");
mvprintw(10, 6, "4. Point");
mvprintw(11, 6, "5. Domain");
show_int( 7,19, CFG.UUCPgate.zone);
show_int( 8,19, CFG.UUCPgate.net);
show_int( 9,19, CFG.UUCPgate.node);
show_int(10,19, CFG.UUCPgate.point);
show_str(11,19,8, CFG.UUCPgate.domain);
for (;;) {
set_color(WHITE, BLACK);
show_int( 7,19, CFG.UUCPgate.zone);
show_int( 8,19, CFG.UUCPgate.net);
show_int( 9,19, CFG.UUCPgate.node);
show_int(10,19, CFG.UUCPgate.point);
show_str(11,19,12, CFG.UUCPgate.domain);
j = select_menu(5);
switch(j) {
case 0: return;
case 1: E_INT( 7,19, CFG.UUCPgate.zone, "The ^zone^ number for the UUCP gateway")
case 2: E_INT( 8,19, CFG.UUCPgate.net, "The ^Net^ number for the UUCP gateway")
case 3: E_INT( 9,19, CFG.UUCPgate.node, "The ^Node^ number for the UUCP gateway")
case 4: E_INT( 10,19, CFG.UUCPgate.point, "The ^Point^ number for the UUCP gateway")
case 5: E_STR( 11,19,11, CFG.UUCPgate.domain, "The ^FTN Domain^ for the UUCP gateway without a dot")
}
j = select_menu(5);
switch(j) {
case 0: return;
case 1: E_INT( 7,19, CFG.UUCPgate.zone, "The ^zone^ number for the UUCP gateway")
case 2: E_INT( 8,19, CFG.UUCPgate.net, "The ^Net^ number for the UUCP gateway")
case 3: E_INT( 9,19, CFG.UUCPgate.node, "The ^Node^ number for the UUCP gateway")
case 4: E_INT( 10,19, CFG.UUCPgate.point, "The ^Point^ number for the UUCP gateway")
case 5: E_STR( 11,19,8, CFG.UUCPgate.domain, "The ^FTN Domain^ for the UUCP gateway without a dot")
}
}
}
@ -1069,39 +1069,39 @@ void e_newfiles(void)
*/
void e_aka(int Area)
{
int j;
int j;
clr_index();
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "1.1 EDIT AKA");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. Zone");
mvprintw( 8, 6, "2. Net");
mvprintw( 9, 6, "3. Node");
mvprintw(10, 6, "4. Point");
mvprintw(11, 6, "5. Domain");
mvprintw(12, 6, "6. Active");
for (;;) {
set_color(WHITE, BLACK);
mvprintw( 5, 6, "1.1 EDIT AKA");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. Zone");
mvprintw( 8, 6, "2. Net");
mvprintw( 9, 6, "3. Node");
mvprintw(10, 6, "4. Point");
mvprintw(11, 6, "5. Domain");
mvprintw(12, 6, "6. Active");
show_int( 7,19, CFG.aka[Area].zone);
show_int( 8,19, CFG.aka[Area].net);
show_int( 9,19, CFG.aka[Area].node);
show_int(10,19, CFG.aka[Area].point);
show_str(11,19,8, CFG.aka[Area].domain);
show_bool(12,19, CFG.akavalid[Area]);
for (;;) {
set_color(WHITE, BLACK);
show_int( 7,19, CFG.aka[Area].zone);
show_int( 8,19, CFG.aka[Area].net);
show_int( 9,19, CFG.aka[Area].node);
show_int(10,19, CFG.aka[Area].point);
show_str(11,19,12, CFG.aka[Area].domain);
show_bool(12,19, CFG.akavalid[Area]);
j = select_menu(6);
switch(j) {
case 0: return;
case 1: E_INT( 7,19, CFG.aka[Area].zone, "The ^zone^ number for this aka")
case 2: E_INT( 8,19, CFG.aka[Area].net, "The ^Net^ number for this aka")
case 3: E_INT( 9,19, CFG.aka[Area].node, "The ^Node^ number for this aka")
case 4: E_INT( 10,19, CFG.aka[Area].point, "The ^Point^ number for this node (if any)")
case 5: E_STR( 11,19,11, CFG.aka[Area].domain, "The ^FTN Domain^ for this aka without a dot (ie no .org)")
case 6: E_BOOL(12,19, CFG.akavalid[Area], "Is this aka ^available^")
}
j = select_menu(6);
switch(j) {
case 0: return;
case 1: E_INT( 7,19, CFG.aka[Area].zone, "The ^zone^ number for this aka")
case 2: E_INT( 8,19, CFG.aka[Area].net, "The ^Net^ number for this aka")
case 3: E_INT( 9,19, CFG.aka[Area].node, "The ^Node^ number for this aka")
case 4: E_INT( 10,19, CFG.aka[Area].point, "The ^Point^ number for this node (if any)")
case 5: E_STR( 11,19,8, CFG.aka[Area].domain, "The ^FTN Domain^ for this aka without a dot (ie no .org)")
case 6: E_BOOL(12,19, CFG.akavalid[Area], "Is this aka ^available^")
}
}
}