1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

lib/DtHelp: remove register keyword

This commit is contained in:
Jon Trulson 2018-06-27 14:19:02 -06:00
parent 2760adaab3
commit 5b5ac72691
15 changed files with 71 additions and 71 deletions

View file

@ -351,7 +351,7 @@ const char *
_DtHelpCeResolveSpcToAscii (
const char *spc_symbol)
{
register int i = 0;
int i = 0;
if (NULL == spc_symbol)
return NULL;

View file

@ -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 +/-

View file

@ -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;

View file

@ -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)
{

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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 ;

View file

@ -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 ;

View file

@ -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];

View file

@ -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;

View file

@ -87,7 +87,7 @@ _DtHelpResizeDisplayArea (
int columns )
{
int count = 0;
register int n;
int n;
unsigned long char_width;
Arg args[5];
Dimension newWidth;

View file

@ -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 */

View file

@ -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;

View file

@ -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 )