mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-06 16:30:01 +00:00
1 line
23 KiB
Plaintext
1 line
23 KiB
Plaintext
|
LOAD 'Macros.dump'
INCLUDE 'M16.Profile'
INCLUDE 'SS.equ'
INCLUDE 'Driver.equ'
INCLUDE 'Heap.aii.i'
;-----------------------------------------------
;
; Imported addresses
;
;-----------------------------------------------
IMPORT D_GrowHandle
IMPORT D_MemoryError
IMPORT D_NeedHand
IMPORT D_SetFileChanged
IMPORT D_SetUndoStr
IMPORT S_AcceptCell
IMPORT S_ActivateScrlBars
IMPORT S_ActiveWindow
IMPORT S_AddCellToChangedList
IMPORT S_AdjustSheetColumns
IMPORT S_CalculateSheet
IMPORT S_CellWidth
IMPORT S_ChangeColWidth
IMPORT S_ChangeDef
IMPORT S_CurBRSelect
IMPORT S_CurDefColWd
IMPORT S_CurEditFlag
IMPORT S_CurTLSelect
IMPORT S_CurWindow
IMPORT S_DeltaMove
IMPORT S_DoMove
IMPORT S_DoTranspose
IMPORT S_DrawMove
IMPORT S_GetCellIndex
IMPORT S_GetDestCellRanges
IMPORT S_GetSSScrap
IMPORT S_InRange
IMPORT S_MoveDestBR
IMPORT S_MoveDestTL
IMPORT S_MoveSrcBR
IMPORT S_MoveSrcTL
IMPORT S_NewLineEdit
IMPORT S_PutSSScrap
IMPORT S_RedrawCellRange
IMPORT S_RefreshScreen
IMPORT S_ScrapBR
IMPORT S_ScrapBottom
IMPORT S_ScrapBuffer
IMPORT S_ScrapLeft
IMPORT S_ScrapPasteType
IMPORT S_ScrapRight
IMPORT S_ScrapTL
IMPORT S_ScrapTop
IMPORT S_SwapColumns
IMPORT S_SwapIn
IMPORT S_SwapRows
IMPORT S_TraverseRange
;-----------------------------------------------
;
; Forward addresses and entries
;
;-----------------------------------------------
ENTRY S_BuildColWdUndo
ENTRY S_BuildSimpleUndo
ENTRY S_DeleteUndo
ENTRY S_FixLE
ENTRY S_SetUndoOff
ENTRY S_UndoClearStr
ENTRY S_UndoColWdStr
ENTRY S_UndoCutStr
ENTRY S_UndoDeleteStr
ENTRY S_UndoEntryStr
ENTRY S_UndoFillStr
ENTRY S_UndoImportStr
ENTRY S_UndoInsertStr
ENTRY S_UndoMoveStr
ENTRY S_UndoPasteFormatStr
ENTRY S_UndoPasteStr
ENTRY S_UndoPasteValuesStr
ENTRY S_UndoSortStr
ENTRY S_UndoTransposeStr
ENTRY S_UndoTrashCells
;-----------------------------------------------------------------------------
;
;
S_UndoData PROC EXPORT
EXPORT S_UndoInProgress
EXPORT S_NewUndoHandle
EXPORT S_NewUndoLocation1
EXPORT S_NewUndoLocation2
EXPORT S_UndoType
EXPORT S_UndoHandle
EXPORT S_UndoLocation1
EXPORT S_UndoLocation2
EXPORT S_UndoNames
EXPORT S_UndoColWdStr
EXPORT S_UndoEntryStr
EXPORT S_UndoClearStr
EXPORT S_UndoCutStr
EXPORT S_UndoPasteStr
EXPORT S_UndoPasteValuesStr
EXPORT S_UndoPasteFormatStr
EXPORT S_UndoFillStr
EXPORT S_UndoMoveStr
EXPORT S_UndoDeleteStr
EXPORT S_UndoInsertStr
EXPORT S_UndoTransposeStr
EXPORT S_UndoSortStr
EXPORT S_UndoImportStr
S_UndoInProgress DC.W 0
S_NewUndoHandle DS.B 4
S_NewUndoLocation1 DS.B 4
S_NewUndoLocation2 DS.B 4
S_UndoType DS.B 2
S_UndoHandle DS.B 4
S_UndoLocation1 DS.B 4
S_UndoLocation2 DS.B 4
S_UndoNames
DC.L 0
DC.L S_UndoColWdStr
DC.L S_UndoEntryStr
DC.L S_UndoClearStr
DC.L S_UndoCutStr
DC.L S_UndoPasteStr
DC.L S_UndoPasteValuesStr
DC.L S_UndoPasteFormatStr
DC.L S_UndoFillStr
DC.L S_UndoMoveStr
DC.L S_UndoDeleteStr
DC.L S_UndoInsertStr
DC.L S_UndoTransposeStr
DC.L S_UndoSortStr
DC.L S_UndoImportStr
S_UndoColWdStr str 'Column Width Change'
S_UndoEntryStr str 'Entry'
S_UndoClearStr str 'Clear'
S_UndoCutStr str 'Cut'
S_UndoPasteStr str 'Paste'
S_UndoPasteValuesStr str 'Paste Values'
S_UndoPasteFormatStr str 'Paste Format'
S_UndoFillStr str 'Fill'
S_UndoMoveStr str 'Move'
S_UndoDeleteStr str 'Delete'
S_UndoInsertStr str 'Insert'
S_UndoTransposeStr str 'Transpose'
S_UndoSortStr str 'Sort'
S_UndoImportStr str 'Import'
ENDP
;-----------------------------------------------------------------------------
;
;
S_SetUndoOn PROC EXPORT
;Using S_CurrentData
;Using S_UndoData
input Type:w
BEGIN
Call S_SetUndoOff
lda S_NewUndoHandle
ora S_NewUndoHandle+2
beq Exit
MoveWord Type,S_UndoType
asl a
asl a
tax
PushLong S_UndoNames:x
lda Type
bpl highBitOK
lda 3,s
ora #$8000
sta 3,s
highBitOK
Call D_SetUndoStr,in=
|