From bbf9b88c667048ee5961418abf6aaac42eb5364e Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Mon, 11 Mar 2024 12:28:50 +1300 Subject: [PATCH] tree: clean up whitespace and includes --- callisto.h | 1 - lcl.c | 8 +++----- lenviron.c | 5 +---- lextra.c | 3 --- lfs.c | 3 +-- ljson.c | 2 +- lprocess.c | 6 ++---- util.h | 2 +- 8 files changed, 9 insertions(+), 21 deletions(-) diff --git a/callisto.h b/callisto.h index 6f7ac25..a9e7be1 100644 --- a/callisto.h +++ b/callisto.h @@ -4,7 +4,6 @@ */ #ifndef _CALLISTO_H_ - #define _CALLISTO_H_ #include diff --git a/lcl.c b/lcl.c index 80c20a1..16b3b9d 100644 --- a/lcl.c +++ b/lcl.c @@ -9,17 +9,15 @@ * @module cl */ -#include +#include #include +#include #include #include -#include -#include #include #include -#include "callisto.h" #include "util.h" static void @@ -240,7 +238,7 @@ cl_options(lua_State *L) argc = (int)lua_rawlen(L, 1) + 1; /* get argv length */ argv = lua_newuserdatauv(L, (argc + 1) * sizeof(char *), 0); argv[argc] = NULL; - + for (i = 0; i < argc; i++) { /* for every argument */ lua_pushinteger(L, i); /* push argv index */ lua_gettable(L, 1); /* push argv[i] */ diff --git a/lenviron.c b/lenviron.c index cc9e127..05b2f85 100644 --- a/lenviron.c +++ b/lenviron.c @@ -8,17 +8,14 @@ * @module environ */ -#include #include +#include #include #include #include "callisto.h" - -extern char **environ; - /*** * Table enabling easy access to environment * variables. diff --git a/lextra.c b/lextra.c index 3efabe9..2b70619 100644 --- a/lextra.c +++ b/lextra.c @@ -17,9 +17,6 @@ #include #include -#include "callisto.h" -#include "util.h" - /*** * Waits the specified amount of seconds. * diff --git a/lfs.c b/lfs.c index f5ae80f..414bc62 100644 --- a/lfs.c +++ b/lfs.c @@ -24,7 +24,6 @@ #include #include -#include "callisto.h" #include "util.h" /*** @@ -335,7 +334,7 @@ fs_mkdir(lua_State *L) ret = mkpath(dir, 0777, 0777); else ret = mkdir(dir, 0777); - + if (ret == 0) { lua_pushboolean(L, 1); return 1; diff --git a/ljson.c b/ljson.c index 51880a3..f053a2e 100644 --- a/ljson.c +++ b/ljson.c @@ -16,7 +16,7 @@ * - Full support for JSON with UTF-8, including decoding surrogate pairs * * - Optional run-time support for common exceptions to the JSON specification - * (infinity, NaN, etc.) + * (infinity, NaN, etc.) * * - No dependencies on other libraries * diff --git a/lprocess.c b/lprocess.c index 1148ce9..956fbad 100644 --- a/lprocess.c +++ b/lprocess.c @@ -9,16 +9,14 @@ * @module process */ -#include -#include #include +#include #include -#include +#include #include #include -#include "callisto.h" #include "util.h" #define PID_MAX 8 /* rounded to the nearest even number */ diff --git a/util.h b/util.h index 5b22119..76f7592 100644 --- a/util.h +++ b/util.h @@ -4,10 +4,10 @@ */ #ifndef _UTIL_H_ - #define _UTIL_H_ #include + #include int lfail(lua_State *);