Browse Source

Brought lob up to -w codes

master
dirkson 3 years ago
parent
commit
51b2089e0f
  1. 4
      build
  2. 5
      meson.build
  3. 2
      src/examples/test.c
  4. 6
      src/lob.c

4
build

@ -61,7 +61,7 @@ osmia_help () {
echo "Target will be passed to ninja directly"
echo "Mode defaults to release, or is one of the following:"
echo "-r OR --release : Builds using Meson's release mode"
echo "-d OR --debug : Builds using Meson's debug mode, with --werror added"
echo "-d OR --debug : Builds using Meson's debug mode"
echo "-c OR --clean : Cleans up current project meson/ninja/osmia files"
echo "-a OR --add-san : Clang's address sanitizer"
echo "-w32 OR --win32 : Cross-compile for win32 using $MDIR/win32.txt"
@ -120,14 +120,12 @@ case "$1" in
-d|-debug|--debug)
DIR=debug
BLD=debug
MESONOPTS="--werror"
;;
-a)
COMPILER="clang"
DIR=debug
BLD=debug
MESONOPTS=-Db_sanitize=address
MESONOPTS="--werror"
;;
-w32|-win32|--win32|-window32|--windows32)
DIR=release

5
meson.build

@ -1,4 +1,5 @@
project('lob', 'c', default_options : ['default_library=static', 'c_std=gnu89'], subproject_dir : 'meson')
project('lob', 'c', default_options : ['default_library=static', 'c_std=c99'], subproject_dir : 'meson')
add_project_arguments(['-Werror', '-Wall', '-Wpedantic', '-Wextra'], language : 'c')
incdir = include_directories('include')
#TinyFileDialogs
@ -6,7 +7,7 @@ incdir = include_directories('include')
#deptinyfd = declare_dependency(link_with : libtinyfd, include_directories : incdir)
if get_option('use_boksi')
subproject('boksi', default_options : ['default_library=static', 'c_std=gnu89'])
subproject('boksi')
else
add_project_arguments('-DLOB_NO_BOKSI', language : 'c')
endif

2
src/examples/test.c

@ -154,7 +154,7 @@ void* test_second_thread(void* bob)
{
unsigned int i;
for(i = 0; i < 1024 * 1024 * 16; i++)
lob(LOB_WARN, "ABCDEFGHIJKLMNOP");
lob(LOB_WARN, "ABCDEFGHIJKLMNOP %p", bob);
return NULL;
}

6
src/lob.c

@ -187,13 +187,13 @@ static inline void lob_out_boksi(const char * const prefix, const lob_format *fo
char *buffer = basicbuffer;
unsigned int bufferSize = LOB_BUFFER_SIZE;
int bufferSize = LOB_BUFFER_SIZE;
va_list tempargs;
restart_boksi_loop:;
unsigned int i = 0;
unsigned int loc = 0;
int i = 0;
int loc = 0;
int ret = 0;
while (format[i].block != LOB_FORMAT_DONE)
{

Loading…
Cancel
Save