comparison libinterp/corefcn/gl2ps-print.cc @ 30885:960909469245

maint: Merge stable to default.
author John W. Eaton <jwe@octave.org>
date Sun, 03 Apr 2022 11:30:26 -0400
parents 1921d9d0e62b 0a1aec50a0c8
children
comparison
equal deleted inserted replaced
30882:b77b321f1ac5 30885:960909469245
527 { 527 {
528 // FIXME: gl2ps uses pixel units for SVG format. 528 // FIXME: gl2ps uses pixel units for SVG format.
529 // Modify resulting svg to use points instead. 529 // Modify resulting svg to use points instead.
530 // Remove this "else if" block, and 530 // Remove this "else if" block, and
531 // make header_found true for SVG if gl2ps is fixed. 531 // make header_found true for SVG if gl2ps is fixed.
532 std::string srchstr (str); 532
533 // Specify number of characters because STR may have
534 // come from std::fread and not end with a NUL
535 // character.
536 std::string srchstr (str, nread);
533 std::size_t pos = srchstr.find ("<svg "); 537 std::size_t pos = srchstr.find ("<svg ");
534 if (! header_found && pos != std::string::npos) 538 if (! header_found && pos != std::string::npos)
535 { 539 {
536 header_found = true; 540 header_found = true;
537 pos = srchstr.find ("px"); 541 pos = srchstr.find ("px");