From:
[email protected]
[Thanks. To keep a record in the Debian BTS it is enough to CC
[email protected] (see CC in this message).]
I'm not familiar to SCCS, but from your patch it seems that SCCS files
are always stored in an SCCS directory. If this is right, I some little problems with your patch. However, I'm CCing David, sloccount's author,
so that he can comment.
A couple of comments by me:
* From my understanding of how make_filelists work, I find that "skip"
is used to store the value of the "--skip" command line parameter.
Therefore, using that variable would mean that it would be overided if
---skip is used (maybe concatenating instead of assigning in line 68,
but that would imply some other changes):
--skip) shift
skip="$1"
shift;;
However, this wouldn't work (if I read the code well) for SCCS dirs not
right under the dir being counted, since on line 105 you can see how it
is only used for dirs right under "basedir":
base=`basename "$possible_dir"`
if [ "$base" = "$skip" ]
then
continue
fi
* I guess that your patch to the "find" line works for second level and
lower SCCS directories, but wouldn't work for first level SCCS dirs. The
"skip" thing would make that work, but only in case --skip is not used.
All in all, I'd suggest:
- Convert "skip" into a list, and initialize it to "SCSS"
- Addd (instead of overriding) the --skip parameters to this list
- Skip all first level dirs in the "skip" list
- Change the "find" line as you propose
David, how do you see this?
I can do the patching if you are busy and find this solution reasonable.
Saludos,
Jesus.
On Fri, 2004-08-13 at 15:08, Tim Timmerman wrote:
Jesus,
Sorry, on some broken platform that doesn't allow me to use the
formal bug tracking system
I did some experimenting with respect to SCCS files in Sloccount..
The following worked for me..
diff sloccount-2.24/make_filelists sloccount-2.24-asml/make_filelists
23c23
< skip=""
---
skip="SCCS"
82a83
echo "Base is $base, skip = $skip\n";
111c112
< find "$dir" $follow -type f -print > "${childname}/filelist"
---
find "$dir" $follow -name SCCS -prune -o -type f -print > "${childname}/filelist"
I'm not sure about the usefulness of the "skip" setting.. Don't
think it makes any difference.
Hope this helps
TimT.
--
[email protected] 040-2683613
[email protected] Voodoo Programmer/Keeper of the Rubber Chicken
Why do banks charge you a "non-sufficient funds fee" on money they
already know you don't have?
--
To UNSUBSCRIBE, email to
[email protected]
with a subject of "unsubscribe". Trouble? Contact
[email protected]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)