Unit SFXmisc

*****************************************************************) (* Copyright 1997, Microchip Systems / Carl Bunton *) (* Email: Twojags@cris.com *) (* Web-page: http://www.concentric.net/~twojags *) (* *) (* This program was written in Delphi 2 because version 2 *) (* compiles a much smaller executable using the windows api. It *) (* should be fully compatible with Delphi 3, but will produce a *) (* noticable increase of size in the final compiled program. *) (* *) (*MODIFIED by M. Stephany mirbir.st@t-online.de 12/28/97-01/04/98*) (* for some special purposes; modified lines are marked (##) *) (

Classes

Functions

AppendDirTail - --------------------------------------------------------------------------
CenterDialog - (FileLen: LONGINT);

--------------------------------------------------------------------------*) (* CenterDialog --- Center dialog on screen.
Crc32_Buf - --------------------------------------------------------------------------
ExtractFileName - --------------------------------------------------------------------------
ExtractFilePath - --------------------------------------------------------------------------
FileExists - --------------------------------------------------------------------------
ForceDirectories - --------------------------------------------------------------------------
FSeek - --------------------------------------------------------------------------
IsSelected - --------------------------------------------------------------------------
Min - --------------------------------------------------------------------------
PCharToStr - --------------------------------------------------------------------------*) (* Set the contents of a STRING
RemoveDirTail - --------------------------------------------------------------------------
StrLen - --------------------------------------------------------------------------
StrToInt - --------------------------------------------------------------------------
Unstore - ## added to get the result of a proccessarchive in sfxgbls.

Types

Constants

CM_CANCEL
CM_CONFIRM
CM_EDIT1
CM_LIST
CM_NO
CM_NOASK
CM_OK
CM_OVERWRITE
CM_SKIP
CM_STATUS
CM_YES
fsMaxPassword
fsMaxPath

Variables

CurrentFile
ExtPath
FilePos
HasStoredPaths
Index
MainWin
OverWriteFile
OverWriteMode
Password
processresult
PW
PWLen
StartOfFile


Functions


FUNCTION AppendDirTail(sDir: PCHAR) : PCHAR;

--------------------------------------------------------------------------

PROCEDURE CenterDialog(Wnd : hWnd);

(FileLen: LONGINT);

--------------------------------------------------------------------------*) (* CenterDialog --- Center dialog on screen. *) (*--------------------------------------------------------------------------


PROCEDURE Crc32_Buf(str: PCHAR; len: INTEGER; VAR crc: LONGINT);

--------------------------------------------------------------------------

FUNCTION ExtractFileName(FileName: STRING): STRING;

--------------------------------------------------------------------------

FUNCTION ExtractFilePath(Filename: STRING): STRING;

--------------------------------------------------------------------------

FUNCTION FileExists(Filename: PCHAR): BOOLEAN;

--------------------------------------------------------------------------

PROCEDURE ForceDirectories(Dir: STRING);

--------------------------------------------------------------------------

PROCEDURE FSeek(Offset: LONGINT; MoveMethod: WORD);

--------------------------------------------------------------------------

FUNCTION IsSelected (hWndList: hWnd; Filename: pchar): boolean;

--------------------------------------------------------------------------

FUNCTION Min(CONST I1, I2: LONGINT): LONGINT;

--------------------------------------------------------------------------

FUNCTION PCharToStr(p: PCHAR; Len: WORD): STRING;

--------------------------------------------------------------------------*) (* Set the contents of a STRING

FUNCTION RemoveDirTail(sDir: PCHAR) : PCHAR;

--------------------------------------------------------------------------

FUNCTION StrLen(Str: PCHAR): WORD;

--------------------------------------------------------------------------

FUNCTION StrToInt(CONST S: STRING): LONGINT;

--------------------------------------------------------------------------

PROCEDURE Unstore;

## added to get the result of a proccessarchive in sfxgbls.pas

--------------------------------------------------------------------------


Types


Constants

CM_CANCEL = 2

CM_CONFIRM = 503

CM_EDIT1 = 101

CM_LIST = 301

CM_NO = 2

CM_NOASK = 401

CM_OK = 1

CM_OVERWRITE = 501

CM_SKIP = 502

CM_STATUS = 601

CM_YES = 1

Dialog Control-IDs *) //## here some controls are removed

fsMaxPassword = 80

fsMaxPath = 256


Variables

CurrentFile : STRING

ExtPath : ARRAY[0..fsMaxPath-1] OF CHAR

FilePos : LONGINT

BYTE

HasStoredPaths : Boolean

Index : LONGINT

MainWin : hWnd

OverWriteFile : BOOLEAN

OverWriteMode : BYTE

startofstored : dword;

Password : ARRAY[0..fsMaxPassword-1] OF CHAR

processresult : boolean

PW : STRING

PWLen : LONGINT {BYTE}

StartOfFile : LONGINT