clp

command line syntax highlighter
git clone git://jeskin.net/clp.git
README | Log | Files | Refs | LICENSE

commit 88e7d0df0aded158e476ff3de86e843154d007a1
parent 407cd4096227bae5a6a81ba92b19180b0f4200a0
Author: Jon Eskin <eskinjp@gmail.com>
Date:   Thu, 14 Jul 2022 04:20:58 -0400

remove unneeded path

Diffstat:
Mclp.c | 16----------------
1 file changed, 0 insertions(+), 16 deletions(-)

diff --git a/clp.c b/clp.c @@ -118,22 +118,6 @@ int main(int argc, char *argv[]) { lua_path_add(L, path); } - ssize_t len = readlink("/proc/self/exe", path, sizeof(path) - 1); - if (len > 0) { - path[len] = '\0'; - /* some idotic dirname(3) implementations return pointers to statically - * allocated memory, hence we use memmove to copy it back */ - char *dir = dirname(path); - if (dir) { - size_t len = strlen(dir) + 1; - if (len < sizeof(path) - sizeof("/lua")) { - memmove(path, dir, len); - strcat(path, "/lua"); - lua_path_add(L, path); - } - } - } - int ret = 0; int status = 0; if (!package_exists(L, "clp")) {