Changeset 759c376 in mainline


Ignore:
Timestamp:
2006-06-04T15:06:14Z (19 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1ed15cd
Parents:
7bc1e74
Message:

Coding style repair

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fb/ega.c

    r7bc1e74 r759c376  
    156156        int i;
    157157        if (rows > 0) {
    158                 memcpy(scr_addr,((char *)scr_addr)+rows*scr_width*2,scr_width*scr_height*2-rows*scr_width*2);
    159                 for(i=0;i<rows*scr_width;i++)
    160                         (((short *)scr_addr)+scr_width*scr_height-rows*scr_width)[i]=((style<<8)+' ');
     158                memcpy(scr_addr,((char *)scr_addr) + rows * scr_width * 2, scr_width * scr_height * 2 - rows * scr_width * 2);
     159                for(i = 0; i < rows * scr_width ; i ++)
     160                        (((short *)scr_addr) + scr_width * scr_height - rows * scr_width) [i] = ((style << 8) + ' ');
    161161        } else if (rows < 0) {
    162162
    163                 memcpy(((char *)scr_addr)-rows*scr_width*2,scr_addr,scr_width*scr_height*2+rows*scr_width*2);
    164                 for(i=0;i<-rows*scr_width;i++)
    165                         ((short *)scr_addr)[i]=((style<<8)+' ');
     163                memcpy(((char *)scr_addr) - rows * scr_width * 2 ,scr_addr ,scr_width * scr_height * 2 + rows * scr_width * 2);
     164                for( i = 0; i < - rows * scr_width ; i++)
     165                        ((short *)scr_addr) [i] = ((style << 8 ) + ' ');
    166166        }
    167167}
     
    192192        int i;
    193193        short *mem;
    194         for(i=0;(i<MAX_SAVED_SCREENS)&&(saved_screens[i].data);i++);
    195         if(i==MAX_SAVED_SCREENS) return EINVAL;
    196         if(!(saved_screens[i].data=malloc(2*scr_width*scr_height))) return ENOMEM;
    197         memcpy(saved_screens[i].data,scr_addr,2*scr_width*scr_height);
     194        for( i=0 ;( i < MAX_SAVED_SCREENS ) && (saved_screens[i].data); i++);
     195        if( i == MAX_SAVED_SCREENS)
     196                return EINVAL;
     197        if(!(saved_screens[i].data=malloc( 2 * scr_width*scr_height )))
     198                return ENOMEM;
     199        memcpy(saved_screens[i].data,scr_addr, 2 * scr_width * scr_height )
     200                ;
    198201        return i;
    199202}
Note: See TracChangeset for help on using the changeset viewer.