Text File

Aharpo.514 net.ucds utzoo!decvax!ucbvax!mhtsa!mhuxt!cbosg!harpo!jea Fri Apr 9 10:36:06 1982 CDM fix CDM fix description follows ...

If you use the macro feature of ucds, you have probably encountered an annoying "feature" concerning unused parameters. If, for example, you have a general purpose macro with 3 output pins two of which are used in one occurrence and the third which is used in another occurrence, you will get an error message such as the following: % NAME(TYPE) XXX unused parameter Now it also generates a line in the output (stdout) and resultant .wx like this: .o XXX; XXX Which causes the place program to go to never-never land. Don't dispair! A "solution" (patch) can be achieved with the following program.

Oh, yea. This program also takes I/O connector names and strips their name back to the base name. This is necessary since the board descriptions have only the base name and will not be recognized otherwise. For example, if within macro1 you connect to I/O connector TNconn pin 1, then the name for that TNconn in the .wx file will be stripped from macro1/TNconn down to TNconn (as it appears in the .wb file).

######################################################################## # THIS PROGRAM RUNS CDM AND STRIPS ERRONEOUS OUTPUT FROM THE RESULT FILE # The standard output is sent to .wx # The error output goes to CDMERR # Error output less "unused parameter" messages is saved in stderr # # Warnings, rather than error messages, are used for unused pins # on macros. # # I/O connector names are stripped back to the base names to # correspond to the names that will appear in the # board (.wb) description. # # Lines with semi-colons are removed, since these result from # occurrences of unused parameters.

echo ":cdm $* 2>CDMERR >.wx" cdm $* 2>CDMERR >.wx trap 'cat stderr' 0;trap 'exit 1' 1 2 3 15

awk '/unused par/{if ( $1 == "%" ) print "% Warning: Parameter",$3,"is not used in",$2; else print "% Warning: Parameter",$2,"is not used in",$1} !/unused par/{print $0 >"stderr"}' CDMERR;

echo 'g;^\(\.o[ ][ ]*\)[^ ]*/;s;;\1; g/^\.o[ ].*;/d w q' | ed - .wx

----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen <jgoerzen@complete.org> of http://communication.ucsd.edu/A-News/

This Usenet Oldnews Archive article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.