aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-24 03:54:01 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-24 03:54:01 -0400
commit715964c0b5ab8a2bc2b8ae8b7935e9ea0088e332 (patch)
tree8d61003fadc3d3c7761394c517c4488c2b63743d /src/main.c
parent2ce1d0d8a2e7f79e1bb008836a4dca48adba867e (diff)
downloadfujinet-chat-715964c0b5ab8a2bc2b8ae8b7935e9ea0088e332.tar.gz
Dynamic screens. Still a bit flaky, but actually does work to some degree.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/main.c b/src/main.c
index 98a45c6..1ed7240 100644
--- a/src/main.c
+++ b/src/main.c
@@ -84,8 +84,8 @@ void init_channels(void) {
for(i = 0; i < MAX_SCREENS - 2; i++) {
if(config.channels[i][0]) {
- scr_status[i + 2] = SCR_INACTIVE;
- strcpy(scr_names[i + 2], config.channels[i]);
+ screens[i + 2].status = SCR_INACTIVE;
+ strcpy(screens[i + 2].title, config.channels[i]);
}
}
}
@@ -114,18 +114,25 @@ void reconnect(void) {
}
void main(void) {
- bell_type = config.alert_type; /* TODO: have bell.s read staight from the struct */
-
- edbox_clear();
-
- while(1) {
- if(fn_connect()) {
- ind_net_idle();
- irc_register();
- irc_loop();
- }
- OS.atract = 0;
- fn_disconnect();
- reconnect();
- }
+ bell_type = config.alert_type; /* TODO: have bell.s read staight from the struct */
+
+ edbox_clear();
+
+ #if 0
+ scr_activate(0);
+ scr_print_active("line one\n");
+ scr_print_active("line two\n");
+hang: goto hang;
+ #else
+ while(1) {
+ if(fn_connect()) {
+ ind_net_idle();
+ irc_register();
+ irc_loop();
+ }
+ OS.atract = 0;
+ fn_disconnect();
+ reconnect();
+ }
+ #endif
}