home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / hp / 9198 < prev    next >
Encoding:
Text File  |  1992-08-12  |  3.1 KB  |  93 lines

  1. Path: sparky!uunet!dtix!darwin.sura.net!Sirius.dfn.de!chx400!sicsun!slhp1.epfl.ch!lecom
  2. From: lecom@slhp1.epfl.ch (Claude Lecommandeur)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: Xlib bugs in HP-UX 8.07
  5. Message-ID: <3870@sicsun.epfl.ch>
  6. Date: 12 Aug 92 12:41:35 GMT
  7. References: <85922@netnews.upenn.edu>
  8. Sender: news@sicsun.epfl.ch
  9. Organization: Ecole Polytechnique Federale de Lausanne
  10. Lines: 81
  11.  
  12. In article <85922@netnews.upenn.edu>, freeman@saul.cis.upenn.edu (Jon Freeman) writes:
  13. |> I have two specific complaints about Xlib functions under HP-UX 8.07.
  14. |> 
  15. |> 1.  For the life of me, I cannot figure out how to add a new font
  16. |> directory to a server's font path using XSetFontPath() (or
  17. |> equivalently, 'xset +fp' or 'xset fp+').  I wrote a small C program
  18. |> that calls XSetFontPath() but it keeps giving me BadValue errors.  It
  19. |> is possible to "add" font directories that are already in the path
  20. |> (they will appear twice in the path), but adding a new directory
  21. |> simply doesn't work, no matter where that directory actually is.  Does
  22. |> anybody else have this problem, or am I losing my mind?
  23. |> 
  24.  
  25.     It seems that you can add directories only in {your_X11_path}/lib/fonts,
  26. i don't know why, but it works for me for these kind of directories.
  27.  
  28. |> 2.  Here's a simple Xlib program called xlib-test.c:
  29. |> --------------------------------------------------------
  30. |> #include <stdio.h>
  31. |> #include <X11/Xlib.h>
  32. |> 
  33. |> int main(argc, argv)
  34. |> int argc;
  35. |> char *argv[];
  36. |> {
  37. |>   Display *disp;
  38. |>   char *fg, *bg, *rnd;
  39. |> 
  40. |>   if ((disp = XOpenDisplay(NULL)) == NULL) {
  41. |>     printf("Can't open default display\n");
  42. |>     exit(1);
  43. |>   }
  44. |> 
  45. |>   fg = XGetDefault( disp, argv[0], "foreground" );
  46. |>   bg = XGetDefault( disp, argv[0], "background" );
  47. |>   rnd = XGetDefault( disp, argv[0], "random" );
  48. |> 
  49. |>   if( fg == NULL ) printf("fg is null.\n");
  50. |>   else printf("fg is %s\n", fg);
  51. |> 
  52. |>   if( bg == NULL ) printf("bg is null.\n");
  53. |>   else printf("bg is %s\n", bg);
  54. |> 
  55. |>   if( rnd == NULL ) printf("rnd is null.\n");
  56. |>   else printf("rnd is %s\n", rnd);
  57. |> 
  58. |>   XCloseDisplay( disp );
  59. |> 
  60. |>   return 0;
  61. |> 
  62. |> }
  63. |> --------------------------------------------------------
  64. |> And here's its output on an HP9000/710:
  65. |> 
  66. |> hp710 /disk/plaid/freeman [ 4 ] xlib-test
  67. |> fg is #FFFFFFFFFFFF
  68. |> bg is #7848A075D500
  69. |> rnd is null.
  70. |> hp710 /disk/plaid/freeman [ 5 ] 
  71. |> 
  72. |> I have no .Xdefaults file in my home directory, and my XENVIRONMENT
  73. |> variable is not set, so all three calls to XGetDefault() should have
  74. |> returned null.  I get the same results no matter what the name of the
  75. |> program is.
  76. |> 
  77. |> Xlib is the lowest level of what's supposed to be the ultimate
  78. |> portable window system.  It's very disappointing to discover that even
  79. |> basic functions like these have bugs.
  80. |> 
  81.  
  82.    Did you try xrdb -q, HP/Vue loadss its own resources in the server.
  83.  
  84. -- 
  85.  
  86.  
  87.                     Claude Lecommandeur
  88.                     Service Informatique Central
  89.                     Ecole Polytechnique Federale de Lausanne
  90.                     1015 LAUSANNE (SWITZERLAND)
  91.                     E-Mail : lecom@sic.epfl.ch
  92.                     Tel : (41 21) 693-22-97
  93.