1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-06-26 20:57:48 +02:00

fix len values

This commit is contained in:
Jfreegman 2014-06-14 14:09:20 -04:00
parent 499c66f411
commit 2c4f0d593d
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
2 changed files with 10 additions and 1 deletions

View File

@ -126,6 +126,7 @@ static struct line_info *line_info_ret_queue(struct history *hst)
return ret;
}
/* creates new line_info line and puts it in the queue */
void line_info_add(ToxWindow *self, uint8_t *tmstmp, uint8_t *name1, uint8_t *name2, uint8_t *msg,
uint8_t type, uint8_t bold, uint8_t colour)
{
@ -145,9 +146,17 @@ void line_info_add(ToxWindow *self, uint8_t *tmstmp, uint8_t *name1, uint8_t *na
/* for type-specific formatting in print function */
switch (type) {
case ACTION:
case CONNECTION:
len += 3;
break;
case SYS_MSG:
break;
case PROMPT:
++len;
break;
default:
len += 2;
break;

View File

@ -67,7 +67,7 @@ struct history {
int queue_sz;
};
/* adds a line to history (also moves line_start and/or line_root forward if necessary) */
/* creates new line_info line and puts it in the queue */
void line_info_add(ToxWindow *self, uint8_t *tmstmp, uint8_t *name1, uint8_t *name2, uint8_t *msg,
uint8_t type, uint8_t bold, uint8_t colour);