ref: 27bad13b97e1bc25e245d6c0e0db257b7bdacf40
parent: 72b43426c3329f2fa6abbbebfb27f757177b9344
author: Steven Sleder <[email protected]>
date: Fri Nov 16 21:46:30 EST 2018
Fixed a few issues with casting since Steve is dumb and did some boilerplate
--- a/fuzz.h
+++ b/fuzz.h
@@ -107,7 +107,8 @@
t_DirSS,
t_char,
t_uchar,
-t_charS
+t_charS,
+t_charSArr
};
// Structure to track an instance of a given type
--- a/input.c
+++ b/input.c
@@ -21,6 +21,8 @@
// mutate the input
int fd;
+ //int_mut(lget(&(sc->inputs), 0));
+
// log the variables
log_call(sc);
@@ -112,13 +114,20 @@
fprint(logfd, "%d", (int) ele->var);
break;
case t_uint :
- fprint(logfd, "%d", (uint) ele->var);
+ fprint(logfd, "%d", (unsigned int) ele->var);
+ break;
case t_long :
fprint(logfd, "%ld", (long) ele->var);
break;
case t_ulong :
- fprint(logfd, "%lu", (ulong) ele->var);
+ fprint(logfd, "%lu", (unsigned long) ele->var);
break;
+ case t_vlong :
+ fprint(logfd, "%llu", (long long) ele->var);
+ break;
+ case t_longS :
+ fprint(logfd, "%ld", (long*) ele->var);
+ break;
case t_DirS :
fprint(logfd, "%s", (Dir*) ele->var);
break;
@@ -125,8 +134,15 @@
case t_charS :
fprint(logfd, "%s", (char*) ele->var);
break;
+ case t_charSArr :
+ //fprint(logfd, "%s", (char*) ele->var);
+ break;
case t_char :
fprint(logfd, "%c", (char) ele->var);
+ break;
+ case t_uchar :
+ fprint(logfd, "%c", (unsigned char) ele->var);
+ break;
default :
exits("Unknown input variable type!");
}
--- a/mutate.c
+++ b/mutate.c
@@ -7,61 +7,76 @@
}
void
-mut_uint()
+mut_uint(unsigned int* in_val)
{
}
void
-mut_charstar()
+mut_charstar(char* in_val)
{
}
void
-mut_ucharstar()
+mut_ucharstar(unsigned char* in_val)
{
}
+//void
+//mut_charstar_arr(char*[]* in_val)
+//{
+//}
+
void
-mut_charstar_arr()
+mut_long(long* in_val)
{
}
void
-mut_long()
+mut_longstar(long** in_val)
{
}
void
-mut_longstar()
+mut_ulong(unsigned long* in_val)
{
}
void
-mut_ulong()
+mut_vlong(long long* in_val)
{
}
void
-mut_vlong()
+mut_void(void* in_val)
{
}
void
-mut_voidstar()
+mut_voidstar(void** in_val)
{
}
void
-mut_IOchunkstar()
+mut_IOchunk(IOchunk* in_val)
{
}
void
-mut_dirstar()
+mut_IOchunkstar(IOchunk** in_val)
{
}
void
-mut_dirstar_star()
+mut_dir(Dir* in_val)
+{
+}
+
+void
+mut_dirstar(Dir** in_val)
+{
+}
+
+void
+mut_dirstar_star(Dir*** in_val)
{
}
--- a/mutate.h
+++ b/mutate.h
@@ -7,30 +7,32 @@
void mut_char(char*);
-void mut_char_star();
+void mut_char_star(char**);
-void mut_uchar_star();
+void mut_uchar_star(unsigned char**);
-void mut_char_star_arr();
+//void mut_char_star_arr(char*[]*);
void mut_long(long*);
-void mut_long_star();
+void mut_long_star(long**);
-void mut_ulong(ulong*);
+void mut_ulong(unsigned long*);
-void mut_vlong(vlong*);
+void mut_vlong(long long*);
-void mut_void_star();
+void mut_void(void*);
+void mut_void_star(void**);
+
void mut_IOchunk(IOchunk*);
-void mut_IOchunk_star();
+void mut_IOchunk_star(IOchunk**);
void mut_dir(Dir*);
-void mut_dir_star();
+void mut_dir_star(Dir**);
-void mut_dir_star_star();
+void mut_dir_star_star(Dir***);
#endif