aboutsummaryrefslogtreecommitdiff
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-07-23aux/: UpdateEuAndreh18-208/+260
2021-06-28TODOs.md: Mark #task-bd165b74-c559-48ee-1d29-eaa906aa0393 as DONEEuAndreh1-1/+5
2021-06-28src/remembering-c.c: Free leaking "home" string variableEuAndreh1-0/+1
2021-06-28src/remembering-c.c: Fix usage of strcat()EuAndreh1-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.
2021-06-28src/remembering-c.c: Use better grouping of parentheses for strcmp()EuAndreh1-1/+1
2021-06-28git mv tests/tests-lib.sh tests/lib.shEuAndreh5-4/+4
2021-06-28TODOs.md: Add #task-06c8ef1b-15ed-5932-3391-8c02ff759e7aEuAndreh1-0/+3
2021-06-28tests/ranking.sh: Add test_pick_inexisting_value, disabledEuAndreh1-0/+35
2021-06-28tests/*.sh: Refactor error messages to be consistent, move helper all helper ↵EuAndreh2-47/+48
funtions to the top
2021-06-28TODOs.md: Add #task-f5a3d036-f451-f469-56f6-73274162df8eEuAndreh1-0/+3
2021-06-27TODOs.md: Add #task-bd165b74-c559-48ee-1d29-eaa906aa0393EuAndreh1-0/+3
2021-06-27mv {aux => tests}/tests-lib.shEuAndreh5-4/+4
2021-06-27src/unit-test.h: Make its output equal to aux/tests-lib.shEuAndreh1-1/+1
2021-06-27TODOs.md: Add #task-20f96d7d-2fd8-7a5f-e861-ded565c3b408EuAndreh1-0/+3
2021-06-27src/remembering-c.c: Add tests for mkdir_p()EuAndreh1-3/+49
2021-06-27src/remembering-c.c: Mark as static two functions leftEuAndreh1-2/+2
2021-06-27src/remembering-c.c: Add mkdir_pEuAndreh1-4/+52
2021-06-27src/remembering-c.c: Provide more precise location of errors for perror()EuAndreh1-6/+6
2021-06-27Makefile: Use DEFS over CFLAGS for definesEuAndreh1-2/+5
2021-06-27src/remembering-c.c: Add unit tests for get_profile_file()EuAndreh2-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.
2021-06-27src/remembering-c.c: Add get_profile_file()EuAndreh1-0/+54
2021-06-27src/remembering-c.c: Mark all functions as staticEuAndreh1-3/+3
2021-06-27TODOs.md: Add #task-b3261473-9d12-9df4-cbfe-c4017ffed709EuAndreh1-0/+3
2021-06-27tests/cli-opts.sh: Add N=$LINENOEuAndreh1-0/+21
2021-06-27TODOs.md: Add #task-013534fe-8839-9de1-ec4a-9d63980fc096EuAndreh1-0/+3
2021-06-27src/remembering.in: Stop ignoring unrecognized flagsEuAndreh2-1/+25
2021-06-27src/remembering.in: Don't look for --help and --version flags after --EuAndreh1-8/+16
2021-06-27src/remembering.in: Fix ShellCheck offense, remove disableEuAndreh1-2/+1
2021-06-27src/remembering.in: Better instruction on looking at manpage in help stringEuAndreh1-1/+1
2021-06-27src/remembering.in: Fix syntax of help string output optionsEuAndreh1-2/+2
2021-06-27src/remembering-c.c: Restart C versionEuAndreh1-899/+66
2021-06-27Makefile: Remove $(LDLIBS)EuAndreh1-1/+1
2021-06-27Makefile: s/DEFS/CFLAGS/EuAndreh1-1/+1
2021-06-26tests/install-uninstall.sh: Add test for install/uninstallEuAndreh2-0/+50
2021-06-26aux/: Update, adapt Makefile accordinglyEuAndreh14-64/+378
2021-06-26aux/utils.sh: Remove unused fileEuAndreh3-11/+0
2021-06-26aux/guix/manifest.scm: Add gettext and po4a for doing i18nEuAndreh1-0/+2
2021-06-26Makefile, README.md: Adapt to changes in aux/EuAndreh31-214/+317
2021-06-26Makefile: Remove fallible/valgrind tests for nowEuAndreh1-3/+1
2021-06-26git grep -l '\./remembering' | xargs sed -i ↵EuAndreh4-25/+26
's|\./remembering|./src/remembering|g'
2021-06-26Makefile: Use inference rules, disable Valgrind testsEuAndreh2-24/+9
2021-06-26git mv src/remembering.sh src/remembering.inEuAndreh1-0/+0
2021-06-26git mv src/remembering.c src/remembering-c.cEuAndreh2-1/+1
2021-06-26src/remembering.c: Comment existing codeEuAndreh1-7/+7
2021-06-22TODOs.md: Add #task-44843686-1328-521a-8281-60dbb05f2d3fEuAndreh1-0/+3
2021-06-22aux/tests-lib.sh: Use colours in test reportingEuAndreh1-6/+17
2021-06-22aux/workflow/TODOs.sh: Use <pre> over <span> for idsEuAndreh1-1/+1
2021-06-19TODOs.md: Update body of #task-47d98f68-0dec-f9b2-4d5c-bfe822411477EuAndreh1-0/+5
2021-06-19Makefile: Stop specifying CFLAGS, LDFLAGS and CCEuAndreh1-4/+0
2021-06-19Setup base i18n infrastructureEuAndreh15-34/+2681