* Make some functions in win.c pure
* Remove unused code
* Fix misuse of attr_const, const functions shouldn't exam data pointed
to by its pointer arguments.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
So that the format arguments will only be evaluated if the log is
enabled by the log level. Allow us to add more expensive logs without
impact performance when they are not enabled.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
* string functions mstr*() are moved to string_utils.c
* allocation wrappers are moved to utils.h
* printf_* functions are moved to log.h
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>