|
@@ -5,11 +5,24 @@
|
|
|
#include "linkedList.h"
|
|
|
#endif
|
|
|
|
|
|
-#ifndef HOOKS
|
|
|
-#include "hooks.h"
|
|
|
-#endif
|
|
|
+/* #ifndef HOOKS */
|
|
|
+/* #include "hooks.h" */
|
|
|
+/* #endif */
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
{
|
|
|
- printf("Foo Bar\n");
|
|
|
+ LISTEL *start = malloc(sizeof(LISTEL));
|
|
|
+ long number = 1;
|
|
|
+ start->data = (void *) number;
|
|
|
+ for(number = 2 ; number <= 10 ; number ++) {
|
|
|
+ LISTEL *insertAfterElement = start;
|
|
|
+ while (insertAfterElement->next != NULL)
|
|
|
+ insertAfterElement = insertAfterElement->next;
|
|
|
+ insertAfter((void *) number, insertAfterElement);
|
|
|
+ }
|
|
|
+ LISTEL *next = start;
|
|
|
+ while(next != NULL) {
|
|
|
+ printf("%ld\n", (long)next->data);
|
|
|
+ next = next->next;
|
|
|
+ }
|
|
|
}
|