Merge from vendor branch OPENSSH:
[dragonfly.git] / contrib / gperf / src / trace.cc
1 /* Tracing function calls.
2    Copyright (C) 1989-1998 Free Software Foundation, Inc.
3    written by Douglas C. Schmidt (schmidt@ics.uci.edu)
4
5 This file is part of GNU GPERF.
6
7 GNU GPERF is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 1, or (at your option)
10 any later version.
11
12 GNU GPERF is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU GPERF; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA.  */
20
21 #include "trace.h"
22
23 #include <stdio.h>
24
25 int Trace::nesting = 0;
26
27 Trace::Trace (const char *n)
28 {
29   fprintf (stderr, "%*scalling %s\n", 3 * nesting++, "", name = n);
30 }
31
32 Trace::~Trace (void)
33 {
34   fprintf (stderr, "%*sleaving %s\n", 3 * --nesting, "", name);
35 }