home *** CD-ROM | disk | FTP | other *** search
/ nisttime.carsoncity.k12.mi.us / nisttime.carsoncity.k12.mi.us.tar / nisttime.carsoncity.k12.mi.us / pub / autolock / pushautolock.c < prev    next >
C/C++ Source or Header  |  2003-12-09  |  1KB  |  34 lines

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