Overview
Comment:Added pretty heading and explicitly include p2c header.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 210345de182d7e2ae46d2101574775d73c0d4d872b0b9b7208f5a5dd2c51fa0b
User & Date: gawthrop@users.sourceforge.net on 1998-08-12 14:14:18
Other Links: branch diff | manifest | tags
Context
1998-08-12
14:15:13
Implicit integration - c implemetation now included. check-in: d6b93f19e6 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
14:14:18
Added pretty heading and explicitly include p2c header. check-in: 210345de18 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
13:18:31
Now in e output format check-in: 7a4bb5b5e8 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_p2c from [55077f8402] to [23aaefc197].

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.3  1998/07/27 20:32:51  peterg
## Now gives immediate warnings
##
## Revision 1.2  1998/07/25 16:35:43  peterg
## Sorted out log files etc
##
## Revision 1.1  1998/07/25 16:28:38  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.4  1998/07/29 13:56:34  peterg
## Replces p2c include by local include.
##
## Revision 1.3  1998/07/27 20:32:51  peterg
## Now gives immediate warnings
##
## Revision 1.2  1998/07/25 16:35:43  peterg
## Sorted out log files etc
##
## Revision 1.1  1998/07/25 16:28:38  peterg
45
46
47
48
49
50
51
52

53





















54
55
56
57
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_junk

grep -v 'PASCAL_MAIN' < mtt_junk  | sed 's@<p2c/p2c.h>@"p2c.h"@' >$1_$2.c






















if [ -n "$info" ]; then
    cat mtt_p2c.log
fi







|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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 */

/* Compile with cc -lm $1_$2.c */

/* The following is the header file included here for completeness */
EOF

cat $MTTPATH/trans/c/p2c.h >> $1_$2.c

cat <<EOF >> $1_$2.c
/* End of the header file. */


EOF

cat mtt_junk2 >> $1_$2.c

if [ -n "$info" ]; then
    cat mtt_p2c.log
fi


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