1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-09-28 02:25:35 +02:00

format fixes

This commit is contained in:
jfreegman 2019-12-07 23:17:02 -05:00
parent ddeca171a0
commit 116bff8cef
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
7 changed files with 17 additions and 15 deletions

View File

@ -129,7 +129,8 @@ static void kill_groupchat_window(ToxWindow *self)
del_window(self);
}
int init_groupchat_win(ToxWindow *prompt, Tox *m, uint32_t groupnum, uint8_t type, const char *title, size_t title_length)
int init_groupchat_win(ToxWindow *prompt, Tox *m, uint32_t groupnum, uint8_t type, const char *title,
size_t title_length)
{
if (groupnum > MAX_GROUPCHAT_NUM) {
return -1;

View File

@ -56,7 +56,8 @@ typedef struct {
/* Frees all Toxic associated data structures for a groupchat (does not call tox_conference_delete() ) */
void free_groupchat(ToxWindow *self, Tox *m, uint32_t groupnum);
int init_groupchat_win(ToxWindow *prompt, Tox *m, uint32_t groupnum, uint8_t type, const char *title, size_t title_length);
int init_groupchat_win(ToxWindow *prompt, Tox *m, uint32_t groupnum, uint8_t type, const char *title,
size_t title_length);
/* destroys and re-creates groupchat window with or without the peerlist */
void redraw_groupchat_win(ToxWindow *self);

View File

@ -496,8 +496,10 @@ File_Type file_type(const char *path)
switch (s.st_mode & S_IFMT) {
case S_IFDIR:
return FILE_TYPE_DIRECTORY;
case S_IFREG:
return FILE_TYPE_REGULAR;
default:
return FILE_TYPE_OTHER;
}

View File

@ -39,8 +39,7 @@
#define net_to_host(x, y) hst_to_net(x, y)
#endif
typedef enum File_Type
{
typedef enum File_Type {
FILE_TYPE_REGULAR,
FILE_TYPE_DIRECTORY,
FILE_TYPE_OTHER,

View File

@ -237,8 +237,7 @@ void add_line_to_hist(ChatContext *ctx)
void fetch_hist_item(ChatContext *ctx, int key_dir)
{
if (wcscmp(ctx->line, L"\0") != 0
&& ctx->hst_pos == ctx->hst_tot)
{
&& ctx->hst_pos == ctx->hst_tot) {
add_line_to_hist(ctx);
ctx->hst_pos--;
}