/[cvs]/stack/stack.c
ViewVC logotype

Diff of /stack/stack.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by masse, Mon Jan 7 23:35:37 2002 UTC revision 1.5 by teddy, Tue Jan 8 00:03:16 2002 UTC
# Line 236  extern void print(stackitem** stack_head Line 236  extern void print(stackitem** stack_head
236    if((*stack_head)==NULL)    if((*stack_head)==NULL)
237      return;      return;
238    
239    if((*stack_head)->type==value)    switch((*stack_head)->type){
240      case value:
241      printf("%d", (*stack_head)->content.val);      printf("%d", (*stack_head)->content.val);
242    else if((*stack_head)->type==string)      break;
243      case string:
244      printf("%s", (char*)(*stack_head)->content.ptr);      printf("%s", (char*)(*stack_head)->content.ptr);
245    else      break;
246      case symbol:
247        printf("%s", (*stack_head)->id);
248      case ref:
249      default:
250      printf("%p", (*stack_head)->content.ptr);      printf("%p", (*stack_head)->content.ptr);
251        break;
252      }
253    
254    toss(stack_head);    toss(stack_head);
255  }  }
# Line 251  extern void nl() Line 259  extern void nl()
259    printf("\n");    printf("\n");
260  }  }
261    
262    extern void quit()
263    {
264      exit(EXIT_SUCCESS);
265    }
266    
267  int main()  int main()
268  {  {
269    stackitem* s= NULL;    stackitem* s= NULL;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26