I18nUtil.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 libraries 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: I18nUtil.h /main/1 1996/03/25 00:52:10 pascale $ */
  24. /************************************<+>*************************************
  25. ****************************************************************************
  26. **
  27. ** File: I18nUtil.h
  28. **
  29. **
  30. ** This file contains function definitions for the corresponding .c
  31. ** file
  32. **
  33. **
  34. ** (c) Copyright Hewlett-Packard Company, 1990.
  35. **
  36. **
  37. **
  38. ****************************************************************************
  39. ************************************<+>*************************************/
  40. /*
  41. * (c) Copyright 1996 Digital Equipment Corporation.
  42. * (c) Copyright 1996 Hewlett-Packard Company.
  43. * (c) Copyright 1996 International Business Machines Corp.
  44. * (c) Copyright 1996 Sun Microsystems, Inc.
  45. * (c) Copyright 1996 Novell, Inc.
  46. * (c) Copyright 1996 FUJITSU LIMITED.
  47. * (c) Copyright 1996 Hitachi.
  48. */
  49. #ifndef _i18nUtil_h
  50. #define _i18nUtil_h
  51. #include <stdio.h>
  52. #include <string.h>
  53. #include <X11/Xlib.h>
  54. #include <X11/Intrinsic.h>
  55. /* string */
  56. #define COMMENT_CHAR '!'
  57. #define COMMENT_CHAR2 '#'
  58. #define is_comment_char(c) ((c) == COMMENT_CHAR || (c) == COMMENT_CHAR2)
  59. #define is_white(c) ((c) == ' ' || (c) == '\t' || (c) == '\n')
  60. #define skip_white(p) while (is_white(*(p))) (p)++
  61. #define cut_field(p) \
  62. for ((p)++; *(p) && !is_white(*(p)); (p)++) ; *(p)++ = 0; skip_white(p)
  63. #endif /* _i18nUtil_h */
  64. /* DON'T ADD ANYTHING AFTER THIS #endif */