Commits

Cat's Eye Technologies  committed 81cc16d

Partially implement reconciling caused-by's, and add some notes.

  • Participants
  • Parent commits 6124c3a

Comments (0)

Files changed (2)

 	struct caused_by *c;
 
 	MALLOC(c, caused_by, "caused by");
-	
+
 	c->next = ctab->head;
+	ctab->head = c;
 	c->cause = ss;
 	c->effect = e;
 
 
 		if (!match) {
 			/* add an event */
+			/* TODO: probably leaky */
+			/* TODO: only store effect as a name? */
+			e = event_new(etab);
+			e->name = c->cause;
+			event_consequence_append(e, c->effect->name, &etime_zero);
 		}
 	}
 }
 		scan(sc);
 		if (tokeq(sc, "by") || tokeq(sc, "after")) {
 			scan(sc);
+			/* TODO: we're also going to have to check that this
+                        event's name is a literal.  If it's not,
+                        this makes no sense... */
 			ss = event_appl_literal(sc);
 			(void)caused_by_add(caused_by, ss, e);
 		} else {