chiark / gitweb /
test "part"; part A is optional
authorian <ian>
Sat, 31 Jan 2004 19:57:36 +0000 (19:57 +0000)
committerian <ian>
Sat, 31 Jan 2004 19:57:36 +0000 (19:57 +0000)
layout/informat.txt
layout/layout
layout/ours.m4

index a64674eac044ae21cd2f3c8287e9183c6b50cfca..7c8352f514cb8fc986ddd715a65a85f45d3734a0 100644 (file)
@@ -61,7 +61,7 @@ Commands
    * showlibrary lists only parts, not objects
    * the -e and -E command line options distinguish parts and objects
 
- part N [-]O [F A] [FR AR ...]
+ part N [-]O [F [A]] [FR AR ...]
  obj[flip] O A F [P]
   Places an instance of object or part O.  The loc defined inside O as
   F (`formal parameter', F must be just <identifier>) is placed at
@@ -83,7 +83,8 @@ Commands
   specifies that the loc FR inside O is exported into the global
   namespace as a new loc AR.  Either FR or AR may start with `-'.
   Also, each loc L inside O is exported into the global namespace as a
-  new loc N_L (unless N_L already exists).
+  new loc N_L (unless N_L already exists).  If A is not specified then
+  N_F is used.
 
   For `obj[flip]' if prefix P (syntax is that of an identifier) is
   specified, each other loc L inside O is exported into the global
index 342b73af5b115442c54bef45e273177e7054daef..d2da8c44e93e1c687c1952b829f109dc0cd76208 100755 (executable)
@@ -712,7 +712,10 @@ sub cmd__obj ($) {
     $obj_id= can(\&cva_idstr);
     if (defined $part_name) {
        $formal_id= can(\&cva_idstr);
-       $actual= can(\&cva_idex);
+       $actual= cano(\&cva_idex, undef);
+       if (!defined $actual) {
+           $actual= cva_idex("${part_name}_${formal_id}");
+       }
     } else {
        $actual= can(\&cva_idex);
        $formal_id= can(\&cva_idstr);
@@ -966,6 +969,7 @@ while (<>) {
     @al= split /\s+/, $_;
     next unless @al;
     print DEBUG "=== @al\n";
+    last if $al[0] eq 'eof';
     push @{ $ctx->{CmdLog} }, [ @al ] if exists $ctx->{CmdLog};
     cmd__one();
 }
index c4a8964d3048619a8d5029caaacc045e497b815e..b0c053d7d4010a310712eb433eb5765d81295f40 100644 (file)
@@ -1,7 +1,7 @@
 include(`parts.i4')
 
 abs midx_m 830 500 90
-obj cross_peco_l midx_m m midx_
+part midx cross_peco_l m
 
 abs dem_tljp_m 200 200 0
 obj pt_peco_mr dem_tljp_m c dem_tljp_