sled

Једноставни уређивач текста
git clone https://git.sr.ht/~strahinja/sled
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 3b4e20e51d9111bd01aeea91c0e9230114b0cf1d
родитељ 7b8853fd948bff478c6585488e369f7bdad72bc9
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Sat,  8 Jun 2024 15:46:14 +0200

Remove leftover unneeded constants, move rest to limit.h

Diffstat:
MTODO | 2--
MTODO.done | 2++
Mlimit.h | 3+++
Mutil.h | 5-----
измењених датотека: 4, додавања: 5(+), брисања: 7(-)

diff --git a/TODO b/TODO @@ -3,8 +3,6 @@ TODO [ ] *str*cpy -> memccpy? -[ ] Check (and possibly remove) leftover constants - < > Make allocation errors prompt to save the file before exiting? - Would this make sense? diff --git a/TODO.done b/TODO.done @@ -1,6 +1,8 @@ Done or canceled todos ====================== +[x] Check (and possibly remove) leftover constants + [x] Bugfix: cursor after paste when on last line - [x] Bugfix: copy copies the whole line to paste buffer - [x] Adjust offsets for new *str*cpy logic diff --git a/limit.h b/limit.h @@ -16,6 +16,9 @@ extern long limits[]; #define ALLOC_DELTA 50 #define LINE_ALLOC_DELTA 85 #define LINE_DEFAULT 85 +#define MAXCOPYBUF 8192 #define MAXINPUT (512 + 1) +/* maximum chars for UTF-8 representations of Unicode chars, per Unicode char */ +#define UTF8REPMAX 6 int init_limits(const char* dir); diff --git a/util.h b/util.h @@ -109,11 +109,6 @@ enum { enum { ACT_WRITING, ACT_READING }; -#define MAXCOPYBUF 8192 -#define MAXDATEBUF 80 -#define MAXFLAGSBUF (4 + 1) -/* maximum chars for UTF-8 representations of Unicode chars, per Unicode char */ -#define UTF8REPMAX 6 #define TB_KEY_CTRL_SPACE 0x00 extern int utlerrno;