MsgLog.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. /*
  24. * (c) Copyright 1995 Digital Equipment Corporation.
  25. * (c) Copyright 1995 Hewlett-Packard Company.
  26. * (c) Copyright 1995 International Business Machines Corp.
  27. * (c) Copyright 1995 Sun Microsystems, Inc.
  28. * (c) Copyright 1995 Novell, Inc.
  29. * (c) Copyright 1995 FUJITSU LIMITED.
  30. * (c) Copyright 1995 Hitachi.
  31. *
  32. * MsgLog.h - Public header file for the Message Logging Service
  33. *
  34. * $XConsortium: MsgLog.h /main/5 1995/07/14 13:22:57 drk $
  35. *
  36. */
  37. #ifndef _Dt_MsgLog_h
  38. #define _Dt_MsgLog_h
  39. #include <stdio.h> /* needed for FILE */
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. # include <stdarg.h>
  44. /*
  45. * Type declarations
  46. */
  47. typedef enum {
  48. DtMsgLogInformation,
  49. DtMsgLogStderr,
  50. DtMsgLogDebug,
  51. DtMsgLogWarning,
  52. DtMsgLogError
  53. } DtMsgLogType;
  54. typedef void (*DtMsgLogHandler) (
  55. const char * program_name,
  56. DtMsgLogType msg_type,
  57. const char * format,
  58. va_list args );
  59. /*
  60. * Function declarations
  61. */
  62. extern void DtMsgLogMessage (
  63. const char * program_name,
  64. DtMsgLogType msg_type,
  65. const char * format,
  66. ... );
  67. extern DtMsgLogHandler DtMsgLogSetHandler (
  68. DtMsgLogHandler handler );
  69. extern FILE * DtMsgLogOpenFile (
  70. const char * type,
  71. char ** filename_return); /* MODIFIED */
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75. #endif /* _Dt_MsgLog_h */