SrvMain.c 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. static char rcsid[] =
  24. "$XConsortium: SrvMain.c /main/4 1995/10/30 09:40:18 rswiston $";
  25. /* *
  26. * (c) Copyright 1993, 1994 Hewlett-Packard Company *
  27. * (c) Copyright 1993, 1994 International Business Machines Corp. *
  28. * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
  29. * (c) Copyright 1993, 1994 Novell, Inc. *
  30. */
  31. /*
  32. $Log$
  33. * Revision 1.10 95/02/24 13:47:53 13:47:53 mcnichol_ibm_austin
  34. * 7602 - code needs 4 line CDE partner copyright notices
  35. *
  36. * Revision 1.9 94/07/25 15:52:01 15:52:01 mcbill_hp_cv
  37. * remove call to DtSetUserMessageHandler (obsolete)
  38. *
  39. *
  40. * Revision 1.8 94/05/05 16:13:58 16:13:58 arg_sun
  41. * DevEnv_cleanup
  42. *
  43. * Revision 1.7 93/08/12 20:25:17 20:25:17 xbuild (See Marc Ayotte)
  44. * additional CoeToDt check-in
  45. *
  46. * Revision 1.6 93/08/12 20:17:58 20:17:58 xbuild (See Marc Ayotte)
  47. * CoeToDt check-in
  48. *
  49. * Revision 1.5 93/03/08 14:39:58 14:39:58 xbuild (See Marc Ayotte)
  50. * "duplicate rev for sending to ibm"
  51. *
  52. * Revision 1.4 93/03/05 11:19:52 11:19:52 ronv (Ronald Voll)
  53. * ========= Changed strings: =============
  54. * vue --> dt
  55. * Vue --> Dt
  56. * VuE --> CoE
  57. * VUE --> DT
  58. *
  59. * Revision 1.3 93/01/28 15:47:47 15:47:47 xbuild (See Marc Ayotte)
  60. * XmpToDt check-in
  61. *
  62. * Revision 1.2 93/01/27 19:50:39 19:50:39 xbuild (See Marc Ayotte)
  63. * XueToDt check-in
  64. *
  65. * Revision 1.1 93/01/12 10:42:51 10:42:51 xbuild (See Marc Ayotte)
  66. * Initial revision
  67. *
  68. * Revision 1.1 93/01/07 16:40:10 16:40:10 xbuild (See Marc Ayotte)
  69. * Initial revision
  70. *
  71. * Revision 1.1 91/10/31 16:26:30 16:26:30 keith (Keith Taylor)
  72. * Initial revision
  73. *
  74. * Revision 3.3 91/05/22 14:02:22 14:02:22 julie (Julie Skeen)
  75. * protos and domain fixes
  76. *
  77. * Revision 3.2 90/09/24 17:20:33 17:20:33 fredh (Fred Handloser)
  78. * change to static message catalogs
  79. *
  80. * Revision 3.1 90/07/27 11:37:34 11:37:34 ted (Ted Ransom)
  81. * added the new parameter for InitializeCoecolor
  82. *
  83. * Revision 3.0 90/07/10 12:08:42 12:08:42 kimd (Kim Drongesen)
  84. * first release after strider/tw
  85. * useAsyncGeometry and font changes for topcat added
  86. *
  87. * Revision 2.6 90/04/26 14:00:03 14:00:03 ted
  88. * bullet proofing
  89. *
  90. * Revision 2.5 90/03/29 08:08:46 08:08:46 ted (Ted Ransom)
  91. * now calls InitializeCoecolor .. does CheckMonitor, InitializePalettes, and
  92. * AllocateColors
  93. *
  94. * Revision 2.4 90/03/26 14:34:45 14:34:45 ted (Ted Ransom)
  95. * registered error message handler .. registered XeProgName
  96. *
  97. * Revision 2.3 90/03/14 17:23:40 17:23:40 ted (Ted Ransom)
  98. * no change
  99. *
  100. * Revision 2.2 90/03/14 11:25:43 11:25:43 jenny (Jennefer Wood)
  101. * added appContext to XtOpenDisplay and XtAppMainLoop
  102. *
  103. * Revision 2.1 90/03/13 09:04:30 09:04:30 ted (Ted Ransom)
  104. * added support for Selections .. use -DSELECTION
  105. *
  106. * Revision 2.0 90/03/12 09:17:25 09:17:25 jenny (Jennefer Wood)
  107. * NCGA
  108. *
  109. * Revision 1.5 90/02/28 11:27:02 11:27:02 ted (Ted Ransom)
  110. * updated to support multiple screens
  111. *
  112. * Revision 1.4 90/02/26 17:25:02 17:25:02 ted (Ted Ransom)
  113. * no changes ... sorry
  114. *
  115. * Revision 1.3 90/02/21 13:41:08 13:41:08 root ()
  116. * added malloc_check and malloc_trace under ifdef for USERHELP
  117. *
  118. * Revision 1.2 90/02/12 16:04:09 16:04:09 ted (Ted Ransom)
  119. * changed c_server.h Srv.h
  120. *
  121. * Revision 1.1 90/02/12 15:20:45 15:20:45 ted (Ted Ransom)
  122. * Initial revision
  123. *
  124. */
  125. #include "Srv.h"
  126. #include "Sm.h"
  127. void
  128. main(
  129. int argc,
  130. char **argv )
  131. {
  132. Display *display;
  133. int result;
  134. #ifdef USERHELP
  135. malloc_check(1);
  136. malloc_trace(0);
  137. #endif
  138. XtAppContext app;
  139. /* Initialize the toolkit and open the display */
  140. XtToolkitInitialize();
  141. app = XtCreateApplicationContext();
  142. display = XtOpenDisplay(app, NULL, argv[0], "Customize", NULL, 0,
  143. &argc, argv);
  144. /* Go register the DT error handler */
  145. XeProgName = argv[0];
  146. result = InitializeDtcolor(display, DEFAULT_SESSION);
  147. if(result != 0)
  148. exit(0);
  149. XtAppMainLoop(app);
  150. }