1/* $Id: debug.c,v 1.1.1.1 2008/10/15 03:26:34 james26_jang Exp $
2 *
3 * Copyright (C) 1996  SpellCaster Telecommunications Inc.
4 *
5 * This software may be used and distributed according to the terms
6 * of the GNU General Public License, incorporated herein by reference.
7 *
8 * For more information, please contact gpl-info@spellcast.com or write:
9 *
10 *     SpellCaster Telecommunications Inc.
11 *     5621 Finch Avenue East, Unit #3
12 *     Scarborough, Ontario  Canada
13 *     M1B 2T9
14 *     +1 (416) 297-8565
15 *     +1 (416) 297-6433 Facsimile
16 */
17
18#include <linux/kernel.h>
19#include <linux/string.h>
20
21int dbg_level = 0;
22static char dbg_funcname[255];
23
24void dbg_endfunc(void)
25{
26	if (dbg_level) {
27		printk("<-- Leaving function %s\n", dbg_funcname);
28		strcpy(dbg_funcname, "");
29	}
30}
31
32void dbg_func(char *func)
33{
34	strcpy(dbg_funcname, func);
35	if(dbg_level)
36		printk("--> Entering function %s\n", dbg_funcname);
37}
38
39inline void pullphone(char *dn, char *str)
40{
41	int i = 0;
42
43	while(dn[i] != ',')
44		str[i] = dn[i], i++;
45	str[i] = 0x0;
46}
47