OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [common/] [ctype.c] - Blame information for rev 299

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 marcus.erl
/*
2
    ctype.c -- character types
3
    Implements the usual ctype stuff (only valid for ASCII systems)
4
    Copyright (C) 2002 Richard Herveille, rherveille@opencores.org
5
 
6
    This file is part of OpenRISC 1000 Reference Platform Monitor (ORPmon)
7
 
8
    This program is free software; you can redistribute it and/or modify
9
    it under the terms of the GNU General Public License as published by
10
    the Free Software Foundation; either version 2 of the License, or
11
    (at your option) any later version
12
 
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17
 
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
*/
22
 
23
#include <ctype.h>
24
 
25
const unsigned char __ctype_table[256] =
26
{
27
  /* only the first 128 characters are really defined                   0   1   2   3    4   5   6   7  */
28
       0, __CT_c,  __CT_c,  __CT_c,  __CT_c,  __CT_c,  __CT_c,  __CT_c, /*0  NUL SOH STX ETX  EOT ENQ ACK BEL */
29
  __CT_c, __CT_b,  __CT_s,  __CT_b,  __CT_s,  __CT_s,  __CT_c,  __CT_c, /*1  BS  HT  LF  VT   FF  CR  SO  SI  */
30
  __CT_c, __CT_c,  __CT_c,  __CT_c,  __CT_c,  __CT_c,  __CT_c,  __CT_c, /*2  DLE DC1 DC2 DC3  DC4 NAK SYN ETB */
31
  __CT_c, __CT_c,  __CT_c,  __CT_c,  __CT_c,  __CT_c,  __CT_c,  __CT_c, /*3  CAN EM  SUB ESC  FS  GS  RS  US  */
32
  __CT_b, __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_p, /*4  SP  !   "   #    $   %   &   '   */
33
  __CT_p, __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_p, /*5  (   )   *   +    ,   -   .   /   */
34
  __CT_d, __CT_d,  __CT_d,  __CT_d,  __CT_d,  __CT_d,  __CT_d,  __CT_d, /*6  0   1   2   3    4   5   6   7   */
35
  __CT_d, __CT_d,  __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_p, /*7  8   9   :   ;    <   =   >   ?   */
36
  __CT_p, __CT_ux, __CT_ux, __CT_ux, __CT_ux, __CT_ux, __CT_ux, __CT_u, /*8  @   A   B   C    D   E   F   G   */
37
  __CT_u, __CT_u,  __CT_u,  __CT_u,  __CT_u,  __CT_u,  __CT_u,  __CT_u, /*9  H   I   J   K    L   M   N   O   */
38
  __CT_u, __CT_u,  __CT_u,  __CT_u,  __CT_u,  __CT_u,  __CT_u,  __CT_u, /*a  P   Q   R   S    T   U   V   W   */
39
  __CT_u, __CT_u,  __CT_u,  __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_p, /*b  X   Y   Z   [    \   ]   ^   _   */
40
  __CT_p, __CT_lx, __CT_lx, __CT_lx, __CT_lx, __CT_lx, __CT_lx, __CT_l, /*c  `   a   b   c    d   e   f   g   */
41
  __CT_l, __CT_l,  __CT_l,  __CT_l,  __CT_l,  __CT_l,  __CT_l,  __CT_l, /*d  h   i   j   k    l   m   n   o   */
42
  __CT_l, __CT_l,  __CT_l,  __CT_l,  __CT_l,  __CT_l,  __CT_l,  __CT_l, /*e  p   q   r   s    t   u   v   w   */
43
  __CT_l, __CT_l,  __CT_l,  __CT_p,  __CT_p,  __CT_p,  __CT_p,  __CT_c, /*f  x   y   z   {    |   }   ~   DEL */
44
 
45
  /* The other 128 characters are system dependant          */
46
  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,
47
  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,
48
  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,
49
  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,
50
 
51
  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,
52
  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,
53
  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,
54
  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0
55
};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.