Include file for Proteus common
functions |
; Include file for Proteus common functions
; **** Constants for FOPEN ****
; open for reading
CONST FO_READ 1
; open for writing
CONST FO_WRITE 2
; open for reading/writing
CONST FO_RDWR 4
; create if it does not exist
CONST FO_CREATE 8
; truncate if exists
CONST FO_TRUNC 16
; **** Constants for FSEEK ****
; offset from the beginning of file
CONST SEEK_SET 0
; offset from current position
CONST SEEK_CUR 1
; offset from the end of file
CONST SEEK_END 2
; **** Constants for ISFILE ****
; file not found
CONST ISFILE_ERR 0
; exists as a file
CONST ISFILE_FILE 1
; exists as a directory
CONST ISFILE_DIR 2
; exists as a link
CONST ISFILE_LINK 3
; **** Costants for FATTRIB and CHMOD ****
!ifdef UNIX
; execution right for user
CONST ATTR_USREXE 1
; writing right for user
CONST ATTR_USRWRITE 2
; reading right for user
CONST ATTR_USRREAD 4
; directory
CONST ATTR_DIRECTORY 8
; symbolic link
CONST ATTR_LINK 16
; execution right for group
CONST ATTR_GRPEXE 32
; writing right for group
CONST ATTR_GRPWRITE 64
; reading right for group
CONST ATTR_GRPREAD 128
; execution right for others
CONST ATTR_OTHEXE 256
; writing right for others
CONST ATTR_OTHWRITE 512
; reading right for others
CONST ATTR_OTHREAD 1024
; execution right
CONST RIGHT_EXE 1
; writing right
CONST RIGHT_WRITE 2
; reading right
CONST RIGHT_READ 4
!else
; read-only
CONST ATTR_RDONLY 1
; hidden
CONST ATTR_HIDDEN 2
; system
CONST ATTR_SYSTEM 4
; directory
CONST ATTR_DIRECTORY 16
; to be archived
CONST ATTR_ARCHIVE 32
!endif
; **** Constants for DICUPDATE ****
; error
CONST DIC_ERROR 0
; definition added to dictionary
CONST DIC_ADDED 1
; definition modified in dictionary
CONST DIC_MODIFIED 2
; definition removed from dictionary
CONST DIC_REMOVED 3
; **** Constants for DIROPEN ****
; find among files
CONST DO_FILE 1
; find among directories
CONST DO_DIRECTORY 2
; include special directory "."
CONST DO_DOT 4
; include special directory ".."
CONST DO_DDOT 8
; find among links
CONST DO_LINK 16
; **** Constants for DIRLAST ****
; name
CONST DL_NAME 1
; size
CONST DL_SIZE 2
; last modification date
CONST DL_MDATE 3
; last modification time
CONST DL_MTIME 4
; attributes
CONST DL_ATTRIB 5
; creation date
CONST DL_CDATE 6
; creation time
CONST DL_CTIME 7
; last access date
CONST DL_ADATE 8
; last access time
CONST DL_ATIME 9
; **** Constants for SORT/SCAN ****
; sort as a list of strings
CONST SORT_STRING 0
; sort as a list of integers
CONST SORT_INTEGER 1
; sort as a list of floating points
CONST SORT_FLOAT 2
; sort as a list of dates
CONST SORT_DATE 3
; sort as a list of strings (case unsensitive)
CONST SORT_ISTRING 4
; find using basic regular expression
CONST SORT_MATCH 5
; find using basic regular expression (case unsensitive)
CONST SORT_IMATCH 6
; find using extended regular expression
CONST SORT_REXMATCH 7
; find using extended regular expression (case unsensitive)
CONST SORT_REXIMATCH 8
; descending order
CONST SORT_DESCENDING 0
; ascending order
CONST SORT_ASCENDING 1