summaryrefslogtreecommitdiff
path: root/src/common/nullpo.c
blob: f0fc2c7ab144352d1ea9a89081b32c694961f829 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder

#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "nullpo.h"
#include "../common/showmsg.h"

/**
 * Reports NULL pointer information
 */
void nullpo_info(const char *file, int line, const char *func, const char *targetname) {
	if (file == NULL)
		file = "??";
	
	if (func == NULL || *func == '\0')
		func = "unknown";
	
	ShowMessage("--- nullpo info --------------------------------------------\n");
	ShowMessage("%s:%d: target '%s' in func `%s'\n", file, line, targetname, func);
	ShowMessage("--- end nullpo info ----------------------------------------\n");
}