diff options
author | Valaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-01-29 16:00:45 +0000 |
---|---|---|
committer | Valaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-01-29 16:00:45 +0000 |
commit | a2675f07d7da22a7c6ae11f545bf8f671e785a82 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /src/common/nullpo.c | |
parent | b8801ae9585201eaaf9fdf80d9c7117ee18f52e2 (diff) | |
download | hercules-a2675f07d7da22a7c6ae11f545bf8f671e785a82.tar.gz hercules-a2675f07d7da22a7c6ae11f545bf8f671e785a82.tar.bz2 hercules-a2675f07d7da22a7c6ae11f545bf8f671e785a82.tar.xz hercules-a2675f07d7da22a7c6ae11f545bf8f671e785a82.zip |
Clearing trunk.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5091 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/nullpo.c')
-rw-r--r-- | src/common/nullpo.c | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/src/common/nullpo.c b/src/common/nullpo.c deleted file mode 100644 index 5fbf5fc1d..000000000 --- a/src/common/nullpo.c +++ /dev/null @@ -1,90 +0,0 @@ -#include <stdio.h> -#include <stdarg.h> -#include <string.h> -#include "nullpo.h" -// #include "logs.h" // �z���Ă݂� - -static void nullpo_info_core(const char *file, int line, const char *func, - const char *fmt, va_list ap); - -/*====================================== - * Null�`�F�b�N �y�� ���o�� - *-------------------------------------- - */ -int nullpo_chk_f(const char *file, int line, const char *func, const void *target, - const char *fmt, ...) -{ - va_list ap; - - if (target != NULL) - return 0; - - va_start(ap, fmt); - nullpo_info_core(file, line, func, fmt, ap); - va_end(ap); - return 1; -} - -int nullpo_chk(const char *file, int line, const char *func, const void *target) -{ - if (target != NULL) - return 0; - - nullpo_info_core(file, line, func, NULL, NULL); - return 1; -} - - -/*====================================== - * nullpo���o��(�O���ďo���������b�p) - *-------------------------------------- - */ -void nullpo_info_f(const char *file, int line, const char *func, - const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - nullpo_info_core(file, line, func, fmt, ap); - va_end(ap); -} - -void nullpo_info(const char *file, int line, const char *func) -{ - nullpo_info_core(file, line, func, NULL, NULL); -} - - -/*====================================== - * nullpo���o��(Main) - *-------------------------------------- - */ -static void nullpo_info_core(const char *file, int line, const char *func, - const char *fmt, va_list ap) -{ - if (file == NULL) - file = "??"; - - func = - func == NULL ? "unknown": - func[0] == '\0' ? "unknown": - func; - - printf("--- nullpo info --------------------------------------------\n"); - printf("%s:%d: in func `%s'\n", file, line, func); - if (fmt != NULL) - { - if (fmt[0] != '\0') - { - vprintf(fmt, ap); - - // �Ō�ɉ��s�������m�F - if (fmt[strlen(fmt)-1] != '\n') - printf("\n"); - } - } - printf("--- end nullpo info ----------------------------------------\n"); - - // �������nullpo���O���t�@�C���ɏ����o������ - // �܂Ƃ߂Ē�o�ł���ȂƎv���Ă�����B -} |