Overview
Comment:Put back struc_txt2m - required by mtt2sys.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/merging-ode2odes-exe | trunk
Files: files | file ages | folders
SHA3-256: df44346da16ad154c32faec7e37304e0cad296657afd0532755b8e26bddd630e
User & Date: geraint@users.sourceforge.net on 2001-03-06 03:52:15
Other Links: branch diff | manifest | tags
Context
2001-03-07
04:06:55
Irix: catch SIGFPE and write data before aborting (.exe).
GNU/Linux: nada.
check-in: 30eac5fc49 user: geraint@users.sourceforge.net tags: origin/merging-ode2odes-exe, trunk
2001-03-06
03:52:15
Put back struc_txt2m - required by mtt2sys. check-in: df44346da1 user: geraint@users.sourceforge.net tags: origin/merging-ode2odes-exe, trunk
03:48:43
Print additional environment variable for "mtt -p".
MTT_LDFLAGS defaults to " " to avoid installation warning.
check-in: 0e8b9063f9 user: geraint@users.sourceforge.net tags: origin/merging-ode2odes-exe, trunk
Changes

Added mttroot/mtt/bin/trans/struc_txt2m version [da921fb492].





























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: struc_txt2m

# Structure file - txt to m conversion
# P.J.Gawthrop April 1997
# Copyright (c) P.J.Gawthrop, 1997.

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



# Inform user
echo "Creating $1_struc.m"

rm -f mtt_error

#Write some file headers
echo "function [input_name,output_name,state_name] = $1_struc" > $1_struc.m
echo "%% Structure file ($1_struc.m)" >> $1_struc.m
echo "%% Generated by MTT at `date`" >> $1_struc.m

# This is the main transformation using awk
awk '
function header(what){
  print what "_name = [";
}

function footer(what){
  print "];";
}

BEGIN{
Which="";
apostrophe = "\047";
}
{
  if ($1!=Which) {
    if (Which!="") footer(Which);
    header($1);
  }
  print  apostrophe $4 "_" $3 apostrophe;
  Which = $1;
}
END{
  footer(Which)
}
'  SYSTEM=$1  < $1_struc.txt >> $1_struc.m 2>mtt_error.txt

# Now invoke the standard error handling.
mtt_error mtt_error.txt



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