TEXT HANDLING BUGS

This commit is contained in:
Vitor Santos Costa
2017-01-09 14:58:01 +00:00
parent 80cb881f3c
commit 6778ea2975
4 changed files with 42 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
/*************************************************************************
/*************************************************************************
* *
* YAP Prolog *
* *
@@ -78,7 +78,7 @@ void *my_malloc(size_t sz) {
p = malloc(sz);
// Yap_DebugPuts(stderr,"gof\n");
if (Yap_do_low_level_trace)
fprintf(stderr, "+ %p : %lu\n", p, sz);
fprintf(stderr, "+ %p : %" UInt_F "\n", p, sz);
if (sz > 500 && write_malloc++ > 0)
__android_log_print(ANDROID_LOG_ERROR, "YAPDroid ", "+ %d %p", write_malloc,
p);
@@ -90,11 +90,11 @@ void *my_realloc(void *ptr, size_t sz) {
p = realloc(ptr, sz);
if (Yap_do_low_level_trace)
// fprintf(stderr, "+ %p -> %p : %lu\n", ptr, p, sz);
// Yap_DebugPuts(stderr,"gof\n");
if (sz > 500 && write_malloc++ > 0)
__android_log_print(ANDROID_LOG_ERROR, "YAPDroid ", "* %d %p", write_malloc,
p);
// fprintf(stderr, "+ %p -> %p : %: ==%" UInt_P "\n", ptr, p, sz);
// Yap_DebugPuts(stderr,"gof\n");
if (sz > 500 && write_malloc++ > 0)
__android_log_print(ANDROID_LOG_ERROR, "YAPDroid ", "* %d %p",
write_malloc, p);
return p;
}