Differences From Artifact [c07f300f6b]:

To Artifact [e3eb2fe827]:


12
13
14
15
16
17
18



19
20
21
22
23
24
25
# Copyright (c) P.J.Gawthrop 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.5  1998/08/12 14:14:18  peterg
## Added pretty heading and explicitly include p2c header.
##
## Revision 1.4  1998/07/29 13:56:34  peterg
## Replces p2c include by local include.
##
## Revision 1.3  1998/07/27 20:32:51  peterg







>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) P.J.Gawthrop 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.6  1999/04/20 06:17:15  peterg
## Fudge to avoid a bizzare bug (?) in p2c which corrupts "zero_matrix"
##
## Revision 1.5  1998/08/12 14:14:18  peterg
## Added pretty heading and explicitly include p2c header.
##
## Revision 1.4  1998/07/29 13:56:34  peterg
## Replces p2c include by local include.
##
## Revision 1.3  1998/07/27 20:32:51  peterg
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Inform user
echo Creating $1_$2.c

# Use p2c to do the translation 
p2c -V  $1_$2.p  | grep Warning # > mtt_p2c.log 2>> mtt_p2c.log
cat $1_$2.log >> mtt_p2c.log

# zap the PASCAL_MAIN which we don't want and change p2c.h include.
mv $1_$2.c mtt_junk1
grep -v 'PASCAL_MAIN'  < mtt_junk1 | grep -v 'p2c/p2c.h'> mtt_junk2

# pretty heading
DATE=`date`

cat <<EOF  >$1_$2.c
/* C program  $1_$2.c */
/* Generated by MTT on $DATE */







|

|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Inform user
echo Creating $1_$2.c

# Use p2c to do the translation 
p2c -V  $1_$2.p  | grep Warning # > mtt_p2c.log 2>> mtt_p2c.log
cat $1_$2.log >> mtt_p2c.log

# Change p2c.h include.
mv $1_$2.c mtt_junk1
cat mtt_junk1 | grep -v 'p2c/p2c.h'> mtt_junk2

# pretty heading
DATE=`date`

cat <<EOF  >$1_$2.c
/* C program  $1_$2.c */
/* Generated by MTT on $DATE */

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]