Joachim Nilsson
b15a14e920
strtonum(): POSIX strtoll() returns EINVAL, check for that too
...
From FreeBSD.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-12-10 09:43:20 +01:00
Joachim Nilsson
7e8534e36b
pidfile_signal(): Return result of kill() and only remove on SIGKILL
...
If kill() is successful, and the signal was SIGKILL, we remove() the PID
file and return the rc of remove(), otherwise we always return the rc of
kill().
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-10-22 13:08:19 +02:00
Joachim Nilsson
3989d91d36
Minor, refactor and fix function doc comment
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-07-22 14:46:08 +02:00
Joachim Nilsson
b6a9ed3c6d
New function(s): strnmatch() and strmatch()
...
These two functions look for a string in a (terminate) list of strings
and returns the index to that string, or -1 if not found or error.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-06-29 18:38:56 +02:00
Joachim Nilsson
9d63302337
Minor, whitespace + simplify
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-06-29 18:35:52 +02:00
Joachim Nilsson
9f92a9d572
Fix #12 : Add missing includes for INT32_MAX and MIN()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-05-10 19:06:07 +02:00
Joachim Nilsson
34f23a77f8
Missing defines for LLONG_MAX and LLONG_MIN
...
Some systems may not yet have defined LLONG_MAX and LLONG_MIN in
limits.h, in particular older GLIBC installs are affected.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-02-28 10:43:08 +01:00
Joachim Nilsson
59ce0c0dc4
Minor ABI bump, changes to lite.h, const + fixed up touch()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-22 12:08:05 +01:00
Joachim Nilsson
d84bcb3847
copyfile(),movefile(): constify
...
A `const` string is a declaration to the user of an API that the
implementation does not touch the contents.
We do some `(char *)` casting in this patch, but the resulting
code still does not touch the contents of the original pointer.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-22 11:34:46 +01:00
Joachim Nilsson
a9a3a2dda1
constify
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-22 11:34:24 +01:00
Joachim Nilsson
20af39300c
ifconfig(): constify
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-22 11:33:55 +01:00
Joachim Nilsson
7b612cda83
lfile: constify
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-22 11:33:37 +01:00
Joachim Nilsson
1d21b11802
lftok(): Refactor, collapse and simplify a bit
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-22 10:56:54 +01:00
Joachim Nilsson
a3badc85f8
Fix FTBFS, add missing fcntl.h header for AT_FDCWD
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-21 17:15:39 +01:00
Joachim Nilsson
ac936448f5
Only define min() and max() macros if not already defined
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-21 14:19:45 +01:00
Joachim Nilsson
3a26ab28b2
Fix #11 : Allow relative paths to touch()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-21 14:17:43 +01:00
Joachim Nilsson
3e921d72e5
conio.h: Add initscr() declaration after relocation to conio.c
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 15:39:16 +01:00
Joachim Nilsson
71a0c53029
Bump ABI version, major changes in this release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 13:57:44 +01:00
Joachim Nilsson
6608d2e8c9
Remove tree() from libite, moved to troglobit/toolbox.git instead
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 13:49:05 +01:00
Joachim Nilsson
62334c80fd
Remove fmode() from libite, it's safer to use stat() instead
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 12:51:49 +01:00
Joachim Nilsson
626d5456f7
copyfile(): Reduce dependency and simplify, already called stat()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 12:49:49 +01:00
Joachim Nilsson
e3dff8e5be
Reorder source files, sort of alphabetically
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 12:46:39 +01:00
Joachim Nilsson
bbb951dc23
conio.h: Move initscr() function to conio.c
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 10:28:07 +01:00
Joachim Nilsson
daf41d326b
Relocate source files to an src/ sub directory
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 09:02:21 +01:00