#!/bin/sh

#
# Grapnel API with PVM target for Grapnel environment (tapepppost)
#
# Copyright (c) Drotos Daniel, University of Miskolc. 1994,98
#
#  This file is part of Grapnel API with PVM target for GRAPNEL
#  environment.
#
#  The GRAPNEL system is part of SEPP project. This project is
#  supported by the EC within COPERNICUS Research Project
#  No. 5383. The grp2c (Grapnel Compiler) translates GRP files,
#  generated by the Graphical Program Editor (GRED), into C
#  source. Latest version of the grapnel compiler is available on site
#  mazsola:
#
#  http://mazsola.iit.uni-miskolc.hu/~dani/grp2c
#
# This script is used to modify TAPE-preprocessed version
# of the generated C-source files.
#
# Use: tapepppost source
#
# Where `source' is the name of the source file being modified.

sed -e "s/,argv\[\],/,argv,/g
/Instrumentation/a\\
\\
#define TapeInstrumented 1
" $1 >/tmp/$1.tmp
mv /tmp/$1.tmp $1

# End of tapepppost
