home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_09
/
9n09104a
< prev
next >
Wrap
Text File
|
1991-07-09
|
737b
|
21 lines
long *datapointer;
int ticks, stopcount;
...
datapointer=(long *) malloc(stopcount*sizeof(long));
ticks=0;
while (ticks <=stopcount)
{ /*ERROR: Put last data
item off the end of the
malloc'd array while
processing a predefined
amount of incoming data
from a comm channel. */
if(dataready)
{ /* wait for data-ready signal */
*(datapointer + ticks) = process_data();
ticks++;
}
}