aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/upcase.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-02-28 00:35:24 -0500
committerPaul Mackerras <paulus@samba.org>2006-02-28 00:35:24 -0500
commit6749c5507388f3fc3719f57a54b540ee83f6661a (patch)
treec069f990f86b020a14b50759d0c75475eedde186 /fs/ntfs/upcase.c
parent2cf82c0256b198ae28c465f2c4d7c12c836ea5ea (diff)
parent56ec6462af9cba56a04439154e5768672d6f390f (diff)
Merge ../powerpc-merge
Diffstat (limited to 'fs/ntfs/upcase.c')
-rw-r--r--fs/ntfs/upcase.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ntfs/upcase.c b/fs/ntfs/upcase.c
index 879cdf1d5bd3..9101807dc81a 100644
--- a/fs/ntfs/upcase.c
+++ b/fs/ntfs/upcase.c
@@ -3,10 +3,7 @@
3 * Part of the Linux-NTFS project. 3 * Part of the Linux-NTFS project.
4 * 4 *
5 * Copyright (c) 2001 Richard Russon <ntfs@flatcap.org> 5 * Copyright (c) 2001 Richard Russon <ntfs@flatcap.org>
6 * Copyright (c) 2001-2004 Anton Altaparmakov 6 * Copyright (c) 2001-2006 Anton Altaparmakov
7 *
8 * Modified for mkntfs inclusion 9 June 2001 by Anton Altaparmakov.
9 * Modified for kernel inclusion 10 September 2001 by Anton Altparmakov.
10 * 7 *
11 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the Free 9 * under the terms of the GNU General Public License as published by the Free
@@ -75,12 +72,13 @@ ntfschar *generate_default_upcase(void)
75 if (!uc) 72 if (!uc)
76 return uc; 73 return uc;
77 memset(uc, 0, default_upcase_len * sizeof(ntfschar)); 74 memset(uc, 0, default_upcase_len * sizeof(ntfschar));
75 /* Generate the little endian Unicode upcase table used by ntfs. */
78 for (i = 0; i < default_upcase_len; i++) 76 for (i = 0; i < default_upcase_len; i++)
79 uc[i] = cpu_to_le16(i); 77 uc[i] = cpu_to_le16(i);
80 for (r = 0; uc_run_table[r][0]; r++) 78 for (r = 0; uc_run_table[r][0]; r++)
81 for (i = uc_run_table[r][0]; i < uc_run_table[r][1]; i++) 79 for (i = uc_run_table[r][0]; i < uc_run_table[r][1]; i++)
82 uc[i] = cpu_to_le16((le16_to_cpu(uc[i]) + 80 uc[i] = cpu_to_le16(le16_to_cpu(uc[i]) +
83 uc_run_table[r][2])); 81 uc_run_table[r][2]);
84 for (r = 0; uc_dup_table[r][0]; r++) 82 for (r = 0; uc_dup_table[r][0]; r++)
85 for (i = uc_dup_table[r][0]; i < uc_dup_table[r][1]; i += 2) 83 for (i = uc_dup_table[r][0]; i < uc_dup_table[r][1]; i += 2)
86 uc[i + 1] = cpu_to_le16(le16_to_cpu(uc[i + 1]) - 1); 84 uc[i + 1] = cpu_to_le16(le16_to_cpu(uc[i + 1]) - 1);