From: Colin P. A. <co...@co...> - 2007-12-07 16:00:06
|
This is a bit odd. When testing one of the W3C XSLT test cases, I was getting an error from the XML parser when using ISE 6.1, but not when using gec. The error is that it was unable to open an xml file - the reason, because the URI has the file name in lower case, but the actual file name is in upper case. And I'm running on Linux where file names are (for worse or for worse - even Microsoft can't get it wrong EVERY time) case sensitive. I shall be reporting the error in the test case to the W3C, but I don't understand why when compiled with gec there is no error. -- Colin Adams Preston Lancashire |
From: Eric B. <er...@go...> - 2007-12-08 04:50:40
|
Colin Paul Adams wrote: > This is a bit odd. > > When testing one of the W3C XSLT test cases, I was getting an error > from the XML parser when using ISE 6.1, but not when using gec. > > The error is that it was unable to open an xml file - the reason, > because the URI has the file name in lower case, but the actual file > name is in upper case. And I'm running on Linux where file names are > (for worse or for worse - even Microsoft can't get it wrong EVERY > time) case sensitive. > > I shall be reporting the error in the test case to the W3C, but I > don't understand why when compiled with gec there is no error. If you were using files the Gobo way, you would get "False" with the following code: local l_file: KL_TEXT_INPUT_FILE do create l_file.make ("dummy") l_file.open_read print (l_file.is_open_read) However, using files the ISE way, you will not get the exception as expected. This is because when I implemented FILE in gec, there was no support for exception yet. Now, it is possible to raise an exception and rescue it in gec, so I guess I should change the implementation class FILE to raise an exception in order to be more compatible with ISE. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Colin P. A. <co...@co...> - 2007-12-08 07:59:31
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes: Eric> If you were using files the Gobo way, you would get "False" Eric> with the following code: Eric> local l_file: KL_TEXT_INPUT_FILE do create l_file.make Eric> ("dummy") l_file.open_read print (l_file.is_open_read) Eric> However, using files the ISE way, you will not get the Eric> exception as expected. I don't really understand any of that: 1) This is all Gobo code, using the file resolver. 2) How is gec managing to open the upper-case file in the first place, when it has a lower-case name? -- Colin Adams Preston Lancashire |
From: Eric B. <er...@go...> - 2007-12-08 14:20:40
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> If you were using files the Gobo way, you would get "False" > Eric> with the following code: > > Eric> local l_file: KL_TEXT_INPUT_FILE do create l_file.make > Eric> ("dummy") l_file.open_read print (l_file.is_open_read) > > Eric> However, using files the ISE way, you will not get the > Eric> exception as expected. > > I don't really understand any of that: > > 1) This is all Gobo code, using the file resolver. > 2) How is gec managing to open the upper-case file in the first place, > when it has a lower-case name? Ah, you said that you didn't get the error message, but I didn't realize that it meant that it was actually able to read the file. I have no idea why it manages to open the file. And I can't try it on a small example since I don't have access to a Linux or other case-sensitive operating system. It's too bad that SourceForge does not offer its compile-farm anymore. As far as I can see, the code ends up calling fopen(). I don't know if there is an option to make it case-insensitive or case_sensitive at will. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Eric B. <er...@go...> - 2007-12-08 15:21:06
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> I have no idea why it manages to open the > Eric> file. And I can't try it on a small example since I don't > Eric> have access to a Linux or other case-sensitive operating > Eric> system. It's too bad that SourceForge does not offer its > Eric> compile-farm anymore. > > It doesn't? That's a blow. I was hoping to use it to create MacOSX > executables. http://en.wikipedia.org/wiki/Compile_farm https://sourceforge.net/forum/forum.php?forum_id=665363| If you find another compile farm as good as SourceForge was, I'm interested to know. If Orgigo really wants to have a competitive advantage over other hosts, I think that it would be a great addition to their offer. However I'm not sure they have enough resources and skills in so many different operating systems. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Colin P. A. <co...@co...> - 2007-12-08 15:58:03
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes: Eric> Colin Paul Adams wrote: >>>>>>> "Eric" == Eric Bezault <er...@go...> writes: >> >> Eric> I can see one difference between ISE and Gobo when opening Eric> the file under Linux/Unix. When opening a binary file, Gobo Eric> does "rb" (same as Windows) whereas ISE does "r" for the Eric> mode. I guess this is the problem. I will fix that and we Eric> will see how it goes. In the meantime I'd be interested if Eric> you could have a look at the manpage for fopen() on Linux Eric> and see if there is anything specified for "rb" (like "open Eric> the file in case-insensitive mode" ;-)). >> >> It says: >> >> " The mode string can also include the letter b either as a >> last character or as a character between the characters in any >> of the two- character strings described above. This is >> strictly for compatibility with C89 and has no effect; the b is >> ignored on all POSIX conform- ing systems, including Linux. >> (Other systems may treat text files and binary files >> differently, and adding the b may be a good idea if you do I/O >> to a binary file and expect that your program may be ported to >> non-Unix environments.) " >> Eric> OK. Just to double-check, can you try to remove the "b"s anyway Eric> in function 'file_open_mode' in Eric> $GOBO/tool/gec/runtime/c/eif_file.c and recompile your Eric> program (no need to recompile gec itself)? Perhaps the Eric> "compatibility" goes up to the point where filenames are Eric> considered case-insensitive. Who knows. To my surprise, it does the trick. Shall I check it in? If the answer is yes, which tests do I need to run? -- Colin Adams Preston Lancashire |
From: Eric B. <er...@go...> - 2007-12-08 22:08:04
|
Colin Paul Adams wrote: > Eric> OK. Just to double-check, can you try to remove the "b"s anyway > Eric> in function 'file_open_mode' in > Eric> $GOBO/tool/gec/runtime/c/eif_file.c and recompile your > Eric> program (no need to recompile gec itself)? Perhaps the > Eric> "compatibility" goes up to the point where filenames are > Eric> considered case-insensitive. Who knows. > > To my surprise, it does the trick. > Shall I check it in? > If the answer is yes, which tests do I need to run? I'll check it in because I'm also currently modifying this file to raise exceptions like ISE does. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Eric B. <er...@go...> - 2007-12-08 14:42:17
|
Eric Bezault wrote: > Colin Paul Adams wrote: >>>>>>> "Eric" == Eric Bezault <er...@go...> writes: >> >> Eric> If you were using files the Gobo way, you would get "False" >> Eric> with the following code: >> >> Eric> local l_file: KL_TEXT_INPUT_FILE do create l_file.make >> Eric> ("dummy") l_file.open_read print (l_file.is_open_read) >> >> Eric> However, using files the ISE way, you will not get the >> Eric> exception as expected. >> >> I don't really understand any of that: >> >> 1) This is all Gobo code, using the file resolver. >> 2) How is gec managing to open the upper-case file in the first place, >> when it has a lower-case name? > > Ah, you said that you didn't get the error message, but > I didn't realize that it meant that it was actually able > to read the file. I have no idea why it manages to open > the file. And I can't try it on a small example since I > don't have access to a Linux or other case-sensitive > operating system. It's too bad that SourceForge does not > offer its compile-farm anymore. As far as I can see, the > code ends up calling fopen(). I don't know if there is > an option to make it case-insensitive or case_sensitive > at will. I can see one difference between ISE and Gobo when opening the file under Linux/Unix. When opening a binary file, Gobo does "rb" (same as Windows) whereas ISE does "r" for the mode. I guess this is the problem. I will fix that and we will see how it goes. In the meantime I'd be interested if you could have a look at the manpage for fopen() on Linux and see if there is anything specified for "rb" (like "open the file in case-insensitive mode" ;-)). -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Emmanuel S. [ES] <ma...@ei...> - 2007-12-08 15:11:08
|
use strace on linux to see the system calls. Manu > -----Original Message----- > From: gob...@li... > [mailto:gob...@li...] On > Behalf Of Eric Bezault > Sent: Saturday, December 08, 2007 6:42 AM > To: Colin Paul Adams > Cc: gob...@li... > Subject: Re: [gobo-eiffel-develop] Perverse bug with gec? > > Eric Bezault wrote: > > Colin Paul Adams wrote: > >>>>>>> "Eric" == Eric Bezault <er...@go...> writes: > >> > >> Eric> If you were using files the Gobo way, you would > get "False" > >> Eric> with the following code: > >> > >> Eric> local l_file: KL_TEXT_INPUT_FILE do create l_file.make > >> Eric> ("dummy") l_file.open_read print (l_file.is_open_read) > >> > >> Eric> However, using files the ISE way, you will not get the > >> Eric> exception as expected. > >> > >> I don't really understand any of that: > >> > >> 1) This is all Gobo code, using the file resolver. > >> 2) How is gec managing to open the upper-case file in the first > >> place, when it has a lower-case name? > > > > Ah, you said that you didn't get the error message, but I didn't > > realize that it meant that it was actually able to read the file. I > > have no idea why it manages to open the file. And I can't > try it on a > > small example since I don't have access to a Linux or other > > case-sensitive operating system. It's too bad that SourceForge does > > not offer its compile-farm anymore. As far as I can see, > the code ends > > up calling fopen(). I don't know if there is an option to make it > > case-insensitive or case_sensitive at will. > > I can see one difference between ISE and Gobo when opening > the file under Linux/Unix. When opening a binary file, Gobo > does "rb" (same as Windows) whereas ISE does "r" > for the mode. I guess this is the problem. I will fix that > and we will see how it goes. In the meantime I'd be > interested if you could have a look at the manpage for > fopen() on Linux and see if there is anything specified for > "rb" (like "open the file in case-insensitive mode" ;-)). > > -- > Eric Bezault > mailto:er...@go... > http://www.gobosoft.com > > -------------------------------------------------------------- > ----------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for just about > anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > gobo-eiffel-develop mailing list > gob...@li... > https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop > |
From: Eric B. <er...@go...> - 2007-12-08 15:26:17
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > > Eric> I can see one difference between ISE and Gobo when opening > Eric> the file under Linux/Unix. When opening a binary file, Gobo > Eric> does "rb" (same as Windows) whereas ISE does "r" for the > Eric> mode. I guess this is the problem. I will fix that and we > Eric> will see how it goes. In the meantime I'd be interested if > Eric> you could have a look at the manpage for fopen() on Linux > Eric> and see if there is anything specified for "rb" (like "open > Eric> the file in case-insensitive mode" ;-)). > > It says: > > " The mode string can also include the letter b either as a last > character or as a character between the characters in any of the two- > character strings described above. This is strictly for compatibility > with C89 and has no effect; the b is ignored on all POSIX conform- > ing systems, including Linux. (Other systems may treat text files and > binary files differently, and adding the b may be a good idea if > you do I/O to a binary file and expect that your program may be ported > to non-Unix environments.) > " > OK. Just to double-check, can you try to remove the "b"s anyway in function 'file_open_mode' in $GOBO/tool/gec/runtime/c/eif_file.c and recompile your program (no need to recompile gec itself)? Perhaps the "compatibility" goes up to the point where filenames are considered case-insensitive. Who knows. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |