[M3devel] Pathname.Legal

Neels Janosch Hofmeyr neels at elego.de
Wed Oct 17 00:37:23 CEST 2007


There is a different implementation of Pathname (i.e. PathnameWin32.m3
in cm3/m3-libs/libm3/src/os/WIN32) which uses \ separators.

But this makes me look at the windows code: it has the same limitation!

I guess I should also apply the fix there, right??
it says:

CONST Legal = SET OF CHAR {'\001' .. '\177'} - SET OF CHAR {DirSepChar,
':'};
  (* *** This should be as permissive as any NT file system. *)

(note: \177 is in octal and is 127 in decimal)

Tony Hosking wrote:
> What happens on Windows?  There path separators include \.
>
> On Oct 16, 2007, at 5:44 PM, Neels Janosch Hofmeyr wrote:
>
>>
>> Rodney M. Bates wrote:
>>> Since the language itself specifies that program variables of type
>>> CHAR are in ISO Latin-1, not just ASCII, I think extending compilers,
>>> etc., to handle those characters makes complete sense, without even
>>> needing to view it as support for unicode or differing locales.
>>>
>>> Do I understand correctly that Neels' patch extends just to ISO
>>> Latin-1?
>>
>> Well, the fix allows more characters. It does in no way change datatype
>> bitwidth, any conversion or any other behavior at all. It's just an
>> abort condition which is made more lenient, so that it allows all CHAR
>> characters in a Pathname.T (which is a TEXT). *If* CHAR represents ISO
>> Latin-1, then the fix extends the range of allowed characters to ISO
>> Latin-1 only.
>>
>> Do you know more about this? I can only guess. Olaf Wagner guessed it's
>> fine to submit the fix. I encountered no problems using it with large
>> numbers of filenames.
>> Can you think of anything that might be a problem when allowing all
>> CHARs in a file name?
>>
>> Regards!
>> Neels
>>
>> -- 
>> Neels Janosch Hofmeyr
>> Software Developer
>>
>> neels at elego.de
>> Public Key: http://binarchy.net/neels/neels.hofmeyr.public.key.asc
>>
>> elego Software Solutions GmbH           http://www.elegosoft.com
>> Gustav-Meyer-Allee 25, Gebäude 12       HRB 77719
>> 13355 Berlin, Germany                   Amtsgericht Charlottenburg
>> Tel.: +49 30 23 45 86 96                Sitz der Gesellschaft: Berlin
>> Fax:  +49 30 23 45 86 95                Geschäftsführer: Olaf Wagner
>>
>>
>

-- 
Neels Janosch Hofmeyr
Software Developer

neels at elego.de
Public Key: http://binarchy.net/neels/neels.hofmeyr.public.key.asc

elego Software Solutions GmbH           http://www.elegosoft.com
Gustav-Meyer-Allee 25, Gebäude 12       HRB 77719
13355 Berlin, Germany                   Amtsgericht Charlottenburg
Tel.: +49 30 23 45 86 96                Sitz der Gesellschaft: Berlin
Fax:  +49 30 23 45 86 95                Geschäftsführer: Olaf Wagner


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20071017/5a3fb86a/attachment-0002.sig>


More information about the M3devel mailing list