Commit Graph

21 Commits

Author SHA1 Message Date
Dan Cross
54093060cb More cleanups.
More cleaning up construction of arrays of things.
Introduce a utility function called, `split_on_space`
that tokenizes a string on a space character; use
it in most places where `strtok()` had been called.

More use of the ptr_vector type.  Introduce a utility
function to get access to the pointers without consuming
the vector; this is used in the files code.

Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
2018-10-10 10:25:47 +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
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
42fdc30972 maginet 2018-05-22 21:02:22 +10:00
Andrew Pamment
9390dedc82 Add personal mail scan 2018-02-18 13:51:39 +10:00
Andrew Pamment
66da53eb85 lots of leaks fixed 2018-02-10 16:01:30 +10:00
Andrew Pamment
c2b956c13a Handle zip not installed gracefully 2018-02-09 19:35:14 +10:00
Andrew Pamment
d7d984cc57 fix typo 2018-01-08 09:59:20 +10:00
Andrew Pamment
8ce18af919 Mark emails as seen after downloading bluewave 2018-01-08 09:56:41 +10:00
Andrew Pamment
ba8b5a97b2 Add private email uploads to bluewave totals 2018-01-08 09:01:27 +10:00
Andrew Pamment
1f699ad89f EXPERIMENTAL: Bluewave Email Support 2018-01-08 08:54:03 +10:00
Andrew Pamment
76de1e7f4b Attempt to add first/last names to bluewave scan 2018-01-07 22:59:39 +10:00
Andrew Pamment
a58b45b950 Attempt to reset numbers each day on bwave pkts 2017-10-18 19:33:41 +10:00
Andrew Pamment
5ca5ea73c3 First try at alternate packet numbering for bluewave 2017-10-18 07:36:58 +10:00
Andrew Pamment
7dba74f514 Fix semaphore updating on netbsd/evbarm 2017-10-13 22:13:00 +10:00
Andrew Pamment
1d7d4d4f9a Fix bluewave last read pointers 2017-10-11 21:01:13 +10:00
Andrew Pamment
ffaca86565 Redo Make file setup.. please standby 2017-09-25 13:27:22 +10:00