home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / ibm / AIX / aixMsg.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-16  |  4.2 KB  |  101 lines

  1. /*
  2.  * $XConsortium: aixMsg.c,v 1.2 91/07/16 13:01:10 jap Exp $
  3.  *
  4.  * Copyright IBM Corporation 1987,1988,1989,1990,1991
  5.  *
  6.  * All Rights Reserved
  7.  *
  8.  * License to use, copy, modify, and distribute this software and its
  9.  * documentation for any purpose and without fee is hereby granted,
  10.  * provided that the above copyright notice appear in all copies and that
  11.  * both that copyright notice and this permission notice appear in
  12.  * supporting documentation, and that the name of IBM not be
  13.  * used in advertising or publicity pertaining to distribution of the
  14.  * software without specific, written prior permission.
  15.  *
  16.  * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  17.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND 
  18.  * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL
  19.  * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  20.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  22.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  23.  * SOFTWARE.
  24.  *
  25. */
  26.  
  27. /*              include file for message texts          */
  28. #include "X_msg.h" 
  29. nl_catd  scmc_catd = NULL;   /* Cat descriptor for scmc conversion */
  30.  
  31. #ifndef DONOTUSELOCALE
  32. #include <locale.h>
  33. #endif
  34.  
  35. #include <stdio.h>
  36.  
  37.  
  38. /* Default error messages used if catalog file is not found */
  39.  
  40. static char *err_msgs[] = {
  41.         "1362-001 The X Server cannot open the default font %s.\n\tMake sure that the font or default font path is valid.\n",
  42.     "1362-002 The X Server cannot open the default cursor font %s.\n\tMake sure that the cursor font or default cursor font path is valid.\n",
  43.     "1362-003 The X Server cannot open RGB database %s.\n\
  44. \tCheck the database %s. If valid, try invoking server again.\n",
  45.     "1362-004 Usage: The \"X\" command accepts the following flags:\n\
  46. \t   -a  <accel>     specify the mouse acceleration\n\
  47. \t   -bp <color>     specify a BlackPixel color\n\
  48. \t   -c  <volume>    specify the key click volume\n\
  49. \t   -D  <file>      specify the color definition data base file\n\
  50. \t   -f  <volume>    specify the beep volume\n\
  51. \t   -fc <font>      specify the font for cursor glyphs and masks\n\
  52. \t   -fn <font>      specify the default text font\n\
  53. \t   -fp <path>      specify the search path for fonts\n\
  54. \t   -m              use monochrome display characteristics\n\
  55. \t   -n :<num>       specify the connection number\n\
  56. \t   -p  <interval>  specify the screen saver interval\n\
  57. \t   -r              disables auto repeat\n\
  58. \t   -s <delay>      specify the screen saver delay\n\
  59. \t   -t <threshold>  specify the mouse threshold\n\
  60. \t   -to <time>      specify the time between connection checks\n\
  61. \t   -T              disable the Ctrl-Alt-Backspace key sequence\n\
  62. \t   -v              activate screen saver with background color\n\
  63. \t   -wp <color>     specify a WhitePixel color\n",
  64.         "1362-005 Error number %s was received while attempting to bind a UNIX\n\
  65. \tdomain socket.\n\tCheck permissions in /dev/sock file.\n",
  66.     "1362-006 An error was detected while attempting to bind the TCP socket.\n\
  67. \tBe sure the network is available, the network is configured correctly,\n\
  68. \tand any necessary devices are configured correctly.\n",
  69.     "1362-007 The X Server is unable to query current keyboard.\n\
  70. \tCheck that the keyboard is in working condition and firmly attached\n\
  71. \tto the machine.\n",
  72.     "1362-008 The X Server is unable to query display device IDs.\n\
  73. \tCheck that the device of the specified type is attached and configured\n\
  74. \tcorrectly.\n",
  75.     "1362-009 The X Server is unable to locate display %s.\n\
  76. \tBe sure that the device specified is attached to the X server and is\n\
  77. \tconfigured correctly.\n",
  78.     "1362-010 The X Server cannot configure the locator device.\n\
  79. \tBe sure the device is attached to the computer and configured\n\
  80. \tcorrectly.\n"};
  81.  
  82.  
  83. void aixErrMsg(err_nbr, x_parm)
  84. int err_nbr;
  85. char *x_parm;
  86. {
  87.  
  88. #ifndef DONOTUSELOCALE
  89.     setlocale(LC_ALL, "");
  90. #endif
  91. /* open the message catalog file descriptor */
  92. /*
  93.     if(!scmc_catd)
  94.             scmc_catd = NLcatopen(MF_X);
  95. */
  96.  
  97.     /* Print the error message from the NL message catalog */
  98.     fprintf(stderr, NLcatgets(scmc_catd, MS_X, err_nbr, err_msgs[err_nbr-1]), 
  99.         x_parm, x_parm);
  100. }
  101.