Skip to content

Latest commit

 

History

History
101 lines (78 loc) · 2.41 KB

errno.asc

File metadata and controls

101 lines (78 loc) · 2.41 KB

errno

errno

#ifdef mini_errno
error return value

errno_str

char *errno_str(int err)

convert errno to str, with 3 chars length
 ending the string (global)
 with two \0\0, when errno<100
 errnum must be <200.

Size: ~123B ../src/process/errno_str.c l.7

exit_errno

void exit_errno( int errnum )
Defines: write exit errno_str execve

exit, and execute /bin/errno
 this is intended to give a error message for the
 given errno num.
 Instead of having the error messages compiled
 into each binary, they can stay within one executable, "errno"
 This spares about 4kB, but needs errno installed to /bin/errno
 It's the drawback of not having a shared library,
 where all executables would share the same errno messages
 in memory.
 On the other hand, a shared library would need to be installed
 as well.
 The supplied errno can be negative,
 the absolute value is supplied to errno.
perror

void perror(const char msg)
*Defines:
write strlen fileno strerror errno
write error messages to standard error Size: ~329B ../src/output/perror.c l.4 manpage: perror

ret_errno

#ifdef mini_errno

This macro expands to a return, and
 (when mini_errno is defined) returns -1 and sets errno,
 or returns the negative errno value.
seterrno

#ifdef mini_errno

set errno, but only when errno is defined.
strerror

char* strerror( int errnum )
../src/string/strerror.c l.7 manpage: strerror

verbose_errstr

const char* verbose_errstr(int num)

verbose error (errno) string.
 this adds about 3.5kB to the compiled binary(!)
verbose_errstr2

const char* verbose_errstr2(int num)

verbose error (errno) string.
 this adds about 3.5kB to the compiled binary(!)
 Trying to shrink that here.