Changeset 1ed15cd in mainline
- Timestamp:
- 2006-06-04T15:12:00Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3dd98c7a
- Parents:
- 759c376
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fb/ega.c
r759c376 r1ed15cd 156 156 int i; 157 157 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 ++)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 160 (((short *)scr_addr) + scr_width * scr_height - rows * scr_width) [i] = ((style << 8) + ' '); 161 161 } else if (rows < 0) { 162 162 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++)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 165 ((short *)scr_addr) [i] = ((style << 8 ) + ' '); 166 166 } … … 192 192 int i; 193 193 short *mem; 194 for (i=0 ;( i < MAX_SAVED_SCREENS ) && (saved_screens[i].data); i++);195 if (i == MAX_SAVED_SCREENS)194 for (i=0 ;( i < MAX_SAVED_SCREENS ) && (saved_screens[i].data); i++); 195 if (i == MAX_SAVED_SCREENS) 196 196 return EINVAL; 197 if (!(saved_screens[i].data=malloc( 2 * scr_width*scr_height )))197 if (!(saved_screens[i].data=malloc( 2 * scr_width*scr_height ))) 198 198 return ENOMEM; 199 memcpy (saved_screens[i].data,scr_addr, 2 * scr_width * scr_height)199 memcpy (saved_screens[i].data ,scr_addr ,2 * scr_width * scr_height) 200 200 ; 201 201 return i; … … 204 204 static int print_screen(int i) 205 205 { 206 if (saved_screens[i].data)207 memcpy (scr_addr,saved_screens[i].data,2*scr_width*scr_height);206 if (saved_screens[i].data) 207 memcpy (scr_addr,saved_screens[i].data, 2 * scr_width * scr_height); 208 208 else return EINVAL; 209 209 return i;
Note:
See TracChangeset
for help on using the changeset viewer.