4 |
#include <stdlib.h> |
#include <stdlib.h> |
5 |
/* NULL */ |
/* NULL */ |
6 |
#include <stddef.h> |
#include <stddef.h> |
7 |
|
/* dlopen, dlsym, dlerror */ |
8 |
#include <dlfcn.h> |
#include <dlfcn.h> |
9 |
|
|
10 |
#define HASHTBLSIZE 65536 |
#define HASHTBLSIZE 65536 |
148 |
if(stack_head->next != NULL) |
if(stack_head->next != NULL) |
149 |
print_st(stack_head->next, counter+1); |
print_st(stack_head->next, counter+1); |
150 |
|
|
151 |
if(stack_head->type==value) |
switch(stack_head->type){ |
152 |
|
case value: |
153 |
printf("%ld: %d\n", counter, (int)stack_head->content.val); |
printf("%ld: %d\n", counter, (int)stack_head->content.val); |
154 |
else if(stack_head->type==string) |
break; |
155 |
|
case string: |
156 |
printf("%ld: \"%s\"\n", counter, (char*)stack_head->content.ptr); |
printf("%ld: \"%s\"\n", counter, (char*)stack_head->content.ptr); |
157 |
else |
break; |
158 |
|
case ref: |
159 |
|
case func: |
160 |
printf("%ld: %p\n", counter, stack_head->content.ptr); |
printf("%ld: %p\n", counter, stack_head->content.ptr); |
161 |
|
break; |
162 |
|
} |
163 |
} |
} |
164 |
|
|
165 |
extern void printstack(stackitem** stack_head) |
extern void printstack(stackitem** stack_head) |
257 |
|
|
258 |
return EXIT_SUCCESS; |
return EXIT_SUCCESS; |
259 |
} |
} |
260 |
|
|
261 |
|
/* Local Variables: */ |
262 |
|
/* compile-command:"make CFLAGS=\"-Wall -g -rdynamic -ldl\" stack" */ |
263 |
|
/* End: */ |