gpftobdf.c: fix long int comiler warnings
[oweals/cde.git] / cde / programs / dtfile / dtcopy / dtcopy.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: dtcopy.h /main/7 1996/10/29 17:08:48 mustafa $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  *
27  *   FILE:           dtcopy.h
28  *
29  *
30  *   DESCRIPTION:    Header file used in copydialog.c,errordialog.c
31  *                   main_dtcopy.c,overwrtdialog.c,utils.c
32  *
33  *   (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
34  *   (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
35  *   (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
36  *   (c) Copyright 1993, 1994, 1995 Novell, Inc.
37  *
38  ****************************************************************************
39  ************************************<+>*************************************/
40
41 #include <limits.h>
42
43 /* Macros */
44 #define MAX_PATH      PATH_MAX
45
46 #define G_OVERWRITE_EXISTING            0
47 #define G_SKIP                          1
48 #define G_RENAME_EXISTING               2
49 #define N_OVERWRITE_RADIO_BUTTONS       3
50
51 /* Help numbers that are used locally in dtcopy
52  * to indentify what help volume should be used
53  * for a particular callback.  Look to utils.c
54  * in help_callback for code.  MJT
55  */
56 #define HELP_HELP_MENU                  1
57 #define HELP_INTRODUCTION               2
58 #define HELP_DIR_COPY                   3
59 #define HELP_DIR_ERROR                  4
60 #define HELP_OVERWRITE                  5
61 #define HELP_USING                      6
62 #define HELP_VERSION                    7
63 #define STOPW_HELP_DIALOG               9
64
65 /*  debugging output  */
66 #ifdef DEBUG
67 extern int debug;
68 #define DPRINTF(p)  if (debug) printf p
69 #define DPRINTF2(p) if (debug >= 2) printf p
70 #else
71 #define DPRINTF(p)  /* noop */
72 #define DPRINTF2(p) /* noop */
73 #endif
74
75 /* _DtMessage Dialog build defines */
76 #define ERROR_DIALOG  1
77 #define WARNING_DIALOG  2
78 #define QUESTION_DIALOG 3
79
80 /* Global Variables */
81 extern Widget G_toplevel;
82 extern Widget G_overwrite_radio;
83 extern Widget G_summary_text;
84 extern Widget G_status_text;
85 extern Widget G_status_text2;
86 extern Widget G_error_count;
87 extern Widget G_error_msgs;
88 extern Widget G_copy_dialog;
89 extern Widget G_error_dialog;
90 extern Widget G_over_dialog;
91 extern Widget G_over_confirm;
92 extern Widget G_copy_action_area_pbuttons[4];
93 extern Widget G_help_dialog;
94 extern Widget G_rename_text;
95 extern Widget G_toggle_main;
96 extern Widget G_toggle_error;
97
98 extern char  G_rename_oldname[MAX_PATH];
99 extern char  G_source_dir[MAX_PATH];
100 extern int G_move;
101 extern int G_do_copy;
102 extern int G_pause_copy;
103 extern int G_user_pause_copy;
104 extern int G_wait_on_error;
105 extern int G_error_status;
106 extern int G_ignore_errors;
107 extern int G_overwrite_selection;
108 extern int G_overwrite_confirm;
109 extern int G_wait_on_input;
110 extern int G_dialog_closed;
111
112 /* Types */
113
114
115 /* External Routines */
116
117 extern void help_callback(
118         Widget widget,
119         XtPointer client_data,
120         XtPointer call_data);
121 extern void sensitize_copy_action_area(
122                 Widget *pushbutton_array);
123 extern void desensitize_copy_action_area(
124                 Widget *pushbutton_array);
125 extern Boolean create_copydir_dialog(
126                 Widget parent_widget,
127                 char *source,
128                 char *target);
129 extern void create_error_dialog(
130                 Widget parent_widget,
131                 char *op,
132                 char *filename,
133                 int errnum);
134 extern void create_overwrite_dialog(
135                 Widget parent_widget,
136                 char *sname,
137                 char *tname,
138                 Boolean isdir);
139 extern void _DtChildPosition(
140                 Widget w,
141                 Widget parent,
142                 Position *newX,
143                 Position *newY);
144 extern void cancel_callback(
145                 Widget w,
146                 XtPointer client_data,
147                 XtPointer call_data);
148 extern void display_cancel_warning(Widget parent);
149 extern void toggle_callback(
150                 Widget w,
151                 XtPointer client_data,
152                 XtPointer call_data);
153 extern int  touch(String path);
154
155 /*
156  * macro to get message catalog strings
157  */
158
159 #ifndef NO_MESSAGE_CATALOG
160 # ifdef __ultrix
161 #  define _CLIENT_CAT_NAME "dtcopy.cat"
162 # else  /* __ultrix */
163 #  define _CLIENT_CAT_NAME "dtcopy"
164 # endif /* __ultrix */
165 extern char *_DtGetMessage(char *filename, int set, int n, char *s);
166 # define GETMESSAGE(set, number, string)\
167     (_DtGetMessage(_CLIENT_CAT_NAME, set, number, string))
168 #else
169 # define GETMESSAGE(set, number, string)\
170     string
171 #endif