]> git.cworth.org Git - mnemon/blobdiff - mnemon.h
More cleanup of "unsigned vs. signed" integer comparison.
[mnemon] / mnemon.h
index 396c9951c9682f0aa23b517142a4fdd1b8bb868f..27e02a075b52db8b352db442e3211c1bac68486d 100644 (file)
--- a/mnemon.h
+++ b/mnemon.h
@@ -32,8 +32,8 @@ typedef struct _item {
 
 typedef struct _bin {
     int score;
-    int items_size;
-    int num_items;
+    unsigned int items_size;
+    unsigned int num_items;
     item_t **items;
 } bin_t;
 
@@ -42,27 +42,19 @@ typedef enum {
     CATEGORY_ORDER_SEQUENTIAL
 } category_order_t;
 
-typedef enum {
-    CHALLENGE_TYPE_TEXT,
-    CHALLENGE_TYPE_IMAGE,
-    CHALLENGE_TYPE_AUDIO,
-    CHALLENGE_TYPE_MIDI,
-    CHALLENGE_TYPE_TEXT_TO_SPEECH
-} challenge_type_t;
-
 typedef struct _category {
     char *name;
-    int items_size;
-    int num_items;
+    unsigned int items_size;
+    unsigned int num_items;
     item_t *items;
 
     /* Support sequential introduction of items from bin 0 */
     category_order_t order;
     /* Support categories where responses are timed (0.0 == disable). */
     double time_limit;
-    int bin_zero_head;
+    unsigned int bin_zero_head;
     /* Support challenges of non-text types (image, audio, etc.) */
-    challenge_type_t challenge_type;
+    char *challenge_type;
     /* Whether to repeat afterwards (for a little extra reinforcement) */
     bool_t repeat;
 } category_t;
@@ -70,12 +62,12 @@ typedef struct _category {
 typedef struct _mnemon {
     char *dir_name;
 
-    int categories_size;
-    int num_categories;
+    unsigned int categories_size;
+    unsigned int num_categories;
     category_t *categories;
 
-    int bins_size;
-    int num_bins;
+    unsigned int bins_size;
+    unsigned int num_bins;
     bin_t *bins;
 } mnemon_t;