Overview
Comment:Self-naming components: name is mttTYPE or mttTYPE_2 ...
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: bef089cdef5337feab9786266c542dfbe3e24055d4b7f047431237999b5e1118
User & Date: gawthrop@users.sourceforge.net on 2002-05-25 09:23:47
Other Links: branch diff | manifest | tags
Context
2002-05-26
17:28:27
Tweaked figures again check-in: 974eef3cb5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2002-05-25
09:23:47
Self-naming components: name is mttTYPE or mttTYPE_2 ... check-in: bef089cdef user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2002-05-24
16:19:42
Builds Simulink .mdl as well as sys_sfun.mexglx. check-in: d23074a21b user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/awk/rbg_fig2m.awk from [b4dc2f4aab] to [8cd4399f36].

8
9
10
11
12
13
14




15
16
17
18
19
20
21
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25







+
+
+
+







# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.43  2002/05/22 10:33:18  gawthrop
## Nameless components are now named according to type - replaces old
## mtt1 etc style.
##
## Revision 1.42  2002/03/26 12:05:27  geraint
## Escaped characters to eliminate awk warnings.
##
## Revision 1.41  2001/06/13 10:41:06  gawthrop
## Further changes towards aouto creation of lbl files.
## Prettified lbl files
##
268
269
270
271
272
273
274
275
276
277
278
279
280
281







282


283
284
285
286
287
288
289
272
273
274
275
276
277
278







279
280
281
282
283
284
285

286
287
288
289
290
291
292
293
294







-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+







# Grabs the fig-file information for a component
  return(sprintf("%s %s %s %s %s %s %s %s %s %s %s ", \
		 $1, $2, $3, $4, $5, $6, $7, \
		 $8, $9, $10, $11))
	 }

function type_name(type) {
    if (type==1)
      return "one"
    else {
      if (type==0)
        return "zero"
      else
        return type
#    if (type==1)
#      return "one"
#    else {
#      if (type==0)
#        return "zero"
#      else
#        return type
    }
#    }
    return sprintf("mtt%s", type);
}

function process_text() {
# The text string is field 14 onwards
  str = $14; 
  for (i=15; i<=NF; i++) {
    str = sprintf("%s %s", str, $i)
428
429
430
431
432
433
434
435

436
437
438
439
440
441
442
433
434
435
436
437
438
439

440
441
442
443
444
445
446
447







-
+







        name_index[type]++
      else
        name_index[type] = 1;

      if (name_index[type]==1)
        name = sprintf("%s", type_name(type))
      else
        name = sprintf("%s%i", type_name(type), name_index[type]);
        name = sprintf("%s_%i", type_name(type), name_index[type]);

      i_label++;
      label[i_label,1] = name;
      label[i_label,2] = default_cr;
      label[i_label,3] = default_args
	}


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