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

Diff of /stack/stack.c

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

revision 1.19 by masse, Sat Feb 2 14:50:44 2002 UTC revision 1.20 by masse, Sat Feb 2 15:12:56 2002 UTC
# Line 312  int stack_read(stackitem** stack_head, h Line 312  int stack_read(stackitem** stack_head, h
312    int itemp;    int itemp;
313    size_t inlength= strlen(in_line)+1;    size_t inlength= strlen(in_line)+1;
314    int convert= 0;    int convert= 0;
315      static int non_eval_flag= 0;
316    
317    temp= malloc(inlength);    temp= malloc(inlength);
318    rest= malloc(inlength);    rest= malloc(inlength);
# Line 341  int stack_read(stackitem** stack_head, h Line 342  int stack_read(stackitem** stack_head, h
342      /* If single char */      /* If single char */
343      if((convert= sscanf(in_line, "%c%[^\n\r]", temp, rest))) {      if((convert= sscanf(in_line, "%c%[^\n\r]", temp, rest))) {
344        if(*temp==';') {        if(*temp==';') {
345          eval(stack_head);               /* Evaluate top element */          if(non_eval_flag) {
346              eval(stack_head);             /* Evaluate top element */
347              break;
348            }
349            
350            push_ref(stack_head, in_hash, ";");
351          break;          break;
352        }        }
353    
354        if(*temp==']') {        if(*temp==']') {
355          push_ref(stack_head, in_hash, "[");          push_ref(stack_head, in_hash, "[");
356          pack(stack_head);          pack(stack_head);
357            non_eval_flag--;
358            break;
359          }
360    
361          if(*temp=='[') {
362            push_ref(stack_head, in_hash, "[");
363            non_eval_flag++;
364          break;          break;
365        }        }
366      }      }

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26