home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
s
/
sep91.zip
/
9N09104A
< prev
next >
Wrap
Text File
|
1991-07-10
|
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++;
}
}