Changeset 31898 for main/trunk/greenstone2/perllib/gsprintf.pm
- Timestamp:
- 2017-08-17T16:15:10+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/gsprintf.pm
r31896 r31898 71 71 sub gsprintf 72 72 { 73 my ($handle, $text_string, @text_arguments) = @_;74 _gsprintf($handle, $text_string, 0, @text_arguments);75 }76 77 sub gsprintf_multiline78 {79 73 my ($handle, $text_string, @text_arguments) = @_; 80 _gsprintf($handle, $text_string, 1, @text_arguments);81 }82 83 sub _gsprintf84 {85 my ($handle, $text_string, $multiline, @text_arguments) = @_;86 74 87 75 # Return unless the required arguments were supplied … … 93 81 # Resolve the string arguments using sprintf, then write out to the handle 94 82 my $text_string_resolved = sprintf($text_string, @text_arguments); 95 96 if($multiline) { # replace newlines97 $text_string_resolved =~ s@\\n@\n@g;98 }99 83 100 84 if ($freetext_xml_mode) {
Note:
See TracChangeset
for help on using the changeset viewer.