Removed explicit usage of the 'register' keyword.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/127/head
Michele Calgaro 5 years ago
parent 234e466e0e
commit 8250c8e423
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -30,7 +30,7 @@ extern "C" void vm_statistics(task_t, vm_statistics_data_t*);
void KMemoryWidget::update()
{
int pageshift; /* log base 2 of the pagesize */
register int pagesize;
int pagesize;
vm_statistics_data_t vmstats;
int swap_pages=0,swap_free=0,i;
struct tbl_swapinfo swbuf;

@ -151,7 +151,7 @@ void KSMShutdownFeedback::slotPaintEffect()
m_unfadedImage = m_grayImage.copy();
register uchar * r = m_grayImage.bits();
uchar * r = m_grayImage.bits();
uchar * end = m_grayImage.bits() + m_grayImage.numBytes();
while ( r != end ) {
@ -225,7 +225,7 @@ void KSMShutdownFeedback::slotPaintEffect()
{
TQImage img( imgWidth, y2-start_y1, 32 );
memcpy( img.bits(), m_grayImage.scanLine( start_y1 ), ( y2-start_y1 ) * imgWidth * 4 );
register uchar * rd = img.bits();
uchar * rd = img.bits();
for( int y = start_y1; y < y2; ++y )
{
// linear gradients look bad, so use cos-function
@ -255,9 +255,9 @@ void KSMShutdownFeedback::slotPaintEffect()
m_unfadedImage = m_grayImage.copy();
register uchar * r = m_grayImage.bits();
register uchar * g = m_grayImage.bits() + 1;
register uchar * b = m_grayImage.bits() + 2;
uchar * r = m_grayImage.bits();
uchar * g = m_grayImage.bits() + 1;
uchar * b = m_grayImage.bits() + 2;
uchar * end = m_grayImage.bits() + m_grayImage.numBytes();
while ( r != end ) {
@ -340,12 +340,12 @@ void KSMShutdownFeedback::slotPaintEffect()
{
TQImage img( imgWidth, y2-start_y1, 32 );
memcpy( img.bits(), m_grayImage.scanLine( start_y1 ), ( y2-start_y1 ) * imgWidth * 4 );
register uchar * rs = m_unfadedImage.scanLine( start_y1 );
register uchar * gs = rs + 1;
register uchar * bs = gs + 1;
register uchar * rd = img.bits();
register uchar * gd = rd + 1;
register uchar * bd = gd + 1;
uchar * rs = m_unfadedImage.scanLine( start_y1 );
uchar * gs = rs + 1;
uchar * bs = gs + 1;
uchar * rd = img.bits();
uchar * gd = rd + 1;
uchar * bd = gd + 1;
for( int y = start_y1; y < y2; ++y )
{
// linear gradients look bad, so use cos-function
@ -395,7 +395,7 @@ void KSMShutdownFeedback::slotPaintEffect()
m_unfadedImage = m_grayImage.copy();
register uchar * r = m_grayImage.bits();
uchar * r = m_grayImage.bits();
uchar * end = m_grayImage.bits() + m_grayImage.numBytes();
while ( r != end ) {
@ -468,8 +468,8 @@ void KSMShutdownFeedback::slotPaintEffect()
if( y2 > start_y1 ) {
TQImage img( imgWidth, y2-start_y1, 32 );
memcpy( img.bits(), m_grayImage.scanLine( start_y1 ), ( y2-start_y1 ) * imgWidth * 4 );
register uchar * rs = m_unfadedImage.scanLine( start_y1 );
register uchar * rd = img.bits();
uchar * rs = m_unfadedImage.scanLine( start_y1 );
uchar * rd = img.bits();
for( int y = start_y1; y < y2; ++y )
{
// linear gradients look bad, so use cos-function

@ -212,15 +212,15 @@ long percentages(cnt, out, new, old, diffs)
int cnt;
int *out;
register long *new;
register long *old;
long *new;
long *old;
long *diffs;
{
register int i;
register long change;
register long total_change;
register long *dp;
int i;
long change;
long total_change;
long *dp;
long half_total;
/* initialization */

@ -170,7 +170,7 @@ int updateNetDev(void)
struct ifstats *istat;
struct timeval tv;
static LONGLONG timestamp=0;
register LONGLONG cts,elapsed;
LONGLONG cts,elapsed;
//struct ipstat ips;
if ((s=socket(PF_INET,SOCK_DGRAM,0)) < 0){

@ -150,7 +150,7 @@ static int updateProcess( pid_t pid ) {
char buf[BUFSIZE];
prpsinfo_t psinfo;
struct passwd *pw;
register double newCentStamp,timeDiff, usDiff,usTime;
double newCentStamp,timeDiff, usDiff,usTime;
struct timeval tv;
if( (ps = findProcessInList( pid )) == NULL ) {

@ -212,15 +212,15 @@ long percentages(cnt, out, new, old, diffs)
int cnt;
int *out;
register long *new;
register long *old;
long *new;
long *old;
long *diffs;
{
register int i;
register long change;
register long total_change;
register long *dp;
int i;
long change;
long total_change;
long *dp;
long half_total;
/* initialization */

@ -159,15 +159,15 @@ long percentages(cnt, out, new, old, diffs)
int cnt;
int *out;
register long *new;
register long *old;
long *new;
long *old;
long *diffs;
{
register int i;
register long change;
register long total_change;
register long *dp;
int i;
long change;
long total_change;
long *dp;
long half_total;
/* initialization */

@ -47,7 +47,7 @@ bool_t
xdr_fhandle(XDR *xdrs, fhandle objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_opaque(xdrs, objp, FHSIZE)) {
return (FALSE);
@ -59,7 +59,7 @@ bool_t
xdr_fhstatus(XDR *xdrs, fhstatus *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_u_int(xdrs, &objp->fhs_status)) {
return (FALSE);
@ -80,7 +80,7 @@ bool_t
xdr_dirpath(XDR *xdrs, dirpath *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_string(xdrs, objp, MNTPATHLEN)) {
return (FALSE);
@ -92,7 +92,7 @@ bool_t
xdr_name(XDR *xdrs, name *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_string(xdrs, objp, MNTNAMLEN)) {
return (FALSE);
@ -104,7 +104,7 @@ bool_t
xdr_mountlist(XDR *xdrs, mountlist *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct mountbody), (xdrproc_t)xdr_mountbody)) {
return (FALSE);
@ -116,7 +116,7 @@ bool_t
xdr_mountbody(XDR *xdrs, mountbody *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_name(xdrs, &objp->ml_hostname)) {
return (FALSE);
@ -134,7 +134,7 @@ bool_t
xdr_groups(XDR *xdrs, groups *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct groupnode), (xdrproc_t)xdr_groupnode)) {
return (FALSE);
@ -146,7 +146,7 @@ bool_t
xdr_groupnode(XDR *xdrs, groupnode *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_name(xdrs, &objp->gr_name)) {
return (FALSE);
@ -161,7 +161,7 @@ bool_t
xdr_exports(XDR *xdrs, exports *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct exportnode), (xdrproc_t)xdr_exportnode)) {
return (FALSE);
@ -173,7 +173,7 @@ bool_t
xdr_exportnode(XDR *xdrs, exportnode *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_dirpath(xdrs, &objp->ex_dir)) {
return (FALSE);
@ -191,7 +191,7 @@ bool_t
xdr_ppathcnf(XDR *xdrs, ppathcnf *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
int i=i;
@ -240,7 +240,7 @@ xdr_ppathcnf(XDR *xdrs, ppathcnf *objp)
}
else {
{ register short *genp;
{ short *genp;
for ( i = 0,genp=objp->pc_mask;
i < 2; i++){
IXDR_PUT_SHORT(buf,*genp++);
@ -294,7 +294,7 @@ xdr_ppathcnf(XDR *xdrs, ppathcnf *objp)
}
else {
{ register short *genp;
{ short *genp;
for ( i = 0,genp=objp->pc_mask;
i < 2; i++){
*genp++ = IXDR_GET_SHORT(buf);

@ -47,7 +47,7 @@ bool_t
xdr_nfsstat(XDR *xdrs, nfsstat *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_enum(xdrs, (enum_t *)objp)) {
return (FALSE);
@ -59,7 +59,7 @@ bool_t
xdr_ftype(XDR *xdrs, ftype *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_enum(xdrs, (enum_t *)objp)) {
return (FALSE);
@ -71,7 +71,7 @@ bool_t
xdr_nfs_fh(XDR *xdrs, nfs_fh *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
int i=i;
if (!xdr_opaque(xdrs, objp->data, NFS_FHSIZE)) {
@ -84,7 +84,7 @@ bool_t
xdr_nfstime(XDR *xdrs, nfstime *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_u_int(xdrs, &objp->seconds)) {
return (FALSE);
@ -99,7 +99,7 @@ bool_t
xdr_fattr(XDR *xdrs, fattr *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (xdrs->x_op == XDR_ENCODE) {
@ -274,7 +274,7 @@ bool_t
xdr_sattr(XDR *xdrs, sattr *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (xdrs->x_op == XDR_ENCODE) {
@ -365,7 +365,7 @@ bool_t
xdr_filename(XDR *xdrs, filename *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_string(xdrs, objp, NFS_MAXNAMLEN)) {
return (FALSE);
@ -377,7 +377,7 @@ bool_t
xdr_nfspath(XDR *xdrs, nfspath *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_string(xdrs, objp, NFS_MAXPATHLEN)) {
return (FALSE);
@ -389,7 +389,7 @@ bool_t
xdr_attrstat(XDR *xdrs, attrstat *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfsstat(xdrs, &objp->status)) {
return (FALSE);
@ -410,7 +410,7 @@ bool_t
xdr_sattrargs(XDR *xdrs, sattrargs *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfs_fh(xdrs, &objp->file)) {
return (FALSE);
@ -425,7 +425,7 @@ bool_t
xdr_diropargs(XDR *xdrs, diropargs *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfs_fh(xdrs, &objp->dir)) {
return (FALSE);
@ -440,7 +440,7 @@ bool_t
xdr_diropokres(XDR *xdrs, diropokres *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfs_fh(xdrs, &objp->file)) {
return (FALSE);
@ -455,7 +455,7 @@ bool_t
xdr_diropres(XDR *xdrs, diropres *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfsstat(xdrs, &objp->status)) {
return (FALSE);
@ -476,7 +476,7 @@ bool_t
xdr_readlinkres(XDR *xdrs, readlinkres *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfsstat(xdrs, &objp->status)) {
return (FALSE);
@ -497,7 +497,7 @@ bool_t
xdr_readargs(XDR *xdrs, readargs *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfs_fh(xdrs, &objp->file)) {
return (FALSE);
@ -518,7 +518,7 @@ bool_t
xdr_readokres(XDR *xdrs, readokres *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_fattr(xdrs, &objp->attributes)) {
return (FALSE);
@ -533,7 +533,7 @@ bool_t
xdr_readres(XDR *xdrs, readres *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfsstat(xdrs, &objp->status)) {
return (FALSE);
@ -554,7 +554,7 @@ bool_t
xdr_writeargs(XDR *xdrs, writeargs *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (xdrs->x_op == XDR_ENCODE) {
@ -634,7 +634,7 @@ bool_t
xdr_createargs(XDR *xdrs, createargs *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_diropargs(xdrs, &objp->where)) {
return (FALSE);
@ -649,7 +649,7 @@ bool_t
xdr_renameargs(XDR *xdrs, renameargs *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_diropargs(xdrs, &objp->from)) {
return (FALSE);
@ -664,7 +664,7 @@ bool_t
xdr_linkargs(XDR *xdrs, linkargs *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfs_fh(xdrs, &objp->from)) {
return (FALSE);
@ -679,7 +679,7 @@ bool_t
xdr_symlinkargs(XDR *xdrs, symlinkargs *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_diropargs(xdrs, &objp->from)) {
return (FALSE);
@ -697,7 +697,7 @@ bool_t
xdr_nfscookie(XDR *xdrs, nfscookie objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_opaque(xdrs, objp, NFS_COOKIESIZE)) {
return (FALSE);
@ -709,7 +709,7 @@ bool_t
xdr_readdirargs(XDR *xdrs, readdirargs *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfs_fh(xdrs, &objp->dir)) {
return (FALSE);
@ -727,7 +727,7 @@ bool_t
xdr_entry(XDR *xdrs, entry *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_u_int(xdrs, &objp->fileid)) {
return (FALSE);
@ -748,7 +748,7 @@ bool_t
xdr_dirlist(XDR *xdrs, dirlist *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_pointer(xdrs, (char **)&objp->entries, sizeof(entry), (xdrproc_t)xdr_entry)) {
return (FALSE);
@ -763,7 +763,7 @@ bool_t
xdr_readdirres(XDR *xdrs, readdirres *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfsstat(xdrs, &objp->status)) {
return (FALSE);
@ -784,7 +784,7 @@ bool_t
xdr_statfsokres(XDR *xdrs, statfsokres *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (xdrs->x_op == XDR_ENCODE) {
@ -868,7 +868,7 @@ bool_t
xdr_statfsres(XDR *xdrs, statfsres *objp)
{
register int32_t *buf=buf;
int32_t *buf=buf;
if (!xdr_nfsstat(xdrs, &objp->status)) {
return (FALSE);

@ -393,7 +393,7 @@ SetLocalAuthorization( struct display *d )
void
SetAuthorization( struct display *d )
{
register Xauth **auth = d->authorizations;
Xauth **auth = d->authorizations;
int i;
for (i = 0; i < d->authNum; i++) {
@ -925,7 +925,7 @@ DefineSelf( int fd, int file, int auth, int *ok )
int family;
struct utsname name;
register struct hostent *hp;
struct hostent *hp;
union {
struct sockaddr sa;

@ -550,7 +550,7 @@ registerBroadcastForPing( void )
BROADCAST_QUERY );
#else /* __GNU__ */
struct ifconf ifc;
register struct ifreq *ifr;
struct ifreq *ifr;
struct sockaddr broad_addr;
char buf[2048], *cp, *cplim;
# ifdef WINTCP /* NCR with Wollongong TCP */

@ -322,9 +322,9 @@ KdmItem::paint( TQPainter *p, const TQRect &rect )
TQImage lightVersion;
lightVersion = copy.convertToImage();
register uchar * r = lightVersion.bits();
register uchar * g = lightVersion.bits() + 1;
register uchar * b = lightVersion.bits() + 2;
uchar * r = lightVersion.bits();
uchar * g = lightVersion.bits() + 1;
uchar * b = lightVersion.bits() + 2;
uchar * end = lightVersion.bits() + lightVersion.numBytes();
while ( r != end ) {
@ -356,7 +356,7 @@ KdmItem::paint( TQPainter *p, const TQRect &rect )
TQImage img( myWidget->size(), 32 );
img = img.convertDepth(32);
img.setAlphaBuffer(true);
register uchar * rd = img.bits();
uchar * rd = img.bits();
for( int y = 0; y < img.height(); ++y )
{
for( short int x = 0; x < img.width(); ++x )

@ -1482,7 +1482,7 @@ void Client::imposeCachedShadow(TQPixmap &pixmap, TQRegion exposed)
void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded,
TQRegion exposed, int thickness, double maxOpacity)
{
register int distance, intersectCount, i, j, x, y;
int distance, intersectCount, i, j, x, y;
QRgb pixel;
double decay, factor, opacity;
int red, green, blue, pixelRed, pixelGreen, pixelBlue;

@ -593,16 +593,16 @@ TQPixmap *KeramikHandler::composite( TQImage *over, TQImage *under )
// Copy the under image (bottom aligned) to the destination image
for (int y1 = height - under->height(), y2 = 0; y1 < height; y1++, y2++ )
{
register TQ_UINT32 *dst = reinterpret_cast<TQ_UINT32*>( dest.scanLine(y1) );
register TQ_UINT32 *src = reinterpret_cast<TQ_UINT32*>( under->scanLine(y2) );
TQ_UINT32 *dst = reinterpret_cast<TQ_UINT32*>( dest.scanLine(y1) );
TQ_UINT32 *src = reinterpret_cast<TQ_UINT32*>( under->scanLine(y2) );
for ( int x = 0; x < width; x++ )
*(dst++) = *(src++);
}
// Blend the over image onto the destination
register TQ_UINT32 *dst = reinterpret_cast<TQ_UINT32*>( dest.bits() );
register TQ_UINT32 *src = reinterpret_cast<TQ_UINT32*>( over->bits() );
TQ_UINT32 *dst = reinterpret_cast<TQ_UINT32*>( dest.bits() );
TQ_UINT32 *src = reinterpret_cast<TQ_UINT32*>( over->bits() );
for ( int i = 0; i < width * height; i++ )
{
int r1 = tqRed( *dst ), g1 = tqGreen( *dst ), b1 = tqBlue( *dst );
@ -1155,13 +1155,13 @@ void KeramikClient::updateMask()
// over the pixels to compute the bounding rects from it.
TQRegion r;
register int w, y = 0;
int w, y = 0;
if ( TQApplication::reverseLayout() ) {
// If the caption bubble is visible and extends above the titlebar
if ( largeCaption && captionRect.width() >= 25 ) {
register int x = captionRect.left();
int x = captionRect.left();
w = captionRect.width();
r += TQRegion( x + 11, y++, w - 19, 1 );
r += TQRegion( x + 9, y++, w - 15, 1 );
@ -1188,7 +1188,7 @@ void KeramikClient::updateMask()
// If the caption bubble is visible and extends above the titlebar
if ( largeCaption && captionRect.width() >= 25 ) {
register int x = captionRect.left();
int x = captionRect.left();
w = captionRect.width();
r += TQRegion( x + 8, y++, w - 19, 1 );
r += TQRegion( x + 6, y++, w - 15, 1 );

@ -165,8 +165,8 @@ static void xreply_backtrace()
Status
_XReply (dpy, rep, extra, discard)
register Display *dpy;
register xReply *rep;
Display *dpy;
xReply *rep;
int extra; /* number of 32-bit words expected after the reply */
Bool discard; /* should I discard data following "extra" words? */
{

Loading…
Cancel
Save