#!/usr/bin/perl -pi
#
# @(#)esqlsed	50.1 97/01/12 17:54:52
#
# DBD::Informix for Perl Version 5
#
# Post-process C files generated by Informix ESQL/C versions 4.10.UC1 upwards
#
# Copyright (c) 1996,1997 Jonathan Leffler
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.

$mode = 1 if ($line++ == 0 && /^#include <sqlhdr\.h>$/o);
print "/* Processed by esqlsed version 50.1 (97/01/12) */\n#include \"esqlc.h\"\n"
	if ($mode == 1 && $line == 1);
$_ = "" if ($mode == 1 && /^#include <sqlca\.h>$/o);
$_ = "" if ($mode == 1 && /^#include <sqlhdr\.h>$/o);
$_ = "" if ($mode == 1 && /^extern _SQCURSOR \*_iqnprep\(\);$/o);
s/\(char\s*\*\)\s*0/0/og if ($mode == 1 && /\b_iq\w+\(/o);
