Re: Real world example of the includes-with-the-same-name "bug"
- Posted by Vincent <darkvincentdude at yahoo.com> Jan 19, 2006
- 666 views
C Bouzy wrote: > I have never ran into the bug you mentioned, and I have written huge > programs in EU. For Example my application Rhyme & Verse has over 21,000 > lines of code in the main file, and over 83 include files. Hi Chris, Well first of all it isn't a bug, it was intentially designed that way for internal simplicity. This is a problematic design as discusted before. Robert wouldn't change it, so I took matters in my own hands. I got it to work but it is a difficult to resolve every possiblility of full length paths being different. I've spent three days far writing code to remove trailing slashes and dots, converting them to either "\\" or "/", building full paths for main and relative path when main_path is ".\\" and "./", rewriting path_open() and removing remove name_ext() in specific places. I also been doing alot of testing too. I can do some wacky stuff like: include "C:/\\Documents and Settings\\//\\/\Vincent////\\/\\\\Ic\\//\\Try.e" include ".////////Ic///\\\\\\/Try.e" include .////\\//Ic//\\\\/Try.e include "\\\/\\Ic////Try.e" include "//Ic///Try.e" include .\Ic\Try.e include ./Ic/Try.e include Ic/\Try.e include Ic\Try.e ... so on ... And it recoginize that they all are the same file and directory thus including it only once. Yet I could use a different path and it will treat "Try.e" as a seperate file with possibly different contents; It will fail if the paths dont exist as usual. There are a couple minor issues that I'm working out before I send my source to Robert Craig for inspection and hopefully implementation into Euphoria v3.0.Regards, Vincent