Commit Graph

12 Commits

Author SHA1 Message Date
Přemysl Eric Janouch a87be6dfd2 Fix two Clang static analyzer issues
Overflowing memory allocations should crash or exit anyway.
2014-07-19 22:35:12 +02:00
Přemysl Eric Janouch 027333e56a Fix some compiler warnings
`-Weverything' seems to have found a few problems.

Also enabled clang sanitizers by default.
2014-07-19 17:44:49 +02:00
Přemysl Eric Janouch 43d34d2473 Add a LIST_HEADER macro
To save us from specifying the `next' and `prev' pointers all the time.

It's not perfect, just a tiny bit better.
2014-07-18 19:51:15 +02:00
Přemysl Eric Janouch 1842fa90dd Revise usage of print_{error,fatal}()
Let's limit print_fatal() to unexpected conditions.

Also added exit_fatal() to save a few lines of code.
2014-07-16 23:56:42 +02:00
Přemysl Eric Janouch 2921eed702 Rip out error codes
As it turns out, they're rather annoying to maintain, and we don't even need
them.  They also clutter the code unnecessarily in their current form.

If it ever comes to having to have them, let's make another version of
error_set(), maybe error_set_with_code(), that makes it possible to also set
an integer within `struct error'.

The only problem with the above solution is when we aggregate errors from
multiple functions (be it by calling one after another, or through nesting of
functions that may return an error).

But let's care about that when the time comes for it.
2014-07-16 00:53:59 +02:00
Přemysl Eric Janouch 18cb2941f3 Resolve paths relative to XDG config. paths
This should make the programs an awful lot less painful to set up.
2014-07-14 22:15:56 +02:00
Přemysl Eric Janouch 586ccd4e87 Put a prolog at the top of configuration files
Later I'm going to put in there some more information about the format etc.
2014-07-13 23:50:44 +02:00
Přemysl Eric Janouch 03ec980f26 Add a strtoul() wrapper 2014-07-13 05:56:30 +02:00
Přemysl Eric Janouch 51909edc76 Apparently it's the "realname" 2014-07-13 05:38:05 +02:00
Přemysl Eric Janouch 475c83618a Only compile regex's once 2014-07-13 04:30:23 +02:00
Přemysl Eric Janouch 705c0e943e WIP: add a stub IRC daemon named `kike'
As it is going to share a great lot of functionality with ZyklonB, I have
decided to extract the common parts into `common.c' and make the two subprojects
include this file.

The Single Compile Unit concept has proven valuable (sub-second compile times,
dead code warnings, almost no need for function declarations, whole-program
optimizations), and the sources aren't that long so far anyway.

I am probably going to add CMake support later but so far it's not a priority.
This project is meant to be portable and freely relocatable (ie. no hardcoded
paths if I can avoid it).
2014-07-12 21:09:50 +02:00
Přemysl Eric Janouch 165a19da21 Initial commit 2014-07-05 01:28:16 +02:00