84 if (this->file) this->file =
file;
92 fprintf(stderr,
"ERROR: file name pointer is zero\n");
96 file = fopen(file_name,
"wb");
100 fprintf(stderr,
"ERROR: cannot open file '%s'\n", file_name);
104 if (setvbuf(
file,
NULL, _IOFBF, io_buffer_size) != 0)
106 fprintf(stderr,
"WARNING: setvbuf() failed with buffer size %u\n", io_buffer_size);
122 fprintf(stderr,
"ERROR: file pointer is zero\n");
129 if(_setmode( _fileno( stdout ), _O_BINARY ) == -1 )
131 fprintf(stderr,
"ERROR: cannot set stdout to binary (untranslated) mode\n");
149 fprintf(stderr,
"ERROR: ByteStreamOut pointer is zero\n");
156 fprintf(stderr,
"ERROR: LASheader pointer is zero\n");
162 this->version = 20020715;
166 this->version = 20010712;
235 rgba[0] = point->
rgb[0]/256;
236 rgba[1] = point->
rgb[1]/256;
237 rgba[2] = point->
rgb[2]/256;
261 fprintf(stderr,
"ERROR: stream not seekable. cannot update header from %I64d to %I64d points.\n",
npoints,
p_count);
263 fprintf(stderr,
"ERROR: stream not seekable. cannot update header from %lld to %lld points.\n",
npoints,
p_count);