Added `has', `index_of' and `last_index_of' to take a CHARACTER_32 as input. This wil make most of the code handling READABLE_STRING_GENERAL to look more as if we were handling a STRING_32 instance.


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@590 6d4a7a74-6026-0410-acef-abb7cea3cd6d
Added conversion from NATURAL_32 to CHARACTER_32 and vice-versa this simplifies code that manipulate NATURAL_X values as if they were characters.


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@591 6d4a7a74-6026-0410-acef-abb7cea3cd6d
Added `utf_32_string_to_utf_8' and `utf_32_string_to_utf_8_0'.
Reimplemented the _0 routines so that they can be used by the non-_0 routines so that the only reallocation is shrinking which is cheap, versus growing which can be costly.


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@592 6d4a7a74-6026-0410-acef-abb7cea3cd6d
To help debugging memory issues coming from MANAGED_POINTER (e.g. double frees or invalid pointer) we equipped the class with a way to uniquely identify an allocation for a given reproducible execution.


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@593 6d4a7a74-6026-0410-acef-abb7cea3cd6d
Allowed FILE classes as well as DIRECTORY to accept Unicode characters:
* It meant changing signature of most routines to accept READABLE_STRING_GENERAL. To not break code only 2 routines in FILE did not change their signature and are now obsolete: make and change_name.
* To not break backward compatibility where STRING_8 where actually understood as a byte sequence, whenever you create a FILE/DIRECTORY using a STRING_8, we use the old implementation, otherwise we use UTF-8 encoding for UNIX and UTF-16 encoding on Windows.
* To make the above point possible is to avoid a lot of conversions, we actually store the name as a MANAGED_POINTER within the FILE/DIRECTORY/FILE_INFO instance.

Renamed UNIX_FILE_INFO as FILE_INFO as there is nothing really specific about UNIX anymore, but kept the UNIX_FILE_INFO to not break existing code.

Those changes had an impact on the runtime implementation of many C externals:
- EIF_FILENAME is now the type of paths at the C level: wchar_t * on Windows and char * on UNIX.
- All external routines have been prefixed with `eif_' to avoid conflicts at the C level.

To make this commit work on your implementation, make sure to update the compiler/runtime implementation too.


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@594 6d4a7a74-6026-0410-acef-abb7cea3cd6d
Made `eif_user_directory_name_ptr' an external from the runtime instead of trying to implement it.


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@595 6d4a7a74-6026-0410-acef-abb7cea3cd6d
Fixed compilation warnings on Windows.


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@596 6d4a7a74-6026-0410-acef-abb7cea3cd6d
Fixed `utf_16_0_pointer_to_string_32' to not go beyond the number of bytes of its argument by incrementing `i' by 2 at each iteration rather than multiplying it by 2.


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@597 6d4a7a74-6026-0410-acef-abb7cea3cd6d
Fixed an extra null character appearing in `pointer_to_file_name_8' on Windows.
Fixed a bug in our call to `MultiByteToWideChar' as it does not return the number of bytes as we thought but the number of wide characters (unlike WideCharToMultiByte which does that).


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@598 6d4a7a74-6026-0410-acef-abb7cea3cd6d