* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <vlc_common.h>
+#include <vlc_charset.h>
-#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
#include <dirent.h>
#include <time.h>
#include "common.h"
int init_idle_preset() {
preset_t * preset;
- int i;
/* Initialize idle preset struct */
if ((preset = (preset_t*)malloc(sizeof(preset_t))) == NULL)
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;
}
preset_t * load_preset(char * pathname) {
preset_t * preset;
- int i;
/* Initialize preset struct */
if ((preset = (preset_t*)malloc(sizeof(preset_t))) == NULL)
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;
}
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 );
}