Re: load_zones

From: Mike Breuer (mbreuer@new.rr.com)
Date: 04/17/02


> That is, it behaves like:
>
>   while (get_line(fl, buf)) {
>     if ((strchr("MOPGERD", buf[0]) && buf[1] == ' ') || (buf[0] == 'S'
&&
> buf[1] == '\0'))
>       num_of_cmds++;
>
>   rewind(fl);
>   }
>
> even though it is written like:
>
>   while (get_line(fl, buf)) {
>     if ((strchr("MOPGERD", buf[0]) && buf[1] == ' ') || (buf[0] == 'S'
&&
> buf[1] == '\0'))
>       num_of_cmds++;
>   }
>   rewind(fl);
>
>
> What am I not understanding here?

load_zones() is called for each zone file.  If you are setting a
breakpoint on the "while" line in the debugger, it is very likely
getting back there when it goes to read the next file.  Check to see if
the FILE pointer (fl) is changing when it appears to jump back to the
top of the while loop, or set more strategic breakpoints so you can
verify the behavior.  If that's not it, then I'd have to see more code.

Mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT