From 633eabfc5820a6cc3b3c45793243928d0fa9c099 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 27 Apr 2021 16:44:48 -0400 Subject: [PATCH] Updated the boilerplate on each file --- textclient/Makefile | 14 ++++---- textclient/README.txt | 14 +++++--- textclient/citadel.c | 24 ++++++------- textclient/citadel_ipc.c | 20 +++++------ textclient/client_chat.c | 24 ++++++------- textclient/client_passwords.c | 26 +++++++------- textclient/commands.c | 26 +++++++------- textclient/configure | 14 ++++---- textclient/ipc_c_tcp.c | 24 ++++++------- textclient/messages.c | 24 ++++++------- textclient/rooms.c | 24 ++++++------- textclient/routines.c | 24 ++++++------- textclient/routines2.c | 24 ++++++------- textclient/screen.c | 67 ++++++++++++++--------------------- textclient/textclient.h | 23 +++++------- textclient/tuiconfig.c | 24 ++++++------- 16 files changed, 182 insertions(+), 214 deletions(-) diff --git a/textclient/Makefile b/textclient/Makefile index 0750f964f..c42fe6063 100644 --- a/textclient/Makefile +++ b/textclient/Makefile @@ -1,12 +1,14 @@ # MAKEFILE FOR CITADEL TEXT CLIENT # This file is part of "conf-IG-ure" # Copyright (C) 2016-2018 by Art Cancro -# Distributed under the terms of the GNU General Public License v3 with the following special exceptions: -# 1. By using this software you agree that it's called "Linux", not "GNU/Linux" -# 2. By using this software you agree that it's called "open source", not "free software" -# 3. By using this software you agree that GNU Autotools are crap, which is why conf-IG-ure exists -# 4. By using this software you agree that Richard Stallman should shut up about everything -# 5. By reading these special exceptions you have already agreed to them. +# +# 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. # config.mk is generated by ./configure include config.mk diff --git a/textclient/README.txt b/textclient/README.txt index 6218f644d..22f72e18b 100644 --- a/textclient/README.txt +++ b/textclient/README.txt @@ -2,9 +2,13 @@ This is a text mode user interface for the Citadel system. It presents a Citadel site to users in the form of a traditional BBS. -All code is Copyright (c) 1987-2021 by the citadel.org team, and is released -under the terms of the GNU General Public License v3. As a special exception, -the Citadel team requires all users of this code to agree that our favorite -software model is called "open source" and NOT "free software", and that our -favorite operating system is called "Linux" and NOT "GNU/Linux". +All code is Copyright (c) 1987-2021 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. diff --git a/textclient/citadel.c b/textclient/citadel.c index 1fea75eb3..e5017fd95 100644 --- a/textclient/citadel.c +++ b/textclient/citadel.c @@ -1,16 +1,14 @@ -/* - * Main source module for the client program. - * - * Copyright (c) 1987-2019 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// Main source module for the client program. +// +// Copyright (c) 1987-2019 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. #include "textclient.h" diff --git a/textclient/citadel_ipc.c b/textclient/citadel_ipc.c index f9ebf8a8f..123258f76 100644 --- a/textclient/citadel_ipc.c +++ b/textclient/citadel_ipc.c @@ -1,14 +1,12 @@ -/* - * Copyright (c) 1987-2020 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// Copyright (c) 1987-2020 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. #include "textclient.h" diff --git a/textclient/client_chat.c b/textclient/client_chat.c index b8f621bd7..5b0da95f4 100644 --- a/textclient/client_chat.c +++ b/textclient/client_chat.c @@ -1,16 +1,14 @@ -/* - * front end for multiuser chat - * - * Copyright (c) 1987-2016 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// front end for multiuser chat +// +// Copyright (c) 1987-2016 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. #include "textclient.h" diff --git a/textclient/client_passwords.c b/textclient/client_passwords.c index 522ec8825..6187a7cd3 100644 --- a/textclient/client_passwords.c +++ b/textclient/client_passwords.c @@ -1,17 +1,15 @@ -/* - * Functions which allow the client to remember usernames and passwords for - * various sites. - * - * Copyright (c) 1987-2016 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// Functions which allow the client to remember usernames and passwords for +// various sites. +// +// Copyright (c) 1987-2016 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. #include "textclient.h" diff --git a/textclient/commands.c b/textclient/commands.c index 4187ddd51..864cee44d 100644 --- a/textclient/commands.c +++ b/textclient/commands.c @@ -1,17 +1,15 @@ -/* - * This file contains functions which implement parts of the - * text-mode user interface. - * - * Copyright (c) 1987-2018 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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 file contains functions which implement parts of the +// text-mode user interface. +// +// Copyright (c) 1987-2018 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. #include "textclient.h" diff --git a/textclient/configure b/textclient/configure index 04821c612..f49e7527f 100755 --- a/textclient/configure +++ b/textclient/configure @@ -3,12 +3,14 @@ # CONFIGURE SCRIPT FOR CITADEL TEXT CLIENT # This file is part of "conf-IG-ure" # Copyright (C) 2016-2019 by Art Cancro -# Distributed under the terms of the GNU General Public License v3 with the following special exceptions: -# 1. By using this software you agree that it's called "Linux", not "GNU/Linux" -# 2. By using this software you agree that it's called "open source", not "free software" -# 3. By using this software you agree that GNU Autotools are crap, which is why conf-IG-ure exists -# 4. By using this software you agree that Richard Stallman is a communist. -# 5. By reading these special exceptions you have already agreed to them. +# +# 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. echo echo diff --git a/textclient/ipc_c_tcp.c b/textclient/ipc_c_tcp.c index 4e4b8b872..efb997dcc 100644 --- a/textclient/ipc_c_tcp.c +++ b/textclient/ipc_c_tcp.c @@ -1,16 +1,14 @@ -/* - * Client-side IPC functions - * - * Copyright (c) 1987-2018 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// Client-side IPC functions +// +// Copyright (c) 1987-2018 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. #include "textclient.h" diff --git a/textclient/messages.c b/textclient/messages.c index df99e3362..31ca9011f 100644 --- a/textclient/messages.c +++ b/textclient/messages.c @@ -1,16 +1,14 @@ -/* - * Text client functions for reading and writing of messages - * - * Copyright (c) 1987-2020 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// Text client functions for reading and writing of messages +// +// Copyright (c) 1987-2020 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. #include "textclient.h" diff --git a/textclient/rooms.c b/textclient/rooms.c index 4eeb91e46..5c65cea82 100644 --- a/textclient/rooms.c +++ b/textclient/rooms.c @@ -1,16 +1,14 @@ -/* - * Client-side functions which perform room operations - * - * Copyright (c) 1987-2018 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// Client-side functions which perform room operations +// +// Copyright (c) 1987-2018 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. #include "textclient.h" diff --git a/textclient/routines.c b/textclient/routines.c index 3daaa3da8..b488dc9d1 100644 --- a/textclient/routines.c +++ b/textclient/routines.c @@ -1,16 +1,14 @@ -/* - * Client-side support functions. - * - * Copyright (c) 1987-2016 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// Client-side support functions. +// +// Copyright (c) 1987-2016 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. #include "textclient.h" diff --git a/textclient/routines2.c b/textclient/routines2.c index a5225b027..5105ee082 100644 --- a/textclient/routines2.c +++ b/textclient/routines2.c @@ -1,16 +1,14 @@ -/* - * More client-side support functions. - * - * Copyright (c) 1987-2017 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// More client-side support functions. +// +// Copyright (c) 1987-2017 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. #include "textclient.h" diff --git a/textclient/screen.c b/textclient/screen.c index 70f2b1f65..eac342f4b 100644 --- a/textclient/screen.c +++ b/textclient/screen.c @@ -1,20 +1,17 @@ -/* - * Screen output handling - * - * Copyright (c) 1987-2018 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// Screen output handling +// +// Copyright (c) 1987-2021 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. #include "textclient.h" - int enable_status_line = 0; char status_line[1024] = " "; @@ -34,8 +31,7 @@ void do_keepalive(void); * Attempt to discover the screen dimensions. * WARNING: This is sometimes called from a signal handler. */ -void check_screen_dims(void) -{ +void check_screen_dims(void) { #ifdef TIOCGWINSZ struct { unsigned short height; /* rows */ @@ -57,8 +53,7 @@ void check_screen_dims(void) /* * Initialize the screen */ -void screen_new(void) -{ +void screen_new(void) { send_ansi_detect(); look_for_ansi(); cls(0); @@ -66,23 +61,18 @@ void screen_new(void) } - /* * Beep. */ -void ctdl_beep(void) -{ +void ctdl_beep(void) { putc(7, stdout); } - - /* * scr_printf() outputs to the terminal */ -int scr_printf(char *fmt, ...) -{ +int scr_printf(char *fmt, ...) { static char outbuf[4096]; /* static for performance -- not re-entrant -- change if needed */ va_list ap; int retval; @@ -103,8 +93,7 @@ int scr_printf(char *fmt, ...) /* * Read one character from the terminal */ -int scr_getc(int delay) -{ +int scr_getc(int delay) { unsigned char buf; scr_flush(); @@ -117,11 +106,11 @@ int scr_getc(int delay) return buf; } + /* * Issue the paginator prompt (more / hit any key to continue) */ -void hit_any_key(void) -{ +void hit_any_key(void) { int a, b; color(COLOR_PUSH); @@ -153,8 +142,7 @@ void hit_any_key(void) /* * Output one character to the terminal */ -int scr_putc(int c) -{ +int scr_putc(int c) { /* handle tabs normally */ if (c == '\t') { do { @@ -171,9 +159,11 @@ int scr_putc(int c) if (c == '\n') { ++lines_printed; cols_printed = 0; - } else if (c == '\r') { + } + else if (c == '\r') { cols_printed = 0; - } else if (isprint(c)) { + } + else if (isprint(c)) { ++cols_printed; if ((screenwidth > 0) && (cols_printed > screenwidth)) { ++lines_printed; @@ -197,8 +187,8 @@ int scr_putc(int c) return c; } -void scr_flush(void) -{ + +void scr_flush(void) { if ((enable_color) && (screenwidth > 0) && (enable_status_line)) { if (strlen(status_line) < screenwidth) { memset(&status_line[strlen(status_line)], 32, screenwidth - strlen(status_line)); @@ -218,8 +208,7 @@ static volatile int caught_sigwinch = 0; * scr_winch() handles window size changes from SIGWINCH * resizes all our windows for us */ -sighandler_t scr_winch(int signum) -{ +sighandler_t scr_winch(int signum) { /* if we receive this signal, we must be running * in a terminal that supports resizing. */ @@ -229,12 +218,10 @@ sighandler_t scr_winch(int signum) } - /* * Display a 3270-style "wait" indicator at the bottom of the screen */ -void scr_wait_indicator(int state) -{ +void scr_wait_indicator(int state) { int sp = (screenwidth - 2); if (!enable_status_line) diff --git a/textclient/textclient.h b/textclient/textclient.h index be52529fb..2a3703648 100644 --- a/textclient/textclient.h +++ b/textclient/textclient.h @@ -1,17 +1,12 @@ -/* - * Copyright (c) 1987-2020 by the citadel.org team - * - * This program is open source software. It runs great on the Linux - * operating system, and probably other places too. We acknowledge - * that Richard Stallman is a communist and an asshole, while at the - * same time we release this program under the terms of the General - * Public 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 - * General Public License for more details. - */ +// Copyright (c) 1987-2020 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. #define UDS "_UDS_" #define DEFAULT_HOST "localhost" diff --git a/textclient/tuiconfig.c b/textclient/tuiconfig.c index 80f0c94fe..6372daf87 100644 --- a/textclient/tuiconfig.c +++ b/textclient/tuiconfig.c @@ -1,16 +1,14 @@ -/* - * Configuration screens that are part of the text mode client. - * - * Copyright (c) 1987-2018 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public 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. - */ +// Configuration screens that are part of the text mode client. +// +// Copyright (c) 1987-2018 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. #include "textclient.h" -- 2.30.2