vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 74c6be4bf827ea18aa6da44a589e11260e5e790e parent c8c8dff5388f7c59e6bf54190b9610ba3fd2e85a Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 17 Feb 2016 10:49:32 +0100 map: set errno to EEXIST when trying to map_put a duplicate value Diffstat:
| M | map.c | | | 1 | + |
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/map.c b/map.c @@ -113,6 +113,7 @@ bool map_put(Map *map, const char *k, const void *value) if (key[byte_num] == '\0') { /* All identical! */ free(key); + errno = EEXIST; return false; } }