diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-04-24 03:54:01 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-04-24 03:54:01 -0400 |
| commit | 715964c0b5ab8a2bc2b8ae8b7935e9ea0088e332 (patch) | |
| tree | 8d61003fadc3d3c7761394c517c4488c2b63743d /src/main.c | |
| parent | 2ce1d0d8a2e7f79e1bb008836a4dca48adba867e (diff) | |
| download | fujinet-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.c | 39 |
1 files changed, 23 insertions, 16 deletions
@@ -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 } |
