semantics.c

changeset 24
6575fcfbdb1b
parent 22
198616589af5
child 25
139b91f9a224
     1.1 diff -r 1fe64161aaac -r 6575fcfbdb1b semantics.c
     1.2 --- a/semantics.c	Mon Dec 31 08:25:04 2001 +0000
     1.3 +++ b/semantics.c	Mon Dec 31 08:25:04 2001 +0000
     1.4 @@ -42,13 +42,6 @@
     1.5  } input_image_t;
     1.6  
     1.7  
     1.8 -typedef struct bookmark_t
     1.9 -{
    1.10 -  struct bookmark_t *next;
    1.11 -  char *name;
    1.12 -} bookmark_t;
    1.13 -
    1.14 -
    1.15  typedef struct output_context_t
    1.16  {
    1.17    struct output_context_t *parent;
    1.18 @@ -84,6 +77,7 @@
    1.19  FILE *yyin;
    1.20  int line;  /* line number in spec file */
    1.21  
    1.22 +int bookmark_level;
    1.23  
    1.24  input_context_t *first_input_context;
    1.25  input_context_t *last_input_context;
    1.26 @@ -309,6 +303,7 @@
    1.27        return;
    1.28      }
    1.29  
    1.30 +  new_bookmark->level = bookmark_level;
    1.31    new_bookmark->name = name;
    1.32    if (last_output_context->first_bookmark)
    1.33      last_output_context->last_bookmark->next = new_bookmark;
    1.34 @@ -452,8 +447,7 @@
    1.35        if (page->bookmark_list)
    1.36  	{
    1.37  	  for (bookmark = page->bookmark_list; bookmark; bookmark = bookmark->next)
    1.38 -	    printf ("bookmark '%s' ", bookmark->name);
    1.39 -	  printf ("\n");
    1.40 +	    printf ("bookmark %d '%s'\n", bookmark->level, bookmark->name);
    1.41  	}
    1.42        for (i = page->range.first; i <= page->range.last; i++)
    1.43  	{