basetbl.c 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these librararies and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: basetbl.c /main/3 1995/11/01 15:50:27 rswiston $ */
  24. /** %W% **/
  25. /* Copyright (c) 1991, 1992 UNIX System Laboratories, Inc. */
  26. /* All Rights Reserved */
  27. /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF UNIX System Laboratories, Inc. */
  28. /* The copyright notice above does not evidence any */
  29. /* actual or intended publication of such source code. */
  30. #include "stdio.h"
  31. #include <sys/types.h>
  32. #include "exksh.h"
  33. #include "msgs.h"
  34. /*
  35. * Declare all strings in one place to avoid duplication
  36. */
  37. char STR_uint[] = "uint";
  38. static char STR_intp[] = "intp";
  39. static char STR_int[] = "int";
  40. static char STR_dint[] = "dint";
  41. char STR_unsigned_long[] = "unsigned_long";
  42. static char STR_longp[] = "longp";
  43. static char STR_long[] = "long";
  44. static char STR_dlong[] = "dlong";
  45. static char STR_ushort[] = "ushort";
  46. static char STR_short[] = "short";
  47. static char STR_dshort[] = "dshort";
  48. static char STR_unchar[] = "unchar";
  49. static char STR_char[] = "char";
  50. char STR_string_t[] = "string_t";
  51. struct memtbl T_uint[] = {
  52. { (char *) STR_uint, (char *) STR_uint, K_INT, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(uint), 0 }, NULL
  53. };
  54. struct memtbl T_dint[] = {
  55. { (char *) STR_dint, (char *) STR_dint, K_DINT, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(int) }, NULL
  56. };
  57. struct memtbl T_int[] = {
  58. { (char *) STR_int, (char *) STR_int, K_INT, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(int) }, NULL
  59. };
  60. struct memtbl T_intp[] = {
  61. { (char *) STR_intp, (char *) STR_intp, K_INT, F_SIMPLE, -1, 1, 0, 0, 0, 0, sizeof(int) }, NULL
  62. };
  63. struct memtbl T_unsigned_long[] = {
  64. { (char *) STR_unsigned_long, (char *) STR_unsigned_long, K_LONG, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(unsigned long), 0 }, NULL
  65. };
  66. struct memtbl T_long[] = {
  67. { (char *) STR_long, (char *) STR_long, K_LONG, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(long) }, NULL
  68. };
  69. struct memtbl T_dlong[] = {
  70. { (char *) STR_dlong, (char *) STR_dlong, K_DLONG, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(long) }, NULL
  71. };
  72. struct memtbl T_longp[] = {
  73. { (char *) STR_longp, (char *) STR_longp, K_LONG, F_SIMPLE, -1, 1, 0, 0, 0, 0, sizeof(long) }, NULL
  74. };
  75. struct memtbl T_ushort[] = {
  76. { (char *) STR_ushort, (char *) STR_ushort, K_SHORT, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(ushort) }, NULL
  77. };
  78. struct memtbl T_short[] = {
  79. { (char *) STR_dshort, (char *) STR_dshort, K_DSHORT, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(short) }, NULL
  80. };
  81. struct memtbl T_dshort[] = {
  82. { (char *) STR_short, (char *) STR_short, K_SHORT, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(short) }, NULL
  83. };
  84. struct memtbl T_unchar[] = {
  85. { (char *) STR_unchar, (char *) STR_unchar, K_CHAR, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(unsigned char) }, NULL
  86. };
  87. struct memtbl T_char[] = {
  88. { (char *) STR_char, (char *) STR_char, K_CHAR, F_SIMPLE, -1, 0, 0, 0, 0, 0, sizeof(char) }, NULL
  89. };
  90. struct memtbl T_string_t[] = {
  91. { (char *) STR_string_t, (char *) STR_string_t, K_STRING, F_TYPE_IS_PTR, -1, 0, 0, -1, 0, 0, sizeof(char *) }, NULL
  92. };
  93. struct memtbl *basemems[] = {
  94. T_uint,
  95. T_int,
  96. T_dint,
  97. T_intp,
  98. T_unsigned_long,
  99. T_long,
  100. T_dlong,
  101. T_longp,
  102. T_ushort,
  103. T_short,
  104. T_dshort,
  105. T_unchar,
  106. T_char,
  107. T_string_t,
  108. NULL
  109. };
  110. struct symarray basedefs[] = {
  111. { "PRDECIMAL", PRDECIMAL },
  112. { "PRHEX", PRHEX },
  113. { "PRMIXED", PRMIXED },
  114. { "PRMIXED_SYMBOLIC", PRMIXED_SYMBOLIC },
  115. { "PRNAMES", PRNAMES },
  116. { "PRSYMBOLIC", PRSYMBOLIC },
  117. { NULL, 0 }
  118. };