Commit Graph

31 Commits

Author SHA1 Message Date
Kevin Easton
ac1c95c4ec Rename Window.columns to Window.saved_columns
This more accurately describes what it's for, and also avoids a conflict with the columns identifier
defined by terminfo's <term.h>.
2018-12-10 23:46:24 +11:00
Kevin Easton
9bffcf91ba Use main_screen->co instead of current_term->TI_cols as fallback width for never-visible windows
Window management should be getting its idea of screen geometry from screens, rather than
directly from the terminal.
2018-05-14 15:25:21 +10:00
Kevin Easton
14a501bd04 Add window_columns() function to determine number of columns used for splitting window output
Replaces two open-coded versions of the same pattern.
2018-05-10 17:02:16 +10:00
Kevin Easton
a71ee883e1 Make "You can't hide an invisible window" message respect /SET WINDOW_QUIET
Also remove unnecessary NULL check, window->screen is already checked for NULL.
2017-11-10 17:16:58 +11:00
Kevin Easton
c6f420b53d Simplify get_window_by_desc()
The '#' case never worked anyway, so just remove it and simplify.
2017-11-10 17:12:09 +11:00
Kevin Easton
8a176c6950 Remove pointless check for unsigned number < 0 in get_window_by_refnum() 2017-11-09 23:50:13 +11:00
Kevin Easton
ce55f5eaa8 Move unsetting of UPDATE_STATUS flag into update_window_status()
Also remove a buggy attempt to unset the flag from set_hold_mode().
2017-11-09 23:45:09 +11:00
Kevin Easton
c881d1d20f Simplify condition in set_current_channel_by_refnum() 2017-11-09 23:35:28 +11:00
Kevin Easton
f81126186c Simplifications in window_query()
Should be no user-visible changes.
2017-11-09 23:32:56 +11:00
gdinit
bac141898b Correct spelling of some client messages, comments and function names 2017-10-20 14:57:17 +11:00
Kevin Easton
70ac43ce77 Remove globals 'li' and 'co' in term.c
These globals were used to store the original terminal dimesions from the terminal database (or
in the case of reattaching, supplied by scr-bx) to be applied if the current terminal dimensions
could not be determined.

Instead, we leave the original terminal dimensions in current_term->TI_lines and current_term->TI_cols,
and create current_term->li and current_term->co to store the current terminal dimensions (as eg.
supplied by scr-bx).
2017-09-15 17:15:24 +10:00
Kevin Easton
53f3a34ca5 Change channel argument of is_current_channel() to const char * 2017-04-16 16:14:13 +10:00
Kevin Easton
2fa0bf818a Replace uses of HAVE_SSL with HAVE_LIBSSL
autoconf's AC_CHECK_LIB automatically sets HAVE_LIBSSL, whereas HAVE_SSL has to be set manually.

This prepares us to remove some code from configure.
2017-03-17 00:07:38 +11:00
Kevin Easton
f21b89e428 Improve /WINDOW DESCRIBE output
Instead of showing a meaningless pointer value for Screen:, we show the
screen number and ttyname.

Also take the CO, LI values from the window's screen.

Don't show the Prompt: unless one is set.
2016-03-16 23:50:38 +11:00
Kevin Easton
8886c20c1b Improve messages shown by /window size 2015-11-11 14:59:21 +11:00
Kevin Easton
ce3fd79652 Global spelling fix s/recieve/receive/ across codebase
This includes some user-visible messages and help files, so if anyone has
hooked them with /ON WINDOW their hooks will need updating.
2015-10-04 09:06:38 +11:00
Kevin Easton
d0b0a95330 Convert skip_ctl_c_seq() and its callers (except strip_ansi()) from unsigned char to char
This should make no functional difference, and cuts out a large number of
unsigned char * / char * mismatch warnings.
2015-06-17 22:50:49 +10:00
Kevin Easton
8cdc62ae0d Wire up /SET DOUBLE_STATUS_LINES so it actually does something
The DOUBLE_STATUS_LINES /SET has existed for a long while, but setting it has
never actually had an effect.  This change causes it to affect the
/window double setting of new windows: 0 means new windows are created without
double status lines, 1 means only the first window is created with double
status lines and subsequent windows aren't (this is the default) and 2 means
that all windows are created with double status lines.

Note that setting this variable in your .ircrc can't actually affect the first
window, because that's created before the .ircrc is loaded.  The compiled-in
default value (DEFAULT_DOUBLE_STATUS_LINES in config.h) is the only thing that
can affect the first window.

Reported by presi.
2015-06-03 23:16:57 +10:00
Kevin Easton
f222b94d13 window.c: Apply patch from tau replacing sprintf() with snprintf().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@440 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-11 13:24:38 +00:00
Tim Cava
112b38ac7a Revert the last commit. It accidentally had autogenerated files in it.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@432 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-07 03:00:24 +00:00
Tim Cava
276fd24258 Use snprintf rather than sprintf. From pvaldes.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@431 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-07 02:41:16 +00:00
Kevin Easton
e281537918 logfile should be initialised from LOGFILE_VAR if that is set.
We can also rearrange things to remove the need for the add_ext variable,
hopefully also making the logic a bit more clear.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@423 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-27 15:08:23 +00:00
Tim Cava
6094d62550 Cleanup window_help(). Use strlcat rather than strmcat.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@422 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-26 16:43:49 +00:00
Tim Cava
37f59831a2 Refactor window_log(). Use strlcat rather than strmcat. Rename a variable
and remove a buffer on the stack.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@421 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-26 15:30:09 +00:00
Tim Cava
a394019490 Use strlcpy, rather than strmcpy, in window_log().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@329 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 10:55:09 +00:00
Tim Cava
674558ece4 Use strlcpy, rather than strmcpy, in delete_window().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@328 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 10:46:09 +00:00
Tim Cava
49a7117900 Including dcc.h in window.c is unnecessary.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@295 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:21:26 +00:00
Kevin Easton
789ed916cd Backport changes from epic5 to make recv_nick, sent_nick and sent_body
per-server, and apply new version of do_oops from flewid (the BX2 version). 

This means that /oops, "/query .", "/query ,", "/msg ." and "/msg ," are now
per-server, along with the $. $, and $B aliases.



git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@87 13b04d17-f746-0410-82c6-800466cd88b0
2010-06-26 08:18:34 +00:00
Kevin Easton
3de93b1dbc Far-reaching changes to make BitchX compatible with 64 bit architectures
like x86-64, where sizeof(int) != sizeof (void *).  This involves correctly
casting every function pointer from the global table to the correct
function type, which has the added benefit of allowing type-checking of
function arguments and return values.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@26 13b04d17-f746-0410-82c6-800466cd88b0
2008-04-30 13:57:56 +00:00
Kevin Easton
533c3dbcbf Turn on SVN keyword replacement for $Date$, $Author$, $Revision$, $Id$ for all
*.c and *.h files.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/branches/ircii-pana-1.1@3 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:49:14 +00:00
Kevin Easton
28febcfea9 Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:25:32 +00:00