Commit Graph

11 Commits

Author SHA1 Message Date
Kevin Easton
ac84793dd6 Switch from direct tcl_interp->result access to Tcl_GetStringResult() and Tcl_AppendResult()
This allows building against recent libtcl versions.

A fallback definition of Tcl_GetStringResult() is included so that building against libtcl 7 still works.
2017-07-01 00:47:20 +10:00
Kevin Easton
c0c7cdbdcc Rework the calculation of the select timeout in io() to be based on absolute wake time
An absolute wake time is now calculated and updated by set_server_bits(),
TimerTimeout() and tclTimerTimeout().  This is then used to calculate the actual
select() timeout, instead of having those functions calculate a relative timeout
value themselves.  This significantly simplifies those functions, since the
underlying values tend to be recorded as absolute times.

It also allows us to disentangle tclTimeTimeout from TimerTimeout(), and move the
responsibility for calculating the QUEUE_SENDS wake time from TimerTimeout() to
set_server_bits() where it belongs.

The QUEUE_SENDS and CONNECT_DELAY wake up times will also now be correctly
calculated, based on the last sent time and connect time respectively.
2015-06-07 00:03:09 +10:00
Kevin Easton
b944573a5e Minor fixes to enable compiling against TCL8.5
Define USE_NON_CONST so that the newer TCL headers define functions in the
same way as pre-8.4 TCL headers.  It will be a good idea to change to
USE_COMPAT_CONST instead at some point.

Also use ckfree() instead of free() to free an allocation returned by TCL.
2015-05-16 22:20:25 +10:00
Tim Cava
1bafc85e23 Convert sprintf calls to snprintf. From pvaldes.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@454 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-11 21:28:48 +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
d7bdc25960 Use memcpy() instead of strlcpy() in two places where the source length is
known and the destination length is known to be sufficient.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@376 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-28 14:01:23 +00:00
Tim Cava
6afd2d4a87 Use strlcpy, rather than strmcpy, in Tcl_GetKeyedListField().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@371 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-18 23:17:23 +00:00
Tim Cava
c907a548e0 Use strlcpy, rather than strmcpy, in Tcl_GetKeyedListKeys().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@370 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-18 23:16:12 +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