@@ -481,7 +481,7 @@ int utfgridSaveImage(imageObj *img, mapObj *map, FILE *fp, outputFormatObj *form
481
481
imgheight = img->height /renderer->utfresolution ;
482
482
imgwidth = img->width /renderer->utfresolution ;
483
483
484
- fprintf (fp," {\" grid\" :[" );
484
+ msIO_fprintf (fp," {\" grid\" :[" );
485
485
486
486
/* Print the buffer, also */
487
487
for (row=0 ; row<imgheight; row++) {
@@ -491,8 +491,8 @@ int utfgridSaveImage(imageObj *img, mapObj *map, FILE *fp, outputFormatObj *form
491
491
stringptr = string;
492
492
/* Needs comma between each lines but JSON must not start with a comma. */
493
493
if (row!=0 )
494
- fprintf (fp," ," );
495
- fprintf (fp," \" " );
494
+ msIO_fprintf (fp," ," );
495
+ msIO_fprintf (fp," \" " );
496
496
for (col=0 ; col<img->width /renderer->utfresolution ; col++) {
497
497
/* Get the datas from buffer. */
498
498
pixelid = renderer->buffer [(row*imgwidth)+col];
@@ -505,51 +505,51 @@ int utfgridSaveImage(imageObj *img, mapObj *map, FILE *fp, outputFormatObj *form
505
505
*stringptr = ' \0 ' ;
506
506
char * utf8;
507
507
utf8 = msConvertWideStringToUTF8 (string, " UCS-4LE" );
508
- fprintf (fp," %s" , utf8);
508
+ msIO_fprintf (fp," %s" , utf8);
509
509
msFree (utf8);
510
510
msFree (string);
511
- fprintf (fp," \" " );
511
+ msIO_fprintf (fp," \" " );
512
512
}
513
513
514
- fprintf (fp," ],\" keys\" :[\"\" " );
514
+ msIO_fprintf (fp," ],\" keys\" :[\"\" " );
515
515
516
516
/* Prints the key specified */
517
517
for (i=0 ;i<renderer->data ->counter ;i++) {
518
- fprintf (fp," ," );
518
+ msIO_fprintf (fp," ," );
519
519
520
520
if (renderer->useutfitem )
521
521
{
522
522
pszEscaped = msEscapeJSonString (renderer->data ->table [i].itemvalue );
523
- fprintf (fp," \" %s\" " , pszEscaped);
523
+ msIO_fprintf (fp," \" %s\" " , pszEscaped);
524
524
msFree (pszEscaped);
525
525
}
526
526
/* If no UTFITEM specified use the serial ID as the key */
527
527
else
528
- fprintf (fp," \" %i\" " , renderer->data ->table [i].serialid );
528
+ msIO_fprintf (fp," \" %i\" " , renderer->data ->table [i].serialid );
529
529
}
530
530
531
- fprintf (fp," ],\" data\" :{" );
531
+ msIO_fprintf (fp," ],\" data\" :{" );
532
532
533
533
/* Print the datas */
534
534
if (renderer->useutfdata ) {
535
535
for (i=0 ;i<renderer->data ->counter ;i++) {
536
536
if (i!=0 )
537
- fprintf (fp," ," );
537
+ msIO_fprintf (fp," ," );
538
538
539
539
if (renderer->useutfitem )
540
540
{
541
541
pszEscaped = msEscapeJSonString (renderer->data ->table [i].itemvalue );
542
- fprintf (fp," \" %s\" :" , pszEscaped);
542
+ msIO_fprintf (fp," \" %s\" :" , pszEscaped);
543
543
msFree (pszEscaped);
544
544
}
545
545
/* If no UTFITEM specified use the serial ID as the key */
546
546
else
547
- fprintf (fp," \" %i\" :" , renderer->data ->table [i].serialid );
547
+ msIO_fprintf (fp," \" %i\" :" , renderer->data ->table [i].serialid );
548
548
549
- fprintf (fp," %s" , renderer->data ->table [i].datavalues );
549
+ msIO_fprintf (fp," %s" , renderer->data ->table [i].datavalues );
550
550
}
551
551
}
552
- fprintf (fp," }}" );
552
+ msIO_fprintf (fp," }}" );
553
553
554
554
return MS_SUCCESS;
555
555
}
0 commit comments