cards

alternative to Anki for the command-line
git clone https://github.com/jennydoe/cards.git
Log | Files | Refs | Feed | README

commit 10a551e16eb0c07473853b153887e356eefbdb78
parent 3d2bc3291672f1a9327d0e1333cfa0496e2aa3f9
Author: Jenny Doe <tng@soykaf.me>
Date:   Sat, 30 Mar 2019 14:43:26 +0100

fixed: tweaks

Diffstat:
MMakefile | 3++-
Mcards.c | 8++++----
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,7 +1,8 @@ CC=cc STD=c99 +CFLAGS=-g -Wall BIN=a.out SRC=cards.c $(BIN): $(SRC) - $(CC) --std=$(STD) $(SRC) + $(CC) --std=$(STD) $(CFLAGS) -o $(BIN) $(SRC) diff --git a/cards.c b/cards.c @@ -112,7 +112,7 @@ hash_table_insert(struct Cards *ht, const wchar_t * question, /* hardcore */ void -hash_table_iterate_over(struct Cards *ht, void (*f) (const struct Card *)) +hash_table_iterate_over(struct Cards *ht, void (*f) (struct Card *)) { for (int i = 0; i < ht->size; i++) { struct Card *kv = ht->buckets[i].head; @@ -126,10 +126,10 @@ hash_table_iterate_over(struct Cards *ht, void (*f) (const struct Card *)) } /* accessed in main() and select_next_card() */ -static struct Card *next_card; +static struct Card * next_card; void -select_next_card(const struct Card *card) +select_next_card(struct Card *card) { if (next_card == NULL @@ -144,7 +144,7 @@ select_next_card(const struct Card *card) } void -dump_card(const struct Card *card) +dump_card(struct Card *card) { printf("%ls\t%ls", card->question, card->answer);