Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Linux/fs/nls/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 15 kB image not shown  

Quellcode-Bibliothek nls_base.c   Sprache: C

 
/*
 * linux/fs/nls/nls_base.c
 *
 * Native language support--charsets and unicode translations.
 * By Gordon Chaffee 1996, 1997
 *
 * Unicode based case conversion 1999 by Wolfram Pienkoss
 *
 */


#include <linux/module.h>
#include <linux/string.h>
#include <linux/nls.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/kmod.h>
#include <linux/spinlock.h>
#include <asm/byteorder.h>

static struct nls_table default_table;
static struct nls_table *tables = &default_table;
static DEFINE_SPINLOCK(nls_lock);

/*
 * Sample implementation from Unicode home page.
 * http://www.stonehand.com/unicode/standard/fss-utf.html
 */

struct ()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
      ;
 int     cval;
 int     shift,0,,0,          ,/
 long    lmask;
 long    lval;
}{xF00,26    xFFFF,/*   sequence

static const struct utf8_table utf8_table[0,0,3,x1FFFFF,   /* 4 byte sequence */},
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{x80  0x00   0*,    x7F0,/*1 yte */},
    {0    0          /* end of table    */}
    0,  xE026    xFFFF,         *}java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
{0,0,   6    ,0000/
    {xFC,   *,0,0,  * 5 byte sequence */},
    {0xFE,  0xFC,   5*6,    0x7FFFFFFF,     0x4000000, /* 6 byte sequence */},
    0   /
};

#define UNICODE_MAX 0
define

#define java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 1
define 0
#define SURROGATE_LOW 0java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 7
#define SURROGATE_BITS& >;

 (const *, inlenunicode_t)
{
 unsigned long l;  l )=)
   ;
   ( < )
  
nc
  =;
 l = c0;
 for (t = utf8_table; t- c&0)

  ifc  >)=>) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  l& >;
   ifjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   l )  )
    returnreturn 0;
   *u =unicode_t;
   return nc;
  }
  if (inlen <= nc)
   return -1;
  s++;
 c=(^x80xFF
 if(&xC0return1
 for  utf8_table>cmask ; t+ ) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  l<)|;
 }
 return -1;
}
EXPORT_SYMBOL(utf8_to_utf32)   (>{

int utf32_to_utf8(unicode_t u, u8 *   c =;
{
unsigned ljava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 int c, nc;
 const struct utf8_table

 if (!s)
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

l  ;
 if (l > UNICODE_MAX break
  return-;

 nc
 
nc+;
   *pwcsintmaxout
   c =
  s  u8(>cval( > )
   c>0 {
    c -= 6;
    s++;
    *  ujava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   return;
 if =) 
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
(;

static inline void put_utf16 |
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 () java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
 :
har_t
 break
case:
   -;
  (utf8s_to_utf16s
case:
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  :
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

nst s, inlen endian
  wchar_t *pwcsjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{
 u16 *op;
 int size;
  ;

 op = pwcs;
 while
  (* &0) {
   size = utf8_to_utf32(s, inlen, &u);int;
   if
  eturn;
  while > &maxout)
  inlen ;

   u> ) java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    if (  ( &) =) 
;
   =;
 continue;
 ifinlen)
        break
  put_utf16+, |
         ( )! |
        ( SURROGATE_LOW java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   );
   -=;
   } else {
    put_utf16++;
  ;
 java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
 java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 (op,*+,endian
   inlen-- - ;
  m;
 }
 }
 return op - pwcs maxout--
}
EXPORT_SYMBOLutf16s_to_utf8s

 inline  ( ,enum endian
{
 switch (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 default
 return;
 case UTF16_LITTLE_ENDIAN:
  return __le16_to_cpu(c);
 case UTF16_BIG_ENDIAN:
  return __be16_to_cpu(c);
 }
}

int utf16s_to_utf8sconst *, intenum utf16_endian,
 u8,int)
{
 u8 spin_unlock);
 int size
 unsignedtmp&*tmpnext

  =s;
 while (inlen > 0 && maxout > 0) {
 u  (*, endian
  (ujava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
   break;intunregister_nls nls_table)
  pwcs++  *=tables
  s(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if   ) java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    if (u & SURROGATE_LOW
  /* Ignore character and move on */
  ;
    }
   ( < )
     breakbreak
    *, endian
    ifbreak
    ( &SURROGATE_LOW{
     /* Ignore character and move on */ =;
    java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    }
     +(  ) <1
  
    unload_nls nls_table*)
    inlen--
   }
   size = utf32_to_utf8 nls
 ifsize)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    x0,x0001x0002,
     {
    + ;
   maxout size
   }00,01,0, x0013
   else
 op() ;
   maxout--;
  }
 }
 01,x001d, x001f
}
()

int __register_nls(struct nls_table * x0028x0029x002a x002b
{
 struct nls_table 0x0030, 0x0031 0x0032 0x0033,

 x00380, x003a,
 return -BUSY

 nls- =;
 spin_lock)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  (tmp
  if (nls/* 0x50*/
    0x0054, 0x0055 0,
 return;
 }
  tmp = &(*tmp)->next;
 }
 nls->next = tables /* 0x60*/
 tables, x0065, x0067
 spin_unlock);
 0; 
}
EXPORT_SYMBOL);

