# 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
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.
-/*
- * 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"
-/*
- * 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"
-/*
- * 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"
-/*
- * 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"
-/*
- * 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"
# 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
-/*
- * 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"
-/*
- * 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"
-/*
- * 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"
-/*
- * 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"
-/*
- * 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"
-/*
- * 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] = " ";
* 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 */
/*
* Initialize the screen
*/
-void screen_new(void)
-{
+void screen_new(void) {
send_ansi_detect();
look_for_ansi();
cls(0);
}
-
/*
* 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;
/*
* Read one character from the terminal
*/
-int scr_getc(int delay)
-{
+int scr_getc(int delay) {
unsigned char buf;
scr_flush();
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);
/*
* Output one character to the terminal
*/
-int scr_putc(int c)
-{
+int scr_putc(int c) {
/* handle tabs normally */
if (c == '\t') {
do {
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;
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));
* 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.
*/
}
-
/*
* 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)
-/*
- * 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"
-/*
- * 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"