Differences From Artifact [b4dc2f4aab]:

To Artifact [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 ]