This also fixes the ability to bind to key sequences ending in ^.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@476 13b04d17-f746-0410-82c6-800466cd88b0
Fixes platforms where time_t and long are different sizes.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@474 13b04d17-f746-0410-82c6-800466cd88b0
Fixes platforms where time_t and long are not the same size, like netbsd i386.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@473 13b04d17-f746-0410-82c6-800466cd88b0
This function never worked - function_timer() was creating a string but then
never throwing it away and returning a part of the argument instead, which
then caused a crash because it couldn't be freed later in the expression
parsing.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@472 13b04d17-f746-0410-82c6-800466cd88b0
An incorrect pointer was being passed to malloc_sprintf(), causing a
crash. Use m_sprintf() instead.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@471 13b04d17-f746-0410-82c6-800466cd88b0
Affected functions are alias_idle(), alias_serverlag(), alias_awaytime(),
function_serverpass(), function_checkuser() and function_isuser().
This fixes $serverpass(), which seems to have never worked right.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@470 13b04d17-f746-0410-82c6-800466cd88b0
This fixes bugs on netbsd i386, where time_t is longer than long.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@466 13b04d17-f746-0410-82c6-800466cd88b0
This fixes a series of compiler warnings on netbsd i386.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@465 13b04d17-f746-0410-82c6-800466cd88b0
Also rework function to use snprintf() instead of sprintf().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@464 13b04d17-f746-0410-82c6-800466cd88b0
An snprintf() call that creates IRC protocol messages must use
(MAX_PROTOCOL_SIZE + 1) as 'n' rather than the buffer size.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@461 13b04d17-f746-0410-82c6-800466cd88b0
ircterm.h now includes ncurses/ncurses.h if present, which is necessary for Cygwin.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@438 13b04d17-f746-0410-82c6-800466cd88b0
This ensures portability to systems with a fixed-argument list declaration
of tparm(), like NetBSD curses.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@436 13b04d17-f746-0410-82c6-800466cd88b0
This simplifies the inclusion logic in ircterm.h, and updates term.c to include
term.h if available. This removes the declarations for setupterm(), tigetstr(),
tigetnum(), tigetflag(), tgetent(), tgetstr(), tgetnum() and tgetflag() from
term.c as those should be defined in term.h or termcap.h.
This should make the system declaration of tparm() available to term.c, which
will fix a crash on NetBSD x86-64 caused by the implicit declaration of tparm()
having a return type of 'int' while the real function has a return type of
'char *'.
We have to include term.h in term.c, not in ircterm.h because term.h defines
a large number of macros, at least two of which ('lines' and 'goto_window')
conflict with names in use in the rest of the codebase.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@435 13b04d17-f746-0410-82c6-800466cd88b0
The new logic is considerably shorter and simpler, and should mean that
terminfo is properly used in preference to termcap on NetBSD. This also
allows us to include term.h in term.c, where the system definition of
tparm() lives on some systems (NetBSD is one such).
The new logic also means we link against libtinfo in preference to
libncurses, which should mean a little less memory used at runtime and a
fraction faster startup time.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@434 13b04d17-f746-0410-82c6-800466cd88b0