Commit 501b66fa authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(pitx): Fix output format. Print string charpos.

parent 7b9389b0
......@@ -129,20 +129,24 @@ define pitx
end
if ($it->what == IT_CHARACTER)
if ($it->len == 1 && $it->c >= ' ' && it->c < 255)
printf "ch='%c'", $it->c
printf " ch='%c'", $it->c
else
printf "ch=[%d,%d]", $it->c, $it->len
printf " ch=[%d,%d]", $it->c, $it->len
end
else
if ($it->what == IT_IMAGE)
printf "IMAGE=%d", $it->image_id
printf " IMAGE=%d", $it->image_id
else
printf " "
output $it->what
end
end
if ($it->method != GET_FROM_BUFFER)
printf " next="
output $it->method
if ($it->method == GET_FROM_STRING)
printf "[%d]", $it->current.string_pos.charpos
end
end
printf "\n"
if ($it->region_beg_charpos >= 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment