make pretty-code

This commit is contained in:
Gwenhael Le Moine 2023-09-07 16:30:44 +02:00
parent 58a77bde4b
commit 0f6d0a358b
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
7 changed files with 878 additions and 1152 deletions

View file

@ -11,7 +11,7 @@
#include "hp48.h"
#include "hp48emu.h"
#include "timer.h"
#include "x48.h" /* adjust_contrast(); ann_struct_t; DISP_ROWS; NIBS_PER_BUFFER_ROW */
#include "x48.h" /* adjust_contrast(); ann_struct_t; DISP_ROWS; NIBS_PER_BUFFER_ROW */
saturn_t saturn;
@ -187,7 +187,7 @@ static inline void draw_nibble( int c, int r, int val ) {
if ( r <= display.lines )
x -= disp.offset;
y = r; // y: start in pixels
y = r; // y: start in pixels
val &= 0x0f;
if ( val != lcd_buffer[ r ][ c ] ) {
@ -417,7 +417,6 @@ void draw_annunc( void ) {
else
XClearArea( dpy, disp.win, ann_tbl[ i ].x, ann_tbl[ i ].y,
ann_tbl[ i ].width, ann_tbl[ i ].height, False );
}
refresh_icon();
@ -444,19 +443,17 @@ void update_display( void ) {
if ( display.on ) {
addr = display.disp_start;
if ( display.offset != old_offset ) {
memset(
disp_buf, 0xf0,
( size_t )( ( display.lines + 1 ) * NIBS_PER_BUFFER_ROW ) );
memset(
lcd_buffer, 0xf0,
( size_t )( ( display.lines + 1 ) * NIBS_PER_BUFFER_ROW ) );
memset( disp_buf, 0xf0,
( size_t )( ( display.lines + 1 ) * NIBS_PER_BUFFER_ROW ) );
memset( lcd_buffer, 0xf0,
( size_t )( ( display.lines + 1 ) * NIBS_PER_BUFFER_ROW ) );
old_offset = display.offset;
}
if ( display.lines != old_lines ) {
memset( &disp_buf[ 56 ][ 0 ], 0xf0,
( size_t )( 8 * NIBS_PER_BUFFER_ROW ) );
( size_t )( 8 * NIBS_PER_BUFFER_ROW ) );
memset( &lcd_buffer[ 56 ][ 0 ], 0xf0,
( size_t )( 8 * NIBS_PER_BUFFER_ROW ) );
( size_t )( 8 * NIBS_PER_BUFFER_ROW ) );
old_lines = display.lines;
}
for ( i = 0; i <= display.lines; i++ ) {

View file

@ -4,7 +4,7 @@
#include "hp48.h"
#include "hp48emu.h"
#include "timer.h"
#include "x48.h" /* disp; refresh_display(); get_ui_event() */
#include "x48.h" /* disp; refresh_display(); get_ui_event() */
extern int throttle;
@ -2425,5 +2425,5 @@ void emulate( void ) {
}
if ( schedule_event-- <= 0 )
schedule();
} while (1);
} while ( 1 );
}

View file

@ -10,7 +10,7 @@
#include "options.h"
#include "hp48.h"
#include "hp48emu.h"
#include "x48.h" /* ShowConnections() */
#include "x48.h" /* ShowConnections() */
static int wire_fd;
static int ir_fd;

View file

@ -6,7 +6,7 @@
#include "hp48emu.h"
#include "romio.h"
#include "timer.h"
#include "x48.h" /* disp; refresh_display(); get_ui_event() */
#include "x48.h" /* disp; refresh_display(); get_ui_event() */
static int interrupt_called = 0;
extern long nibble_masks[ 16 ];

View file

@ -7,7 +7,7 @@
#include "hp48.h"
#include "hp48emu.h"
#include "romio.h"
#include "x48.h" /* disp */
#include "x48.h" /* disp */
#include "options.h"
extern int device_check;

1999
src/x48.c

File diff suppressed because it is too large Load diff

View file

@ -360,7 +360,7 @@ void get_resources( void ) {
resetOnStartup = 0;
throttle = 0;
serialLine = "/dev/ttyS0" ;
serialLine = "/dev/ttyS0";
romFileName = "rom.dump";