From 567771cbcc53f8005c90ed14b31132e7a13acc22 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 5 Nov 2024 13:48:44 +0100 Subject: [PATCH] ignore s3c2410.h in make pretty-code --- .clang-format | 2 -- Makefile | 2 +- src/x49gpng/ui.c | 16 ++++++++-------- src/x49gpng/ui.h | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.clang-format b/.clang-format index 126882a..c4ee43d 100644 --- a/.clang-format +++ b/.clang-format @@ -1,4 +1,3 @@ ---- Language: Cpp ColumnLimit: 140 IndentWidth: 4 @@ -56,4 +55,3 @@ BraceWrapping: SplitEmptyFunction: true SplitEmptyRecord: true SplitEmptyNamespace: true -... diff --git a/Makefile b/Makefile index 82dec1c..490cd41 100644 --- a/Makefile +++ b/Makefile @@ -194,7 +194,7 @@ mrproper: distclean # auto-format code pretty-code: - clang-format -i ./src/x49gpng/*.c ./src/x49gpng/*.h + clang-format -i ./src/x49gpng/*.c $(shell ls ./src/x49gpng/*.h | grep -v s3c2410.h) ## s3c2410.h triggers an error # Populate dist/firmware/ from hpcalc.org pull-firmware: diff --git a/src/x49gpng/ui.c b/src/x49gpng/ui.c index 3a1577c..981006d 100644 --- a/src/x49gpng/ui.c +++ b/src/x49gpng/ui.c @@ -1711,7 +1711,7 @@ static int draw_faceplate( GtkWidget* ui_background, GdkEventConfigure* event, g int dl = 0, dr = 0; int faceplate_color; - GdkPixmap* bg_pixmap; /* FIXME */ + GdkPixmap* bg_pixmap; /* FIXME */ if ( ui->calculator == UI_CALCULATOR_HP49GP || ui->calculator == UI_CALCULATOR_HP49GP_NEWRPL ) faceplate_color = UI_COLOR_FACEPLATE_49GP; @@ -1765,8 +1765,8 @@ static int draw_faceplate( GtkWidget* ui_background, GdkEventConfigure* event, g tiny_font_measure_text( key->right, &wr, &hr, &a, &dr ); if ( !key->left ) { xr = key->x + ( key->width - wr ) / 2; - tiny_font_draw_text( bg_pixmap, &ui->colors[ right_color ], ui->kb_x_offset + xr, - ui->kb_y_offset + key->y - hr + dr + 1, key->right ); + tiny_font_draw_text( bg_pixmap, &ui->colors[ right_color ], ui->kb_x_offset + xr, ui->kb_y_offset + key->y - hr + dr + 1, + key->right ); } } @@ -1799,8 +1799,8 @@ static int draw_faceplate( GtkWidget* ui_background, GdkEventConfigure* event, g tiny_font_measure_text( key->below, &wl, &hl, &a, &dl ); xl = key->x + ( key->width - wl ) / 2; - tiny_font_draw_text( bg_pixmap, &ui->colors[ below_color ], ui->kb_x_offset + xl, - ui->kb_y_offset + key->y + key->height + 2, key->below ); + tiny_font_draw_text( bg_pixmap, &ui->colors[ below_color ], ui->kb_x_offset + xl, ui->kb_y_offset + key->y + key->height + 2, + key->below ); } #if DEBUG_LAYOUT /* Debug Button Layout */ @@ -2117,9 +2117,9 @@ static int ui_load( x49gp_module_t* module, GKeyFile* keyfile ) gtk_event_box_set_above_child( GTK_EVENT_BOX( button->box ), false ); gtk_container_add( GTK_CONTAINER( button->box ), button->button ); - gtk_widget_set_size_request( button->box, ui_keys[ i ].width, ui_keys[ i ].height ); - gtk_fixed_put( GTK_FIXED( fixed_widgets_container ), button->box, ui->kb_x_offset + ui_keys[ i ].x, - ui->kb_y_offset + ui_keys[ i ].y ); + gtk_widget_set_size_request( button->box, ui_keys[ i ].width, ui_keys[ i ].height ); + gtk_fixed_put( GTK_FIXED( fixed_widgets_container ), button->box, ui->kb_x_offset + ui_keys[ i ].x, + ui->kb_y_offset + ui_keys[ i ].y ); g_signal_connect( G_OBJECT( button->button ), "button-press-event", G_CALLBACK( react_to_button_press ), button ); g_signal_connect( G_OBJECT( button->button ), "button-release-event", G_CALLBACK( react_to_button_release ), button ); diff --git a/src/x49gpng/ui.h b/src/x49gpng/ui.h index 7b7467d..1a2c536 100644 --- a/src/x49gpng/ui.h +++ b/src/x49gpng/ui.h @@ -117,7 +117,7 @@ struct __x49gp_ui_s__ { gint lcd_annunciators_height; }; -void gui_update_lcd(x49gp_t *x49gp); +void gui_update_lcd( x49gp_t* x49gp ); int gui_init( x49gp_t* x49gp ); void gui_show_error( x49gp_t* x49gp, const char* text );