Subversion Repositories Kolibri OS

Rev

Rev 1568 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1568 Rev 1573
Line 79... Line 79...
79
;;------------------------------------------------------------------------------------------------;;
79
;;------------------------------------------------------------------------------------------------;;
80
;> --- TBD ---                                                                                    ;;
80
;> --- TBD ---                                                                                    ;;
81
;;------------------------------------------------------------------------------------------------;;
81
;;------------------------------------------------------------------------------------------------;;
82
;< --- TBD ---                                                                                    ;;
82
;< --- TBD ---                                                                                    ;;
83
;;================================================================================================;;
83
;;================================================================================================;;
-
 
84
	push ecx
84
	mov	ecx, [_f]
85
	mov	ecx, [_f]
85
	dec	[ecx + IniFile.cnt]
86
	dec	[ecx + IniFile.cnt]
86
	jns	@f
87
	jns	@f
87
	stdcall libini._.preload_block, [_f]
88
	stdcall libini._.preload_block, [_f]
88
	dec	[ecx + IniFile.cnt]
89
	dec	[ecx + IniFile.cnt]
89
    @@: lodsb
90
    @@: lodsb
-
 
91
	pop ecx
90
	ret
92
	ret
91
endp
93
endp
Line 92... Line 94...
92
 
94
 
93
;;================================================================================================;;
95
;;================================================================================================;;
Line 97... Line 99...
97
;;------------------------------------------------------------------------------------------------;;
99
;;------------------------------------------------------------------------------------------------;;
98
;> --- TBD ---                                                                                    ;;
100
;> --- TBD ---                                                                                    ;;
99
;;------------------------------------------------------------------------------------------------;;
101
;;------------------------------------------------------------------------------------------------;;
100
;< --- TBD ---                                                                                    ;;
102
;< --- TBD ---                                                                                    ;;
101
;;================================================================================================;;
103
;;================================================================================================;;
-
 
104
	push ecx
102
	mov	ecx, [_f]
105
	mov	ecx, [_f]
103
    @@: stdcall libini._.get_char, [_f]
106
    @@: stdcall libini._.get_char, [_f]
104
	cmp	al, 32
107
	cmp	al, 32
105
	je	@b
108
	je	@b
106
	cmp	al, 13
109
	cmp	al, 13
Line 112... Line 115...
112
	cmp	al, ini.COMMENT_CHAR
115
	cmp	al, ini.COMMENT_CHAR
113
	jne	@f
116
	jne	@f
114
	stdcall libini._.skip_line, [_f]
117
	stdcall libini._.skip_line, [_f]
115
	jmp	@b
118
	jmp	@b
116
    @@: stdcall libini._.unget_char, [_f]
119
    @@: stdcall libini._.unget_char, [_f]
-
 
120
	pop ecx
117
	ret
121
	ret
118
endp
122
endp
Line 119... Line 123...
119
 
123
 
120
;;================================================================================================;;
124
;;================================================================================================;;
Line 124... Line 128...
124
;;------------------------------------------------------------------------------------------------;;
128
;;------------------------------------------------------------------------------------------------;;
125
;> --- TBD ---                                                                                    ;;
129
;> --- TBD ---                                                                                    ;;
126
;;------------------------------------------------------------------------------------------------;;
130
;;------------------------------------------------------------------------------------------------;;
127
;< --- TBD ---                                                                                    ;;
131
;< --- TBD ---                                                                                    ;;
128
;;================================================================================================;;
132
;;================================================================================================;;
-
 
133
	push ecx
129
	mov	ecx, [_f]
134
	mov	ecx, [_f]
130
    @@: stdcall libini._.get_char, [_f]
135
    @@: stdcall libini._.get_char, [_f]
131
	cmp	al, 32
136
	cmp	al, 32
132
	je	@b
137
	je	@b
133
	cmp	al, 9
138
	cmp	al, 9
134
	je	@b
139
	je	@b
135
    @@: stdcall libini._.unget_char, [_f]
140
    @@: stdcall libini._.unget_char, [_f]
-
 
141
	pop ecx
136
	ret
142
	ret
137
endp
143
endp
Line 138... Line 144...
138
 
144
 
139
;;================================================================================================;;
145
;;================================================================================================;;
Line 143... Line 149...
143
;;------------------------------------------------------------------------------------------------;;
149
;;------------------------------------------------------------------------------------------------;;
144
;> --- TBD ---                                                                                    ;;
150
;> --- TBD ---                                                                                    ;;
145
;;------------------------------------------------------------------------------------------------;;
151
;;------------------------------------------------------------------------------------------------;;
146
;< --- TBD ---                                                                                    ;;
152
;< --- TBD ---                                                                                    ;;
147
;;================================================================================================;;
153
;;================================================================================================;;
-
 
154
	push ecx
148
	mov	ecx, [_f]
155
	mov	ecx, [_f]
149
    @@: stdcall libini._.get_char, [_f]
156
    @@: stdcall libini._.get_char, [_f]
150
	or	al, al
157
	or	al, al
151
	jz	@f
158
	jz	@f
152
	cmp	al, 13
159
	cmp	al, 13
153
	je	@f
160
	je	@f
154
	cmp	al, 10
161
	cmp	al, 10
155
	jne	@b
162
	jne	@b
156
    @@: stdcall libini._.unget_char, [_f]
163
    @@: stdcall libini._.unget_char, [_f]
-
 
164
	pop ecx
157
	ret
165
	ret
158
endp
166
endp
Line 159... Line 167...
159
 
167
 
160
;;================================================================================================;;
168
;;================================================================================================;;
Line 423... Line 431...
423
;> --- TBD ---                                                                                    ;;
431
;> --- TBD ---                                                                                    ;;
424
;;------------------------------------------------------------------------------------------------;;
432
;;------------------------------------------------------------------------------------------------;;
425
;< eax = -1 (fail) / 0 (ok)                                                                       ;;
433
;< eax = -1 (fail) / 0 (ok)                                                                       ;;
426
;< [_f.pos] = new cursor position (right after ']' char if eax = 0, at the end of file otherwise) ;;
434
;< [_f.pos] = new cursor position (right after ']' char if eax = 0, at the end of file otherwise) ;;
427
;;================================================================================================;;
435
;;================================================================================================;;
428
	push	ebx edi
436
	push	ebx ecx edi
Line 429... Line 437...
429
 
437
 
430
	mov	ecx, [_f]
438
	mov	ecx, [_f]
431
	invoke	file.seek, [ecx + IniFile.fh], 0, SEEK_SET
439
	invoke	file.seek, [ecx + IniFile.fh], 0, SEEK_SET
Line 459... Line 467...
459
	cmp	al, ']'
467
	cmp	al, ']'
460
	jne	.next_section
468
	jne	.next_section
461
    @@:
469
    @@:
462
	cmp	byte[edi], 0
470
	cmp	byte[edi], 0
463
	jne	.next_section
471
	jne	.next_section
464
	pop	edi ebx
472
	pop	edi ecx ebx
465
	xor	eax, eax
473
	xor	eax, eax
466
	ret
474
	ret
Line 467... Line 475...
467
 
475
 
468
  .exit_error:
476
  .exit_error:
469
	pop	edi ebx
477
	pop	edi ecx ebx
470
	or	eax, -1
478
	or	eax, -1
471
	ret
479
	ret
Line 472... Line 480...
472
endp
480
endp