Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-08-29 | misc: Properly account for escaped delimiters in `find_delm()`HEADmaster | mrb0nk500 | |
2022-08-05 | git: Make use of `format_len()` in `dir_path_name()` | mrb0nk500 | |
2022-08-05 | misc: Make `dir_path_name()` actually do some error checking | mrb0nk500 | |
2022-08-05 | misc: Fixed a major issue with `mkdirp()` | mrb0nk500 | |
It was basically not properly skipping over to the next forward slash. The solution was to have it get the span of the forward slashes, and checking if we hit the null terminator after trying to find the next forward slash. If we do hit the null terminator, we add the forward slash span to the cursor. | |||
2022-08-04 | misc: Add a little optimization to `remove_trailing_whitespace()` | mrb0nk500 | |
This also cleans it up a bit. | |||
2022-08-04 | misc: Add `remove_trailing_whitespace()` | mrb0nk500 | |
This function removes any whitespace found at the end of the supplied string. This can be useful when you have a string with whitespace throughout it, but only want the whitespace at the end removed. | |||
2022-08-03 | misc: Add `vformat_len_copy()` | mrb0nk500 | |
This works the same as `vformat_len()`, except that it copies `args` into a temporary `va_list`. This can be useful when you're already using a `va_list`, and thus need to copy the list already. | |||
2022-08-03 | misc: Use of `vformat_len()`, rather than doing it manually in | mrb0nk500 | |
`format_len()` | |||
2022-08-03 | misc: Add `vformat_len()` | mrb0nk500 | |
This works exactly like `format_len()`, except that it uses `va_list` rather than variadic arguments. | |||
2022-07-31 | misc: Add `is_dir()`, and `mkdirp()` | mrb0nk500 | |
`is_dir()` checks if the supplied path is a directory, and returns 1 if it's a directory, 0 if it isn't a directory, and -1 if it doesn't exist. `mkdirp()` works like `mkdir()` except that it also creates parent directories if needed. | |||
2022-07-31 | misc: Make sure that `s` starts at the character before the delimiter in | mrb0nk500 | |
`find_delm()` Also `s` doesn't get incremented when checking if the current character is a backslash now. | |||
2022-07-27 | misc: Actually return pointer to the first non-delimited character after | mrb0nk500 | |
the end of the range in `get_str_delm_range()` | |||
2022-07-27 | misc: Use `find_delm()` when finding the end of the range in | mrb0nk500 | |
`get_str_delm_range()` | |||
2022-07-27 | misc: Make `find_delm()` account for escaped delimiters. | mrb0nk500 | |
2022-07-27 | misc: Add `find_delm()`, and `get_str_delm_range()` | mrb0nk500 | |
`find_delm()` finds the first matched delimiter of the supplied delimiter(s), and either returns the pointer to the first non-delimiter character after the match, or the match itself if `skip_delm` is true, or false respectivly. `get_str_delm_range()` finds, and returns the string in between the supplied starting, and ending delimiter(s). It also returns the pointer to the first non-delimiter character after the end of the range in `rhs`. | |||
2022-07-27 | misc: Add `\r`, and `\n` to the list of whitespace that | mrb0nk500 | |
`skip_whitespace()` can skip past. | |||
2022-07-27 | misc: Use `is_empty()` instead of just checking if `*str` is NULL in | mrb0nk500 | |
`get_line()` | |||
2022-07-27 | misc: Add `is_empty()`, and `skip_whitespace()` | mrb0nk500 | |
2022-07-27 | misc: Make `get_line()` simpler by using `strcspn()` | mrb0nk500 | |
2021-08-01 | Fixed a typo in `sanitized_dir_path_name()`. | mrb0nk500 | |
2021-08-01 | Added `sanitized_dir_path_name()`. | mrb0nk500 | |
This function is the same as `dir_path_name()`, except `name` is sanitized before being appended to `root`. | |||
2021-08-01 | Fixed an infinite loop bug in `sanitized_str()`, and | mrb0nk500 | |
`sanitized_strlen()`. | |||
2021-08-01 | Explicitly discard const qualifier in `find_alpha()`. | mrb0nk500 | |
This was done to get rid of a const qualifier warning. | |||
2021-07-03 | Added `find_alpha()`, and `create_num_str()`. | mrb0nk500 | |
2021-06-26 | Include `stdarg.h` in `misc.c`. | mrb0nk500 | |
2021-06-26 | Added `format_len()`. | mrb0nk500 | |
2021-06-23 | Fixed another typo in `dir_path_num()`. | mrb0nk500 | |
2021-06-23 | Fixed a typo in `dir_path_num()`. | mrb0nk500 | |
2021-06-23 | Added `sanitize_strlen()`, and `sanitize_str()`. | mrb0nk500 | |
`sanitize_str()` creates a string with each starting space replaced by a hyphen, and with all trailing spaces, and periods removed. `sanitize_strlen()` gets the length of the sanatized version of the supplied string. | |||
2021-06-23 | Added `delm_span()`. | mrb0nk500 | |
2021-06-23 | Added 'dir_path_num()', and `dir_path_name()`. | mrb0nk500 | |
2021-06-18 | Move all miscellaneous functions from `config.c` into | mrb0nk500 | |
`misc.c`. |