From 0114ca3c970877d9245bf7bed6bd3409fee71aff Mon Sep 17 00:00:00 2001 From: Francesco Date: Tue, 6 Jan 2026 17:59:58 +0100 Subject: [PATCH] style: format file --- .clang-format | 12 ++++++------ src/methods.c | 6 ++++-- src/types.c | 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.clang-format b/.clang-format index 99db24e..f7cfc80 100644 --- a/.clang-format +++ b/.clang-format @@ -1,8 +1,8 @@ +BasedOnStyle: LLVM UseTab: Always -IndentWidth: 4 TabWidth: 4 -ColumnLimit: 0 -AllowAllParametersOfDeclarationOnNextLine: false -BreakBeforeBinaryOperators: None -SpacesInParentheses: false -BinPackParameters: true +IndentWidth: 4 +IndentCaseLabels: true +ColumnLimit: 120 +PointerAlignment: Right +AllowShortFunctionsOnASingleLine: None diff --git a/src/methods.c b/src/methods.c index 6c6fe99..2217dfb 100644 --- a/src/methods.c +++ b/src/methods.c @@ -265,7 +265,8 @@ tgbot_rc tgbot_get_me(tgbot_s *bot, tgbot_me_s *me) { return TGBOT_OK; } -tgbot_rc tgbot_send_message(tgbot_s *bot, int64_t chat_id, const char *text, const char *parse_mode, tgbot_inlinekeyboard_s *keyboard) { +tgbot_rc tgbot_send_message(tgbot_s *bot, int64_t chat_id, const char *text, const char *parse_mode, + tgbot_inlinekeyboard_s *keyboard) { char url[1024]; tgbot_json_option options[4] = { @@ -288,7 +289,8 @@ tgbot_rc tgbot_send_message(tgbot_s *bot, int64_t chat_id, const char *text, con return TGBOT_OK; } -tgbot_rc tgbot_edit_message_text(tgbot_s *bot, int64_t chat_id, long message_id, const char *text, tgbot_inlinekeyboard_s *keyboard) { +tgbot_rc tgbot_edit_message_text(tgbot_s *bot, int64_t chat_id, long message_id, const char *text, + tgbot_inlinekeyboard_s *keyboard) { char url[1024]; tgbot_json_option options[4] = { diff --git a/src/types.c b/src/types.c index dbc461d..cc741d0 100644 --- a/src/types.c +++ b/src/types.c @@ -32,7 +32,8 @@ tgbot_inlinekeyboardbutton_s *tgbot_inlinekb_button_at(tgbot_inlinekeyboard_s *k return &keyboard->buttons[row * keyboard->columns + column]; } -tgbot_rc tgbot_inlinekb_button(tgbot_inlinekeyboard_s *keyboard, size_t row, size_t column, const char *text, const char *url, const char *callback_data) { +tgbot_rc tgbot_inlinekb_button(tgbot_inlinekeyboard_s *keyboard, size_t row, size_t column, const char *text, + const char *url, const char *callback_data) { tgbot_inlinekeyboardbutton_s *button = tgbot_inlinekb_button_at(keyboard, row, column); strncpy(button->text, text, sizeof(button->text) - 1);