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

Diff of /stack/stack.c

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

revision 1.24 by masse, Sat Feb 2 19:30:07 2002 UTC revision 1.25 by masse, Sat Feb 2 20:06:11 2002 UTC
# Line 64  stackitem** hash(hashtbl in_hashtbl, con Line 64  stackitem** hash(hashtbl in_hashtbl, con
64    out_hash= out_hash%HASHTBLSIZE;    out_hash= out_hash%HASHTBLSIZE;
65    position= &(in_hashtbl[out_hash]);    position= &(in_hashtbl[out_hash]);
66    
67    while(position != NULL){    while(1){
68      if(*position==NULL)         /* If empty */      if(*position==NULL)         /* If empty */
69        return position;        return position;
70            
# Line 73  stackitem** hash(hashtbl in_hashtbl, con Line 73  stackitem** hash(hashtbl in_hashtbl, con
73    
74      position= &((*position)->next); /* Try next */      position= &((*position)->next); /* Try next */
75    }    }
   return NULL;                  /* end of list reached without finding  
                                    an empty position */  
76  }  }
77    
78  /* Generic push function. */  /* Generic push function. */
# Line 218  extern void print_(stackitem** stack_hea Line 216  extern void print_(stackitem** stack_hea
216      printf("\"%s\"", (char*)temp->content.ptr);      printf("\"%s\"", (char*)temp->content.ptr);
217      break;      break;
218    case symbol:    case symbol:
219      case func:
220      printf("%s", temp->id);      printf("%s", temp->id);
221      break;      break;
222    default:    default:

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26