Thomas Bryan - 2001-08-25

Logged In: YES
user_id=1197

Submitted by Jeroen van der Zijp on Thu, 22 Jul 1999
07:43:43 -0500

I have traced the problem into the loop :

foreach $inputfile (@inputfiles) {

$sdesc_marker=$SDESC_MARKER;
$user_marker=$USER_MARKER;
$user_delim=$USER_DELIM;
$global_marker=$GLOBAL_MARKER;
$global_equals=$GLOBAL_EQUALS;

open(INPUT,"<$inputfile");
while(<INPUT>) {
if ($inputfile ne $oldinput) {

......

What seems to happen is when multiple header files
are being scanned I loose one line or so from the
top of the second file.

I have a comment block there like

/*******
* *
*******/

And since I loose the /***** the parser gets
derailed.

For the moment, I've replaced this routine with:

foreach $inputfile (@inputfiles) {

$sdesc_marker=$SDESC_MARKER;
$user_marker=$USER_MARKER;
$user_delim=$USER_DELIM;
$global_marker=$GLOBAL_MARKER;
$global_equals=$GLOBAL_EQUALS;

@fdata=stat("$inputfile");

open(INPUT,"<$inputfile");
$buffer="";
while (<INPUT>) {
$buffer.=$_;
}

#
# Clear Global Variables
#
foreach $gb (keys(%global)) {
$global{$gb}="";
}

if ($buffer) {
&PROCINPUT($fdata[9]);
}
}

Although this of course does not recurse down the
directories....

Also, I have a suggestion:

a statement like {break}

would be very useful in some situations like below:

{foreach protected}
{if func}
Protected member functions:
{break}
{endif}
{next protected}

The idea is to output the string "Protected member
functions:" only once.

Having a {break} would be very useful in order to
generate some output af= ter bracketing with a lot
if conditionals.

Note I can not use {if first} as the first
protected may not be a function.

{break} may be implemented through an extra return
value from GENTEXT which is passed up until the
nearest for loop. I believe it should be quite
easy to add.

Otherwise, I'm getting the hang of it, and I like
it. Please keep up the good work.

- Jeroen