utf8 path issue.
This commit is contained in:
Jean-François DEL NERO
2025-02-10 19:03:07 +01:00
parent 9f2be89e6b
commit 721b916519
3 changed files with 9 additions and 9 deletions
@@ -107,11 +107,11 @@ int png_encode_image(void *image, size_t length, uint32_t width, uint32_t height
{
FILE * f;
f=fopen(filename,"wb");
f=hxc_fopen(filename,"wb");
if(f)
{
fwrite(png_buf,png_size,1,f);
fclose(f);
hxc_fclose(f);
}
}
@@ -122,7 +122,7 @@ int binlogicfile2stream(HXCFE_IMGLDR * imgldr_ctx,char * file, la_stats * la)
rev_cnt = 0;
delta = 0;
f = fopen(file,"r");
f = hxc_fopen(file,"r");
if(f)
{
fseek(f,0,SEEK_END);
@@ -159,7 +159,7 @@ int binlogicfile2stream(HXCFE_IMGLDR * imgldr_ctx,char * file, la_stats * la)
{
if ( fread(&data_buffer,TMP_BUFFER_SIZE,1,f) != 1 )
{
fclose(f);
hxc_fclose(f);
return -1;
}
@@ -169,7 +169,7 @@ int binlogicfile2stream(HXCFE_IMGLDR * imgldr_ctx,char * file, la_stats * la)
{
if ( fread(&data_buffer,size,1,f) != 1 )
{
fclose(f);
hxc_fclose(f);
return -1;
}
@@ -232,7 +232,7 @@ int binlogicfile2stream(HXCFE_IMGLDR * imgldr_ctx,char * file, la_stats * la)
offset += block_size;
}
fclose(f);
hxc_fclose(f);
}
else
{
+3 -3
View File
@@ -755,7 +755,7 @@ int execute_file_script( script_ctx * ctx, char * filename )
err = SCRIPT_INTERNAL_ERROR;
ctx->script_file = fopen(filename,"rb");
ctx->script_file = hxc_fopen(filename,"rb");
if(ctx->script_file)
{
strncpy(ctx->script_file_path,filename,DEFAULT_BUFLEN);
@@ -787,7 +787,7 @@ int execute_file_script( script_ctx * ctx, char * filename )
err = execute_line_script(ctx, ctx->pre_command);
if(err != SCRIPT_NO_ERROR)
{
fclose(ctx->script_file);
hxc_fclose(ctx->script_file);
return err;
}
}
@@ -806,7 +806,7 @@ int execute_file_script( script_ctx * ctx, char * filename )
}while(1);
}
fclose(ctx->script_file);
hxc_fclose(ctx->script_file);
err = SCRIPT_NO_ERROR;
}