#! /usr/bin/perl
use strict;
use warnings;
# gener
sub xlink($)
{
my ($fun) = @_;
# not documented, or do not exist (!)
return "$fun"
if $fun eq 'PQregisterThreadLock' or
$fun eq 'PQerrorField' or
$fun eq 'PQsetResultInstanceData';
my $lfun = lc $fun;
return "";
}
# process input
$/ = undef;
my $text = <>;
$text =~ s,(PQ[_a-zA-Z0-9]*)(?!\s*\.?),xlink($1),seg;
print $text;