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

Diff of /stack/stack.c

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

revision 1.8 by masse, Tue Jan 8 14:17:33 2002 UTC revision 1.10 by masse, Tue Jan 8 17:31:27 2002 UTC
# Line 128  int push_ref(stackitem** stack_head, has Line 128  int push_ref(stackitem** stack_head, has
128    new_item->content.ptr= *hash(in_hash, in_string);    new_item->content.ptr= *hash(in_hash, in_string);
129    new_item->type= ref;    new_item->type= ref;
130    
   if(handle==NULL)  
     handle= dlopen(NULL, RTLD_LAZY);  
   
131    if(new_item->content.ptr==NULL) {    if(new_item->content.ptr==NULL) {
132        if(handle==NULL)
133          handle= dlopen(NULL, RTLD_LAZY);    
134    
135      symbol= dlsym(handle, in_string);      symbol= dlsym(handle, in_string);
136      if(dlerror()==NULL)      if(dlerror()==NULL)
137        def_func(in_hash, symbol, in_string);        def_func(in_hash, symbol, in_string);
# Line 308  extern void expand(stackitem** stack_hea Line 308  extern void expand(stackitem** stack_hea
308    *stack_head= new_head;    *stack_head= new_head;
309  }  }
310    
311    extern void swap(stackitem** stack_head)
312    {
313      stackitem* temp= (*stack_head);
314      
315      if((*stack_head)==NULL || (*stack_head)->next==NULL)
316        return;
317    
318      *stack_head= (*stack_head)->next;
319      temp->next= (*stack_head)->next;
320      (*stack_head)->next= temp;
321    }
322    
323  extern void quit()  extern void quit()
324  {  {
325    exit(EXIT_SUCCESS);    exit(EXIT_SUCCESS);
# Line 328  int main() Line 340  int main()
340      printf("okidok\n ");      printf("okidok\n ");
341    }    }
342    
343      exit(EXIT_SUCCESS);
   return EXIT_SUCCESS;  
344  }  }
345    
346  /* Local Variables: */  /* Local Variables: */

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26