19990502 sourceware import
[external/binutils.git] / include / mpw / spin.h
1 /* Progress macros that use SpinCursor in MPW.
2    Copyright (C) 1994 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
17
18 #ifndef _SPIN_H
19 #define _SPIN_H
20
21 /* For MPW, progress macros just need to "spin the cursor" frequently,
22    preferably several times per second on a 68K Mac.  */
23
24 /* In order to determine if we're meeting the goal, define this macro
25    and information about frequency of spinning will be collected and
26    displayed.  */
27
28 #define SPIN_MEASUREMENT
29
30 #include <CursorCtl.h>
31
32 /* Programs use this macro to indicate the start of a lengthy
33    activity.  STR identifies the particular activity, while N
34    indicates the expected duration, in unspecified units.  If N is
35    zero, then the expected time to completion is unknown.  */
36
37 #undef START_PROGRESS
38 #define START_PROGRESS(STR,N) mpw_start_progress (STR, N, __FILE__, __LINE__);
39
40 /* Programs use this macro to indicate that progress has been made on a
41    lengthy activity.  */
42
43 #undef PROGRESS
44 #ifdef SPIN_MEASUREMENT
45 #define PROGRESS(X) mpw_progress_measured (X, __FILE__, __LINE__);
46 #else
47 #define PROGRESS(X) mpw_progress (X);
48 #endif 
49
50 /* Programs use this macro to indicate the end of a lengthy activity.
51    STR must match a STR passed to START_PROGRESS previously.  */
52
53 #undef END_PROGRESS
54 #define END_PROGRESS(STR) mpw_end_progress (STR, __FILE__, __LINE__);
55
56 extern void mpw_start_progress (char *, int, char *, int);
57
58 extern void mpw_progress (int);
59
60 extern void mpw_progress_measured (int, char *, int);
61
62 extern void mpw_end_progress (char *, char *, int);
63
64 #endif /* _SPIN_H */