mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 05:23:02 +01:00
fix len values
This commit is contained in:
parent
499c66f411
commit
2c4f0d593d
@ -126,6 +126,7 @@ static struct line_info *line_info_ret_queue(struct history *hst)
|
|||||||
return ret;
|
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,
|
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)
|
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 */
|
/* for type-specific formatting in print function */
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ACTION:
|
case ACTION:
|
||||||
|
case CONNECTION:
|
||||||
len += 3;
|
len += 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SYS_MSG:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PROMPT:
|
||||||
|
++len;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
len += 2;
|
len += 2;
|
||||||
break;
|
break;
|
||||||
|
@ -67,7 +67,7 @@ struct history {
|
|||||||
int queue_sz;
|
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,
|
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);
|
uint8_t type, uint8_t bold, uint8_t colour);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user