?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. ; issue in v1.15.1 reported on pk-ru forum:
  2. ; sometimes the internal function "cmphstr" is used to detect keywords over raw line data
  3. ; which didn't undergo yet proper substitution and contain block/EOL comment, then it was
  4. ; possible to miss the keyword if the comment char was right after it without whitespace
  5.  
  6.     DEFINE/*c*/xyz
  7.     IFDEF/*c*/xyz
  8.         DB/*c*/1
  9.     ELSE
  10.         ASSERT/*c*/0
  11.     ENDIF
  12.     UNDEFINE/*c*/xyz
  13.  
  14.     ; comment block focused
  15.     IF/*c*/1
  16.         ; nested IF/IFN/IFNUSED
  17.         DB/*c*/2
  18.         IFN/*c*/0
  19.             DB/*c*/3
  20.         ELSE/*c*/
  21.             ASSERT/*c*/0
  22.         ENDIF/*c*/
  23.         ; "//" EOL comment focused
  24.         IF/*c*/1
  25.             DB/*c*/4
  26.         ELSE//c
  27.             ASSERT/*c*/0
  28.         ENDIF//c
  29.         ; ";" EOL comment focused
  30.         IFNUSED/*c*/someLabel
  31.             DB/*c*/5
  32.         ELSE;c
  33.             ASSERT/*c*/0
  34.         ENDIF;c
  35.     ELSE; comment - causing issue in v1.15.1
  36.         ; nested + skipped IF/IFN/IFNUSED
  37.         ASSERT/*c*/0
  38.         IFN/*c*/0
  39.             DB/*c*/-1
  40.         ELSE/*c*/
  41.             ASSERT/*c*/0
  42.         ENDIF/*c*/
  43.         ; "//" EOL comment focused
  44.         IF/*c*/1
  45.             DB/*c*/-2
  46.         ELSE//c
  47.             ASSERT/*c*/0
  48.         ENDIF//c
  49.         ; ";" EOL comment focused
  50.         IFNUSED/*c*/someLabel
  51.             DB/*c*/-3
  52.         ELSE;c
  53.             ASSERT/*c*/0
  54.         ENDIF;c
  55.     ENDIF; comment - causing issue in v1.15.1
  56.  
  57.     DUP/*c*/1
  58.         DB 6
  59.     EDUP//c
  60.  
  61.     STRUCT/*c*/ TestStruct
  62. s_a     BYTE/*c*/-7
  63.     ENDS//c
  64.  
  65.     TestStruct/*c*/{7}
  66.  
  67. ;; LEVEL 2 - add empty defines into sensitive lines to verify they get skipped
  68.  
  69.     DEFINE _EMPTINESS_
  70.  
  71.     ; DEFINE, IFDEF and UNDEFINE can't provide substitution, so they can't attend LEVEL 2
  72.  
  73.     ; comment block focused
  74.     IF/**/_EMPTINESS_/**/1
  75.         ; nested IF/IFN/IFNUSED
  76.         DB/**/_EMPTINESS_/**/10
  77.         IFN/**/_EMPTINESS_/**/0
  78.             DB/**/_EMPTINESS_/**/11
  79.         ELSE/**/_EMPTINESS_/**/
  80.             ASSERT/**/_EMPTINESS_/**/0
  81.         ENDIF/**/_EMPTINESS_/**/
  82.         ; "//" EOL comment focused
  83.         IF/**/_EMPTINESS_/**/1
  84.             DB/**/_EMPTINESS_/**/12
  85.         ELSE/**/_EMPTINESS_//c
  86.             ASSERT/**/_EMPTINESS_/**/0
  87.         ENDIF/**/_EMPTINESS_//c
  88.         ; ";" EOL comment focused
  89.         IFNUSED/**/_EMPTINESS_/**/someLabel
  90.             DB/**/_EMPTINESS_/**/13
  91.         ELSE/**/_EMPTINESS_;c
  92.             ASSERT/**/_EMPTINESS_/**/0
  93.         ENDIF/**/_EMPTINESS_;c
  94.     ELSE; comment - causing issue in v1.15.1
  95.         ; nested + skipped IF/IFN/IFNUSED
  96.         ASSERT/**/_EMPTINESS_/**/0
  97.         IFN/**/_EMPTINESS_/**/0
  98.             DB/**/_EMPTINESS_/**/-11
  99.         ELSE/**/_EMPTINESS_/**/
  100.             ASSERT/**/_EMPTINESS_/**/0
  101.         ENDIF/**/_EMPTINESS_/**/
  102.         ; "//" EOL comment focused
  103.         IF/**/_EMPTINESS_/**/1
  104.             DB/**/_EMPTINESS_/**/-12
  105.         ELSE/**/_EMPTINESS_//c
  106.             ASSERT/**/_EMPTINESS_/**/0
  107.         ENDIF/**/_EMPTINESS_//c
  108.         ; ";" EOL comment focused
  109.         IFNUSED/**/_EMPTINESS_/**/someLabel
  110.             DB/**/_EMPTINESS_/**/-13
  111.         ELSE/**/_EMPTINESS_;c
  112.             ASSERT/**/_EMPTINESS_/**/0
  113.         ENDIF/**/_EMPTINESS_;c
  114.     ENDIF; comment - causing issue in v1.15.1
  115.  
  116.     DUP/**/_EMPTINESS_/**/1
  117.         DB 14
  118.     EDUP/**/_EMPTINESS_//c
  119.  
  120.     STRUCT/**/_EMPTINESS_/**/ TestStruct_L2
  121. s_a     BYTE/**/_EMPTINESS_/**/-14
  122.     ENDS/**/_EMPTINESS_//c
  123.  
  124.     TestStruct_L2/**/_EMPTINESS_/**/{15}
  125.