aboutsummaryrefslogtreecommitdiff
path: root/src/common.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove the `src' directoryPřemysl Janouch2014-08-101-1988/+0
| | | | There are not that many files, and aren't going to be.
* kike: shuffle things aroundPřemysl Janouch2014-08-091-0/+11
| | | | | Pseudorandomly. There are more than one way the program could be laid out. Some of them make more sense than others.
* Attributes don't apply to function definitionsPřemysl Janouch2014-08-091-1/+2
|
* kike: stuffPřemysl Janouch2014-08-041-1/+28
| | | | Implemented a lot of the channel stuff and other stuff as well.
* kike: implement LISTPřemysl Janouch2014-08-031-3/+3
|
* kike: implement the ping-pong and QUITPřemysl Janouch2014-08-021-0/+9
|
* Fix two Clang static analyzer issuesPřemysl Janouch2014-07-191-0/+2
| | | | Overflowing memory allocations should crash or exit anyway.
* Fix some compiler warningsPřemysl Janouch2014-07-191-9/+13
| | | | | | `-Weverything' seems to have found a few problems. Also enabled clang sanitizers by default.
* Add a LIST_HEADER macroPřemysl Janouch2014-07-181-3/+4
| | | | | | To save us from specifying the `next' and `prev' pointers all the time. It's not perfect, just a tiny bit better.
* Implement TIME, VERSION, MOTD, LUSERSPřemysl Janouch2014-07-171-0/+1
|
* Revise usage of print_{error,fatal}()Přemysl Janouch2014-07-161-23/+15
| | | | | | Let's limit print_fatal() to unexpected conditions. Also added exit_fatal() to save a few lines of code.
* str_map::key_cmp -> str_map::key_xfrmPřemysl Janouch2014-07-161-10/+42
| | | | | | It seemed to be almost too easy to be true, and it actually was. Now it should work.
* First bugfixesPřemysl Janouch2014-07-161-2/+5
| | | | Now we can at least successfully register.
* CleanupPřemysl Janouch2014-07-161-21/+10
| | | | No functional changes.
* Rip out error codesPřemysl Janouch2014-07-161-61/+12
| | | | | | | | | | | | | | | 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.
* Make it possible to route messages to syslogPřemysl Janouch2014-07-151-12/+39
|
* Resolve paths relative to XDG config. pathsPřemysl Janouch2014-07-141-45/+87
| | | | This should make the programs an awful lot less painful to set up.
* Add support for custom str_map key comp. fun.Přemysl Janouch2014-07-141-2/+6
| | | | That wasn't hard.
* Put a prolog at the top of configuration filesPřemysl Janouch2014-07-131-2/+5
| | | | Later I'm going to put in there some more information about the format etc.
* Load an MOTD on startPřemysl Janouch2014-07-131-0/+7
|
* Add a strtoul() wrapperPřemysl Janouch2014-07-131-0/+9
|
* Only compile regex's oncePřemysl Janouch2014-07-131-39/+67
|
* Implement an iterator for `struct str_map'Přemysl Janouch2014-07-121-0/+33
|
* Implement parsing of IRC 3.2 message tagsPřemysl Janouch2014-07-121-3/+43
| | | | | It's still in the making and we don't use it, but let's not fail on it if e.g. a plugin decides to enable it.
* WIP: add a stub IRC daemon named `kike'Přemysl Janouch2014-07-121-0/+1772
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).