home *** CD-ROM | disk | FTP | other *** search
/ nisttime.carsoncity.k12.mi.us / nisttime.carsoncity.k12.mi.us.tar / nisttime.carsoncity.k12.mi.us / pub / lockclock / pushlock.c < prev    next >
C/C++ Source or Header  |  1996-11-18  |  779b  |  33 lines

  1. #include <stdio.h>
  2. #include "lock.h"
  3. void pushlock(lock,ib,ie)
  4. struct lockst lock[];
  5. int ib;
  6. int ie;
  7. {
  8. /*
  9.     this subroutine pushes down the lock structure 
  10.     so that lock[ie-1] has what was formerly in lock[ie-2],
  11.     etc.  The operation runs backwards until index ib.  This
  12.     subroutine is normally called with ib=0 and ie=the size
  13.     of the array lock.
  14.  
  15. */
  16. int j;
  17.     for(j=ie-1; j>ib; j--)
  18.        {
  19.        lock[j].day=lock[j-1].day;
  20.        lock[j].fday=lock[j-1].fday;
  21.        lock[j].mode=lock[j-1].mode;
  22.        lock[j].x=lock[j-1].x;
  23.        lock[j].y=lock[j-1].y;
  24.        lock[j].d=lock[j-1].d;
  25.        lock[j].flags=lock[j-1].flags;
  26.        lock[j].waitn=lock[j-1].waitn;
  27.        lock[j].waitx=lock[j-1].waitx;
  28.        lock[j].errx=lock[j-1].errx;
  29.        lock[j].ybar=lock[j-1].ybar;
  30.        lock[j].sumerr=lock[j-1].sumerr;
  31.     }
  32. }
  33.