]> code.citadel.org Git - citadel.git/blobdiff - textclient/commands.c
Still working on sixel
[citadel.git] / textclient / commands.c
index 197fe1a9d58dca65c9759838b33bac880fbdb766..6d39ca9b25b952f6ae48eaf7957529f1ac50c152 100644 (file)
@@ -1,19 +1,11 @@
-// This file contains functions which implement parts of the
-// text-mode user interface.
+// This file contains functions which implement parts of the text-mode user interface.
 //
 //
-// Copyright (c) 1987-2022 by the citadel.org team
+// Copyright (c) 1987-2024 by the citadel.org team
 //
 //
-// This program is open source software.  Use, duplication, and/or
-// disclosure are subject to the GNU General Purpose License version 3.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// This program is open source software.  Use, duplication, or disclosure is subject to the GNU General Public License version 3.
 
 #include "textclient.h"
 
 
 #include "textclient.h"
 
-
 // The help "files" are now just an embedded set of Very Long Strings.  helpnames[] is
 // an array of "file names" and helptexts[] is the "content".
 
 // The help "files" are now just an embedded set of Very Long Strings.  helpnames[] is
 // an array of "file names" and helptexts[] is the "content".
 
@@ -42,11 +34,14 @@ char *helptexts[] = {
            " G         Goto next room which has UNREAD messages.\n"
            " H         Help. Same as '?'\n"
            " I         Reads the Information file for this room.\n"
            " G         Goto next room which has UNREAD messages.\n"
            " H         Help. Same as '?'\n"
            " I         Reads the Information file for this room.\n"
+           " J         Jump to any named room (same as <.G>oto)\n"
            " K         List of Known rooms.\n"
            " L         Reads the last five messages in the room.\n"
            " K         List of Known rooms.\n"
            " L         Reads the last five messages in the room.\n"
+           " M         Go to your private Mail room\n"
            " N         Reads all new messages in the room.\n"
            " O         Reads all old messages, backwards.\n"
            " P         Page another user (send an instant message)\n"
            " N         Reads all new messages in the room.\n"
            " O         Reads all old messages, backwards.\n"
            " P         Page another user (send an instant message)\n"
+           " Q         Quiet mode on/off (disables receiving instant messages)\n"
            " R         Reads all messages in the room, in reverse order.\n"
            " S         Skips current room without making its messages old.\n"
            " T         Terminate (logout)\n"
            " R         Reads all messages in the room, in reverse order.\n"
            " S         Skips current room without making its messages old.\n"
            " T         Terminate (logout)\n"
@@ -342,9 +337,6 @@ char *helptexts[] = {
            "                                          you can specify a partial match\n"
            "\n"
            " <.> <R>ead <T>extfile formatted          File 'download' commands.\n"
            "                                          you can specify a partial match\n"
            "\n"
            " <.> <R>ead <T>extfile formatted          File 'download' commands.\n"
-           " <.> <R>ead file using <X>modem   \n"
-           " <.> <R>ead file using <Y>modem   \n"
-           " <.> <R>ead file using <Z>modem   \n"
            " <.> <R>ead <F>ile unformatted   \n"
            " <.> <R>ead <D>irectory   \n"
            "\n"
            " <.> <R>ead <F>ile unformatted   \n"
            " <.> <R>ead <D>irectory   \n"
            "\n"
@@ -431,6 +423,7 @@ int rc_display_message_numbers;
 int rc_force_mail_prompts;
 int rc_remember_passwords;
 int rc_ansi_color;
 int rc_force_mail_prompts;
 int rc_remember_passwords;
 int rc_ansi_color;
+int rc_sixel;
 int rc_color_use_bg;
 int rc_prompt_control = 0;
 time_t rc_idle_threshold = (time_t) 900;
 int rc_color_use_bg;
 int rc_prompt_control = 0;
 time_t rc_idle_threshold = (time_t) 900;
@@ -897,6 +890,7 @@ void load_command_set(void) {
        rc_display_message_numbers = 0;
        rc_force_mail_prompts = 0;
        rc_ansi_color = 0;
        rc_display_message_numbers = 0;
        rc_force_mail_prompts = 0;
        rc_ansi_color = 0;
+       rc_sixel = 0;
        rc_color_use_bg = 0;
        strcpy(rc_url_cmd, "");
        strcpy(rc_open_cmd, "");
        rc_color_use_bg = 0;
        strcpy(rc_url_cmd, "");
        strcpy(rc_open_cmd, "");
@@ -1005,6 +999,10 @@ void load_command_set(void) {
                        if (!strncasecmp(&buf[12], "on", 2))
                                enable_status_line = 1;
                }
                        if (!strncasecmp(&buf[12], "on", 2))
                                enable_status_line = 1;
                }
+               if (!strncasecmp(buf, "use_sixel=", 10)) {
+                       if (!strncasecmp(&buf[10], "on", 2))
+                               rc_sixel = 1;
+               }
                if (!strncasecmp(buf, "use_background=", 15)) {
                        if (!strncasecmp(&buf[15], "on", 2))
                                rc_color_use_bg = 9;
                if (!strncasecmp(buf, "use_background=", 15)) {
                        if (!strncasecmp(&buf[15], "on", 2))
                                rc_color_use_bg = 9;
@@ -1437,9 +1435,9 @@ int fmout(int width,              // screen width to use
                        continue;
                }
 
                        continue;
                }
 
-               if ( (in_quote) && (*e == '\n') && (enable_color) ) {
+               if ((in_quote) && (*e == '\n') && (enable_color)) {
                        in_quote = 0;
                        in_quote = 0;
-                       scr_printf("\033[22m\033[23m");
+                       scr_printf("\033[22m\033[22m");
                }
 
                if (*e == '\n') {       // newline?
                }
 
                if (*e == '\n') {       // newline?
@@ -1466,9 +1464,9 @@ int fmout(int width,              // screen width to use
                        continue;
                }
 
                        continue;
                }
 
-               if ( (*e == '>') && (column <= 1) && (!fpout) && (enable_color) ) {
+               if ((*e == '>') && (column <= 1) && (!fpout) && (enable_color)) {
                        in_quote = 1;
                        in_quote = 1;
-                       scr_printf("\033[2m\033[3m");
+                       scr_printf("\033[2m\033[2m");
                }
 
                // Or are we looking at a space?
                }
 
                // Or are we looking at a space?