Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-06-08 | Added the `init_config()` function. | mrb0nk500 | |
This function reads the config file supplied by `config_file`, and initialize the `config *` supplied by `cfg` accordingly. `init_config()` returns true if the config file was successfully read, otherwise, it returns false. | |||
2021-06-08 | Added the `done` flag. | mrb0nk500 | |
This flag, when true, exits the main loop, and thus exits the program. | |||
2021-06-08 | Treat `TYPE_BOOL` the same as `TYPE_INT`. | mrb0nk500 | |
The reason for keeping `TYPE_BOOL` is for readability. | |||
2021-06-08 | Remove the `b` member from the `config_val` union. | mrb0nk500 | |
We can use the `i` member instead. | |||
2021-06-08 | Removed unnecessary comment in `config_opts`. | mrb0nk500 | |
2021-06-07 | Fixed a bug with offsets being handled improperly in | mrb0nk500 | |
`set_config_opt()`. | |||
2021-06-07 | Fixed a segfault in `parse_config()`. | mrb0nk500 | |
2021-06-07 | Fixed a segfault bug in `get_line()`. | mrb0nk500 | |
2021-06-07 | Fixed a typo, and replaced a `NULL` in the offset of | mrb0nk500 | |
the null entry with -1 in `config_opts`. | |||
2021-06-07 | Removed the casts to `long` in `parse_option_value()`. | mrb0nk500 | |
They weren't needed. | |||
2021-06-07 | Fixed a bug in one of the checks in `read_file()`. | mrb0nk500 | |
2021-06-07 | Added the `set_config_opt()` function. | mrb0nk500 | |
This function takes the offset of a given member of a config option in a `config` struct, and sets the member to the value supplied by `val`, with the type of value being determined by `type`. | |||
2021-06-07 | Added the `config` struct. | mrb0nk500 | |
This data structure holds all of the variables set by the config file options. | |||
2021-06-07 | Replace `func` in config_opt with `offset`. | mrb0nk500 | |
`offset` is the offset of the member of the config option in the `config` struct. This was done in order to allow for setting any member of the config struct with just a single function. | |||
2021-06-06 | Moved `TYPE_NONE` to the start of `config_type`, and | mrb0nk500 | |
added `TYPE_COUNT` at the end of `config_type`. This is to allow for any iterators that need to count upto the total number of types to just to count up to `TYPE_COUNT`. | |||
2021-06-06 | Added the config option value parser. | mrb0nk500 | |
This function, called `parse_option_value()`, parses the supplied `value` string, and based on the value type supplied by `opt`, sets a given member of `val` for that value type. | |||
2021-06-06 | Added a loop for finding a valid config option. | mrb0nk500 | |
I also added a call to a function that parses the value of the config option. | |||
2021-06-06 | Added a NULL entry to the end of `config_opts`. | mrb0nk500 | |
2021-06-06 | Added a new union called `config_val`. | mrb0nk500 | |
This is so that I don't have to cast the variable as a `void *`, and make it easier to read. I also added `TYPE_NONE` to the `config_type` enum for denoting that the config option doesn't take a value. | |||
2021-06-05 | Fixed a bug, and typo in the `strtok_r()` call in the | mrb0nk500 | |
config parser loop. | |||
2021-06-05 | Replace `find_line()` with `get_line()`. | mrb0nk500 | |
The loop body was also changed accordingly. This was done to make the config parser easier to read. | |||
2021-06-05 | Move the config option stuff into `config.h`. | mrb0nk500 | |
2021-06-05 | Added the typedefs for the config option types. | mrb0nk500 | |
2021-06-05 | Rename var to func, and change all the variables to | mrb0nk500 | |
function addresses. This is to get rid of the need for global variables. | |||
2021-06-05 | Fixed typo in config option format comment. | mrb0nk500 | |
2021-06-05 | Start adding the config options. | mrb0nk500 | |
2021-06-05 | Fixed a typo in the root fallback code. | mrb0nk500 | |
Thanks goes to Nova Forte for pointing it out to me. | |||
2021-06-04 | Fixed typo in `read_file()` to do with the filesize | mrb0nk500 | |
check. | |||
2021-06-04 | Added missing buffer in `read_file()`. | mrb0nk500 | |
I forgot to add it, oof. | |||
2021-06-04 | Started work on the parser loop. | mrb0nk500 | |
2021-06-04 | Added `find_line()`. | mrb0nk500 | |
Which finds the next line in the buffer. | |||
2021-06-04 | Started work on the config file parser. | mrb0nk500 | |
2021-06-04 | Fixed a typo with the `init_daemon()` call in | mrb0nk500 | |
`main()`. | |||
2021-06-04 | Fixed a typo in `pullreqd.c`. | mrb0nk500 | |
2021-06-04 | Added the main function. | mrb0nk500 | |
2021-06-04 | Added `init_daemon()`. | mrb0nk500 | |
Which actually initiallizes, and starts the daemon. If `change_dir` is true, it will change the working directory to `path`, or the root directory if `path` is NULL. | |||
2021-06-04 | Added `hangup_hander()`. | mrb0nk500 | |
Which is the same as `child_handler()`, but for SIGHUP. And just like `child_handler()`, it's also currently a stub. | |||
2021-06-04 | Added `child_handler()`. | mrb0nk500 | |
Which is the handler for SIGCHLD. Currently, it's a stub. | |||
2021-06-04 | Added `fork_proc()`. | mrb0nk500 | |
Which handles forking a process, aswell as exiting the parent process. | |||
2021-06-04 | Created `pullreqd.c`. | mrb0nk500 | |
2021-06-02 | Added the AGPLv3 license, for the AGPLv3 only+NIGGER | mrb0nk500 | |
license. | |||
2021-06-02 | Added AGPLv3 only+NIGGER license. | mrb0nk500 | |
2021-06-02 | Added .gitignore. | mrb0nk500 | |
2021-06-02 | Added Makefile. | mrb0nk500 | |
2021-06-02 | Initial commit. | mrb0nk500 | |
Added the readme. |