home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / motif / 8529 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.1 KB  |  47 lines

  1. Newsgroups: comp.windows.x.motif
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!decwrl!cae780!vadi
  3. From: vadi@csi.com (Vadivelu Elumalai)
  4. Subject: Re: heller updates
  5. Message-ID: <1993Jan12.222553.4252@csi.com>
  6. Organization: Comdisco Systems Inc.
  7. Distribution: na
  8. Date: Tue, 12 Jan 1993 22:25:53 GMT
  9. Lines: 36
  10.  
  11. Section: 11.1.5
  12.  
  13.     Example 11-2. The xcal.c program  Page # 366 (in my book)
  14.  
  15.  
  16. In main(), local variable month_no should be initialized (to 1).
  17.  
  18. While,
  19.  
  20. % xcal                       initializes month_no
  21.  
  22.  
  23. % xcal 1993                  does not.
  24.  
  25.  
  26.  
  27. This is a potential bug as month_no is passed to XmListSelectPos() later
  28. in main() procedure.
  29.  
  30.         XmListSelectPos(w, month_no, True);
  31.  
  32. Problem Code: In main()
  33.  
  34.     int i, month_no ;
  35.  
  36. It should be,
  37.  
  38.     int 1, month_no = 1 ; /* or any number in the range 1 - 12 */
  39.  
  40.  
  41. -Vadi
  42. vadi@csi.com
  43. -----------------------------------------------------------------------------
  44. vadi@csi.com | Sex is not the answer. Sex is the question. Yes is the answer.
  45. -----------------------------------------------------------------------------
  46.  
  47.