1 /* $Id: debug.c,v 1.1.4.1 2001/11/20 14:19:37 kai 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 
21 int dbg_level = 0;
22 static char dbg_funcname[255];
23 
dbg_endfunc(void)24 void dbg_endfunc(void)
25 {
26 	if (dbg_level) {
27 		printk("<-- Leaving function %s\n", dbg_funcname);
28 		strcpy(dbg_funcname, "");
29 	}
30 }
31 
dbg_func(char * func)32 void dbg_func(char *func)
33 {
34 	strcpy(dbg_funcname, func);
35 	if(dbg_level)
36 		printk("--> Entering function %s\n", dbg_funcname);
37 }
38 
pullphone(char * dn,char * str)39 inline 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