home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / maillis / xwindow / 19016 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  1.5 KB

  1. Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
  2. From: ori@marvin.technion.ac.il (Ori Degani)
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: XGetRGBColormap
  5. Message-ID: <1992Dec31.110705.13813@sm.sony.co.jp>
  6. Date: 31 Dec 92 11:07:05 GMT
  7. Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
  8. Distribution: fj
  9. Organization: Heart of Gold Institute
  10. Lines: 33
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Date: Thu, 31 Dec 1992 02:21:55 GMT
  14. Message-Id: <1992Dec31.022155.8911@discus.technion.ac.il>
  15. Newsgroups: comp.windows.x
  16. Sender: xpert-request@expo.lcs.mit.edu
  17.  
  18. Yo, 
  19.   My application needs to display real pictures (digitized), so I'm
  20. using XGetRGBColormaps to get the best colormap for the system.  The
  21. problem is that it giving me an error message for something I copied
  22. from the "Xlib Programming Manual X11R4":
  23.  
  24. Page 225: /XGetRGB/
  25. if (XGetRGBColoraps (dpy, win, &best_map_info, &no_of_cmaps,
  26. XA_RGB_BEST_MAP) == 0) {
  27.     fprintf (stderr, "Error:\n");
  28.     exit(1);
  29. }
  30.  
  31. Well the error it produces is (I'm using gcc if thats any help)
  32.     makeImage.c:97: warning: passing arg 3 of `XGetRGBColormaps' from incompatible pointer type
  33.  
  34. arg 3 is best_map_info, which is declared as:
  35. (same as page 224)
  36. XStandardColormap best_map_info;
  37.  
  38. So what's the problem?  Am I wrong?  Is the book wrong?  (Neither?)
  39.  
  40. Ori
  41. --
  42.    |  ----      Ori Degani
  43.    |  |___      ori@eddie.technion.ac.il   (Ship Computer on the HOG)
  44.    |  |         ori@marvin.technion.ac.il  (Who else) 
  45.    |  ----      s2973229@techst02.technion.ac.il (Ech..)   
  46.