Show
Ignore:
Timestamp:
25.07.2016 14:44:07 (3 years ago)
Author:
ak19
Message:

The %s in the perlmodule strings was being replaced with the entire contents of the buffer when it was written out, when generating excel spreadsheet xml. So use fwrite instead of printf, as it doesn't do special formatting

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/gtiaction.cpp

    r28991 r30620  
    663663 
    664664    // don't actually need to add toplevel gsdlhome to classpath in the following: 
    665  
     665     
    666666    gti_arguments = "get-first-n-chunks-requiring-work " + target_language_code + " " + translation_file_key + " " + "10000" + " | " + java + " -cp " + gsdlhome + path_separator + gsdlhome + "/bin/java/ApplyXSLT.jar org.nzdl.gsdl.ApplyXSLT -c -t " + gsdlhome + "/bin/script/gti-generate-excel-xml.xsl"; 
    667667 
     
    681681  } 
    682682 
    683   // Write the Excel spreadsheet data to the browser 
     683    // Write the Excel spreadsheet data to the browser 
    684684  char* gti_response_xml_text_cstr = gti_response_xml_text.getcstr(); 
    685   printf(gti_response_xml_text_cstr); 
     685  // use fwrite instead of printf as there are %s in the strings 
     686  fwrite(gti_response_xml_text_cstr, 1, strlen(gti_response_xml_text_cstr), stdout); 
    686687  delete[] gti_response_xml_text_cstr; 
    687688