| 43 | extern "C" FILE* fopen_compressed(const char* filename, const char* mode, bool* piped); |
| 44 | |
| 45 | BOOL LASreaderPLY::open(const CHAR* file_name, U8 point_type, BOOL populate_header) |
| 46 | { |
| 47 | if (file_name == 0) |
| 48 | { |
| 49 | laserror("file name pointer is zero"); |
| 50 | return FALSE; |
| 51 | } |
| 52 | |
| 53 | FILE* file = fopen_compressed(file_name, "rb", &piped); |
| 54 | if (file == 0) |
| 55 | { |
| 56 | laserror("cannot open file '%s'", file_name); |
| 57 | return FALSE; |
| 58 | } |
| 59 | |
| 60 | if (setvbuf(file, NULL, _IOFBF, 10*LAS_TOOLS_IO_IBUFFER_SIZE) != 0) |
| 61 | { |
| 62 | LASMessage(LAS_WARNING, "setvbuf() failed with buffer size %d", 10*LAS_TOOLS_IO_IBUFFER_SIZE); |
| 63 | } |
| 64 | |
| 65 | return open(file, file_name, point_type, populate_header); |
| 66 | } |
| 67 | |
| 68 | BOOL LASreaderPLY::open(FILE* file, const CHAR* file_name, U8 point_type, BOOL populate_header) |
| 69 | { |
nothing calls this directly
no test coverage detected