Commit Graph

306 Commits

Author SHA1 Message Date
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
4827dcf8e4 Add a pointer vector abstraction.
There are lots of places where we want a growable
vector of pointers.  Add one.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-10 10:25:37 +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
187cf02903 More GNUmakefile cleanups.
With the normalization of magimail's Makefile,
we can further simplify this logic.

Integrate the WWW logic into GNUmakefile.common.

Remove the custom `Makefile.sunos` files: just
use a conditional in the Makefile.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-10 10:25:26 +10:00
Dan Cross
4ed5319798 Rewrite non-WWW makefiles.
Delegate most of the logic to a "common" GNUmakefile,
with each system-specific GNUmakefile only setting a
handful of necessary variables.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-10 10:22:26 +10:00
Dan Cross
120e947d6e Rename Makefiles to GNUmakefiles.
GNU make is a requirement to build Magicka: make
this explicit with the naming of the files.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-10 10:22:21 +10:00
Dan Cross
b28e003945 Chat system: simplify connect logic.
Simplify the logic around making connections in the
chat system by delegating to utility functions that
return early on failure.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-09 15:49:54 +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
Dan Cross
ff966a6b4d 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:39:59 +10:00
Andrew Pamment
991b1c4368 Update to v0.12-alpha and add area headers 2018-10-04 10:05:04 +10:00
Andrew Pamment
1d1f83cd41 Redraw BBS List after aborting 2018-10-02 10:16:50 +10:00
Andrew Pamment
c36b8d348e Fix bug when removing areas 2018-09-12 10:16:07 +10:00
Andrew Pamment
a9c73f15a6 another fix 2018-09-02 18:27:22 +10:00
Andrew Pamment
db4eeff587 Fix for empty messages 2018-09-02 18:23:47 +10:00
Andrew Pamment
4cf5596737 documentation work and a bug fix 2018-08-13 14:07:21 +10:00
Andrew Pamment
1b661f4f5b Fiddling with unread messages 2018-07-31 10:42:56 +10:00
Andrew Pamment
ecb1c986f0 Start on qwknet support 2018-06-24 10:28:18 +10:00
Andrew Pamment
4b90398cbf Stop using system() 2018-06-20 19:39:57 +10:00
Andrew Pamment
c341df6738 Fix bluewave 2018-06-20 19:31:35 +10:00
Andrew Pamment
96ac7c0a3f Updates for macOS 2018-06-19 19:06:25 +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
760fef49b2 fix a bug with menus 2018-06-12 17:06:49 +10:00
Andrew Pamment
07b5568037 ansi files in strings 2018-06-08 09:27:53 +10:00
Andrew Pamment
edb1b41652 Git hooks suck 2018-06-05 15:27:53 +10:00
Andrew Pamment
d14af4bf23 i will get this soon 2018-06-05 15:24:42 +10:00
Andrew Pamment
f12630f7e5 Last test commit 2018-06-05 15:23:30 +10:00
Andrew Pamment
ffd1c546b8 Another test commit 2018-06-05 15:21:49 +10:00
Andrew Pamment
1feaa7d91e Another test commit 2018-06-05 15:19:41 +10:00
Andrew Pamment
b472f6448c Test commit, just whitespace 2018-06-05 15:15:14 +10:00
Andrew Pamment
732732a728 close iconv 2018-05-31 19:13:43 +10:00
Andrew Pamment
0f6af49071 move next and prev around 2018-05-31 14:00:18 +10:00
Andrew Pamment
5a1a834803 Remove redundant free 2018-05-31 09:59:26 +10:00
Andrew Pamment
0b8cc472d4 Fix bug in SSH 2018-05-31 09:56:01 +10:00
Andrew Pamment
a37329ff21 Fix message flagging in www 2018-05-30 16:21:55 +10:00
Andrew Pamment
efdd46f97a add PAUSE code to ansis 2018-05-27 13:07:07 +10:00
Andrew Pamment
56636843aa attempt to fix with openssl < 1.1.0 2018-05-26 12:57:50 +10:00
Andrew Pamment
834afccb57 Update password hashing to use evp functions 2018-05-26 12:35:06 +10:00
Andrew Pamment
5920963420 Fix for dragonfly 2018-05-26 11:48:06 +10:00
Andrew Pamment
6bce190c1a Just reconfigure all the things 2018-05-26 11:27:29 +10:00
Andrew Pamment
59967118e0 More fixes for building on Net/OpenBSD 2018-05-26 11:10:37 +10:00
Andrew Pamment
d92859ac5d Attempt to fix building on netbsd 2018-05-26 11:05:43 +10:00
Andrew Pamment
ce888d9ad1 maybe this time? 2018-05-25 22:44:44 +10:00
Andrew Pamment
1ec2bc02bd more messing with word wrap 2018-05-25 22:42:35 +10:00
Andrew Pamment
0ebdbe71b4 Messing with wordwrap 2018-05-25 22:38:11 +10:00
Andrew Pamment
759b5a3adb fix type 2018-05-25 22:30:54 +10:00
Andrew Pamment
23fb3df703 update to look prettier 2018-05-25 22:29:09 +10:00
Andrew Pamment
fb90c8b397 updated to include bbs name if known from nodelist 2018-05-25 22:26:22 +10:00
Andrew Pamment
9e816f05f6 Restore accidently deleted date from www messages 2018-05-25 21:39:29 +10:00
Andrew Pamment
8f948e59c4 attempt to fix openbsd compiling 2018-05-25 18:49:30 +10:00
Andrew Pamment
b6f328ffa3 Fix for iconv message 2018-05-23 19:45:55 +10:00
Andrew Pamment
e8c7b0cfec
Merge branch 'maginet' into v0.11-alpha 2018-05-23 17:24:29 +10:00
Andrew Pamment
11fe200797 use iconv in www msgs 2018-05-23 17:21:53 +10:00
Andrew Pamment
42fdc30972 maginet 2018-05-22 21:02:22 +10:00
Andrew Pamment
00703ab5e0 implement flagging on www 2018-05-22 12:20:38 +10:00
Andrew Pamment
f9b13fa515 fix flagging 2018-05-22 09:02:35 +10:00
Andrew Pamment
798bec221d Message Flagging 2018-05-22 08:55:44 +10:00
Andrew Pamment
275a60d0d4 Fix crash in mail menu 2018-05-16 13:44:04 +10:00
Andrew Pamment
ff35d9bec9 fix for www hashes on rpi 2018-05-15 16:44:39 +10:00
Andrew Pamment
b9dbf0f21f add extra byte for null terminator 2018-05-15 12:58:58 +10:00
Andrew Pamment
5100a21163 attempt to fix www_downloads 2018-05-15 12:51:09 +10:00
Andrew Pamment
0d90a3cef5 fix for sunos 2018-05-14 15:33:40 +10:00
Andrew Pamment
5d108fd6c2 v0.11-alpha 2018-05-14 09:17:01 +10:00
Andrew Pamment
e42f274c9b add dosbox shim 2018-05-14 08:36:30 +10:00
Andrew Pamment
8c9111fa17 modify to and subject on reply 2018-05-09 13:19:49 +10:00
Andrew Pamment
a981864237 fix for new menu chainging and scripts 2018-05-03 08:23:26 +10:00
Andrew Pamment
5b448b7e14 Fix chaining commands 2018-05-01 16:13:55 +10:00
Andrew Pamment
e8640d2230 chaining menu commands 2018-05-01 16:05:01 +10:00
Andrew Pamment
ef80f27a6a fix bug 2018-04-20 16:23:18 +10:00
Andrew Pamment
08c01c58c8 strip ansi codes from www reply 2018-04-20 16:20:05 +10:00
Andrew Pamment
0a1cc0fbf9 mv yml to the right place 2018-03-05 17:12:05 +10:00
Andrew Pamment
8e7614e15a fix yml 2018-03-05 17:10:23 +10:00
Andrew Pamment
8c7defb1d8 Testing gitlab ci 2018-03-05 17:08:53 +10:00
Andrew Pamment
2ff6e4cc48 Testing Git 2018-03-05 16:45:27 +10:00
Andrew Pamment
430bde78cd missing last letter 2018-02-28 09:58:07 +10:00
Andrew Pamment
c6b8062782 round and round we go 2018-02-28 09:46:18 +10:00
Andrew Pamment
788e0a9425 fiddle fiddle fiddle 2018-02-28 09:42:10 +10:00
Andrew Pamment
893931e01c going to get it eventually.... maybe. 2018-02-28 09:40:07 +10:00
Andrew Pamment
aa68a8f8f6 messing with wordwrap 2018-02-28 09:33:40 +10:00
Andrew Pamment
da5b512c5f fiddle with word wrap 2018-02-28 09:26:24 +10:00
Andrew Pamment
dd428487fa fix typo 2018-02-28 09:19:55 +10:00
Andrew Pamment
c5c5faf772 fiddling with wordwrap 2018-02-28 09:17:02 +10:00
Andrew Pamment
d087e13f61 experiments with word wrap 2018-02-28 09:10:27 +10:00
Andrew Pamment
735fe035d7 going to get it right eventually... 2018-02-27 22:44:31 +10:00
Andrew Pamment
6d5ef94796 more tweaking word wrap 2018-02-27 22:42:15 +10:00
Andrew Pamment
77303fc475 fix mistake in wordwrap 2018-02-27 22:38:37 +10:00
Andrew Pamment
2a0ef93fb2 more fiddling with wordwrap 2018-02-27 22:36:24 +10:00
Andrew Pamment
962e4cc67f more work on word wrap 2018-02-27 22:28:28 +10:00
Andrew Pamment
f5b136ae21 wordwrap sucks 2018-02-27 21:59:04 +10:00
Andrew Pamment
c52c3c2a9b try to fix bug 2018-02-27 21:50:22 +10:00
Andrew Pamment
29bdc52efa stop crashing! 2018-02-27 21:40:58 +10:00
Andrew Pamment
9dd95d9181 woops 2018-02-27 21:38:56 +10:00
Andrew Pamment
50d2bab142 fiddling with word wrap 2018-02-27 21:36:32 +10:00
Andrew Pamment
4aa2c4f6c1 fix hour being negative 2018-02-27 20:14:01 +10:00
Andrew Pamment
27de6593b1 forgot to free blog entries 2018-02-27 18:57:10 +10:00
Andrew Pamment
fbd3dc7494 Empty title aborts blog editor 2018-02-27 18:51:12 +10:00
Andrew Pamment
396f5c2bb9 Add a system blog 2018-02-27 18:26:32 +10:00
Andrew Pamment
371aa84ea0 Fix for undefined string in mail scan 2018-02-27 13:24:24 +10:00
Andrew Pamment
70dcde1f75 New Last 10 Callers 2018-02-25 16:25:53 +10:00