| 1 | /* | ||
| 2 | Copyright 2015 Alexander Borisov | ||
| 3 | |||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | you may not use this file except in compliance with the License. | ||
| 6 | You may obtain a copy of the License at | ||
| 7 | |||
| 8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | |||
| 10 | Unless required by applicable law or agreed to in writing, software | ||
| 11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | See the License for the specific language governing permissions and | ||
| 14 | limitations under the License. | ||
| 15 | |||
| 16 | Author: lex.borisov@gmail.com (Alexander Borisov) | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include "myhtml/myosi.h" | ||
| 20 | |||
| 21 | 55 | void * mymalloc(size_t size) | |
| 22 | { | ||
| 23 | //printf("Call malloc\n"); | ||
| 24 | 55 | return malloc(size); | |
| 25 | } | ||
| 26 | |||
| 27 | // see who's call realloc | ||
| 28 | 0 | void * myrealloc(void* dst, size_t size) | |
| 29 | { | ||
| 30 | //printf("Call realloc\n"); | ||
| 31 | 0 | return realloc(dst, size); | |
| 32 | } | ||
| 33 | |||
| 34 | 37 | void * mycalloc(size_t num, size_t size) | |
| 35 | { | ||
| 36 | //printf("Call calloc\n"); | ||
| 37 | 37 | return calloc(num, size); | |
| 38 | } | ||
| 39 | |||
| 40 | 0 | void myfree(void* dst) | |
| 41 | { | ||
| 42 | //printf("Call free\n"); | ||
| 43 | 0 | free(dst); | |
| 44 | 0 | } | |
| 45 | |||
| 46 | 0 | void myhtml_print(FILE* out, const char* format, ...) | |
| 47 | { | ||
| 48 | va_list argptr; | ||
| 49 | 0 | va_start(argptr, format); | |
| 50 | 0 | vfprintf(out, format, argptr); | |
| 51 | 0 | va_end(argptr); | |
| 52 | 0 | } |