Changeset 1607:205ed6652931
- Timestamp:
- 03/02/10 15:10:14 (5 months ago)
- Branch:
- default
- Files:
-
- 3 edited
-
apps/lasinfo.c (modified) (1 diff)
-
include/liblas/capi/liblas.h (modified) (1 diff)
-
src/las_c_api.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
apps/lasinfo.c
r1584 r1607 103 103 for (i = 1; i < argc; i++) 104 104 { 105 if (strcmp(argv[i],"-h") == 0 || strcmp(argv[i],"--help") == 0) 105 if (strcmp(argv[i],"-v") == 0 || strcmp(argv[i],"--version") == 0) 106 { 107 char* ver = LAS_GetFullVersion(); 108 fprintf(stderr,"%s", ver); 109 free(ver); 110 exit(0); 111 } 112 else if (strcmp(argv[i],"-h") == 0 || strcmp(argv[i],"--help") == 0) 106 113 { 107 114 usage(); -
include/liblas/capi/liblas.h
r1566 r1607 128 128 */ 129 129 LAS_DLL char* LAS_GetVersion(void); 130 LAS_DLL char* LAS_GetFullVersion(void); 130 131 131 132 LAS_DLL int LAS_IsLibGeoTIFFEnabled(void); -
src/las_c_api.cpp
r1576 r1607 84 84 #endif 85 85 86 87 #ifdef HAVE_SPATIALINDEX 88 #include <spatialindex/Version.h> 89 #endif 90 86 91 #ifdef _WIN32 87 92 #define compare_no_case(a,b,n) _strnicmp( (a), (b), (n) ) … … 1526 1531 } 1527 1532 1528 LAS_DLL char * LAS_GetVersion() { 1529 1530 /* XXX - mloskot: I'd suggest to define PACKAGE_VERSION as static object 1531 and return safe const pointer, instead of newly allocated string. */ 1532 1533 /* FIXME - mloskot: Termporarily, I defined PACKAGE_VERSION 1534 in las_config.h to solve Visual C++ compilation (Ticket #23) */ 1535 1536 std::ostringstream output; 1537 1533 LAS_DLL char* LAS_GetVersion() { 1534 1538 1535 // output << LIBLAS_VERSION_MAJOR; 1539 1536 // output << "." << LIBLAS_VERSION_MINOR; 1540 1537 // output << "." << LIBLAS_VERSION_REV; 1541 1538 // output << "." << LIBLAS_VERSION_BUILD; 1542 output << LIBLAS_RELEASE_NAME; 1543 std::string out(output.str()); 1544 return strdup(out.c_str()); 1545 } 1546 1539 char const* version = LIBLAS_RELEASE_NAME; 1540 return strdup(version); 1541 } 1542 1543 LAS_DLL char* LAS_GetFullVersion(void) { 1544 1545 std::ostringstream os; 1546 #ifdef HAVE_LIBGEOTIFF 1547 os << " GeoTIFF " 1548 << (LIBGEOTIFF_VERSION / 1000) << '.' 1549 << (LIBGEOTIFF_VERSION / 100 % 10) << '.' 1550 << (LIBGEOTIFF_VERSION % 100 / 10); 1551 #endif 1552 #ifdef HAVE_GDAL 1553 os << " GDAL " << GDALVersionInfo("RELEASE_NAME"); 1554 #endif 1555 #ifdef HAVE_SPATIALINDEX 1556 os << " SpatialIndex " 1557 << SIDX_VERSION_MAJOR << '.' 1558 << SIDX_VERSION_MINOR << '.' 1559 << SIDX_VERSION_REV; 1560 #endif 1561 1562 std::string info(os.str()); 1563 os.str(""); 1564 os << "libLAS " << LIBLAS_RELEASE_NAME; 1565 if (!info.empty()) 1566 { 1567 os << " with" << info; 1568 } 1569 os << std::endl; 1570 1571 return strdup(os.str().c_str()); 1572 } 1547 1573 1548 1574
Note: See TracChangeset
for help on using the changeset viewer.
