ctype_.c 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* $OpenBSD: ctype_.c,v 1.10 2011/09/22 09:06:10 stsp Exp $ */
  2. /*
  3. * Copyright (c) 1989 The Regents of the University of California.
  4. * All rights reserved.
  5. * (c) UNIX System Laboratories, Inc.
  6. * All or some portions of this file are derived from material licensed
  7. * to the University of California by American Telephone and Telegraph
  8. * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  9. * the permission of UNIX System Laboratories, Inc.
  10. *
  11. * Redistribution and use in source and binary forms, with or without
  12. * modification, are permitted provided that the following conditions
  13. * are met:
  14. * 1. Redistributions of source code must retain the above copyright
  15. * notice, this list of conditions and the following disclaimer.
  16. * 2. Redistributions in binary form must reproduce the above copyright
  17. * notice, this list of conditions and the following disclaimer in the
  18. * documentation and/or other materials provided with the distribution.
  19. * 3. Neither the name of the University nor the names of its contributors
  20. * may be used to endorse or promote products derived from this software
  21. * without specific prior written permission.
  22. *
  23. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  24. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  25. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  26. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  27. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  28. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  29. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  30. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  31. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  32. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  33. * SUCH DAMAGE.
  34. */
  35. #include <ctype.h>
  36. #include "ctype_private.h"
  37. const char _C_ctype_[1 + CTYPE_NUM_CHARS] = {
  38. 0,
  39. _C, _C, _C, _C, _C, _C, _C, _C,
  40. _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C,
  41. _C, _C, _C, _C, _C, _C, _C, _C,
  42. _C, _C, _C, _C, _C, _C, _C, _C,
  43. _S|(char)_B, _P, _P, _P, _P, _P, _P, _P,
  44. _P, _P, _P, _P, _P, _P, _P, _P,
  45. _N, _N, _N, _N, _N, _N, _N, _N,
  46. _N, _N, _P, _P, _P, _P, _P, _P,
  47. _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U,
  48. _U, _U, _U, _U, _U, _U, _U, _U,
  49. _U, _U, _U, _U, _U, _U, _U, _U,
  50. _U, _U, _U, _P, _P, _P, _P, _P,
  51. _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L,
  52. _L, _L, _L, _L, _L, _L, _L, _L,
  53. _L, _L, _L, _L, _L, _L, _L, _L,
  54. _L, _L, _L, _P, _P, _P, _P, _C,
  55. 0, 0, 0, 0, 0, 0, 0, 0, /* 80 */
  56. 0, 0, 0, 0, 0, 0, 0, 0, /* 88 */
  57. 0, 0, 0, 0, 0, 0, 0, 0, /* 90 */
  58. 0, 0, 0, 0, 0, 0, 0, 0, /* 98 */
  59. 0, 0, 0, 0, 0, 0, 0, 0, /* A0 */
  60. 0, 0, 0, 0, 0, 0, 0, 0, /* A8 */
  61. 0, 0, 0, 0, 0, 0, 0, 0, /* B0 */
  62. 0, 0, 0, 0, 0, 0, 0, 0, /* B8 */
  63. 0, 0, 0, 0, 0, 0, 0, 0, /* C0 */
  64. 0, 0, 0, 0, 0, 0, 0, 0, /* C8 */
  65. 0, 0, 0, 0, 0, 0, 0, 0, /* D0 */
  66. 0, 0, 0, 0, 0, 0, 0, 0, /* D8 */
  67. 0, 0, 0, 0, 0, 0, 0, 0, /* E0 */
  68. 0, 0, 0, 0, 0, 0, 0, 0, /* E8 */
  69. 0, 0, 0, 0, 0, 0, 0, 0, /* F0 */
  70. 0, 0, 0, 0, 0, 0, 0, 0 /* F8 */
  71. };
  72. const char *_ctype_ = _C_ctype_;