diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-30 20:17:39 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-30 23:52:46 +0900 |
commit | 21d827376c477f21f95fd10111ce695a9aefaf0d (patch) | |
tree | ac88e4da730aea8e7318db0fa0db7d5a7ee0c68e | |
parent | 0ed8473f338323c34cde57d298eff60ae197e40d (diff) | |
download | tdeedu-21d827376c477f21f95fd10111ce695a9aefaf0d.tar.gz tdeedu-21d827376c477f21f95fd10111ce695a9aefaf0d.zip |
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit e70e355046de896bf68539f2301f09d93a1f97f7)
-rw-r--r-- | kstars/kstars/fitsimage.cpp | 4 | ||||
-rw-r--r-- | kstars/kstars/fitsprocess.cpp | 2 | ||||
-rw-r--r-- | kstars/kstars/fitsviewer.cpp | 8 | ||||
-rw-r--r-- | kstars/kstars/indi/base64.c | 2 | ||||
-rw-r--r-- | kstars/kstars/indi/celestronprotocol.c | 2 | ||||
-rw-r--r-- | kstars/kstars/indi/fitsrw.c | 26 | ||||
-rw-r--r-- | kstars/kstars/skymap.cpp | 6 | ||||
-rw-r--r-- | kstars/kstars/skymapdraw.cpp | 20 |
8 files changed, 35 insertions, 35 deletions
diff --git a/kstars/kstars/fitsimage.cpp b/kstars/kstars/fitsimage.cpp index 7751dd3b..ee2d0eb1 100644 --- a/kstars/kstars/fitsimage.cpp +++ b/kstars/kstars/fitsimage.cpp @@ -230,8 +230,8 @@ int FITSImage::loadFits (const char *filename) FITS_HDU_LIST *hdl; // TODO add KStars options for transformation FITS_PIX_TRANSFORM trans; - register unsigned char *dest; - //register unsigned char *tempBuffer; + unsigned char *dest; + //unsigned char *tempBuffer; unsigned char *data; int i, j; double a, b; diff --git a/kstars/kstars/fitsprocess.cpp b/kstars/kstars/fitsprocess.cpp index b785050d..717650fe 100644 --- a/kstars/kstars/fitsprocess.cpp +++ b/kstars/kstars/fitsprocess.cpp @@ -29,7 +29,7 @@ #include "fitsviewer.h" #include "fitsimage.h" - #define ELEM_SWAP(a,b) { register float t=(a);(a)=(b);(b)=t; } + #define ELEM_SWAP(a,b) { float t=(a);(a)=(b);(b)=t; } FITSProcess::FITSProcess(FITSViewer *parent, TQStringList darkFiles, TQStringList flatFiles, TQStringList darkflatFiles, int darkMode, int flatMode, int darkflatMode) { diff --git a/kstars/kstars/fitsviewer.cpp b/kstars/kstars/fitsviewer.cpp index 135c5cad..b054c940 100644 --- a/kstars/kstars/fitsviewer.cpp +++ b/kstars/kstars/fitsviewer.cpp @@ -260,10 +260,10 @@ float * FITSViewer::loadData(const char *filename, float *buffer) FITS_FILE *ifp; FITS_HDU_LIST *hdulist; unsigned char *tempData, *tempDataPtr; - register FITS_BITPIX16 pixval_16 =0; - register FITS_BITPIX32 pixval_32 =0; - register FITS_BITPIXM32 pixval_m32 =0; - register FITS_BITPIXM64 pixval_m64 =0; + FITS_BITPIX16 pixval_16 =0; + FITS_BITPIX32 pixval_32 =0; + FITS_BITPIXM32 pixval_m32 =0; + FITS_BITPIXM64 pixval_m64 =0; int totalCount; int width, height, bpp, bitpix; diff --git a/kstars/kstars/indi/base64.c b/kstars/kstars/indi/base64.c index 28424512..f2e840e4 100644 --- a/kstars/kstars/indi/base64.c +++ b/kstars/kstars/indi/base64.c @@ -87,7 +87,7 @@ int from64tobits(char *out, const char *in) { int len = 0; - register unsigned char digit1, digit2, digit3, digit4; + unsigned char digit1, digit2, digit3, digit4; do { do {digit1 = *in++;} while (isspace(digit1)); diff --git a/kstars/kstars/indi/celestronprotocol.c b/kstars/kstars/indi/celestronprotocol.c index 03342f71..b656b683 100644 --- a/kstars/kstars/indi/celestronprotocol.c +++ b/kstars/kstars/indi/celestronprotocol.c @@ -777,7 +777,7 @@ int sec; * error. */ static int telstat(fd,sec,usec) -register int fd, sec, usec; +int fd, sec, usec; { int ret; int width; diff --git a/kstars/kstars/indi/fitsrw.c b/kstars/kstars/indi/fitsrw.c index b21622bf..388a7fa9 100644 --- a/kstars/kstars/indi/fitsrw.c +++ b/kstars/kstars/indi/fitsrw.c @@ -335,7 +335,7 @@ static void fits_delete_hdulist (FITS_HDU_LIST *hl) int fits_nan_32 (unsigned char *v) -{register unsigned long k; +{unsigned long k; k = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3]; k &= 0x7fffffff; /* Dont care about the sign bit */ @@ -366,7 +366,7 @@ int fits_nan_32 (unsigned char *v) int fits_nan_64 (unsigned char *v) -{register unsigned long k; +{unsigned long k; k = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3]; k &= 0x7fffffff; /* Dont care about the sign bit */ @@ -1159,7 +1159,7 @@ err_return: static int fits_eval_pixrange (FILE *fp, FITS_HDU_LIST *hdu) -{register unsigned int maxelem; +{unsigned int maxelem; #define FITSNPIX 4096 unsigned char pixdat[FITSNPIX]; unsigned int nelem, bpp; @@ -1174,8 +1174,8 @@ static int fits_eval_pixrange (FILE *fp, FITS_HDU_LIST *hdu) switch (hdu->bitpix) { case 8: { - register FITS_BITPIX8 pixval; - register unsigned char *ptr; + FITS_BITPIX8 pixval; + unsigned char *ptr; FITS_BITPIX8 minval = 255, maxval = 0; FITS_BITPIX8 blankval; @@ -1217,8 +1217,8 @@ static int fits_eval_pixrange (FILE *fp, FITS_HDU_LIST *hdu) break; } case 16: { - register FITS_BITPIX16 pixval; - register unsigned char *ptr; + FITS_BITPIX16 pixval; + unsigned char *ptr; FITS_BITPIX16 minval = 0x7fff, maxval = ~0x7fff; while (nelem > 0) @@ -1262,8 +1262,8 @@ static int fits_eval_pixrange (FILE *fp, FITS_HDU_LIST *hdu) case 32: { - register FITS_BITPIX32 pixval; - register unsigned char *ptr; + FITS_BITPIX32 pixval; + unsigned char *ptr; FITS_BITPIX32 minval = 0x7fffffff, maxval = ~0x7fffffff; while (nelem > 0) @@ -1306,8 +1306,8 @@ static int fits_eval_pixrange (FILE *fp, FITS_HDU_LIST *hdu) break; } case -32: { - register FITS_BITPIXM32 pixval; - register unsigned char *ptr; + FITS_BITPIXM32 pixval; + unsigned char *ptr; FITS_BITPIXM32 minval, maxval; int first = 1; @@ -1348,8 +1348,8 @@ static int fits_eval_pixrange (FILE *fp, FITS_HDU_LIST *hdu) break; } case -64: { - register FITS_BITPIXM64 pixval; - register unsigned char *ptr; + FITS_BITPIXM64 pixval; + unsigned char *ptr; FITS_BITPIXM64 minval, maxval; int first = 1; diff --git a/kstars/kstars/skymap.cpp b/kstars/kstars/skymap.cpp index 4117ef61..f236be0a 100644 --- a/kstars/kstars/skymap.cpp +++ b/kstars/kstars/skymap.cpp @@ -203,7 +203,7 @@ SkyObject* SkyMap::objectNearest( SkyPoint *p ) { //test RA and dec to see if this star is roughly nearby - for ( register unsigned int i=0; i<data->starList.count(); ++i ) { + for ( unsigned int i=0; i<data->starList.count(); ++i ) { SkyObject *test = (SkyObject *)data->starList.at(i); double dRA = test->ra()->Hours() - p->ra()->Hours(); @@ -323,11 +323,11 @@ SkyObject* SkyMap::objectNearest( SkyPoint *p ) { int icust_min = -1; int icust_cat = -1; - for ( register unsigned int j=0; j< data->CustomCatalogs.count(); ++j ) { + for ( unsigned int j=0; j< data->CustomCatalogs.count(); ++j ) { if ( Options::showCatalog()[j] ) { TQPtrList<SkyObject> catList = data->CustomCatalogs.at(j)->objList(); - for ( register unsigned int i=0; i<catList.count(); ++i ) { + for ( unsigned int i=0; i<catList.count(); ++i ) { //test RA and dec to see if this object is roughly nearby SkyObject *test = (SkyObject *)catList.at(i); double dRA = test->ra()->Hours()-p->ra()->Hours(); diff --git a/kstars/kstars/skymapdraw.cpp b/kstars/kstars/skymapdraw.cpp index 278bb24d..ff7150f8 100644 --- a/kstars/kstars/skymapdraw.cpp +++ b/kstars/kstars/skymapdraw.cpp @@ -283,7 +283,7 @@ void SkyMap::drawMilkyWay( TQPainter& psky, double scale ) psky.setBrush( TQBrush( TQColor( data->colorScheme()->colorNamed( "MWColor" ) ) ) ); bool offscreen, lastoffscreen=false; - for ( register unsigned int j=0; j<11; ++j ) { + for ( unsigned int j=0; j<11; ++j ) { if ( Options::fillMilkyWay() ) { ptsCount = 0; bool partVisible = false; @@ -308,7 +308,7 @@ void SkyMap::drawMilkyWay( TQPainter& psky, double scale ) psky.moveTo( o.x(), o.y() ); - for ( register unsigned int i=1; i<data->MilkyWay[j].count(); ++i ) { + for ( unsigned int i=1; i<data->MilkyWay[j].count(); ++i ) { o = getXY( data->MilkyWay[j].at(i), Options::useAltAz(), Options::useRefraction(), scale ); if (o.x()==-10000000 && o.y()==-10000000) offscreen = true; else offscreen = false; @@ -335,7 +335,7 @@ void SkyMap::drawCoordinateGrid( TQPainter& psky, double scale ) psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "GridColor" ) ), 1, DotLine ) ); //change to GridColor //First, the parallels - for ( register double Dec=-80.; Dec<=80.; Dec += 20. ) { + for ( double Dec=-80.; Dec<=80.; Dec += 20. ) { bool newlyVisible = false; sp->set( 0.0, Dec ); if ( Options::useAltAz() ) sp->EquatorialToHorizontal( data->LST, data->geo()->lat() ); @@ -345,7 +345,7 @@ void SkyMap::drawCoordinateGrid( TQPainter& psky, double scale ) psky.moveTo( o.x(), o.y() ); double dRA = 1./5.; //120 points along full circle of RA - for ( register double RA=dRA; RA<24.; RA+=dRA ) { + for ( double RA=dRA; RA<24.; RA+=dRA ) { sp->set( RA, Dec ); if ( Options::useAltAz() ) sp->EquatorialToHorizontal( data->LST, data->geo()->lat() ); @@ -382,7 +382,7 @@ void SkyMap::drawCoordinateGrid( TQPainter& psky, double scale ) } //next, the meridians - for ( register double RA=0.; RA<24.; RA += 2. ) { + for ( double RA=0.; RA<24.; RA += 2. ) { bool newlyVisible = false; SkyPoint *sp1 = new SkyPoint( RA, -90. ); if ( Options::useAltAz() ) sp1->EquatorialToHorizontal( data->LST, data->geo()->lat() ); @@ -391,7 +391,7 @@ void SkyMap::drawCoordinateGrid( TQPainter& psky, double scale ) psky.moveTo( o.x(), o.y() ); double dDec = 1.; - for ( register double Dec=-89.; Dec<=90.; Dec+=dDec ) { + for ( double Dec=-89.; Dec<=90.; Dec+=dDec ) { sp1->set( RA, Dec ); if ( Options::useAltAz() ) sp1->EquatorialToHorizontal( data->LST, data->geo()->lat() ); @@ -763,7 +763,7 @@ void SkyMap::drawHorizon( TQPainter& psky, double scale ) //Use the TQPtrList of points to pre-sort visible horizon points if ( o.x() > -100 && o.x() < Width + 100 && o.y() > -100 && o.y() < Height + 100 ) { if ( Options::useAltAz() ) { - register unsigned int j; + unsigned int j; for ( j=0; j<points.count(); ++j ) { if ( o.x() < points.at(j)->x() ) { found = true; @@ -842,7 +842,7 @@ void SkyMap::drawHorizon( TQPainter& psky, double scale ) pts->setPoint( 0, points.at(0)->x(), points.at(0)->y() ); if ( Options::showHorizon() ) psky.moveTo( points.at(0)->x(), points.at(0)->y() ); - for ( register unsigned int i=1; i<points.count(); ++i ) { + for ( unsigned int i=1; i<points.count(); ++i ) { pts->setPoint( i, points.at(i)->x(), points.at(i)->y() ); if ( Options::showHorizon() ) { @@ -908,7 +908,7 @@ void SkyMap::drawHorizon( TQPainter& psky, double scale ) psky.drawPolygon( ( const TQPointArray ) *pts, false, 0, ptsCount ); //remove all items in points list - for ( register unsigned int i=0; i<points.count(); ++i ) { + for ( unsigned int i=0; i<points.count(); ++i ) { points.remove(i); } } @@ -1364,7 +1364,7 @@ void SkyMap::drawDeepSkyObjects( TQPainter& psky, double scale ) } //Draw Custom Catalogs - for ( register unsigned int i=0; i<data->CustomCatalogs.count(); ++i ) { + for ( unsigned int i=0; i<data->CustomCatalogs.count(); ++i ) { if ( Options::showCatalog()[i] ) { TQPtrList<SkyObject> cat = data->CustomCatalogs.at(i)->objList(); |