home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
DATABASE
/
MED300.ZIP
/
MEMOEDIT.CLA
< prev
next >
Wrap
Text File
|
1994-02-22
|
12KB
|
213 lines
!▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
!█ █
!█ MEMOEDIT.CLA █
!█ Memo and ASCII file editor for Clarion 3.0 █
!█ █
!█ Revision : 1 █
!█ █
!█ Copyright : Bobcat Systems (c) 1994 █
!█ Author : Robert J. Pupazzoni, Bobcat Systems █
!█ █
!█ Compiler : Clarion Database Developer 3.0, Batch 3006 █
!█ █
!█ REVISION HISTORY █
!█ 1 Created █
!█ █
!▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
MEMOEDIT PROGRAM
!─────────────────────────────────────────────────────────────────────────
! E Q U A T E S
!─────────────────────────────────────────────────────────────────────────
INCLUDE('KEYCODES.EQU') ! Keycodes
INCLUDE('MEMOEDIT.EQU' ) ! Editor equates
!─────────────────────────────────────────────────────────────────────────
! P R O G R A M M A P
!─────────────────────────────────────────────────────────────────────────
MAP
MODULE('MEBLOCK') ! Block operations:
ME_NormBlock() ! Normalize block
ME_MarkOn() ! Turn block marking on
ME_MarkOff() ! Turn block marking off
ME_Copy2Clip() ! Copy block to clipboard
ME_Cut2Clip() ! Cut block to clipboard
ME_PasteClip() ! Paste clipboard
.
MODULE('MECORE') ! Core editing operations:
ME_GetChar( USHORT ),BYTE ! Get character from buffer
ME_PutChar( USHORT, BYTE ) ! Put character to buffer
ME_GetBlock( *STRING, USHORT, USHORT ) ! Get block from buffer
ME_InsTxt( USHORT, USHORT, STRING ) ! Insert text into buffer
ME_DelTxt( USHORT, USHORT ) ! Delete text from buffer
.
MODULE('MEDELETE') ! Deletion operations:
ME_DelChar() ! Delete character
ME_DelEOL() ! Delete to end-of line
ME_DelLine() ! Delete entire line
.
MODULE('MEDONE') ! Clean-up and termination:
ME_Done() ! Free mem / restore context
.
MODULE('MEEDIT') ! Main edit loop:
ME_BufrFull(), BYTE ! Check for buffer full
ME_Edit() ! Edit current document
.
MODULE('MEFILE') ! File operations:
ME_PickFile( STRING ),STRING ! File/directory picklist
ME_PasteFile() ! Paste file
ME_Copy2File() ! Copy marked block to file
ME_EditFile( STRING, <USHORT> ) ! Edit file
.
MODULE('MEINIT') ! Initialization:
ME_InitMemo( *STRING[] ) ! Allocate and init context
.
MODULE('MELINTBL') ! Line table access:
ME_AdjLines( USHORT, USHORT ) ! Adjust line pointers
ME_LineIndex( USHORT ),USHORT ! Find line index
ME_LineStart( USHORT ),USHORT ! Find line start
ME_LineEnd( USHORT ),USHORT ! Find line end
.
MODULE('MEPACK') ! Memo packing/unpacking:
ME_Pack( *STRING[], <BYTE> ) ! Pack memo
ME_Unpack( *STRING[], USHORT ) ! Unpack memo
.
MODULE('MEREFORM') ! Reformatting:
ME_LineBreak( USHORT, USHORT ),USHORT ! Calculate line break
ME_ReformDoc() ! Reformat document
ME_ReformPar( USHORT ) ! Reformat paragraph
.
MODULE('MESCRDEF') ! Screen defaults:
ME_ScrnDefs( BYTE, BYTE, BYTE, BYTE ) ! Set screen defaults
.
MODULE('MESCREEN') ! Screen access:
ME_SetPage() ! Invalidate display page
ME_ShowPage() ! Refresh display
ME_CurPos() ! Position cursor
ME_CurSize( BYTE ) ! Set cursor size
.
MODULE('MEUTIL') ! Miscellanous:
IsAlerted( SHORT ),BYTE ! See if key is ALERTed
UnAlert( SHORT, SHORT ) ! UnALERT a key
ME_Max( LONG, LONG ),LONG ! Larger of 2 integers
ME_Min( LONG, LONG ),LONG ! Smaller of 2 integers
ME_Entry( STRING ),STRING ! String input dialog
ME_Confirm( STRING, <BYTE> ),BYTE ! Confirmation dialog
.
MODULE('MEWORD') ! Word movement:
ME_WordLeft( SHORT ),SHORT ! Move to previous word
ME_WordRight( SHORT ),SHORT ! Move to next word
.
MODULE('CLMEM') ! C memory library:
CFree( ULONG ), | !
NAME('CFree') !
CMalloc( USHORT ), ULONG, | !
NAME('CMalloc') !
CMemMove( ULONG, ULONG, USHORT ), | !
NAME('CMemMove') !
CMemSet( ULONG, USHORT, USHORT ), | !
NAME('CMemSet') !
CMemWSet( ULONG, USHORT, USHORT ), | !
NAME('CMemWSet') !
.
MODULE('RTL') ! Runtime library:
DeAlert( USHORT, USHORT ), | ! (See API Toolkit docs)
NAME('Cla$de_alert') !
FindAlert( SHORT ), | !
NAME('Cla$find_alert') !
FindFirst( *CSTRING, *GROUP, SHORT ),SHORT, |
RAW,NAME('_findfirst') !
FindNext( *GROUP ),SHORT, | !
RAW,NAME('_findnext') !
Int86x( SHORT, *GROUP, *GROUP, *GROUP ), SHORT, |
RAW,NAME('_int86x') !
QShow( *STRING, USHORT, USHORT, USHORT, BYTE, USHORT ), |
RAW,NAME('Cla$qshow') !
.
.
! ─────────────────────────────────────────────────────────────────────────
! S C R E E N S
! ─────────────────────────────────────────────────────────────────────────
wStatus SCREEN(1,80),PRE(MES),AT(25,1),COLOR(112)
ssStatus ROW(1,3) STRING(76),COLOR(112)
.
! ─────────────────────────────────────────────────────────────────────────
! G L O B A L V A R I A B L E S
! ─────────────────────────────────────────────────────────────────────────
gUserDefs GROUP,PRE(MEU) !User-defined defaults:
sHelpID STRING(8) ! Help screen ID
sFilePath STRING(80) ! Path to prepend for OPEN()
bbSizeToFit BYTE(1) ! Size memo to fit on screen?
bbShowStatus BYTE(1) ! Show status line?
ubStatusRow BYTE(25) ! Status line display row
bbAlrtBfrCmd BYTE(0) ! Check ALERTs before cmnds?
bbAlrtBfrMac BYTE(1) ! Check ALERTs before macros?
ubAscImpFmt BYTE(eImpRefNone) ! Default ASCII import format
ubAscExpFmt BYTE(eExpKillCode) ! Default ASCII export format
isFlSaveKey SHORT(CtrlEnter) ! File edit 'Save' key
isFlCancKey SHORT(EscKey) ! File edit 'Cancel' key
.
gGlobals GROUP,PRE(MEG) !Internal global variables:
sFileName STRING(80) ! File NAME() variable
isKeyBuffer SHORT(0) ! Look ahead keystroke buffer
ubCursRow BYTE ! Current cursor row
ubCursCol BYTE ! Current cursor column
.
! ─────────────────────────────────────────────────────────────────────────
! M E M O R Y T A B L E S
! ─────────────────────────────────────────────────────────────────────────
qClipboard QUEUE,PRE(MEB) !Clipboard for block
STRING(255) !operations
.
qDocument QUEUE,PRE(MED) !Table of document structures:
ubWndRowOfs BYTE ! Edit window row offset
ubWndColOfs BYTE ! Edit window column offset
ubWndRows BYTE ! Edit window rows
ubWndCols BYTE ! Edit window columns
usLineWidth USHORT ! Line width
ubTextColor BYTE ! Normal text color
ubSymColor BYTE ! Format code color
ubBlockColor BYTE ! Block marking color
bbInsertMode BYTE ! Insert/overwrite flag
bbShowCodes BYTE ! Display format codes flag
bbBlockShow BYTE ! Marked block display flag
bbBlockMark BYTE ! Block marking mode flag
isBlockBegin SHORT ! Start of marked text block
isBlockEnd SHORT ! End of marked text block
bbAllocFlag BYTE ! Buffer allocation flag (*RESERVED*)
ulEditBuffer ULONG ! Pointer to edit buffer (*RESERVED*)
usCharacters USHORT ! Current # of chars document
usMaxChars USHORT ! Max. chars allowed in buffer
bbHasChanged BYTE ! Edit buffer changed flag
usPageTop USHORT ! Line at current top-of-page
usLineNdx USHORT ! Current line index
isSkew SHORT ! Horizontal skew increment
usPosition USHORT ! Current point position
usLineStart USHORT ! Current line start offset
usLineEnd USHORT ! Current line end offset
.
qLine QUEUE,PRE(QLN) !Line table:
usLineStart SHORT ! Line start position
bbRedisplay SHORT ! Redisplay flag
.
CODE