Fresh IDE . Check-in [aed858876c]
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

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove redundant string.
Timelines: family | ancestors | descendants | both | FreshLibDev
Files: files | file ages | folders
SHA1:aed858876ccede44f265ce87a2933c06ed8a04dc
User & Date: johnfound 2018-12-14 18:49:47
Context
2018-12-14
19:58
More precise emoticon encoding. check-in: e00eaed541 user: johnfound tags: FreshLibDev
18:49
Remove redundant string. check-in: aed858876c user: johnfound tags: FreshLibDev
2018-12-09
14:14
Check for end of the text in order to not miss it. check-in: 89738f4ec5 user: johnfound tags: FreshLibDev
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to freshlib/data/bbcode.asm.

108
109
110
111
112
113
114

115

116

117
118
119
120

121
122
123
124
125
126
127
...
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
...
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497

  label . dword
if used .
  ..pref flex prefix
  ..suff flex suffix
  ..close flex close


  dd ..pref, ..pref#\.length

  dd ..suff, ..suff#\.length

  dd ..close, ..close#\.length
  dd flags
end if
}


fEmptyAttr    = $00000001        ; empty value of the attribute is acceptable.
fBlockTag     = $00000002        ; This is a block tag. Allows paragraph generation and resets its state.
fDisableTags  = $00000004        ; Disable tag generation inside this block; The only tag that is recongized is the respective closing tag.
fLines        = $00000008        ; the tag can contain text lines.
fInlineTag    = $00000010
fMinimagBlock = $80000000        ; The tags, that are open/close by ;tagname/;end in MiniMagAsm
................................................................................
  emoTongue       onetag <'<img class="emoticon" src="', EMOTICONS_PATH, 'tongue.gif" alt=":P">'>,  0,              0,              0
  emoSad          onetag <'<img class="emoticon" src="', EMOTICONS_PATH, 'sad.gif" alt=":(">'>,     0,              0,              0
  emoCry          onetag <'<img class="emoticon" src="', EMOTICONS_PATH, 'cry.gif" alt=":`(">'>,    0,              0,              0
  emoAngry        onetag <'<img class="emoticon" src="', EMOTICONS_PATH, 'angry.gif" alt=">:(">'>,  0,              0,              0

endg

cParagraphTag text "<p>"

;--------------------------------------------------------------
; Converts BB code into HTML. Starts from the position [.from]
; and ends at the end of the text or at first NULL character.
;
; Arguments:
;    .pBBCode - pointer to the TText structure with the BBCode
................................................................................

        test    [.tagFlags], fBlockTag
        jnz     .clear_newline

        cmp     [.fNewLine], 1
        jbe     .copy_tag_prefix

        mov     esi, cParagraphTag
        mov     ecx, cParagraphTag.length
        add     edi, ecx
        call    .copy_tag

.clear_newline:

        and     [.fNewLine], 0








>
|
>
|
>
|
|


>







 







<







 







|
|







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
...
176
177
178
179
180
181
182

183
184
185
186
187
188
189
...
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500

  label . dword
if used .
  ..pref flex prefix
  ..suff flex suffix
  ..close flex close

  .pOpenP dd ..pref
  .lOpenP dd ..pref#\.length
  .pOpenS dd ..suff
  .lOpenS dd ..suff#\.length
  .pClose dd ..close
  .lClose dd ..close#\.length
  .flags  dd flags
end if
}


fEmptyAttr    = $00000001        ; empty value of the attribute is acceptable.
fBlockTag     = $00000002        ; This is a block tag. Allows paragraph generation and resets its state.
fDisableTags  = $00000004        ; Disable tag generation inside this block; The only tag that is recongized is the respective closing tag.
fLines        = $00000008        ; the tag can contain text lines.
fInlineTag    = $00000010
fMinimagBlock = $80000000        ; The tags, that are open/close by ;tagname/;end in MiniMagAsm
................................................................................
  emoTongue       onetag <'<img class="emoticon" src="', EMOTICONS_PATH, 'tongue.gif" alt=":P">'>,  0,              0,              0
  emoSad          onetag <'<img class="emoticon" src="', EMOTICONS_PATH, 'sad.gif" alt=":(">'>,     0,              0,              0
  emoCry          onetag <'<img class="emoticon" src="', EMOTICONS_PATH, 'cry.gif" alt=":`(">'>,    0,              0,              0
  emoAngry        onetag <'<img class="emoticon" src="', EMOTICONS_PATH, 'angry.gif" alt=">:(">'>,  0,              0,              0

endg



;--------------------------------------------------------------
; Converts BB code into HTML. Starts from the position [.from]
; and ends at the end of the text or at first NULL character.
;
; Arguments:
;    .pBBCode - pointer to the TText structure with the BBCode
................................................................................

        test    [.tagFlags], fBlockTag
        jnz     .clear_newline

        cmp     [.fNewLine], 1
        jbe     .copy_tag_prefix

        mov     esi, [tagPara.pOpenP]
        mov     ecx, [tagPara.lOpenP]
        add     edi, ecx
        call    .copy_tag

.clear_newline:

        and     [.fNewLine], 0