From: Jon Trulson Date: Wed, 27 Jun 2018 20:19:02 +0000 (-0600) Subject: lib/DtHelp: remove register keyword X-Git-Tag: 2.3.0a~333 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5b5ac7269142f65448568cb1bc37b6c0482e2de1;p=oweals%2Fcde.git lib/DtHelp: remove register keyword --- diff --git a/cde/lib/DtHelp/AsciiSpc.c b/cde/lib/DtHelp/AsciiSpc.c index bf610ee3..29bf710b 100644 --- a/cde/lib/DtHelp/AsciiSpc.c +++ b/cde/lib/DtHelp/AsciiSpc.c @@ -351,7 +351,7 @@ const char * _DtHelpCeResolveSpcToAscii ( const char *spc_symbol) { - register int i = 0; + int i = 0; if (NULL == spc_symbol) return NULL; diff --git a/cde/lib/DtHelp/FormatMan.c b/cde/lib/DtHelp/FormatMan.c index 9e72c2ac..5b54fedb 100644 --- a/cde/lib/DtHelp/FormatMan.c +++ b/cde/lib/DtHelp/FormatMan.c @@ -168,7 +168,7 @@ GetNextState ( char **ret_str_ptr, Boolean *ret_flag ) { - register int i = len; + int i = len; /* check to see if we have the pattern of a bold + followed by a bold _ purpose is to eventually convert this to +/- diff --git a/cde/lib/DtHelp/FormatSDL.c b/cde/lib/DtHelp/FormatSDL.c index 437cd23b..ea8e3b6d 100644 --- a/cde/lib/DtHelp/FormatSDL.c +++ b/cde/lib/DtHelp/FormatSDL.c @@ -3297,23 +3297,23 @@ static int MaxSDLElements = sizeof (SdlElementList) / sizeof (SDLElementInfo); *****************************************************************************/ #define MyFree(x) if ((char *)(x) != NULL) free(x) #define SaveRestoreMask(x,y) \ - { register int myI;\ + { int myI;\ for (myI = 0; myI < SDL_MASK_LEN; myI++) \ x[myI] = y[myI]; \ } #define MergeMasks(x,y) \ - { register int myI;\ + { int myI;\ for (myI = 0; myI < SDL_MASK_LEN; myI++) \ x[myI] |= y[myI]; \ } #define RemoveMasks(x,y) \ - { register int myI;\ + { int myI;\ for (myI = 0; myI < SDL_MASK_LEN; myI++) \ x[myI] &= (~(y[myI])); \ } #define MaskToValue(x,y) \ - { register int myI;\ - register SDLMask myMask;\ + { int myI;\ + SDLMask myMask;\ for (myI = 0, y = 0; myI < SDL_MASK_LEN; myI++) \ if (x[myI] == 0) \ y += SDL_MASK_SIZE; \ @@ -3475,7 +3475,7 @@ FreeAttributes( ElementInfo *cur_info, _DtHelpFontHints *font_specs) { - register int i = 0; + int i = 0; const SDLElementAttrList *myList; const SDLAttribute *attrib; char *varOffset; diff --git a/cde/lib/DtHelp/FormatTerm.c b/cde/lib/DtHelp/FormatTerm.c index 7769f80f..914fe823 100644 --- a/cde/lib/DtHelp/FormatTerm.c +++ b/cde/lib/DtHelp/FormatTerm.c @@ -317,7 +317,7 @@ TermStrDraw ( pTerm->lines[y] = (wchar_t *) malloc (sizeof(wchar_t) * (length + 1)); if (pTerm->lines[y] != NULL) { - register int i; + int i; wcStr = pTerm->lines[y]; _DtHelpProcessLock(); @@ -340,7 +340,7 @@ TermStrDraw ( (sizeof(wchar_t) * (length + 1))); if (pTerm->lines[y] != NULL) { - register int i; + int i; wcStr = pTerm->lines[y]; _DtHelpProcessLock(); for (i = pTerm->wc_num[y]; i < x; i++) @@ -669,7 +669,7 @@ static void DeallocateHyperArray( DtHelpHyperLines *array_ptr ) { - register DtHelpHyperLines *next = array_ptr; + DtHelpHyperLines *next = array_ptr; if (array_ptr) { diff --git a/cde/lib/DtHelp/GifUtils.c b/cde/lib/DtHelp/GifUtils.c index 359cbab6..003928fe 100644 --- a/cde/lib/DtHelp/GifUtils.c +++ b/cde/lib/DtHelp/GifUtils.c @@ -360,7 +360,7 @@ static int LWZReadByte(byte **inbuf, int flag, int input_code_size, GifState *g) { int code, incode; - register int i; + int i; if (flag) { g->set_code_size = input_code_size; diff --git a/cde/lib/DtHelp/GlobSearch.c b/cde/lib/DtHelp/GlobSearch.c index 02ee92cd..ef572f49 100644 --- a/cde/lib/DtHelp/GlobSearch.c +++ b/cde/lib/DtHelp/GlobSearch.c @@ -549,7 +549,7 @@ static void AdjustPositionValues( NULL != fileList; fileList = _DtHelpFileListGetNext(NULL,fileList) ) { - register _DtHelpGlobSrchVol * vol=(_DtHelpGlobSrchVol *)fileList->clientData; + _DtHelpGlobSrchVol * vol=(_DtHelpGlobSrchVol *)fileList->clientData; if (vol->showVolInList && (vol->hitCnt > 0 || vol->zeroHitsOk) ) break; /* BREAK */ vol->nextVolPosition += adjNextAmount; @@ -564,7 +564,7 @@ static void AdjustPositionValues( NULL != fileList; fileList = _DtHelpFileListGetNext(NULL,fileList) ) { - register _DtHelpGlobSrchVol * vol = (_DtHelpGlobSrchVol *) fileList->clientData; + _DtHelpGlobSrchVol * vol = (_DtHelpGlobSrchVol *) fileList->clientData; if (vol) { vol->startPosition += adjStartAmount; @@ -888,7 +888,7 @@ static void HitListFree( _DtHelpGlobSrchVol * vol, Boolean freeHitsThemselves) { - register _DtHelpGlobSrchHit * hit; + _DtHelpGlobSrchHit * hit; if (NULL == vol) return; /* RETURN */ @@ -1129,7 +1129,7 @@ static int HitListAddFound ( NULL != next; prev = next, next = next->next ) { - register int ret; + int ret; /* do a NLS case insensitive compare using NLS collating */ if ( (ret = (*strcollfn)(next->indexEntry,indexEntry)) >= 0 ) @@ -1209,7 +1209,7 @@ static int CountSelectedVolumes ( NULL != volListHead; volListHead = _DtHelpFileListGetNext(NULL, volListHead) ) { - register _DtHelpGlobSrchVol * vol; + _DtHelpGlobSrchVol * vol; /* get the volume info */ vol = (_DtHelpGlobSrchVol *) volListHead->clientData; @@ -1244,7 +1244,7 @@ static _DtHelpFileEntry GetNextSearchFileAndDisplayCompleted( NULL != curFile; curFile = _DtHelpFileListGetNext(NULL, curFile) ) { - register _DtHelpGlobSrchVol * vol; + _DtHelpGlobSrchVol * vol; vol = (_DtHelpGlobSrchVol *) curFile->clientData; if (NULL == vol) continue; /* CONTINUE */ @@ -2187,7 +2187,7 @@ static void DeleteListContents( NULL != curFile; curFile = _DtHelpFileListGetNext(NULL,curFile) ) { - register _DtHelpGlobSrchVol * vol = (_DtHelpGlobSrchVol *) curFile->clientData; + _DtHelpGlobSrchVol * vol = (_DtHelpGlobSrchVol *) curFile->clientData; if (NULL == vol) continue; /* CONTINUE */ /* if any hits are displayed and any have open topics, @@ -2195,7 +2195,7 @@ static void DeleteListContents( if ( vol->hitsDisplayed && ((vol->nextVolPosition - vol->startPosition) != vol->hitCnt) ) { - register _DtHelpGlobSrchHit * hit; + _DtHelpGlobSrchHit * hit; for ( hit = vol->hitListHead; NULL != hit; hit = hit->next) @@ -2375,7 +2375,7 @@ static void ResultsListUpdate( NULL != testFile; testFile = _DtHelpFileListGetNext(NULL,testFile) ) { - register _DtHelpGlobSrchVol * vol; + _DtHelpGlobSrchVol * vol; vol = (_DtHelpGlobSrchVol *)testFile->clientData; if (vol && vol->showVolInList && (vol->hitCnt > 0 || vol->zeroHitsOk)) break; /* BREAK */ @@ -2923,7 +2923,7 @@ static void SearchFile( DtHelpDialogWidget hw, _DtHelpFileEntry file) { - register _DtHelpGlobSrchVol * vol; + _DtHelpGlobSrchVol * vol; /* get volume info, adding if necessary */ vol = (_DtHelpGlobSrchVol *) file->clientData; @@ -3213,7 +3213,7 @@ static void StartSelectedVolumeSearchCB( NULL != file; file = _DtHelpFileListGetNext(NULL,file) ) { - register _DtHelpGlobSrchVol * vol; + _DtHelpGlobSrchVol * vol; vol = (_DtHelpGlobSrchVol *) file->clientData; if (NULL == vol) continue; diff --git a/cde/lib/DtHelp/Graphics.c b/cde/lib/DtHelp/Graphics.c index 0a540567..62251681 100644 --- a/cde/lib/DtHelp/Graphics.c +++ b/cde/lib/DtHelp/Graphics.c @@ -322,11 +322,11 @@ static enum _DtGrLoadStatus processXwd( int *ret_num_colors, _DtGrContext *context); static void _swaplong ( - register char *bp, - register unsigned n ); + char *bp, + unsigned n ); static void _swapshort ( - register char *bp, - register unsigned n ); + char *bp, + unsigned n ); static int XwdFileToPixmap ( Display *dpy, int screen, @@ -471,11 +471,11 @@ static int new_registry_count = 0; static void _swapshort ( - register char *bp, - register unsigned n ) + char *bp, + unsigned n ) { - register char c; - register char *ep = bp + n; + char c; + char *ep = bp + n; while (bp < ep) { c = *bp; @@ -487,12 +487,12 @@ _swapshort ( static void _swaplong ( - register char *bp, - register unsigned n ) + char *bp, + unsigned n ) { - register char c; - register char *ep = bp + n; - register char *sp; + char c; + char *ep = bp + n; + char *sp; while (bp < ep) { sp = bp + 3; @@ -823,8 +823,8 @@ Do_Pseudo( unsigned long **ret_colors, int *ret_number ) { - register int i, x, y, colorCount = 0; - register XColor *color; + int i, x, y, colorCount = 0; + XColor *color; int result = 0; Pixel pixel; @@ -921,7 +921,7 @@ Do_Direct( unsigned long **ret_colors, int *ret_number ) { - register int x, y; + int x, y; XColor color; unsigned long rmask, gmask, bmask; int rshift = 0, gshift = 0, bshift = 0; @@ -1092,9 +1092,9 @@ XwdFileToPixmap ( int *ret_number ) { int result; - register int i; + int i; XImage in_image, *out_image; - register char *buffer; + char *buffer; unsigned long swaptest = 1; int count; unsigned buffer_size; diff --git a/cde/lib/DtHelp/HelpDialog.c b/cde/lib/DtHelp/HelpDialog.c index 52492b61..3fdc57dd 100644 --- a/cde/lib/DtHelp/HelpDialog.c +++ b/cde/lib/DtHelp/HelpDialog.c @@ -1082,9 +1082,9 @@ static void MenuBarFix( XmGeoMajorLayout layoutPtr, XmKidGeometry rowPtr ) { - register Dimension marginW ; - register Dimension marginH ; - register Dimension twoMarginW ; + Dimension marginW ; + Dimension marginH ; + Dimension twoMarginW ; marginW = geoSpec->margin_w ; @@ -1146,8 +1146,8 @@ XmGeoMatrix _DtHelpDialogWidgetGeoMatrixCreate( DtHelpDialogWidget hw = (DtHelpDialogWidget) wid ; XmGeoMatrix geoSpec ; - register XmGeoRowLayout layoutPtr ; - register XmKidGeometry boxPtr ; + XmGeoRowLayout layoutPtr ; + XmKidGeometry boxPtr ; geoSpec = _XmGeoMatrixAlloc( TB_MAX_WIDGETS_VERT, TB_MAX_NUM_WIDGETS, 0) ; geoSpec->composite = (Widget) hw ; diff --git a/cde/lib/DtHelp/HelpQuickD.c b/cde/lib/DtHelp/HelpQuickD.c index 636a9fca..db25991f 100644 --- a/cde/lib/DtHelp/HelpQuickD.c +++ b/cde/lib/DtHelp/HelpQuickD.c @@ -1164,9 +1164,9 @@ static void MenuBarFix( #endif XmKidGeometry rowPtr ) { - register Dimension marginW ; - register Dimension marginH ; - register Dimension twoMarginW ; + Dimension marginW ; + Dimension marginH ; + Dimension twoMarginW ; marginW = geoSpec->margin_w ; @@ -1231,8 +1231,8 @@ SeparatorFix( XmGeoMajorLayout layoutPtr, /* unused */ XmKidGeometry rowPtr ) { - register Dimension marginW ; - register Dimension twoMarginW ; + Dimension marginW ; + Dimension twoMarginW ; marginW = geoSpec->margin_w ; twoMarginW = (marginW << 1) ; @@ -1289,8 +1289,8 @@ XmGeoMatrix _DtHelpQuickDialogWidgetGeoMatrixCreate( DtHelpQuickDialogWidget qw = (DtHelpQuickDialogWidget) wid ; XmGeoMatrix geoSpec ; - register XmGeoRowLayout layoutPtr ; - register XmKidGeometry boxPtr ; + XmGeoRowLayout layoutPtr ; + XmKidGeometry boxPtr ; XmKidGeometry firstButtonBox ; #ifdef NOTDONE int fix_menubar = False ; diff --git a/cde/lib/DtHelp/JpegUtils.c b/cde/lib/DtHelp/JpegUtils.c index a80d1cf8..2cf357a9 100644 --- a/cde/lib/DtHelp/JpegUtils.c +++ b/cde/lib/DtHelp/JpegUtils.c @@ -350,9 +350,9 @@ static void copy_pixels( djpeg_dest_ptr dinfo, JDIMENSION rows_supplied) { - register int pixval; - register JSAMPROW ptr; - register JDIMENSION col; + int pixval; + JSAMPROW ptr; + JDIMENSION col; ximg_dest_ptr dest = (ximg_dest_ptr) dinfo; ptr = dest->pub.buffer[0]; diff --git a/cde/lib/DtHelp/Layout.c b/cde/lib/DtHelp/Layout.c index 1f570d34..8d262619 100644 --- a/cde/lib/DtHelp/Layout.c +++ b/cde/lib/DtHelp/Layout.c @@ -1680,7 +1680,7 @@ ResolveCell( int max_rows, CellInfo *ret_info) { - register int i; + int i; char *id; char *idRefs; char *ptr; @@ -1909,7 +1909,7 @@ ResolveCell( */ if (retWidth > cellWidth) { - register int j; + int j; _DtCvUnit cellMax; _DtCvUnit maxSlop; _DtCvUnit value; @@ -2826,7 +2826,7 @@ DetermineMaxDims( _DtCvUnit *bot_height, _DtCvUnit *max_width) { - register int j; + int j; _DtCvUnit topWidth; _DtCvUnit botWidth; diff --git a/cde/lib/DtHelp/Resize.c b/cde/lib/DtHelp/Resize.c index c5d14a21..5ca62279 100644 --- a/cde/lib/DtHelp/Resize.c +++ b/cde/lib/DtHelp/Resize.c @@ -87,7 +87,7 @@ _DtHelpResizeDisplayArea ( int columns ) { int count = 0; - register int n; + int n; unsigned long char_width; Arg args[5]; Dimension newWidth; diff --git a/cde/lib/DtHelp/StringFuncs.c b/cde/lib/DtHelp/StringFuncs.c index bbb64199..8d12e432 100644 --- a/cde/lib/DtHelp/StringFuncs.c +++ b/cde/lib/DtHelp/StringFuncs.c @@ -487,9 +487,9 @@ _DtHelpCeUpperCase ( char *string ) int _DtHelpCeStrHashToKey( const char * str) { - register char c; - register const char * tstr; - register int key = 0; + char c; + const char * tstr; + int key = 0; if (!str) return 0; /* RETURN */ diff --git a/cde/lib/DtHelp/XInterface.c b/cde/lib/DtHelp/XInterface.c index aff1a2b9..c6dc351d 100644 --- a/cde/lib/DtHelp/XInterface.c +++ b/cde/lib/DtHelp/XInterface.c @@ -1820,7 +1820,7 @@ _DtHelpDAResolveSpc ( _DtCvUnit *ret_height, _DtCvUnit *ret_ascent) { - register int i = 0; + int i = 0; int result = -1; long fontIdx; long spcTbIdx = 0; diff --git a/cde/lib/DtHelp/decompress.c b/cde/lib/DtHelp/decompress.c index ff7ae347..0f08b00c 100644 --- a/cde/lib/DtHelp/decompress.c +++ b/cde/lib/DtHelp/decompress.c @@ -191,9 +191,9 @@ static int BufCompressedFill (BufFilePtr f) { CompressedFile *file; - register char_type *stackp, *de_stack; - register char_type finchar; - register code_int code, oldcode, incode; + char_type *stackp, *de_stack; + char_type finchar; + code_int code, oldcode, incode; BufChar *buf, *bufend; file = (CompressedFile *) f->hidden; @@ -286,10 +286,10 @@ static char_type rmask[9] = {0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xf static code_int getcode(CompressedFile *file) { - register code_int code; - register int r_off, bits; - register char_type *bp = file->buf; - register BufFilePtr raw; + code_int code; + int r_off, bits; + char_type *bp = file->buf; + BufFilePtr raw; if ( file->clear_flg > 0 || file->offset >= file->size || file->free_ent > file->maxcode )