Moved DejaVue fonts to contrib. They are only needed by applications
[AROS-Contrib.git] / dopus / Program / data.c
blob2fd971cd90e19fa09b2181cafd40365513c7bb81
1 /*
3 Directory Opus 4
4 Original GPL release version 4.12
5 Copyright 1993-2000 Jonathan Potter
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program 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.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 All users of Directory Opus 4 (including versions distributed
22 under the GPL) are entitled to upgrade to the latest version of
23 Directory Opus version 5 at a reduced price. Please see
24 http://www.gpsoft.com.au for more information.
26 The release of Directory Opus 4 under the GPL in NO WAY affects
27 the existing commercial status of Directory Opus 5.
31 #include "dopus.h"
32 #ifndef __AROS__
33 #include <libraries/screennotify.h>
34 #include <libraries/pm.h>
35 #include <libraries/SysInfo.h>
36 #endif
38 /* SAS Detach information */
40 #ifndef __AROS__
41 unsigned long __stack=16384; /* Stack size needed */
42 //long __priority=0; /* Default task priority */
43 long __BackGroundIO=0; /* IO off for non-beta */
44 char *__procname="dopus_task"; /* Task name */
45 char __stdiowin[] = "";
46 #endif
48 /* Library bases */
50 struct DOpusBase *DOpusBase/* = NULL*/; /* dopus.library */
51 struct IntuitionBase *IntuitionBase = NULL; /* intuition.library */
52 struct GfxBase *GfxBase = NULL; /* graphics.library */
53 struct Library *IconBase = NULL; /* icon.library */
54 struct Library *DiskfontBase = NULL; /* diskfont.library */
55 //struct PPBase *PPBase = NULL; /* powerpacker.library */
56 struct Library *LayersBase = NULL; /* layers.library */
57 struct Library *WorkbenchBase = NULL; /* workbench.library */
58 struct MusicBase *MUSICBase/* = NULL*/; /* music.library */
59 struct Library *CxBase = NULL; /* commodities.library */
60 struct Library *RexxSysBase = NULL; /* rexxsyslib.library */
61 struct Library *AccountsBase/* = NULL*/; /* accounts.library */
62 struct Library *UtilityBase = NULL; /* utility.library */
63 struct Library *ScreenNotifyBase/* = NULL*/; /* screennotify.library */
64 struct Library *CyberGfxBase/* = NULL*/; /* cybergraphics.library */
65 struct PopupMenuBase *PopupMenuBase/* = NULL*/; /* popupmenu.library */
66 struct xfdMasterBase *xfdMasterBase/* = NULL*/; /* xfdmaster.library */
67 struct xadMasterBase *xadMasterBase/* = NULL*/; /* xadmaster.library */
68 struct Library *SysInfoBase/* = NULL*/; /* sysinfo.library */
69 struct Library *LocaleBase = NULL; /* locale.library */
70 struct muBase *muBase/* = NULL*/; /* multiuser.library */
71 struct Library *DataTypesBase=NULL; /* datatypes.library */
72 struct Library *AmigaGuideBase=NULL; /* amigaguide.library */
73 struct Library *GadToolsBase=NULL; /* gadtools.library */
75 /* Intuition objects */
77 struct IntuiMessage *IMsg/*=NULL*/; /* Main IntuiMessage pointer */
78 struct Screen *MainScreen/*=NULL*/; /* Main screen */
79 struct Screen *iffscreen/*=NULL*/; /* IFF display screen */
80 struct Screen *fontscreen/*=NULL*/; /* Font display screen */
81 struct Screen *blankscreen/*=NULL*/; /* Blank screen for IFF viewer */
82 struct Window *Window/*=NULL*/; /* Main window */
83 struct Window *fontwindow/*=NULL*/; /* Window for font display */
84 struct Window *ansiread_window/*=NULL*/; /* Window for rendering ANSI text */
85 struct Window *reqoverride/*=NULL*/; /* Pointer for SimpleRequest window */
86 struct PopupMenu *sortmenu/*=NULL*/; /* Sort pop-up menu */
88 /* Graphics objects */
90 //struct ViewPort *main_vp=NULL; /* Main screen ViewPort */
91 struct RastPort *main_rp/*=NULL*/; /* Main window RastPort */
92 struct RastPort dir_rp[2]/*={{0},{0}}*/; /* Directory window RastPorts */
94 struct TextFont *scr_font[NUMFONTS]/*={0}*/; /* Fonts used in screen display */
96 /* Exec objects */
98 struct Process *main_proc/*=NULL*/; /* Main Process */
99 struct Task *hotkey_task/*=NULL*/; /* HotKey Task */
100 struct Task *clock_task/*=NULL*/; /* Clock Task */
102 struct MsgPort *count_port/*=NULL*/; /* Port to establish run count */
103 struct MsgPort *general_port/*=NULL*/; /* General Message Port */
104 struct MsgPort *appmsg_port/*=NULL*/; /* AppObject Message Port */
105 struct MsgPort *arexx_port/*=NULL*/; /* ARexx Port */
106 struct MsgPort *snm_port/*=NULL*/; /* ScreenNotify Port */
108 struct MsgPort *hotkeymsg_port/*=NULL*/; /* Messages to the hotkey task */
109 struct MsgPort *clockmsg_port/*=NULL*/; /* Messages to the clock task */
111 //struct IOStdReq *keyboard_req/*=NULL*/; /* Keyboard IO Request block */
112 struct IOStdReq *input_req/*=NULL*/; /* Input IO Request block */
114 /* DOS objects */
116 BPTR ramdisk_lock/*=0*/; /* Lock on RAM: */
117 APTR windowptr_save/*=NULL*/; /* Saved Window Pointer */
118 BPTR nil_file_handle/*=0*/; /* Handle on the NIL: device */
120 BPTR old_pr_cis/*=0*/; /* Old pr_CIS pointer */
121 BPTR old_pr_cos/*=0*/; /* Old pr_COS pointer */
122 void *old_pr_consoletask/*=NULL*/; /* Old pr_ConsoleTask pointer */
124 /* General objects */
126 struct DOpusRemember *general_key/*=NULL*/; /* General memory key */
127 struct DOpusRemember *help_key/*=NULL*/; /* Memory key for help files */
128 struct DOpusRemember *filetype_key/*=NULL*/; /* Memory key for filetype list */
129 struct DOpusRemember *menu_key/*=NULL*/; /* Memory key for menus */
131 UWORD *nullpalette/*=NULL*/; /* Pointer to a black palette */
133 struct UserInfo *user_info/*=NULL*/; /* UserInfo for envoy */
134 struct GroupInfo *group_info/*=NULL*/; /* GroupInfo for envoy */
135 struct muUserInfo *mu_userinfo/*=NULL*/; /* UserInfo for multiuser */
136 struct muGroupInfo *mu_groupinfo/*=NULL*/; /* GroupInfo for multiuser */
138 struct ScreenNotifyMessage *snm/*=NULL*/;
139 struct Locale *locale/*=NULL*/;
141 /* Directory Opus Internal objects */
143 struct Directory
144 *last_selected_entry/*=NULL*/; /* The last entry selected */
145 struct Help *dopus_firsthelp/*=NULL*/; /* The first help message */
146 struct dopusfiletype
147 *dopus_firsttype/*=NULL*/; /* The first filetype */
148 struct dopusgadgetbanks
149 *dopus_firstgadbank/*=NULL*/; /* The first gadget bank */
150 struct dopusgadgetbanks
151 *dopus_curgadbank/*=NULL*/; /* The current gadget bank */
152 struct dopushotkey
153 *dopus_firsthotkey/*=NULL*/; /* The first hotkey */
154 struct dopushotkey
155 *dopus_globalhotkey/*=NULL*/; /* The last hotkey function */
157 struct DirectoryWindow *dopus_curwin[2]/*={0}*/; /* Currently displayed buffer */
158 struct DirectoryWindow
159 *dopus_firstwin[2]/*={0}*/; /* First buffer in each window */
160 struct DirectoryWindow
161 *dopus_specialwin[2]/*={0}*/; /* Special buffer for each window */
162 struct DirectoryWindow *dopus_oldwin[2]/*={0}*/; /* Last buffer displayed */
164 void *dir_memory_pool/*=NULL*/; /* Memory pool for allocations */
167 /* String data */
169 char str_config_basename[256]/*={0}*/; /* Configuration base name */
170 char str_config_file[256]/*={0}*/; /* Configuration file */
171 char str_dopusrt_path[256]/*={0}*/; /* DOpusRT path name */
173 char str_select_info[128]/*={0}*/; /* Status bar text for selection info */
174 char *str_select_pattern[4]/*={0}*/; /* Four different Select patterns */
175 char *str_arexx_command/*=NULL*/; /* Entered ARexx command string */
176 char *str_space_string/*=NULL*/; /* 255 spaces in a string */
177 char str_hunt_name[80]/*={0}*/; /* File name to hunt for */
178 char str_hunt_name_parsed[164]/*={0}*/; /* Hunt file parsed */
179 char str_search_string[80]/*={0}*/; /* String to search for */
180 char str_filter[40]/*={0}*/; /* File filter for recursive ops */
181 char str_filter_parsed[84]/*={0}*/; /* File filter parsed */
182 char str_arcorgname[FILEBUF_SIZE]/*={0}*/; /* Original name of temporarily unarchived file */
183 char str_version_string[30]/*={0}*/; /* Current version string */
184 char str_arexx_portname[30]/*={0}*/; /* ARexx Port name */
186 //UBYTE var_key_matrix[13]/*={0}*/; /* Keyboard matrix data area */
187 char *str_last_statustext/*=NULL*/; /* Last status text displayed */
189 char *str_last_rexx_result/*=NULL*/; /* Last ARexx result */
191 const char *str_protbits="HSPARWED";
193 /* Various data */
195 BYTE status_iconified/*=0*/; /* Current iconified status */
196 BYTE status_configuring=-1; /* Configuring status */
197 BYTE status_justabort/*=0*/; /* Have we just aborted? */
198 BYTE status_haveaborted/*=0*/; /* The abort sequence has been hit */
199 BYTE status_rexxabort/*=0*/; /* Abort flag for ARexx scripts */
200 BYTE status_previousabort/*=0*/; /* Did we abort a while ago ? */
201 BYTE status_publicscreen/*=0*/; /* Are we on a public screen? */
202 ULONG status_flags/*=0*/; /* Various status bits */
204 BYTE data_active_window/*=0*/; /* Active directory window */
205 UBYTE data_buffer_count[2]/*={0}*/; /* Number of buffers in each window */
206 BYTE data_gadgetrow_offset/*=0*/; /* Gadget row offset */
207 WORD data_drive_offset/*=0*/; /* Current drive offset */
208 ULONG data_colorclock/*=0*/; /* Color clock value for this system */
210 ULONG time_current_sec/*=0*/; /* Current Second (from Intuition) */
211 ULONG time_current_micro/*=0*/; /* Current Micro (from Intuition) */
212 ULONG time_previous_sec/*=0*/; /* Previous Second (from Intuition) */
213 ULONG time_previous_micro/*=0*/; /* Previous Micro (from Intuition) */
215 UBYTE system_version2/*=0*/; /* OS version 2 or greater */
216 int system_dopus_runcount/*=0*/; /* Run count of this copy */
218 UWORD scr_gadget_rows/*=0*/; /* Number of button rows */
219 UWORD scr_gadget_bank_count/*=0*/; /* Number of button banks */
221 UWORD scr_min_width/*=0*/; /* Minimum window width */
222 UWORD scr_min_height/*=0*/; /* Minimum window height */
224 APTR snm_handle/*=NULL*/; /* ScreenNotify handle */
225 struct SysInfo *sysinfo/*=NULL*/; /* SysInfo.library */
227 int askeach/* = 0*/; /* Should replace requester be displayed */
228 int autoskip/* = 0*/; /* Should files be automatically owerwritten */
230 /* Configuration data */
232 struct Config *config/*=NULL*/; /* Configuration structure */
233 BPTR configopus_segment/*=NULL*/; /* Segment pointer for ConfigOpus */
234 BPTR external_mod_segment[3]/*={0}*/; /* External module segments */
235 BYTE config_changed/*=0*/; /* Configuration has been changed */
237 const char *config_replyport_basename="dopus4_config_reply";
239 /* Disk and DOS operations data */
241 UBYTE disk_change_state/*=0*/; /* Lower bits indicate change state */
243 #ifdef __GNUC__
244 unsigned long long dos_global_bytecount/*=0*/; /* Global byte count from recursive op */
245 unsigned long long dos_global_copiedbytes/*=0*/; /* Bytes copied in a recursive op */
246 unsigned long long dos_global_deletedbytes/*=0*/; /* Bytes copied in a recursive op */
247 #else
248 ULONG dos_global_bytecount/*=0*/; /* Global byte count from recursive op */
249 ULONG dos_global_copiedbytes/*=0*/; /* Bytes copied in a recursive op */
250 ULONG dos_global_deletedbytes/*=0*/; /* Bytes copied in a recursive op */
251 #endif
252 ULONG dos_global_blocksneeded/*=0*/; /* Number of blocks needed to copy */
253 ULONG dos_global_files/*=0*/; /* Number of files found in a recursive op */
255 struct DateStamp dos_copy_date/*={0}*/; /* DateStamp of file last copied */
256 ULONG dos_copy_protection/*=0*/; /* Protection of file last copied */
257 char dos_copy_comment[80]/*={0}*/; /* Comment of file last copied */
259 BOOL glob_unprotect_all/*=0*/; /* Unprotect all files */
261 BOOL global_swap_window=FALSE; /* Active window changed */
263 struct Directory dos_global_entry/*={0}*/; /* Global single file entry */
265 struct NotifyRequest *dos_notify_req[2]/*={0}*/; /* Notify requests for both windows */
266 char dos_notify_names[2][256]/*={{0},{0}}*/; /* Notify requests name buffers */
268 struct recpath *rec_firstpath/*=NULL*/; /* Directory path list pointer */
269 struct DOpusRemember *rec_pathkey/*=NULL*/; /* Memory key for dir list */
271 char *icon_type_names[]={ /* Names of different icon types */
272 "Disk",
273 "Drawer",
274 "Tool",
275 "Project",
276 "Trash",
277 "Device",
278 "Kick",
279 "AppIcon"};
281 struct DOpusRemember *recurse_dir_key/*=NULL*/; /* Memory key for RecursiveDirectory's */
282 struct RecursiveDirectory *first_recurse/*=NULL*/; /* First recursive directory pointer */
283 int recurse_max_depth/*=0*/ ; /* Maximum depth reached */
285 struct path_complete completion[2]/*={{0},{0}}*/; /* Path-name completion data */
287 /* DateTime stuff */
289 //char *date_months[12]/*={0}*/; /* Months */
290 //char *date_shortmonths[12]/*={0}*/; /* Short months */
291 //char *date_weekdays[7]/*={0}*/; /* Weekdays */
292 //char *date_shortweekdays[7]/*={0}*/; /* Short weekdays */
293 //char *date_special[4]/*={0}*/; /* Special days */
295 struct StringData stringdata/*={ // String data
296 NULL,
298 NULL,
299 NULL,0,
301 NULL,NULL}*/; // JRZ
303 extern UWORD __chip appicon_data[];
304 struct Image appicon_image = { 0,0,80,40,2,appicon_data,3,0,0};
305 struct DiskObject *user_appicon/* = NULL*/; // HUX: User selected app icon