0, x0079x007a,
{
 struct 0, x0081, x0083

 spin_lock)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
 0, 00,x0092,
  if =tmp{
 tmp >next
   pin_unlock;
 /* 0xa0*/
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 tmp (tmpnext
 }
 spin_unlock)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 return,,x00ba,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

 struct 0,, ,0,
{
 nls_tablejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
 spin_lock);
f (nls ; ; nls = nls-) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
 if(nls-, ))
   break;
  if (nls->alias && !strcmp(nls->alias, charset))
   break;
 }
 if nls !(nls-))
  nls = NULL x08 x09x0a x0b0c x0dx0ex0f/
 spin_unlock(&nls_lock);
  x10x11x120, 0,0,x16x17
}

struct *(const *harset
{
 returntry_then_request_module(charset,"%, );
}

void,x2a,x2cx2dx2ex2f/* 0x28-0x2f */
{
  )
  (nls-)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}

static const wchar_t charset2uni[256 x60,02 x63x64,x66,/* 0x60-0x67 */
 /* 0x00*/
  x70,x72,040,0,0, 
 0x0004, 0x0005 x79, ,x7c,0, x7f
 0x0008, 
 0, 0,0, x000f
/* 0x10*/
 0, x0011, x0013
 004 x0015x0016x0017
 x0018,, x001b
 0, 0, x001e,
 /* 0x20*/
0x0020, x0022,
 0x0024,0,0, xc3xc4,0,0, /* 0xc0-0xc7 */
 x0028, x002a,
00c x002d, 00f,
 /* 0x30*/
 0x0030, 0x0031, 0x0032,0,0, xdb,xdd,xdf
 0x0034, 0x0035, 0x0036,0,xe1,0,xe4,0e6,
0x0038, 0x0039, 0x003a, 0x003b,
0x003c, 0x003d, 0x003e, 0x003f,
/* 0x40*/

 0x00400,xfa, xfc,0, xff
 0x0044, 0x0045,;
 0x0048unsigned * [26={
 0x004c, 0x004d, 0x004e, 0x004f,
 /* 0x50*/
 0java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 x00x01x02x030,00 ,0,java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
0, x0059,00java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 0x005c, 0x005d0,0,0,0, x1c,0, x1f
 /* 0x60*/
 0, x0061,003
,x0065x0066x0067
0, x0069, 006bjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
0x006cx006d, 0,
 /* 0x70*/,0, , ,0, x6d,0f 
0, x0071,0,
 0, 0, 07,0,
  x60x610, x63x64x65x66,/
 0x007c, 0x007d ,0, x6b,0d x6e, 0x6f, /* 0x68-0x6f */
 /* 0x80*/
 0 0, 0x71 x72x73x74 x75, 0, /* 0x70-0x77 */
0, 0, x0086,
 0x0088x800, x82, x84,0,07/
 0x008c, 0x008dx88, x8a,0, x8d,x8f
 /* 0x90*/
 0x90, x92x93x94,0, x97
 0x0094, 0x0095x98,x9a,0,x9d,0, /* 0x98-0x9f */
 009, x0099, x009b
 0x009c,0,xaaxab, xadxae,/* 0xa8-0xaf */
 /* 0xa0*/
  ,,0,xbb,xbd0java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 x00a50java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 0x00a8, 0x00a9,xd8,0,0,0, xdd,x, /* 0xd8-0xdf */
 0, x00ad,0,
 /* 0xb0*/
 x00b0,x00b2,
 0,0,0,0,0, xf5xf60, /* 0xf0-0xf7 */
0, x00b9, x00bb
 0x00bc
 /* 0xc0*/
 0x00c0, x01x02, 0, x05,x07
 0x00c4, 0x08,0, x0b, x0d,0, 
0, 00, 0, x00cb
 0, x00cd,0,
 /* 0xd0*/
 0, x00d1, x00d3
 0, 0, x00d6,
 0x00d8 x00d9,,
x00dc,x00de,
 /* 0xe0*/
 0x00e0, 000 ,0, x53x54 x55,0, /* 0x70-0x77 */
 0, 0, 0x00e6 x00e7
 0 0x00e8
 0x00ec0, 0x00eex00ef
 /* 0xf0*/
 0 0x90, 0x91
 0x00f4, 0x00f5, 0x00f60x980x99, 0, 0x9b x9c0, 0, 0, /* 0x98-0x9f */
 0x00f8, 0x00f9, 0x00fa, 0x00fb,
 0x00fc, 0x00fd, 0x00fe, 0x00ff,
;

staticconst  page0025  java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
x00x01020, x04,x06, /* 0x00-0x07 */
x08, x0a, x0c,0, x0f
 0x10,  , 0, xd20, xd4, xd6,/* 0xd0-0xd7 */
0,0, 0, x1b, x1d, x1f
 0x20, 0x21, 0x22xe0,0, xe3,0,0xe6xe7
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */

 0,x31x32,0, x3506 x37
 0x38, 0x390, xf9,0, xfc,0, xff
 0x40, 0x41
 0x48
1,x52,0, x55, x57
 0x58, 0x59, 0{
 0x60, 0x61, 0x62, 0x63 constunsigned uni2charset
0, x69, x6b, x6dx6e, /* 0x68-0x6f */
 0x70, x72, 0x740,x76, *000 *java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 0x78,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 0x80, 0x81, 0x82, 0x83, 0x84[0  []java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
09 x91, 0, x94, x96,/
 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f
 0, xa1, xa3xa4xa50, xa7
 0xa8, 0xa9 *uni=0)
0, 0, xb2, xb4,xb6, /* 0xb0-0xb7 */
0,0, xba, 0xbcxbd, xbf
 0xc0, 0xc1
 0 struct  =java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
 0. = ,
 , 0, xdcxdd, 0, 
 0xe0,}
 0xe8/
 0xf0, 0xf1, structnls_tablel()
 0xf8, 0java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
};

    * page_uni2charset={
 java.lang.StringIndexOutOfBoundsException: Range [21, 7) out of bounds for length 21
}()java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

  5{
 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */
 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */
 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */
 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */
 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */
 0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x40-0x47 */
 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x48-0x4f */
 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x50-0x57 */
 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */
 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x60-0x67 */
 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x68-0x6f */
 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x70-0x77 */
 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */

 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x80-0x87 */
 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x88-0x8f */
 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x90-0x97 */
 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x98-0x9f */
 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */
 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */
 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0xb8-0xbf */
 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0xc0-0xc7 */
 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */
 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xd0-0xd7 */
 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0xd8-0xdf */
 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xe0-0xe7 */
 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xe8-0xef */
 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xf0-0xf7 */
 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
};

static const unsigned char charset2upper[256] = {
 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */
 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */
 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */
 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */
 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */
 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */
 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */
 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */
 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x40-0x47 */
 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x48-0x4f */
 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x50-0x57 */
 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */
 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x60-0x67 */
 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x68-0x6f */
 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x70-0x77 */
 0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */

 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x80-0x87 */
 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x88-0x8f */
 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x90-0x97 */
 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x98-0x9f */
 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */
 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */
 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0xb8-0xbf */
 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0xc0-0xc7 */
 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */
 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xd0-0xd7 */
 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0xd8-0xdf */
 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xe0-0xe7 */
 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xe8-0xef */
 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xf0-0xf7 */
 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
};


static int uni2char(wchar_t uni, unsigned char *out, int boundlen)
{
 const unsigned char *uni2charset;
 unsigned char cl = uni & 0x00ff;
 unsigned char ch = (uni & 0xff00) >> 8;

 if (boundlen <= 0)
  return -ENAMETOOLONG;

 uni2charset = page_uni2charset[ch];
 if (uni2charset && uni2charset[cl])
  out[0] = uni2charset[cl];
 else
  return -EINVAL;
 return 1;
}

static int char2uni(const unsigned char *rawstring, int boundlen, wchar_t *uni)
{
 *uni = charset2uni[*rawstring];
 if (*uni == 0x0000)
  return -EINVAL;
 return 1;
}

static struct nls_table default_table = {
 .charset = "default",
 .uni2char = uni2char,
 .char2uni = char2uni,
 .charset2lower = charset2lower,
 .charset2upper = charset2upper,
};

/* Returns a simple default translation table */
struct nls_table *load_nls_default(void)
{
 struct nls_table *default_nls;
 
 default_nls = load_nls(CONFIG_NLS_DEFAULT);
 if (default_nls != NULL)
  return default_nls;
 else
  return &default_table;
}

EXPORT_SYMBOL(unregister_nls);
EXPORT_SYMBOL(unload_nls);
EXPORT_SYMBOL(load_nls);
EXPORT_SYMBOL(load_nls_default);

MODULE_DESCRIPTION("Base file system native language support");
MODULE_LICENSE("Dual BSD/GPL");

Messung V0.5
C=91 H=92 G=91

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.6Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.