#include "lasfileio.h"
size_t c_fwrite ( const void *buf, size_t size, size_t count, FILE *stream )
Pointer to a buffer of data to write to the output file. The data is converted from the local byte order to big endian byte order before writing.
Specifies the size, in bytes, of each element write to the file. This is limited to be 1, 2, 4, or 8 bytes to match the sizes of standard data types.
Specifies the number of elements of size bytes to write to the file.
Pointer to the file to write. This file should be opened by the standard C fopen call.
All data files for LAS are written using big endian byte order. This is the byte order used by Mips, Sparc, and Motorola processors. The c_fwrite() routine is the equivalent of the standard C fwrite routine that will perform byte swapping on platforms that use little endian byte order.
c_fwrite() returns the number of items successfully written. If an error occurs the return value is a short item count. E_FAIL (-1) may be returned if the size or count parameters are invalid.