aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2001-02-13 11:48:31 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2001-02-13 11:48:31 +0000
commitc4fefc4887ae696ce512d1d94a7a7013b09aadd5 (patch)
treecd8b72499803501a7c88d187ad7bb6a1e2616ce4
parent9e2930bdb14006b620db19557a589a34c8b38639 (diff)
Notes
-rw-r--r--sys/fs/cd9660/cd9660_util.c12
-rw-r--r--sys/isofs/cd9660/cd9660_util.c12
2 files changed, 24 insertions, 0 deletions
diff --git a/sys/fs/cd9660/cd9660_util.c b/sys/fs/cd9660/cd9660_util.c
index 2a11dc2f63616..56279db036658 100644
--- a/sys/fs/cd9660/cd9660_util.c
+++ b/sys/fs/cd9660/cd9660_util.c
@@ -47,6 +47,14 @@
#include <isofs/cd9660/iso.h>
/*
+ * XXX: limited support for loading of Unicode
+ * conversion routine as a kld at a run-time.
+ * Should be removed when native Unicode kernel
+ * interfaces have been introduced.
+ */
+u_char (*cd9660_wchar2char)(u_int32_t wchar) = NULL;
+
+/*
* Get one character out of an iso filename
* Obey joliet_level
* Return number of bytes consumed
@@ -72,6 +80,10 @@ isochar(isofn, isoend, joliet_level, c)
*c = *isofn;
break;
}
+ /* XXX: if Unicode conversion routine is loaded then use it */
+ if (cd9660_wchar2char != NULL)
+ *c = cd9660_wchar2char((*(isofn - 1) << 8) | *isofn);
+
return 2;
}
diff --git a/sys/isofs/cd9660/cd9660_util.c b/sys/isofs/cd9660/cd9660_util.c
index 2a11dc2f63616..56279db036658 100644
--- a/sys/isofs/cd9660/cd9660_util.c
+++ b/sys/isofs/cd9660/cd9660_util.c
@@ -47,6 +47,14 @@
#include <isofs/cd9660/iso.h>
/*
+ * XXX: limited support for loading of Unicode
+ * conversion routine as a kld at a run-time.
+ * Should be removed when native Unicode kernel
+ * interfaces have been introduced.
+ */
+u_char (*cd9660_wchar2char)(u_int32_t wchar) = NULL;
+
+/*
* Get one character out of an iso filename
* Obey joliet_level
* Return number of bytes consumed
@@ -72,6 +80,10 @@ isochar(isofn, isoend, joliet_level, c)
*c = *isofn;
break;
}
+ /* XXX: if Unicode conversion routine is loaded then use it */
+ if (cd9660_wchar2char != NULL)
+ *c = cd9660_wchar2char((*(isofn - 1) << 8) | *isofn);
+
return 2;
}