A quad is now a file
[henge/webcc.git] / src / apc / ir.c
index d31bc1a..fe613ba 100644 (file)
@@ -98,7 +98,7 @@ push_cdat
   curr_cdatp->idx = num_cdats;
 
   /* Set the cdat as a subclass of the previous cdat */
-
+  (*cdat_stackp)->class_list[(*cdat_stackp)->num_classes] = curr_cdatp;
   /* Push the cdat onto the cdat_stack */
   *++cdat_stackp = curr_cdatp;
 
@@ -220,13 +220,16 @@ insert_set
   struct set* curr_setp;
   struct ref* prev_refp;
   struct ref* curr_refp;
+  struct vdat* curr_vdatp;
 
   curr_odatp = curr_set_odatp; //allocated at insert_set_label, preserved in global space
   curr_cdatp = curr_cdat();
   curr_setp = curr_set();
   prev_refp = prev_ref();
   curr_refp = alloc_ref();
+  curr_vdatp = curr_vdat();
 
+  curr_vdatp->creator = curr_set_odatp;
 
   curr_setp->cdat_idx = curr_cdatp->idx; //does a set need its class idx?
   memmove(curr_setp->name, curr_odatp->name, 32);
@@ -362,18 +365,22 @@ insert_ele()
   uint64_t ref_id;
   struct cdat* curr_cdatp;
   struct odat* curr_odatp;
+  struct vdat* curr_vdatp;
   struct set* curr_setp;
   struct ele* curr_elep;
   struct ref* curr_refp;
   struct ref* prev_refp;
 
+
   curr_cdatp = curr_cdat();
   curr_odatp = curr_odat(); //malloced @ insert_ele_label
+  curr_vdatp = curr_vdat();
   curr_setp = curr_set();
   curr_elep = curr_ele();
   curr_refp = alloc_ref();
   prev_refp = prev_ref();
 
+  curr_vdatp->creator = curr_odatp;
   /* Populate ele in cdat */
   curr_elep->cdat_idx = curr_cdatp->idx;
   curr_setp->num_ele++;
@@ -407,24 +414,24 @@ insert_ele_vdatid
 
 void
 insert_quad
-( int x,
-  int y,
-  int z,
-  uint64_t ref_id
+( void* quad_filep
 )
 {
 
-  struct quad* curr_quadp;
-  struct odat* curr_odatp;
+  /* struct quad* curr_quadp; */
+  /* struct odat* curr_odatp; */
 
-  curr_quadp = curr_quad();
-  curr_odatp = curr_odat();
+  /* curr_quadp = curr_quad(); */
+  /* curr_odatp = curr_odat(); */
+
+  /* curr_quadp->x = x; */
+  /* curr_quadp->y = y; */
+  /* curr_quadp->z = z; */
+  /* curr_quadp->ref_id = ref_id; */
+  /* curr_odatp->num_quads++; */
+  struct odat* curr_odatp;
 
-  curr_quadp->x = x;
-  curr_quadp->y = y;
-  curr_quadp->z = z;
-  curr_quadp->ref_id = ref_id;
-  curr_odatp->num_quads++;
+  curr_odatp->quad_filep = quad_filep;
 }
 
 /* Inserting the hitbox into the set