Heh. Yeah, I already implemented option 3 on my laptop. I'll play around with it for a while & put it in CVS tomorrow.
As for documentation: I know it's kinda lame, but I do keep a log of changes made and their reasons in the code itself: gnetlist/scheme/gnet-spice-sdb.scm. The code is also fairly well commented. ALso, "gnetlist -h" gives you all command line flags, including my new -e flag. I *do* agree that I need to update the SPICE stuff on my webpages. I have lots more to say about, e.g. gnucap. However, it must wait until I have the free time. Stuart > > Ohhh what tangled webs we weave. If you do this Stuart please document > it extensively so that others reading the code will understand why you > are doing something so convoluted. > > Thanks, > > Steve M. > > > Stuart Brorson wrote: > > >Hi Peter -- > > > > > >>Hi Stuart, > >> > >>when you ask for my opinion, here it is: > >> > >> > >> > >> > >>>gnetlist -I -g spice-sdb foo.sch > >>> > >>>The -I flag tells gnetlist to not put the contents of any file into > >>>the netlist, but rather just put a ".include foo.bar" directive in the > >>>deck. (Note that I don't think I have tested this on .include > >>>directives, so if it does the wrong thing, please let me know. > >>> > >>> > >>> > >>Revert this behaviour. By default, write only the .include line and when > >>using: > >> > >>gnetlist -I -g spice-sdb foo.sch > >> > >>Include the model to the spice input file. > >> > >> > > > >I could do this, but there is a snag: The -I flag is really meant to > >control the behavior of .model and .subckt cards. By default the > >contents of a .model or .subckt file gets dumped into the main SPICE > >deck *unless* you specify the -I flag. As a correlary, it will also > >control the behavior of the ".include" symbol. > > > >Therefore, I don't want to invert the logic of the -I flag without > >more thought since it impacts the behavior of things beyond the > >.include symbol. > > > >The problem is that ".include" is both a SPICE statement (command), > >and a gschem symbol. It is one of the only SPICE commands which also > >has a gschem symbol; most other SPICE commands are entered exclusively > >by manually sticking them into a SPICE-directive symbol. Since users > >see the .include symbol in the SPICE symbols lib, they assume that it > >generates a .include statement, but it instead embedds the named file. > >I probably exascerbated this by labeling the symbol ".include", when I > >really meant "embedd external file". > > > >Moving forward, here is another suggestion: > > > >3. Borrowing a riff from you, Peter, I could make the default behavior > >of the .include symbol to just write out the string ".include > >foo.bar". Then I can add a gnetlist flag, say -e, which will force > >all .include symbols to embedd the external file into > >the SPICE deck. > > > >This creates the desired effect (i.e. stick a ".include foo.bar" into > >the netlist by default) while not messing around with spice-sdb's > >behavior with .model and .subckt cards. What do you think? > > > >Stuart > > > > > > > > > > > > > >