40,6 → 40,7 |
mov [source_start],eax |
mov [display_buffer],eax |
mov [hash_tree],eax |
mov [error],eax |
mov [macro_status],al |
mov esi,[input_file] |
mov edx,esi |
870,6 → 871,7 |
je found_macro_block |
jmp invalid_macro_arguments |
macro_argument_with_default_value: |
or [default_argument_value],-1 |
call skip_macro_argument_value |
inc esi |
jmp macro_argument_end |
908,6 → 910,10 |
jz argument_value_end |
cmp al,',' |
je argument_value_end |
cmp [default_argument_value],0 |
je invalid_macro_arguments |
cmp al,'{' |
je argument_value_end |
or ebp,ebp |
jz invalid_macro_arguments |
cmp al,']' |
923,6 → 929,10 |
je argument_string |
cmp al,1Ah |
je argument_symbol |
cmp [default_argument_value],0 |
je simple_argument |
cmp al,'{' |
je argument_value_end |
or ebp,ebp |
jz simple_argument |
cmp al,']' |
1500,10 → 1510,8 |
add esi,ecx |
xchg esi,ebx |
mov [edx+12],esi |
push ebp |
xor ebp,ebp |
mov [default_argument_value],0 |
call skip_macro_argument_value |
pop ebp |
call finish_macro_argument |
xchg esi,ebx |
cmp byte [esi],'=' |
1523,6 → 1531,7 |
jne argument_value_length_ok |
inc dword [edx+12] |
sub ecx,2 |
or ecx,80000000h |
argument_value_length_ok: |
mov [edx+8],ecx |
ret |
1529,6 → 1538,7 |
argument_with_default_value: |
inc esi |
push esi |
or [default_argument_value],-1 |
call skip_macro_argument_value |
pop eax |
cmp dword [edx+8],0 |
1637,14 → 1647,21 |
stosb |
push esi |
mov esi,[esp+4] |
mov [value_size],8 |
mov [error_line],0 |
mov [value_size],0 |
call calculate_expression |
cmp [error_line],0 |
je value_precalculated |
jmp [error] |
value_precalculated: |
mov eax,[edi] |
mov ecx,[edi+4] |
pop esi edi |
cdq |
cmp edx,ecx |
jne value_out_of_range |
cmp dl,[edi+13] |
jne value_out_of_range |
pop esi edi |
ret |
do_irp: |
cmp byte [esi],1Ah |
1665,6 → 1682,7 |
jmp irp_parameters_start |
irp_with_default_value: |
xor ebp,ebp |
or [default_argument_value],-1 |
call skip_macro_argument_value |
inc esi |
irps_name_ok: |
2490,7 → 2508,7 |
jmp cut_current_file_name |
current_file_path_ok: |
mov esi,[esp+4] |
call preprocess_path |
call expand_path |
pop edx |
mov esi,edx |
call open |
2503,26 → 2521,10 |
je try_in_current_directory |
push ebp |
push edi |
copy_include_directory: |
lods byte [esi] |
cmp al,';' |
je include_directory_ok |
stos byte [edi] |
or al,al |
jnz copy_include_directory |
dec esi |
dec edi |
include_directory_ok: |
cmp byte [edi-1],'/' |
je path_separator_ok |
cmp byte [edi-1],'\' |
je path_separator_ok |
mov al,'/' |
stos byte [edi] |
path_separator_ok: |
call get_include_directory |
mov [esp+4],esi |
mov esi,[esp+8] |
call preprocess_path |
call expand_path |
pop edx |
mov esi,edx |
call open |
2533,7 → 2535,7 |
try_in_current_directory: |
mov esi,[esp] |
push edi |
call preprocess_path |
call expand_path |
pop edx |
mov esi,edx |
call open |
2553,35 → 2555,7 |
and [macro_status],0Fh |
call preprocess_file |
pop eax |
mov [macro_status],al |
and al,0F0h |
and [macro_status],0Fh |
or [macro_status],al |
jmp line_preprocessed |
preprocess_path: |
lods byte [esi] |
cmp al,'%' |
je environment_variable |
stos byte [edi] |
or al,al |
jnz preprocess_path |
cmp edi,[memory_end] |
ja out_of_memory |
ret |
environment_variable: |
mov ebx,esi |
find_variable_end: |
lods byte [esi] |
or al,al |
jz not_environment_variable |
cmp al,'%' |
jne find_variable_end |
mov byte [esi-1],0 |
push esi |
mov esi,ebx |
call get_environment_variable |
pop esi |
mov byte [esi-1],'%' |
jmp preprocess_path |
not_environment_variable: |
mov al,'%' |
stos byte [edi] |
mov esi,ebx |
jmp preprocess_path |