X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvisualization%2Fgalaktos%2Fpreset.c;h=e7aea345ddb48ca71c10b8c33d2c4578712eb47d;hb=a804eaa4782f3f8a384c19a223383be309e62023;hp=64a4ce98cf6f9fb5c5eca6509254d5f6951db2d8;hpb=d59f9b354c873e267857dc53dd737cf08dc9eacb;p=vlc diff --git a/modules/visualization/galaktos/preset.c b/modules/visualization/galaktos/preset.c index 64a4ce98cf..e7aea345dd 100644 --- a/modules/visualization/galaktos/preset.c +++ b/modules/visualization/galaktos/preset.c @@ -22,12 +22,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif +#include +#include -#include -#include #include +#include #include #include #include "common.h" @@ -382,7 +385,6 @@ int loadPresetByFile(char * filename) { int init_idle_preset() { preset_t * preset; - int i; /* Initialize idle preset struct */ if ((preset = (preset_t*)malloc(sizeof(preset_t))) == NULL) @@ -520,7 +522,7 @@ int load_preset_file(char * pathname, preset_t * preset) { return FAILURE; /* Open the file corresponding to pathname */ - if ((fs = utf8_fopen(pathname, "r")) == 0) { + if ((fs = utf8_fopen(pathname, "r")) == NULL) { if (PRESET_DEBUG) printf("load_preset_file: loading of file %s failed!\n", pathname); return ERROR; } @@ -738,7 +740,6 @@ void reloadPerFrame(char * s, preset_t * preset) { preset_t * load_preset(char * pathname) { preset_t * preset; - int i; /* Initialize preset struct */ if ((preset = (preset_t*)malloc(sizeof(preset_t))) == NULL) @@ -792,7 +793,7 @@ void savePreset(char * filename) { return; /* Open the file corresponding to pathname */ - if ((fs = utf8_fopen(filename, "w+")) == 0) { + if ((fs = utf8_fopen(filename, "w+")) == NULL) { if (PRESET_DEBUG) printf("savePreset: failed to create filename \"%s\"!\n", filename); return; } @@ -889,7 +890,7 @@ void write_init(init_cond_t * init_cond) { else if (init_cond->param->type == P_TYPE_DOUBLE) { lldiv_t div = lldiv( init_cond->init_val.double_val * 1000000,1000000 ); - sprintf(s, "%s="I64Fd".%06u\n", init_cond->param->name, div.quot, + sprintf(s, "%s=%"PRId64".%06u\n", init_cond->param->name, div.quot, (unsigned int) div.rem ); }