This commit is contained in:
Allen Webster 2020-02-19 21:32:07 -08:00
parent f0421c12b5
commit 0422dadbc8
3 changed files with 340 additions and 338 deletions

View File

@ -6,6 +6,7 @@
extern "C" b32
get_version(i32 maj, i32 min, i32 patch){
printf("CUS: %d.%d.%d\n", MAJOR, MINOR, PATCH);
return(maj == MAJOR && min == MINOR && patch == PATCH);
}

View File

@ -21,7 +21,7 @@ arch=-m64
preproc_file=4coder_command_metadata.i
meta_macros="-DMETA_PASS"
g++ -I"$CODE_HOME" $meta_macros $arch $opts $debug -std=c++11 "$SOURCE" -E -o $preproc_file
g++ -I"$CODE_HOME" $opts $debug -std=gnu++0x "$CODE_HOME/4coder_metadata_generator.cpp" -o "$CODE_HOME/metadata_generator"
g++ -I"$CODE_HOME" $opts $debug -std=c++11 "$CODE_HOME/4coder_metadata_generator.cpp" -o "$CODE_HOME/metadata_generator"
"$CODE_HOME/metadata_generator" -R "$CODE_HOME" "$PWD/$preproc_file"
g++ -I"$CODE_HOME" $arch $opts $debug -std=gnu++0x "$SOURCE" -shared -o custom_4coder.so -fPIC

View File

@ -101,18 +101,18 @@
#include <GL/glext.h>
#ifdef INSO_DEBUG
#define LINUX_FN_DEBUG(fmt, ...) do { \
fprintf(stderr, "%s: " fmt "\n", __func__, ##__VA_ARGS__);\
} while (0)
#define LINUX_FN_DEBUG(fmt, ...) do { \
fprintf(stderr, "%s: " fmt "\n", __func__, ##__VA_ARGS__);\
} while (0)
// I want to see a message
#undef AssertBreak
#define AssertBreak(m) ({\
fprintf(stderr, "\n** ASSERTION FAILURE: %s:%d: %s\n\n", __FILE__, __LINE__, #m);\
#undef AssertBreak
#define AssertBreak(m) ({\
fprintf(stderr, "\n** ASSERTION FAILURE: %s:%d: %s\n\n", __FILE__, __LINE__, #m);\
*((volatile u64*)0) = 0xba771e70ad5;\
})
})
#else
#define LINUX_FN_DEBUG(...)
#define LINUX_FN_DEBUG(...)
#endif
////////////////////////////
@ -1211,7 +1211,7 @@ linux_clipboard_send(XSelectionRequestEvent* req) {
}
}
done:
done:
XSendEvent(req->display, req->requestor, True, 0, (XEvent*)&rsp);
}
@ -1700,6 +1700,7 @@ main(int argc, char **argv){
system_error_box(custom_not_found_msg);
}
custom.get_version = (_Get_Version_Type*)system_get_proc(custom_library, "get_version");
printf("VER: %d.%d.%d\n", MAJOR, MINOR, PATCH);
if (custom.get_version == 0 || custom.get_version(MAJOR, MINOR, PATCH) == 0){
system_error_box(custom_fail_version_msg);
}