| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
We currently use this in one place only but might reuse this a couple of
times later (when migrating to libical).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A small style fix that removes all remaining "(void)" casts. Using these
isn't encouraged in GNU coding guidelines and doesn't serve a certain
purpose, except for satisfying a few static code analysis tools. We
already nuked some of these in previous patches, but this semantic patch
should fix what's left:
@@
identifier func;
@@
- (void)func (
+ func (
...);
Long lines were re-formatted manually.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we use hashes to identify notes, a garbage collector comes in
handy. We search for note files that aren't referenced anywhere. Such
files might come up if a note, that isn't connected with any other item,
is edited.
Huge parts of this code are very hackish due to our data structure
layout and the way our hash table implementation works.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
| |
Now that we use hash-based note file names, note files should never be
unlinked as a note file might be shared.
Also, remove the ERASE_FORCE_KEEP_NOTE flag that no longer makes any
sense.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note file names are now generated based on their content. Items using
the same note will share a single note file.
Please note that this implies a few changes:
* Both random-style and hash-style note files need to be handled to
ensure we do not break backwards compatibility.
* Note files may not be moved or deleted if a note is changed or removed
since the original note file might be used by another item as well.
* A garbage collector to remove unreferenced note files needs to be
implemented.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
| |
Read up to the first blank in note_read() instead of assuming a
fixed-width note file name. Accept everything up to 40 characters (which
is the length of a SHA1 hash in hexadecimal representation).
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
| |
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
* Add new note_edit() and note_view() helper functions. Use these
instead of copy-pasted code in *_note_edit().
* Move all note-related functions (note_edit(), note_view(),
note_erase()) to a new source file "note.c".
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|