Printing the current stack as a locator

Previous: Global variables: state ] [ Top: wftk core index ] [ Next: wftk core index ]

It's sort of silly to have this little function hanging around on its own page, but it doesn't really fit in anywhere else all that well. It's pretty obvious how this thing works, isn't it? You start at the bottom of the stack, and print location pieces as you move to the top.
 
void print_stack()
{
   FRAME * cur;
   for (cur = stack.next; cur != NULL; cur = cur->next) {
      if (cur != stack.next) printf (".");
      printf ("%s", cur->name);
      if (cur->offset_in_parent > 0) {
         printf ("(%d)", cur->offset_in_parent);
      }
   }
   printf ("\n");
}
Previous: Global variables: state ] [ Top: wftk core index ] [ Next: wftk core index ]


This code and documentation are released under the terms of the GNU license. They are additionally copyright (c) 2000, Vivtek. All rights reserved except those explicitly granted under the terms of the GNU license.