From bbc9757dccbc50fb051ca3cff585a9100023b1b1 Mon Sep 17 00:00:00 2001 From: salad Date: Fri, 18 Dec 2020 20:18:38 +0100 Subject: qweqweqweqwe --- src/c_utils_next.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/c_utils_next.c') diff --git a/src/c_utils_next.c b/src/c_utils_next.c index 27a88db..07d1c88 100644 --- a/src/c_utils_next.c +++ b/src/c_utils_next.c @@ -19,6 +19,21 @@ #include "c_utils.h" #include "d_define.h" +void c_set_ptr_norme(char key, t_bool *sw, char **p, char **context) +{ + if ((key == -1 && *p - *context != 0) || key == 1) + { + *p += (key == -1) ? (2 * key) : (0); + while (*sw == FALSE && ((key == -1 && *p - *context != 0) || key == 1) + && **p != C_LF && **p != C_NUL) + *p += key; + if (*sw == TRUE) + *sw = FALSE; + if (*p - *context != 0 && **p != C_NUL) + *p += 1; + } +} + short c_set_key(char *buf) { if (((*((unsigned int *)buf)) == UP_K) || -- cgit v1.2.3