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 >
Wrap
C/C++ Source or Header
|
1996-11-18
|
779b
|
33 lines
#include <stdio.h>
#include "lock.h"
void pushlock(lock,ib,ie)
struct lockst lock[];
int ib;
int ie;
{
/*
this subroutine pushes down the lock structure
so that lock[ie-1] has what was formerly in lock[ie-2],
etc. The operation runs backwards until index ib. This
subroutine is normally called with ib=0 and ie=the size
of the array lock.
*/
int j;
for(j=ie-1; j>ib; j--)
{
lock[j].day=lock[j-1].day;
lock[j].fday=lock[j-1].fday;
lock[j].mode=lock[j-1].mode;
lock[j].x=lock[j-1].x;
lock[j].y=lock[j-1].y;
lock[j].d=lock[j-1].d;
lock[j].flags=lock[j-1].flags;
lock[j].waitn=lock[j-1].waitn;
lock[j].waitx=lock[j-1].waitx;
lock[j].errx=lock[j-1].errx;
lock[j].ybar=lock[j-1].ybar;
lock[j].sumerr=lock[j-1].sumerr;
}
}