[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: refdes_renum and pgskip





To keep my schematic from looking too ratty I split it across five
pages. While I have five pages of schematics, it is all for one card and
I want the part numbers to start at 1 and have no skips. Yet
refdes_renum is acting as though I had given it the --pgskip option even
though I hadn't.

I Googled around a bit to see if this was a known problem but found
nothing. When I realized that this is a Perl script, I decided to have a
look although I have never written any Perl code.

I found the following line after the command line options are processed:


# set the default increment for sheets unless( $pgskip ) { $pgskip = 100; }


This sets $pgskip to 100 if it is zero. Which means that this particular version will not let you do anything but skips.

By commenting this out, I got the desired results of no skips in the
numbers. But the default of skips by 100 for just the --pgskip  option
without a number is broken.

Version information from top of file:

# $Id: refdes_renum,v 1.2 2005/12/21 00:09:56 danmc Exp $

Installed from geda-install-20060124.iso



I keep meaning to learn Perl and even have a book but don't really know what I am doing. However, by looking up the documentation on the Getopt::Long module, I have found the fix:

Delete the failed attempt at setting a default.

Change "pgskip:i" => \$pgskip," at line 41 to "pgskip:100" => \$pgskip,"


By changing 'i' to the number '100', a default value is provided and the behavior is as desired.




--
David W. Schultz
http://home.earthlink.net/~david.schultz/

Just because you're constitutionally entitled to a personal opinion
doesn't mean you're constitutionally entitled to a professional opinion



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user