Overview
Comment: | Now writes a _fig.fig file. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
5b594003901a90b885bace0e49821f33 |
User & Date: | gawthrop@users.sourceforge.net on 1996-08-05 20:12:43 |
Other Links: | branch diff | manifest | tags |
Context
1996-08-05
| ||
20:13:56 | Initial revision check-in: fae876e2c4 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
20:12:43 | Now writes a _fig.fig file. check-in: 5b59400390 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
19:50:55 | Put in fig.fig target. check-in: b0b3314669 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/awk/rbg_fig2m.awk from [10a89cce80] to [aaf04b22ff].
︙ | ︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.6 1996/08/05 12:17:37 peter ## n_ports now appear in the _abg file instead. ## ## Revision 1.5 1996/08/05 12:01:28 peter ## The _cmp function now returns the number of ports. ## ## Revision 1.4 1996/08/05 10:14:46 peter | > > > | 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.7 1996/08/05 18:44:56 peter ## Now writes out a _cbg file without ----- symbol. ## ## Revision 1.6 1996/08/05 12:17:37 peter ## n_ports now appear in the _abg file instead. ## ## Revision 1.5 1996/08/05 12:01:28 peter ## The _cmp function now returns the number of ports. ## ## Revision 1.4 1996/08/05 10:14:46 peter |
︙ | ︙ | |||
248 249 250 251 252 253 254 | if ( (!arrow)&&(NF==(2*stroke_coords+1)) ) { i_stroke++; strokes[i_stroke] = sprintf("%s %s %s %s", $2, $3, $4, $5); } } } | | | | | | | | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | if ( (!arrow)&&(NF==(2*stroke_coords+1)) ) { i_stroke++; strokes[i_stroke] = sprintf("%s %s %s %s", $2, $3, $4, $5); } } } function write_fig() { # Create _fig.fig file from _abg file - not components if ( (isa_fig_file)&&((object!=text)||(isa_component==0))) { if (exact_match($1,data_symbol)) { field_1 = out_data_symbol } else { field_1 = $1 } printf field_1 >> fig_file for (i=2; i<=NF; i++) printf(" %s", $i) >> fig_file; printf("\n") >> fig_file } } function process_fig() { # Test for the fig format first line and data line data_line = (match($1,data_symbol)>0); first_line = (data_line==0)&&(NF>min_line_length); |
︙ | ︙ | |||
296 297 298 299 300 301 302 | (object==polyline)&& \ (sub_type==sub_polyline)&& \ (style==firm_style) \ ) { process_bond() } | | | | | 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | (object==polyline)&& \ (sub_type==sub_polyline)&& \ (style==firm_style) \ ) { process_bond() } write_fig() } BEGIN { sys_name = ARGV[1]; delete ARGV[1]; b_file = sprintf("%s_rbg.m", sys_name); c_file = sprintf("%s_cmp.m", sys_name); fig_file = sprintf("%s_fig.fig", sys_name); warning_f = "WARNING %s \t in fig file but not lbl file - using\n"; warning_l = "WARNING %s \t in lbl file but not fig file - ignoring\n"; warning_p = "WARNING system ports are not consecutively numbered\n"; data_symbol = "----"; out_data_symbol = "\t"; default_cr = ""; default_args = ""; delimiter = ":"; q = "\047"; terminator = "\\001"; component_regexp = "[^0-9a-zA-Z_:]"; port_regexp = "\[[0-9]*\]"; isa_fig_file = 0; min_line_length = 10; object = 0; polyline = 2; sub_polyline=1; firm_style = 0; text = 4; bond_coords = 3; |
︙ | ︙ | |||
344 345 346 347 348 349 350 | i_name = 0; i_port_component = 0; } { # Start of .fig file? if ( (NF>0) && (match("#FIG", $1) > 0) ) { | | | | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | i_name = 0; i_port_component = 0; } { # Start of .fig file? if ( (NF>0) && (match("#FIG", $1) > 0) ) { isa_fig_file=1; } if (isa_fig_file==0) { process_lbl() } else { process_fig() } } |
︙ | ︙ |