flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > include once Goto page Previous 1, 2 |
Author |
|
idle 15 Dec 2015, 14:24
Forum page wrap, reposting...
http://board.flatassembler.net/topic.php?t=12725&start=19 |
|||
15 Dec 2015, 14:24 |
|
l_inc 15 Dec 2015, 14:30
revolution
I didn't say, one should use full paths, but your suggestion is to introduce many more limitations. Say there's a library that includes its files using relative paths (similar to win32a.inc). Some files can be included as a part of the library or individually. The relative paths would be different. How restrictive should be your rules to avoid this? That's not mentioning that soft and hard links are possible in both Windows and Linux. Taking that into account shows that C-style inclusion duplication prevention is the only correct way. Just consider what you'd do to compile a project making use of soft links on a system that has no support for them. _________________ Faith is a superposition of knowledge and fallacy |
|||
15 Dec 2015, 14:30 |
|
revolution 15 Dec 2015, 16:41
l_inc wrote: That's not mentioning that soft and hard links are possible in both Windows and Linux. Taking that into account shows that C-style inclusion duplication prevention is the only correct way. Just consider what you'd do to compile a project making use of soft links on a system that has no support for them. |
|||
15 Dec 2015, 16:41 |
|
l_inc 15 Dec 2015, 19:16
revolution
I have nothing against some rules of project organization. I'm just saying that the only reason to implement "include once" natively is the ability to unambiguously identify files, and if even this advantage is ignored, then it's just useless. _________________ Faith is a superposition of knowledge and fallacy |
|||
15 Dec 2015, 19:16 |
|
idle 16 Dec 2015, 06:25
Again, once is a user-typed hint to overcome standard behaviour of fasm.
It does nothing to fasm structures, keeping inclusion order as described in official manual. What it really does: when fasm is just about including a file, once checks for its presence and does its job. |
|||
16 Dec 2015, 06:25 |
|
idle 21 Nov 2017, 16:55
hi, just updated to 1.72
esp tnx to TG for keeping include logics same |
|||
21 Nov 2017, 16:55 |
|
idle 23 Feb 2021, 18:38
Damn!..
I'm glad to see you again! According the topic, i solved to automate patching process. The only condition - the Author not to change inclusion logics. Right now it is 2/3 complete. There it is. And the stumble: how to analize preproce.inc guys? Do we need to read&trim lines, or tokenize(that is heavy), extract lexems, how to mind the style (e.g. was movsb, became movs byte [etc]), or should we detect inclusion code and replace it all. I donot know. Tnx! |
|||
23 Feb 2021, 18:38 |
|
idle 24 Feb 2021, 23:30
|
|||
24 Feb 2021, 23:30 |
|
edfed 28 Feb 2021, 19:21
include once useless now.
test_it.asm: Code: include 'file_to_include_once.inc' include 'file_that_includes_the_file_to_include_once.inc' call something_from_this_once_file call something_from_the_second_file file_to_include_once.inc: Code: if ~ definite FileToIncludeOnceStillIncluded ... end if FileToIncludeOnceStillIncluded=0 file_that_includes_the_file_to_include_once.inc: Code:
include 'file_that_includes_the_file_to_include_once.inc'
call something_from_the_once_file
definite keyword is a new feature and i like it. |
|||
28 Feb 2021, 19:21 |
|
idle 28 Feb 2021, 19:41
I gues defined (i must admit i have not coded since 2017) )
Glad to meet you, edfed, again. |
|||
28 Feb 2021, 19:41 |
|
edfed 28 Feb 2021, 21:37
that's not defined, i've tested to make include guards with this statement but it don't works at all cause it doesn't care if defined before or after, it tests the entire source before to return a result.
with definite, you can make the distinction between before and after definitions. glad to come back here too... finally i've got time and projects to code with fasm again. |
|||
28 Feb 2021, 21:37 |
|
idle 23 Mar 2021, 21:33
Updated.
I hope it helps/serves/useful.
|
||||||||||
23 Mar 2021, 21:33 |
|
idle 17 Dec 2023, 19:40
hi
updated to fasmw17332 esp tnx to the Author for keeping inclusion logics same - i just ran a script,recompiled,packed |
|||
17 Dec 2023, 19:40 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.