- IO: Have
fd_open_for_write()
overwrite the file if it already exists on Windows
- PATH: Have
path_cp()
exit if no bytes are read or written on Windows
- NOBUILD.H: Fix inclusion of implementation when
NOBUILD_IMPLEMENTATION
is not defined
- Use
nobuild__GetLastErrorAsString()
everywhereGetLastErrorAsString()
is used'
- Avoid using VLA's when building on windows
- Avoid using
PATH_MAX
on windows
- PATH: Make
is_path1_modified_after_path2()
recursively check directories for the most recently modified file - PATH: Deprecate
is_path1_modified_after_path2()
in favor ofpath_is_newer()
- PATH: Add
path_is_newer()
function - CSTR: Add
cstr_array_contains()
function
- BREAKING: Removed
cstr_no_ext
function. - BREAKING: Removed then
IN
andOUT
macros.
- BREAKING:
cst_array_remove
returnsCstr_Array
instead ofCstr
. - Deprecated
VLOG
function.
- Fixed
cstr_array_remove
not correctly returning the modifiedCstr_Array
.
- Generated standalone versions for each nobuild library.
- Fixed
realloc: invalid pointer
error when nobuild rebuilds itself.
- Fixed string returned from
path_dirname
not being null-terminated correctly.
- Added
fd_write
function. This allows you to write bytes from a buffer into a specifiedFd
. - Added
fd_read
function. This allows you to read bytes into a buffer from a specifiedFd
.
- Added
fd_printf
function. It's a printf function that outputs into into the specifiedFd
. - Added
file_to_c_array
function and helper macro that embed's a file into a C array of bytes.
- Fixed security warnings generated by calling
strerror
,strcpy
, andstrncpy
on windows.
- Deprecated
IN
macro, useCHAIN_IN
instead. - Deprecated
OUT
macro, useCHAIN_OUT
instead.
- Included "direct.h" on windows.
- Fixed various conversion warnings.
- Fixed calls to undefined functons on windows.
- Deprecated
cst_no_ext
function, usepath_no_ext
instead. - Prevent
is_path_1_modified_after_path2
from causing a crash if either path didn't exist.
- Added
path_no_ext
function to replacecstr_no_ext
. - Forwrad declared
is_path1_modified_after_path2
function and addedIS_NEWER
macro.. - Added
path_copy
function andCOPY
helper macro for recursive copying. - Added
path_dirname
function andDIRNAME
helper macro to extract path dirname. - Added
path_basename
function andBASENAME
helper macro to extract path basename. - Added
path_is_file
function andIS_FILE
helper macro.
- Logging functions print the calling function and source line.
- Define
TODO
andTODO_SAFE
macro to log unimplemented features.
- Add
capacity
field toCstr_Array
struct.
- Add
cstr_starts_with
function andSTARTS_WITH
macro helper to check ifCstr
starts with a prefix - Add
cstr_array_from_cstr
function andSPLIT
macro helper to splitCstr
toCstr_Array
- Add
cstr_array_remove
function to remove a specific string from aCstr_Array
- Add
cstr_array_concat
function to concatenate aCstr_Array
into another.
- Define
CSTR_ARRAY_MAKE
macro that automatically null terminates the var args list passed to it
- Have
CMD
macro use the added command system
- Define
GO_REBUILD_URSELF
macro to add code for rebuilding the executable ifnobuild.c
was modified. - Add
rebuild_urself()
as backend forGO_REBUILD_URSELF
. - Add
Cstr
as type alias toconst char *
- Define a type struct
Cstr_Array
for an array ofCstr
that stores its length. - Add
cstr_array_make()
for creating aCstr_Array
for varargs. The list must be NULL terminated. - Add
cstr_array_append()
to create a newCstr_Array
and append aCstr
to it. - Add
cstr_ends_with()
function - Add
cstr_array_join()
function - Add
cstr_no_ext()
function - Add
VLOG()
function that acts as the backend of each logging function. - Add
PANIC()
function. It's likeERRO()
but crashes the whole application. - Add
Cmd
struct to represent a single command line. - Add
Cmd_Array
struct to represent a series of command lines, storing the number of commands. - Add
Fd
as type alias for File descriptor. - Add
Pid
as type alias for process ID. - Add
pid_wait()
to wait until the process with the specified pid is finished. - Add
cmd_show()
to render the cmd to stdout. - Add
cmd_run_async()
to run thecmd
asynchronously with custom input and output. - Add
cmd_run_sync()
to runcmd
synchronously. - Add
fd_open_for_read()
to open a path for reading and return a file descriptor to it. - Add
fd_open_for_write()
to open a path for writing and return a file descriptor to it. - Add
fd_close()
to close a file descriptor. - Add
path_rm()
function. - Add
path_mkdirs()
function. - Add
path_rename()
to rename a path. - Define
RENAME()
macro helper. - Add
path_exists()
function. - Define
PATH_EXISTS()
macro helper. - Add
gcc
printf attributes to logging functions. - Add
Pipe
struct that represents a shell pipe. - Add
pipe_make()
function to have the os create the pipe. - Define
PIPE()
macro helper to create a pipe for chaining commands. - Add
Chain_Token
struct that represent a part redirectable entity. - Add
Chain
struct that represents a series of commands piped to each other. - Add
chain_run_sync()
to run a chain synchronously. - Add
chain_echo()
to echo a chain. - Add
chain_build_from_tokens()
to build a chain from tokens. - Define
CHAIN()
macro helper to create aChain
from a series ofChain_Tokens
. - Add
Chain_Token_Type
enum to store the different types of tokens. - Add
IN()
macro to create an inputChain_Token
. - Add
OUT()
macro to create an outputChain_Token
. - Add
CHAIN_CMD()
to represent a command that is run as part of the chain. - Add
shift_args()
function.
PATH_SEP_LEN
FOREACH_VARGS
CONCAT_SEP(sep, ...) build__deprecated_concat_sep(sep, __VA_ARGS__, NULL)
concat_impl(int ignore, ...)
;concat_sep_impl(const char *sep, ...)
;build__join(const char *sep, ...)
;mkdirs_impl(int ignore, ...)
;cmd_impl(int ignore, ...)
;remove_ext(const char *path)
;shift(int *argc, char ***argv)
;
- Add
ENDS_WITH(str, postfix)
function that checks ifstr
ends withpostfix
. - Add
IS_DIR(path)
function that checks ifpath
is a directory. - Add
RM(path)
function that removes the specified path recursively.
- Deprecate
remove_ext(path)
. UseNOEXT(path)
instead. - Deprecate
CONCAT_SEP(sep, ...)
. UseJOIN(sep, ...)
instead. - Deprecate
concat_sep_impl(sep, ...)
. UseJOIN(sep, ...)
instead.
- Add logging functions
INFO(fmt, ...)
,WARN(fmt, ...)
,ERRO(fmt, ...)
. - Introduce API conventions. Functions that start with
nobuild__
(double underscore) are private to the library and should not be relied upon. They can be changed in any release without a warning.
Implemented enough functionality to build bm.