Fresh IDE . Diff
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

Differences From Artifact [4ad957ca00]:

To Artifact [ad1c80cf84]:


455
456
457
458
459
460
461
462

463
464
465
466
467
468
469
455
456
457
458
459
460
461

462
463
464
465
466
467
468
469







-
+








        cmp     byte [.word], '.'
        jne     .localok

        cmp     [hCCPrefix], 0
        jne     .prefixok

        stdcall SearchForLabelPrefix, [.aedit], [.aepos.caretLine]
        stdcall SearchForLabelPrefixInEditor, [.aedit], [.aepos.caretLine]
        mov     [hCCPrefix], eax

.prefixok:
        cmp     [hCCPrefix], 0
        je      .localok

        stdcall StrLen, [hCCPrefix]
617
618
619
620
621
622
623















624

625
626
627
628
629

630
631
632
633

634
635
636
637
638
639
640
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638

639
640
641
642


643
644
645
646

647
648
649
650
651
652
653
654







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+



-
-
+



-
+







endp


; searches the preprocessed source for the last global label definition before the
; specified line in the file. Returns the name of this label as a string in eax.
; If such label is not found, returns eax=0

proc SearchForLabelPrefixInEditor, .editor, .caretY
begin
        push    ecx edx
        stdcall GetEditorFile, [.editor]
        stdcall SearchForLabelPrefix, [eax+TOpenFile.hFileName], [.caretY]
        pop     edx ecx
        return
endp



; searches the preprocessed source for the last global label definition before the
; specified line in the file. Returns the name of this label as a string in eax.
; If such label is not found, returns eax=0

proc SearchForLabelPrefix, .editor, .caretY
proc SearchForLabelPrefix, .hFilename, .line
begin
        push    edx esi

        stdcall GetEditorFile, [.editor]
        stdcall SearchFileInGlobalIndex, [eax+TOpenFile.hFileName]
        stdcall SearchFileInGlobalIndex, [.hFilename]
        jc      .not_found

        mov     esi, eax        ; pointer to TArray of strinigs for needed file.
        mov     edx, [.caretY]
        mov     edx, [.line]
        dec     edx

        cmp     edx, [esi+TArray.count]
        jb      .lineok

        mov     edx, [esi+TArray.count]
        dec     edx