Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | aux/checks/repo.sh: WIP Fix tests | EuAndreh | 2023-04-02 | 1 | -1/+1 |
| | | | | | | | | | Notes: See CI logs with: git notes --ref=refs/notes/ci-logs show 22a7b4f0c8e018077984d58476a0c419b5e11942 git notes --ref=refs/notes/ci-data show 22a7b4f0c8e018077984d58476a0c419b5e11942 Exit status: 2 Duration: 7 | ||||
* | Refactor: rewrite logic to make it simpler and faster | EuAndreh | 2022-11-25 | 1 | -74/+89 |
| | |||||
* | src/remembering.in: Use indented heredoc for usage() and help() | EuAndreh | 2022-11-08 | 1 | -9/+14 |
| | |||||
* | src/remembering.in: Remove hyphen between name and version | EuAndreh | 2022-11-08 | 1 | -1/+1 |
| | | | | | | Also use the @NAME@ placeholder over the hard-coded "remembering" value. Update tests/clip-opts.sh to match. | ||||
* | src/: Remove C files | EuAndreh | 2022-11-08 | 7 | -577/+0 |
| | |||||
* | src/remembering.in: Add trailing "/remembering" to the value defined in ↵ | EuAndreh | 2021-09-08 | 1 | -1/+1 |
| | | | | $XDG_DATA_HOME | ||||
* | Makefile: Generate src/config.h from src/config.h.in | EuAndreh | 2021-09-05 | 1 | -0/+9 |
| | |||||
* | src/remembering.c: Stick (mostly) to 80 columns | EuAndreh | 2021-09-02 | 1 | -7/+13 |
| | |||||
* | src/remembering.c: prevent free() of unitialized value | EuAndreh | 2021-09-02 | 1 | -1/+1 |
| | |||||
* | src/remembering.c: Enforce C style | EuAndreh | 2021-09-01 | 1 | -10/+20 |
| | |||||
* | Refactor C files, split logerr and tests-lib | EuAndreh | 2021-09-01 | 6 | -11/+145 |
| | |||||
* | mv src/remembering-c.c src/remembering.c | EuAndreh | 2021-09-01 | 1 | -0/+0 |
| | |||||
* | src/remembering.in: Add empty line on help text | EuAndreh | 2021-09-01 | 1 | -0/+1 |
| | |||||
* | src/remembering-c.c: Free leaking "home" string variable | EuAndreh | 2021-06-28 | 1 | -0/+1 |
| | |||||
* | src/remembering-c.c: Fix usage of strcat() | EuAndreh | 2021-06-28 | 1 | -5/+5 |
| | | | | | | | | | | | | | | | | | | | | As it turns out, after doing a malloc(), strcat() can't be used directly on top of it. I'd guess that the implementation of strcat() goes through the first string until its end, the \0 NULL terminator, and then starts copying the characters to the new string, overwriting the existing terminator to allow the string to actually be continuous. However, strcat() can't do this in a string that was just malloced and has no content. So it will probably run over the end of the memory untill it finds a NULL byte, and concatenate starting from that. I didn't check this elsewhere, but this explanation sounds reasonable, and Valgrind's diagnostics seem to confirm that. The solution is to strcpy() the first string, and than strcat() the others after that, so that strcat() has an existing string to work on, while strcpy doesn't need that. Fixes #task-bd165b74-c559-48ee-1d29-eaa906aa0393. | ||||
* | src/remembering-c.c: Use better grouping of parentheses for strcmp() | EuAndreh | 2021-06-28 | 1 | -1/+1 |
| | |||||
* | src/unit-test.h: Make its output equal to aux/tests-lib.sh | EuAndreh | 2021-06-27 | 1 | -1/+1 |
| | |||||
* | src/remembering-c.c: Add tests for mkdir_p() | EuAndreh | 2021-06-27 | 1 | -3/+49 |
| | |||||
* | src/remembering-c.c: Mark as static two functions left | EuAndreh | 2021-06-27 | 1 | -2/+2 |
| | |||||
* | src/remembering-c.c: Add mkdir_p | EuAndreh | 2021-06-27 | 1 | -4/+52 |
| | |||||
* | src/remembering-c.c: Provide more precise location of errors for perror() | EuAndreh | 2021-06-27 | 1 | -6/+6 |
| | |||||
* | src/remembering-c.c: Add unit tests for get_profile_file() | EuAndreh | 2021-06-27 | 2 | -5/+164 |
| | | | | | | | | | | | | | Those tests led me to handling the case where $XDG_DATA_HOME was set, but as an empty string. This is the equivalent of the "[ -z ".." ]" test. I also parameterized get_profile_file() to receive the stream where it should write to in case of failing to getenv("HOME"). Even though this makes the arguments of functions that print longer, it looks like an overall good pattern. It is the equivalent of every sh function printing to STDOUT, and let the caller decide if it should go to STDOUT or STDERR. | ||||
* | src/remembering-c.c: Add get_profile_file() | EuAndreh | 2021-06-27 | 1 | -0/+54 |
| | |||||
* | src/remembering-c.c: Mark all functions as static | EuAndreh | 2021-06-27 | 1 | -3/+3 |
| | |||||
* | src/remembering.in: Stop ignoring unrecognized flags | EuAndreh | 2021-06-27 | 1 | -1/+2 |
| | |||||
* | src/remembering.in: Don't look for --help and --version flags after -- | EuAndreh | 2021-06-27 | 1 | -8/+16 |
| | |||||
* | src/remembering.in: Fix ShellCheck offense, remove disable | EuAndreh | 2021-06-27 | 1 | -2/+1 |
| | |||||
* | src/remembering.in: Better instruction on looking at manpage in help string | EuAndreh | 2021-06-27 | 1 | -1/+1 |
| | |||||
* | src/remembering.in: Fix syntax of help string output options | EuAndreh | 2021-06-27 | 1 | -2/+2 |
| | |||||
* | src/remembering-c.c: Restart C version | EuAndreh | 2021-06-27 | 1 | -899/+66 |
| | |||||
* | git mv src/remembering.sh src/remembering.in | EuAndreh | 2021-06-26 | 1 | -0/+0 |
| | |||||
* | git mv src/remembering.c src/remembering-c.c | EuAndreh | 2021-06-26 | 1 | -0/+0 |
| | |||||
* | src/remembering.c: Comment existing code | EuAndreh | 2021-06-26 | 1 | -7/+7 |
| | |||||
* | src/remembering.sh: Remove \" from COMMAND in help text | EuAndreh | 2021-06-13 | 1 | -2/+2 |
| | |||||
* | src/remembering.sh: Choose output only at the top | EuAndreh | 2021-06-13 | 1 | -3/+3 |
| | |||||
* | src/remembering.sh: Use printf over echo | EuAndreh | 2021-06-13 | 1 | -3/+3 |
| | |||||
* | src/remembering.sh: Remove verbose "exit 0" in favor of "exit" | EuAndreh | 2021-06-13 | 1 | -2/+2 |
| | |||||
* | src/remembering.sh: Use "cat <<EOF" for printing help string | EuAndreh | 2021-06-13 | 1 | -6/+7 |
| | |||||
* | src/remembering.c: Use tabs over spaces | EuAndreh | 2021-06-07 | 1 | -684/+735 |
| | |||||
* | src/remembering.sh: Use tabs for separating options columns | EuAndreh | 2021-06-06 | 1 | -4/+4 |
| | |||||
* | mv src/remembering.in src/remembering.sh | EuAndreh | 2021-06-06 | 1 | -0/+0 |
| | |||||
* | src/remembering.c: clang-format | EuAndreh | 2021-03-23 | 1 | -43/+43 |
| | |||||
* | src/remembering.c: WIP more tests for mkdir_p | EuAndreh | 2021-03-22 | 1 | -5/+81 |
| | |||||
* | src/remembering.c: clang-format | EuAndreh | 2021-03-10 | 1 | -13/+13 |
| | |||||
* | src/remembering.c: Write more tests, make existing tests more robust | EuAndreh | 2021-03-10 | 1 | -62/+250 |
| | |||||
* | Support --version flag | EuAndreh | 2021-03-10 | 1 | -1/+8 |
| | |||||
* | src/remembering.c: Add tests for negative and floating-point numbers in the ↵ | EuAndreh | 2021-03-07 | 1 | -0/+12 |
| | | | | profile lines | ||||
* | src/remembering.c: Be more explicit on manpage pointer | EuAndreh | 2021-03-07 | 1 | -1/+1 |
| | |||||
* | src/remembering.c: Fix memory errors | EuAndreh | 2021-03-07 | 1 | -7/+14 |
| | |||||
* | src/remembering.c: Assign and check in a single line | EuAndreh | 2021-03-07 | 1 | -3/+1 |
| |