home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / 20656 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.2 KB  |  39 lines

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