ref: 7e9d6679ddd323aa29e93fa65211961f940e6987
parent: 48b89cdab9adb510ce9dd3609055e228c9215031
author: seh <seh@localhost>
date: Wed Nov 14 14:02:16 EST 2018
boilerplate for mkinlist
--- a/fuzz.h
+++ b/fuzz.h
@@ -94,8 +94,8 @@
};
// Enum to track types of inputs
-typedef int tnum;
-enum tnum {
+typedef int type;
+enum type {
t_int, // int
t_long, // long
t_DirS, // Dir*
@@ -103,11 +103,11 @@
};
// Structure to track an instance of a given type
-typedef struct tinst tinst;
-struct tinst
+typedef struct t_type t_type;
+struct t_type
{
void* var; // Variable to track
- tnum t; // Type of the variable to cast to
+ type t; // Type of the variable to cast to
};
// Type names table -- in input.c
--- a/inlist.c
+++ b/inlist.c
@@ -7,205 +7,212 @@
mkinlist(List* l, call c)
{
// Iterate through l
-
+
switch(c){
- case sc_exits:
+ // pls fix -- try removing the print
+ case sc_exits: print("Adding exits…\n");
+ t_type *t = malloc(1 * sizeof(t_type));
+ t->var = nil;
+ t->t = sc_exits;
+
+ // Add to type list -- in order
+ ladd(l, t);
break;
case sc_abort:
-
+
break;
case sc_access:
-
+
break;
case sc_alarm:
-
+
break;
case sc_await:
-
+
break;
case sc_bind :
-
+
break;
case sc_brk :
-
+
break;
case sc_chdir :
-
+
break;
case sc_close :
break;
case sc_create :
-
+
break;
case sc_dup :
-
+
break;
case sc_errstr :
-
+
break;
case sc_exec :
-
+
break;
case sc_execl :
-
+
break;
case sc_fork :
-
+
break;
case sc_rfork :
-
+
break;
case sc_fauth :
-
+
break;
case sc_fstat :
-
+
break;
case sc_fwstat :
-
+
break;
case sc_fversion:
-
+
break;
case sc_mount :
-
+
break;
case sc_unmount:
-
+
break;
case sc_noted :
-
+
break;
case sc_notify :
-
+
break;
case sc_open :
-
+
break;
case sc_fd2path:
-
+
break;
case sc_pipe :
-
+
break;
case sc_pread :
-
+
break;
case sc_preadv:
-
+
break;
case sc_pwrite :
-
+
break;
case sc_pwritev:
-
+
break;
case sc_read :
-
+
break;
case sc_readn :
-
+
break;
case sc_readv :
-
+
break;
case sc_remove:
-
+
break;
case sc_sbrk :
-
+
break;
case sc_oseek :
-
+
break;
case sc_seek:
-
+
break;
case sc_segattach:
-
+
break;
case sc_segbrk :
-
+
break;
case sc_segdetach:
-
+
break;
case sc_segflush:
-
+
break;
case sc_segfree:
-
+
break;
case sc_semacquire:
-
+
break;
case sc_semrelease:
-
+
break;
case sc_sleep:
-
+
break;
case sc_stat:
-
+
break;
case sc_tsemacquire:
-
+
break;
case sc_wait:
-
+
break;
case sc_waitpid:
-
+
break;
case sc_write:
-
+
break;
case sc_writev:
-
+
break;
case sc_wstat:
-
+
break;
case sc_rendezvous:
-
+
break;
case sc_dirstat:
-
+
break;
case sc_dirfstat:
-
+
break;
case sc_dirwstat:
-
+
break;
case sc_dirfwstat:
-
+
break;
case sc_dirread:
-
+
break;
case sc_nulldir:
-
+
break;
case sc_dirreadall:
-
+
break;
case sc_getpid :
-
+
break;
case sc_getppid:
-
+
break;
case sc_rerrstr:
-
+
break;
case sc_sysname:
-
+
break;
case sc_werrstr:
-
+
break;
default: