include ..\..\inc\version.inc
include ..\..\inc\plugins\plugins.inc

_C_ZINCSUBDIR	= 01h	; config.c_compress

_COPY_SELECTED	= 01h	; copy selected files
_COPY_IARCHIVE	= 02h	; source is archive
_COPY_OARCHIVE	= 04h	; target is archive
_COPY_IEXTFILE	= 08h	; source is .DLL archive - %doszip%/dll/.dll
_COPY_IZIPFILE	= 10h	; source is .ZIP archive
_COPY_OZIPFILE	= 20h	; target is .ZIP archive
_COPY_OEXTFILE	= 40h	; target is .DLL archive
_COPY_RECURSIV	= 80h	; recursive error

S_XCELL		STRUC
xl_flag		DW ?	; DOBJ.dl_flag
xl_cols		DB ?	; number of files in one line
xl_rows		DB ?	; number of lines in panel
xl_rect		DD ?	; the current position of cell
xl_bp		DD ?	; DOBJ.dl_wp
xl_cpos		DD ?	; position of first cell in panel
S_XCELL		ENDS

S_PANEL		STRUC
pn_path		DW ?	; -- offset S_PATH
pn_flag		DW ?
pn_fcb_count	DW ?
pn_fcb_index	DW ?
pn_cel_count	DW ?
pn_cel_index	DW ?
pn_xl		DD ?
pn_dialog	DD ?
pn_wsub		DD ?
pn_putfcb	DW ?
S_PANEL		ENDS

S_DZDS		STRUC	; DS:[0000]
C0_NULL		dd ?	; Module: C0.ASM
C0_abortmsg	db 30 dup(?)
C0_argc		dw ?
C0_argv		dd ?
C0_psp		dw ?
C0_envlen	dw ?
C0_envseg	dw ?
C0_envsize	dw ?
C0_osversion	dw ?
C0_errno	dw ?
C0_doserrno	dw ?
C0_sys_erproc	dd ?
C0_sys_erdevice dd ?
C0_sys_ercode	dw ?
C0_sys_erflag	db ?
C0_sys_erdrive	db ?
C0_oldint_24	dd ?
C0_oldint_23	dd ?
C0_heaptop	dw ?
C0_heapbase	dw ?
C0_heapfree	dw ?
C0_brklvl	dw ?
DZ_stklen	dw ?	; Module: dzmain.asm
DZ_ifsmgr	db ?	; init value of _ifsmgr
DZ_envconf	dd ?
DZ_envtemp	dd ?
DZ_envpath	dd ?
DZ_comspec	dd ?
DZ_dzexe	dd ?
DZ_dzerrno	dw ?
DZ_dzerflag 	dw ?
DZ_dzcount	dw ?
DZ_mainswitch 	dw ?
DZ_dzexitcode	dw ?
DZ_numfblock 	dw ?
DZ_argvfile	dw ?
DZ_programpath	db MAXPATH dup(?)
DZ_configpath	db MAXPATH dup(?)
DZ_c_version	dw ?
DZ_c_lflag	dw ?
DZ_c_confirm	db ?
DZ_c_console	db ?
DZ_c_exconsole	db ?
DZ_c_fsflag	db ?
DZ_c_tvflag	db ?	; -- tview.asm
DZ_c_teflag	dw ?	; -- tedit.asm
DZ_c_tepages	dw ?	; -- tedit.asm Max EMS pages to alloc
DZ_c_telsize	dw ?	; -- tedit.asm Max line length
DZ_c_compress	db ?	; -- packer.asm (deleted)
DZ_c_ffflag	db ?	; -- packer.asm (deleted)
DZ_c_comprlevel	db ?
DZ_c_panelsize	db ?
DZ_c_flaga	dw ?
DZ_c_fcb_indexa	dw ?
DZ_c_cel_indexa	dw ?
DZ_c_flagb	dw ?
DZ_c_fcb_indexb	dw ?
DZ_c_cel_indexb	dw ?
DZ_c_apath	db 814 dup(?)	; S_PATH
DZ_c_bpath	db 814 dup(?)	; S_PATH
DZ_c_filter	db 270 dup(?)	; S_FILT
DZ_c_color	db  40 dup(?)
DZ_c_deleteme	db 260 dup(?)
DZ_cpanel	dw ?
DZ_panela	dw ?
DZ_panelb	dw ?
DZ_Menusline	dd ?
DZ_Commandline	dd ?
DZ_Statusline	dd ?
DZ_copy_flag	db ?
DZ_copy_fast	db ?
DZ_copy_filecount dw ?
DZ_copy_subdcount dw ?
DZ_srcfile	db 384 dup(?)
DZ_srcpath	db WMAXPATH dup(?)
DZ_outfile	db 384 dup(?)
DZ_outpath	db WMAXPATH dup(?)
DZ_entryname	db 512 dup(?)
DZ_bufin	db 4096 dup(?)
S_DZDS		ENDS

; globals (DS==SS)

_ifsmgr		equ	ds:[DZ_ifsmgr]
_psp		equ	ds:[C0_psp]
envseg		equ	ds:[C0_envseg]
envlen		equ	ds:[C0_envlen]
envsize		equ	ds:[C0_envsize]
_osminor	equ	byte ptr ds:[C0_osversion]
_osmajor	equ	byte ptr ds:[C0_osversion+1]
_osversion	equ	ds:[C0_osversion]
errno		equ	ds:[C0_errno]
doserrno	equ	ds:[C0_doserrno]
sys_erdevice	equ	ds:[C0_sys_erdevice]
sys_ercode	equ	ds:[C0_sys_ercode]
sys_erflag	equ	ds:[C0_sys_erflag]
sys_erdrive	equ	ds:[C0_sys_erdrive]
sys_erproc	equ	ds:[C0_sys_erproc]

envconf		equ	ds:[DZ_envconf]
envtemp		equ	ds:[DZ_envtemp]
envpath		equ	ds:[DZ_envpath]
comspec		equ	ds:[DZ_comspec]
srcpath		equ	ds:[DZ_srcpath]
outpath		equ	ds:[DZ_outpath]
srcfile		equ	ds:[DZ_srcfile]
outfile		equ	ds:[DZ_outfile]
entryname	equ	ds:[DZ_entryname]
_bufin		equ	ds:[DZ_bufin]
panela		equ	ds:[DZ_panela]
panelb		equ	ds:[DZ_panelb]
cpanel		equ	ds:[DZ_cpanel]
compresslevel	equ	ds:[DZ_c_comprlevel]
compressflag	equ	ds:[DZ_c_compress]

dosmaper 	proto
malloc		proto pascal :word
free		proto pascal :dword
rsmodal		proto pascal res:dword
dzexec		proto pascal command:dword, exe_type:byte
dzview		proto pascal fname:dword, offs:dword
dzedit		proto pascal fname:dword, line:word
tgetline 	proto pascal dtitle:dword, buffer:word, bsize:word, lsize:word
dzmklist 	proto pascal o_name:word

