Subversion Repositories Kolibri OS

Rev

Rev 1573 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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