* miscfuncs.h (transform_chars): Declare. Define inline variation here.

* mount.cc (mount_info::from_fstab): Remove extern declaration of
	transform_chars.
	* path.cc (tfx_chars): Move to strfuncs.cc.
	(transform_chars): Ditto.
	* strfunc.cc (tfx_chars): Moved here from path.cc.
	(transform_chars): Ditto.
	(sys_cp_wcstombs): Make UNICODE private use area conversion roundtrip
	save for all characters.
	(sys_cp_mbstowcs): Ditto, by removing special case for UTF-8 sequences
	representing U+f0XX UNICODE chars.  Fix typo in comment.
This commit is contained in:
Corinna Vinschen
2009-11-02 11:42:04 +00:00
parent 9725900d86
commit a657970571
5 changed files with 83 additions and 68 deletions

View File

@@ -25,6 +25,14 @@ void backslashify (const char *, char *, bool);
void slashify (const char *, char *, bool);
#define isslash(c) ((c) == '/')
extern void transform_chars (PWCHAR, PWCHAR);
inline void
transform_chars (PUNICODE_STRING upath, USHORT start_idx)
{
transform_chars (upath->Buffer + start_idx,
upath->Buffer + upath->Length / sizeof (WCHAR) - 1);
}
/* Memory checking */
int __stdcall check_invalid_virtual_addr (const void *s, unsigned sz) __attribute__ ((regparm(2)));