Overview
Comment:Nameless components are now named according to type - replaces old
mtt1 etc style.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: df4eab1c5edc682bb479b10d17598299ddb4541c1acf07079f019662ddfbce42
User & Date: gawthrop@users.sourceforge.net on 2002-05-22 10:33:18
Other Links: branch diff | manifest | tags
Context
2002-05-22
16:59:59
Multiple ps files generated - view shows all check-in: 8d0ad4c90b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:33:18
Nameless components are now named according to type - replaces old
mtt1 etc style.
check-in: df4eab1c5e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:35:49
Added insertor variable to stop sh-mode font-lock from getting hopelessly confused by embedded C++. check-in: a342b52fce user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

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

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







+
+
+







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

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## 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
##
## Revision 1.40  2001/06/11 19:43:50  gawthrop
## MTT is now much more sophisticated in generating lbl files
## Labels can contain maths
263
264
265
266
267
268
269











270
271
272
273
274
275
276
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290







+
+
+
+
+
+
+
+
+
+
+








function fig_info() {
# 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
    }
}

function process_text() {
# The text string is field 14 onwards
  str = $14; 
  for (i=15; i<=NF; i++) {
    str = sprintf("%s %s", str, $i)
      }
404
405
406
407
408
409
410

411
412
413











414
415
416
417
418
419
420
418
419
420
421
422
423
424
425



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443







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







	label[i_label,2] = CR;
	label[i_label,3] = args
	  }
    }

# Unnamed component
    if (named_component==0) {
      type = str;
      i_name++;
      name = sprintf("mtt%i", i_name);
      type = str;

      if (type in name_index) 
        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]);

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

# Save in associative arrays by name	
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
679
680
681
682
683
684
685

686
687
688
689
690
691
692







-








  i_bond = 0;
  i_port = 0;
  i_stroke = 0;
  i_arrow = 0;
  i_label = 0;
  i_text = 0;
  i_name = 0;
  i_port_component = 0;

  component_index = 0;
}
{
# Start of .fig file?
  if ($1=="#FIG") {


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