#!/usr/bin/perl -pi
#
# @(#)$Id: esqlsed,v 50.1 1997/01/12 17:54:52 johnl Exp $ 
#
# 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 $RCSfile: esqlsed,v $ version $Revision: 50.1 $ ($Date: 1997/01/12 17:54:52 $) */\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);
