jcs
/subtext
/amendments
/409
db: Use FTN terminology
jcs made amendment 409 about 1 year ago
--- db.c Sat Mar 11 14:57:03 2023
+++ db.c Tue Mar 14 11:04:27 2023
@@ -93,31 +93,31 @@ struct struct_field config_fields[] = {
offsetof(struct config, session_log_days),
1, USHRT_MAX },
- { "FidoNet Network Name", CONFIG_TYPE_STRING,
- offsetof(struct config, fidonet_network),
- 0, member_size(struct config, fidonet_network) },
- { "FidoNet Local Node Address", CONFIG_TYPE_STRING,
- offsetof(struct config, fidonet_node_addr),
- 0, member_size(struct config, fidonet_node_addr) },
- { "FidoNet Hub Address", CONFIG_TYPE_STRING,
- offsetof(struct config, fidonet_hub_addr),
- 0, member_size(struct config, fidonet_hub_addr) },
- { "FidoNet Hub Packet Password", CONFIG_TYPE_PASSWORD,
- offsetof(struct config, fidonet_pkt_password),
- 0, member_size(struct config, fidonet_pkt_password) },
- { "FidoNet Binkp Hostname", CONFIG_TYPE_STRING,
+ { "FTN Network Name", CONFIG_TYPE_STRING,
+ offsetof(struct config, ftn_network),
+ 0, member_size(struct config, ftn_network) },
+ { "FTN Local Node Address", CONFIG_TYPE_STRING,
+ offsetof(struct config, ftn_node_addr),
+ 0, member_size(struct config, ftn_node_addr) },
+ { "FTN Hub Node Address", CONFIG_TYPE_STRING,
+ offsetof(struct config, ftn_hub_addr),
+ 0, member_size(struct config, ftn_hub_addr) },
+ { "FTN Hub Packet Password", CONFIG_TYPE_PASSWORD,
+ offsetof(struct config, ftn_hub_pkt_password),
+ 0, member_size(struct config, ftn_hub_pkt_password) },
+ { "FTN Hub Binkp Hostname", CONFIG_TYPE_STRING,
offsetof(struct config, binkp_hostname),
0, member_size(struct config, binkp_hostname) },
- { "FidoNet Binkp Port", CONFIG_TYPE_SHORT,
+ { "FTN Hub Binkp Port", CONFIG_TYPE_SHORT,
offsetof(struct config, binkp_port),
0, 65535 },
- { "FidoNet Binkp Password", CONFIG_TYPE_PASSWORD,
+ { "FTN Hub Binkp Password", CONFIG_TYPE_PASSWORD,
offsetof(struct config, binkp_password),
0, member_size(struct config, binkp_password) },
- { "FidoNet Binkp Fetch Seconds", CONFIG_TYPE_LONG,
+ { "FTN Hub Binkp Poll Seconds", CONFIG_TYPE_LONG,
offsetof(struct config, binkp_interval_seconds),
1, ULONG_MAX },
- { "FidoNet Binkp Delete After Processing", CONFIG_TYPE_BOOLEAN,
+ { "FTN Hub Binkp Delete After Processing", CONFIG_TYPE_BOOLEAN,
offsetof(struct config, binkp_delete_done),
0, 0 },
@@ -586,16 +586,16 @@ db_migrate(struct db *tdb, short is_new, Str255 fullpa
break;
}
case 12: {
- /* 12->13, added fidonet/binkp fields */
+ /* 12->13, added ftn/binkp fields */
struct config new_config = { 0 };
bile_read(tdb->bile, DB_CONFIG_RTYPE, 1, (char *)&new_config,
sizeof(new_config));
- new_config.fidonet_network[0] = '\0';
- new_config.fidonet_node_addr[0] = '\0';
- new_config.fidonet_hub_addr[0] = '\0';
- new_config.fidonet_pkt_password[0] = '\0';
+ new_config.ftn_network[0] = '\0';
+ new_config.ftn_node_addr[0] = '\0';
+ new_config.ftn_hub_addr[0] = '\0';
+ new_config.ftn_hub_pkt_password[0] = '\0';
new_config.binkp_hostname[0] = '\0';
new_config.binkp_port = 24554;
new_config.binkp_password[0] = '\0';
@@ -607,7 +607,7 @@ db_migrate(struct db *tdb, short is_new, Str255 fullpa
break;
}
case 13: {
- /* 13->14, move mail to separate db, add fidonet fields */
+ /* 13->14, move mail to separate db, add ftn fields */
Str255 newfullpath;
struct bile *mail_bile;
size_t nids, n, size;
@@ -636,7 +636,7 @@ db_migrate(struct db *tdb, short is_new, Str255 fullpa
xfree(&data);
size += (sizeof(struct mail_message) -
- offsetof(struct mail_message, fidonet_msgid));
+ offsetof(struct mail_message, ftn_msgid));
if (bile_resize(mail_bile, MAIL_SPOOL_MESSAGE_RTYPE,
ids[n], size) != size)
panic("failed resizing message %ld", ids[n]);
@@ -655,12 +655,12 @@ db_migrate(struct db *tdb, short is_new, Str255 fullpa
break;
}
case 14: {
- /* 14->15, boards get a fido field */
+ /* 14->15, boards get an ftn field */
struct bile_object *o;
size_t nids, grow, size, n;
unsigned long *ids;
- grow = member_size(struct board, fidonet_area);
+ grow = member_size(struct board, ftn_area);
nids = bile_ids_by_type(tdb->bile, DB_BOARD_RTYPE, &ids);
for (n = 0; n < nids; n++) {
--- db.h Sat Mar 11 14:36:42 2023
+++ db.h Mon Mar 13 23:33:19 2023
@@ -19,51 +19,51 @@
#include <time.h>
-#define DB_CUR_VERS 16
+#define DB_CUR_VERS 16
-#define SUBTEXT_CREATOR 'SUBT'
-#define DB_TYPE 'STDB'
+#define SUBTEXT_CREATOR 'SUBT'
+#define DB_TYPE 'STDB'
-#define DB_TRUE 0x100
-#define DB_FALSE 0x000
+#define DB_TRUE 0x100
+#define DB_FALSE 0x000
-#define DB_CONFIG_RTYPE 'CONF'
-#define DB_USER_RTYPE 'USER'
-#define DB_BOARD_RTYPE 'BORD'
-#define DB_FOLDER_RTYPE 'FOLD'
-#define DB_VERS_RTYPE 'VERS'
-#define DB_MOTD_RTYPE 'MOTD'
+#define DB_CONFIG_RTYPE 'CONF'
+#define DB_USER_RTYPE 'USER'
+#define DB_BOARD_RTYPE 'BORD'
+#define DB_FOLDER_RTYPE 'FOLD'
+#define DB_VERS_RTYPE 'VERS'
+#define DB_MOTD_RTYPE 'MOTD'
-#define DB_TEXT_TYPE 'TEXT'
-#define DB_TEXT_MENU_ID 1
-#define DB_TEXT_SHORTMENU_ID 2
-#define DB_TEXT_ISSUE_ID 3
-#define DB_TEXT_SIGNUP_ID 4
-#define DB_TEXT_PAGE_SYSOP_ID 5
-#define DB_TEXT_NO_FREE_NODES_ID 6
-#define DB_TEXT_SIGNOFF_ID 7
-#define DB_TEXT_MENU_OPTIONS_ID 8
+#define DB_TEXT_TYPE 'TEXT'
+#define DB_TEXT_MENU_ID 1
+#define DB_TEXT_SHORTMENU_ID 2
+#define DB_TEXT_ISSUE_ID 3
+#define DB_TEXT_SIGNUP_ID 4
+#define DB_TEXT_PAGE_SYSOP_ID 5
+#define DB_TEXT_NO_FREE_NODES_ID 6
+#define DB_TEXT_SIGNOFF_ID 7
+#define DB_TEXT_MENU_OPTIONS_ID 8
-#define DB_USERNAME_LENGTH 16
+#define DB_USERNAME_LENGTH 16
-#define SL_TYPE 'STSL'
-#define SL_LOG_RTYPE 'SLOG'
-#define SL_TALLY_RTYPE 'STLY'
+#define SL_TYPE 'STSL'
+#define SL_LOG_RTYPE 'SLOG'
+#define SL_TALLY_RTYPE 'STLY'
-#define BOARD_FILENAME_EXT "brd"
-#define BOARD_THREAD_RTYPE 'BDTH'
-#define BOARD_POST_RTYPE 'BDPS'
-#define BOARD_FIDONET_POST_RTYPE 'BDFP'
-#define BOARD_FIDONET_MSGID_CACHE_RTYPE 'BDMC'
-#define BOARD_SORTED_IDS_RTYPE 'BDDX'
+#define BOARD_FILENAME_EXT "brd"
+#define BOARD_THREAD_RTYPE 'BDTH'
+#define BOARD_POST_RTYPE 'BDPS'
+#define BOARD_FTN_POST_RTYPE 'BDFP'
+#define BOARD_FTN_MSGID_CACHE_RTYPE 'BDMC'
+#define BOARD_SORTED_IDS_RTYPE 'BDDX'
-#define FOLDER_FILENAME_EXT "fld"
-#define FOLDER_FILE_RTYPE 'FILE'
+#define FOLDER_FILENAME_EXT "fld"
+#define FOLDER_FILE_RTYPE 'FILE'
-#define MAIL_SPOOL_TYPE 'STMS'
-#define MAIL_SPOOL_MESSAGE_RTYPE 'PMSG'
+#define MAIL_SPOOL_TYPE 'STMS'
+#define MAIL_SPOOL_MESSAGE_RTYPE 'PMSG'
-#define FIDONET_SPOOL_PACKET_TYPE 'FNSP'
+#define FTN_SPOOL_PACKET_TYPE 'FNSP'
#include "subtext.h"
#include "bile.h"
@@ -90,16 +90,16 @@ struct config {
unsigned short trusted_proxy_udp_port;
short session_log_days;
char modem_parity[4];
- char fidonet_node_addr[32];
- char fidonet_hub_addr[32];
- char fidonet_pkt_password[9];
+ char ftn_node_addr[32];
+ char ftn_hub_addr[32];
+ char ftn_hub_pkt_password[9];
char binkp_hostname[64];
unsigned short binkp_port;
char binkp_password[32];
unsigned long binkp_interval_seconds;
short binkp_delete_done;
short timezone_utcoff;
- char fidonet_network[16];
+ char ftn_network[16];
};
extern struct struct_field config_fields[];