2024-07-03 03:41:28 +02:00
|
|
|
#ifndef ROW_H_
|
|
|
|
#define ROW_H_
|
|
|
|
|
2024-07-04 18:00:13 +02:00
|
|
|
typedef struct row {
|
|
|
|
int idx;
|
|
|
|
int size;
|
|
|
|
int render_size;
|
|
|
|
char *chars;
|
|
|
|
char *render;
|
|
|
|
unsigned char *hl;
|
|
|
|
int opened_comment;
|
|
|
|
} row;
|
|
|
|
|
2024-07-03 03:41:28 +02:00
|
|
|
int row_cx_to_rx(row *row, int cx);
|
2024-07-03 12:11:48 +02:00
|
|
|
int row_rx_to_cx(row *row, int rx);
|
2024-07-03 03:41:28 +02:00
|
|
|
void update_row(row *row);
|
|
|
|
void insert_row(int at, char *s, size_t len);
|
|
|
|
void free_row(row *row);
|
|
|
|
void del_row(int at);
|
|
|
|
void row_insert_char(row *row, int at, int c);
|
|
|
|
void row_append_str(row *row, char *s, size_t len);
|
|
|
|
void row_del_char(row *row, int at);
|
|
|
|
char *rows_to_str(int *buflen);
|
|
|
|
|
|
|
|
#endif
|