4 * Various macros to help in debugging.
6 * ----------------------------------------------------------------------
8 * Copyright (c) 2012 Free Software Foundation
10 * GNU SHOGI is based on GNU CHESS
12 * This file is part of GNU SHOGI.
14 * GNU Shogi is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 3 of the License,
17 * or (at your option) any later version.
19 * GNU Shogi is distributed in the hope that it will be useful, but WITHOUT
20 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 * You should have received a copy of the GNU General Public License along
25 * with GNU Shogi; see the file COPYING. If not, see
26 * <http://www.gnu.org/licenses/>.
27 * ----------------------------------------------------------------------
31 /* Some of this code requires gcc. */
38 * Define simple macros PRINT_ENTER and PRINT_EXIT to print info when
39 * a function is entered or left. They only work if DEBUG is #defined.
40 * This requires gcc. You have to invoke them with a semicolon after them,
46 * This is so as not to screw up automatic indentation in emacs.
49 #if (defined __GNUC__)
51 # define PRINT_ENTER printf("Entering function: %s().\n", __FUNCTION__)
52 # define PRINT_EXIT printf("Exiting function: %s().\n", __FUNCTION__)
61 /* Function inlining; not all C compilers support this. */
62 #if (!defined __GNUC__)
66 #endif /* _DEBUG_H_ */