37 Commits

Author SHA1 Message Date
Dan Cross
bdde1aa621 Use fopen_bbs_path in a couple of places.
Just an example of how it may be used.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-20 09:37:45 +10:00
Andrew Pamment
ee194c102f fix path to last 10 and automessage 2018-10-18 21:03:52 +10:00
Andrew Pamment
af8936c02e Haiku Support
Hope I didn't break things!
2018-10-18 11:36:02 +10:00
Dan Cross
359a190ee9 Remove the last of the sprintf() calls.
sprintf() is unsafe since it may overflow the bounds
of its destination buffers.  Remove the last of the
calls to it; all the logic has either been rewritten
to use snprintf() or other forms of string copying
such as strlcpy().

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-17 13:11:33 +10:00
Dan Cross
6d30116ed9 Import strlcpy/strlcat from OpenBSD, start using them.
strcpy()/strcat() are inherently dangerous, even when
used with great care.  strlcpy() and strlcat() are
much safer replacements, and are available from OpenBSD
under a very liberal license.  Import them and start
using them.

Between pointer vectors, malloz, stralloc and now
strlcpy/strlcat, Magicka has much safer, simpler and
more performant infrastructure for dealing with
strings and dynamic collections of various kinds.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-11 13:58:49 +10:00
Dan Cross
540e359080 Cleanups and pointer vectors.
A repeated pattern in Magicka is to append to dynamically
sized arrays via malloc()/realloc().  Introduce the notion
of a "pointer vector": that is, a growable vector of
pointers, that can be reused to implement that logic more
safely and efficiently (this implementation uses power-of-two
growing).

Many malloc()/realloc() calls were not checked; these
assert() that the return value from realloc() is not NULL.

Add a method to consume the pointer vector: that is, realloc()
it to the current length and return the underlying pointers.

Make the `fmt` argument to dolog() const.
Include <sys/wait.h> in bluewave.c to squash a warning.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-10 10:25:42 +10:00
Dan Cross
fa014f3a88 Simplify dynamic memory management.
Add utility routines and use them to simplify the
use of dynamically allocated memory.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-10 10:25:29 +10:00
Dan Cross
d6826137dd clang-format
Fix a bunch of trivial formatting issues by running
`clang-format`.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-09 15:48:42 +10:00
Andrew Pamment
4cf5596737 documentation work and a bug fix 2018-08-13 14:07:21 +10:00
Andrew Pamment
50f4b9a5a8 Move initialization of mqtt 2018-06-19 09:14:18 +10:00
Andrew Pamment
5853f46f5b Update documents etc 2018-06-19 09:11:52 +10:00
Andrew Pamment
1684f8ab39 Switch broadcast to MQTT 2018-06-18 16:52:27 +10:00
Andrew Pamment
07b5568037 ansi files in strings 2018-06-08 09:27:53 +10:00
Andrew Pamment
efdd46f97a add PAUSE code to ansis 2018-05-27 13:07:07 +10:00
Andrew Pamment
396f5c2bb9 Add a system blog 2018-02-27 18:26:32 +10:00
Andrew Pamment
70dcde1f75 New Last 10 Callers 2018-02-25 16:25:53 +10:00
Andrew Pamment
c98ad14aef Fixed wordwrap bug in internal editor 2018-02-20 15:02:39 +10:00
Andrew Pamment
ec747992a4 revert some changes 2018-02-18 15:11:29 +10:00
Andrew Pamment
263118a164 Attempt to solve stuck nodes 2018-02-16 21:35:09 +10:00
Andrew Pamment
15ca5a41dc web file bases 2018-02-15 14:43:37 +10:00
Andrew Pamment
d002d681d7 Change AUTOMESSAGE_WRITE to AUTOMESSAGE and add prompt. 2018-02-14 14:36:26 +10:00
Andrew Pamment
d5d61a8cc6 Fix a couple of bugs 2018-02-10 14:59:10 +10:00
Andrew Pamment
caf4542e72 Update what's new 2018-02-08 19:58:06 +10:00
Andrew Pamment
49fdd9695d fix for ssh stuck nodes 2018-02-07 18:01:17 +10:00
Andrew Pamment
686aee7226 Added some additional logging 2018-02-07 17:27:50 +10:00
Andrew Pamment
f5cd8ddb03 Remove IAC debug output 2018-02-05 11:52:01 +10:00
Andrew Pamment
027c047b42 some debugging IAC codes in file transfers 2018-02-01 13:42:57 +10:00
Andrew Pamment
8935b660ec some more lua functionality 2018-01-30 17:33:57 +10:00
Andrew Pamment
84a3d271df first attempt at www downlods WIP 2018-01-23 20:57:58 +10:00
Andrew Pamment
69897e7955 Think I may have fixed it! 2018-01-21 19:05:01 +10:00
Andrew Pamment
6ac2e6f125 WWW improvements, fixes and a bug. 2018-01-21 15:02:21 +10:00
Andrew Pamment
6c3df730aa PageUp / Page Down Home / End in lists 2018-01-20 12:46:50 +10:00
Andrew Pamment
209c8b932c Work with unix line endings on display ansi 2018-01-15 14:21:53 +10:00
Andrew Pamment
78f21e9740 Rework logout ansis 2017-10-11 16:24:59 +10:00
Andrew Pamment
a2d80b90fd Add support for US style dates 2017-10-03 12:09:50 +10:00
Andrew Pamment
a74caa16b2 Initial try at new file scan 2017-09-28 19:11:00 +10:00
Andrew Pamment
ffaca86565 Redo Make file setup.. please standby 2017-09-25 13:27:22 +10:00