[BACK]Return to stack.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / dc

Diff for /src/usr.bin/dc/stack.c between version 1.4 and 1.5

version 1.4, 2003/10/18 20:34:26 version 1.5, 2003/11/04 08:10:06
Line 116 
Line 116 
         stack_push(stack, stack_dup_value(value, &copy));          stack_push(stack, stack_dup_value(value, &copy));
 }  }
   
   void
   stack_swap(struct stack *stack)
   {
           struct value    copy;
   
           if (stack->sp < 1) {
                   warnx("stack empty");
                   return;
           }
           copy = stack->stack[stack->sp];
           stack->stack[stack->sp] = stack->stack[stack->sp-1];
           stack->stack[stack->sp-1] = copy;
   }
   
 static void  static void
 stack_grow(struct stack *stack)  stack_grow(struct stack *stack)
 {  {

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