static GDALDataset *OGRHTFDriverOpen( GDALOpenInfo* poOpenInfo ) { if( poOpenInfo->eAccess == GA_Update || poOpenInfo->fpL == NULL ) return NULL; if( strncmp((const char*)poOpenInfo->pabyHeader, "HTF HEADER", strlen("HTF HEADER")) != 0 ) return NULL; OGRHTFDataSource *poDS = new OGRHTFDataSource(); if( !poDS->Open( poOpenInfo->pszFilename ) ) { delete poDS; poDS = NULL; } return poDS; }
static GDALDataset *OGRHTFDriverOpen( GDALOpenInfo* poOpenInfo ) { if( poOpenInfo->eAccess == GA_Update || poOpenInfo->fpL == NULL ) return NULL; if( !STARTS_WITH( reinterpret_cast<char *>(poOpenInfo->pabyHeader), "HTF HEADER") ) return NULL; OGRHTFDataSource *poDS = new OGRHTFDataSource(); if( !poDS->Open( poOpenInfo->pszFilename ) ) { delete poDS; poDS = NULL; } return poDS; }