(GCOS8 only)
status = _wblock(fp,buf,nbytes,seek);
"_wblock" performs a binary write operation on a random or sequential disk file.
If "_wblock" gets an end-of-file status on the output stream, it attempts to grow the file enough to hold the data, provided that the write operation was exactly at the end of the file. If the grow is successful, the remainder of the write is reissued. If the grow fails, "_wblock" does not make a second attempt at growing the file.
For a random disk file, "seek" must be a non-zero multiple of 4*64 (since there are four bytes in each word and 64 words in a sector). There is no limit on the amount of data you can write.
Also for a random disk file, "nbytes" should be a multiple of 4*64. If "nbytes" is not a multiple of 320*4, the hardware fills out the last sector with zeroes, and the remaining sectors of the last llink are left untouched. For random files, "nbytes" must be less than 256*1024*4.
For a sequential disk file, "seek" must be a multiple of 4*320 and "nbytes" must be less than or equal to 63*4*320 (63 llinks). The file pointer will be advanced by (words+319)/320 llinks (where "words" is the number of words written, normally "nbytes/4").
For a tape, "nbytes" must be 12 or greater.
Copyright © 1996, Thinkage Ltd.