execm first working zip version

This commit is contained in:
dockes
2009-10-14 06:21:44 +00:00
parent 3fcde55ff4
commit ce0078081a
7 changed files with 157 additions and 43 deletions
+13 -6
View File
@@ -119,10 +119,12 @@ sub readparam {
}
my $paramname = lc $l[0];
my $paramsize = $l[1];
my $n = read STDIN, $paramdata, $paramsize;
if ($n != $paramsize) {
print STDERR "RCLIMG: [$paramname] expected $paramsize, got $n\n";
exit 1;
if ($paramsize > 0) {
my $n = read STDIN, $paramdata, $paramsize;
if ($n != $paramsize) {
print STDERR "RCLIMG: [$paramname] expected $paramsize, got $n\n";
exit 1;
}
}
# print STDERR "RCLIMG: [$paramname] $paramsize bytes: [$paramdata]\n";
return ($paramname, $paramdata);
@@ -156,14 +158,19 @@ while (1) {
}
unless (defined $params{"filename:"}) {
print STDERR "RCLIMG: no filename ??\n";
exit 1;
# Recoll is requesting next subdocument, but we have none, just say
# so:
print "Document: 0\n\n";
next;
}
my $data = imgTagsToHtml($params{"filename:"});
my $l = length($data);
print "Data: $l\n";
print "Document: $l\n";
# print STDERR "RCLIMG: writing $l bytes of data\n";
print $data;
# Say we have no further documents for this file
print "Eof: 0\n";
# End of output parameters: print empty line
print "\n";
# print STDERR "RCLIMG: done writing data\n";