Changeset View
Changeset View
Standalone View
Standalone View
kstars/skycomponents/starcomponent.cpp
Context not available. | |||||
471 | Trixel trixel = i; // = ( ( i >= 256 ) ? ( i - 256 ) : ( i + 256 ) ); | 471 | Trixel trixel = i; // = ( ( i >= 256 ) ? ( i - 256 ) : ( i + 256 ) ); | ||
---|---|---|---|---|---|
472 | for (unsigned long j = 0; j < (unsigned long)dataReader.getRecordCount(i); ++j) | 472 | for (unsigned long j = 0; j < (unsigned long)dataReader.getRecordCount(i); ++j) | ||
473 | { | 473 | { | ||
474 | if (!fread(&stardata, sizeof(starData), 1, dataFile)) | 474 | if (!fread(&stardata, sizeof(StarData), 1, dataFile)) | ||
475 | { | 475 | { | ||
476 | qDebug() << "FILE FORMAT ERROR: Could not read starData structure for star #" << j << " under trixel #" | 476 | qDebug() << "FILE FORMAT ERROR: Could not read StarData structure for star #" << j << " under trixel #" | ||
477 | << trixel << endl; | 477 | << trixel << endl; | ||
478 | } | 478 | } | ||
479 | 479 | | |||
Context not available. | |||||
639 | dataFile = m_DeepStarComponents.at(1)->getStarReader()->getFileHandle(); | 639 | dataFile = m_DeepStarComponents.at(1)->getStarReader()->getFileHandle(); | ||
640 | //KDE_fseek( dataFile, offset, SEEK_SET ); | 640 | //KDE_fseek( dataFile, offset, SEEK_SET ); | ||
641 | QT_FSEEK(dataFile, offset, SEEK_SET); | 641 | QT_FSEEK(dataFile, offset, SEEK_SET); | ||
642 | ret = fread(&stardata, sizeof(starData), 1, dataFile); | 642 | ret = fread(&stardata, sizeof(StarData), 1, dataFile); | ||
643 | if (m_DeepStarComponents.at(1)->getStarReader()->getByteSwap()) | 643 | if (m_DeepStarComponents.at(1)->getStarReader()->getByteSwap()) | ||
644 | { | 644 | { | ||
645 | byteSwap(&stardata); | 645 | byteSwap(&stardata); | ||
Context not available. | |||||
746 | } | 746 | } | ||
747 | } | 747 | } | ||
748 | 748 | | |||
749 | void StarComponent::byteSwap(starData *stardata) | 749 | void StarComponent::byteSwap(StarData *stardata) | ||
750 | { | 750 | { | ||
751 | stardata->RA = bswap_32(stardata->RA); | 751 | stardata->RA = bswap_32(stardata->RA); | ||
752 | stardata->Dec = bswap_32(stardata->Dec); | 752 | stardata->Dec = bswap_32(stardata->Dec); | ||
Context not available. |