diff --git a/interface.c b/interface.c index f40fadc85..d5d87e548 100644 --- a/interface.c +++ b/interface.c @@ -1,10 +1,14 @@ #include #include #include +#include +#include "http.h" +#include "md5.h" #include "font.h" #include "defines.h" #include "powder.h" #include "interface.h" +#include "misc.h" SDLMod sdl_mod; int sdl_key, sdl_wheel, sdl_caps=0, sdl_ascii, sdl_zoom_trig=0; diff --git a/main.c b/main.c index 88b712c35..e30a97260 100644 --- a/main.c +++ b/main.c @@ -1167,40 +1167,6 @@ int execute_tagop(pixel *vid_buf, char *op, char *tag) return 0; } -struct strlist -{ - char *str; - struct strlist *next; -}; - -void strlist_add(struct strlist **list, char *str) -{ - struct strlist *item = malloc(sizeof(struct strlist)); - item->str = mystrdup(str); - item->next = *list; - *list = item; -} - -int strlist_find(struct strlist **list, char *str) -{ - struct strlist *item; - for(item=*list; item; item=item->next) - if(!strcmp(item->str, str)) - return 1; - return 0; -} - -void strlist_free(struct strlist **list) -{ - struct strlist *item; - while(*list) - { - item = *list; - *list = (*list)->next; - free(item); - } -} - void thumb_cache_inval(char *id); void execute_save(pixel *vid_buf) diff --git a/misc.c b/misc.c index ade3c3cbc..a74b0e449 100644 --- a/misc.c +++ b/misc.c @@ -52,4 +52,32 @@ char *mystrdup(char *s) return x; } return s; +} + +void strlist_add(struct strlist **list, char *str) +{ + struct strlist *item = malloc(sizeof(struct strlist)); + item->str = mystrdup(str); + item->next = *list; + *list = item; +} + +int strlist_find(struct strlist **list, char *str) +{ + struct strlist *item; + for(item=*list; item; item=item->next) + if(!strcmp(item->str, str)) + return 1; + return 0; +} + +void strlist_free(struct strlist **list) +{ + struct strlist *item; + while(*list) + { + item = *list; + *list = (*list)->next; + free(item); + } } \ No newline at end of file diff --git a/misc.h b/misc.h index 556cc979b..e27909336 100644 --- a/misc.h +++ b/misc.h @@ -22,4 +22,16 @@ extern inline float restrict_flt(float f, float min, float max); char *mystrdup(char *s); +struct strlist +{ + char *str; + struct strlist *next; +}; + +void strlist_add(struct strlist **list, char *str); + +int strlist_find(struct strlist **list, char *str); + +void strlist_free(struct strlist **list); + #endif \ No newline at end of file diff --git a/powder.c b/powder.c index d1c832120..0f31577ac 100644 --- a/powder.c +++ b/powder.c @@ -463,6 +463,7 @@ void update_particles_i(pixel *vid, int start, int inc) for(i=start; i<(NPART-starti); i+=inc) if(parts[i].type) { + //printf("parts[%d].type: %d\n", i, parts[i].type); lx = parts[i].x; ly = parts[i].y;