home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17697 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  3.2 KB

  1. Xref: sparky comp.sys.amiga.programmer:17697 comp.sys.amiga.misc:18960
  2. Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.misc
  3. Path: sparky!uunet!gatech!concert!sas!mozart.unx.sas.com!walker
  4. From: walker@twix.unx.sas.com (Doug Walker)
  5. Subject: Re: SAS C6.1 datecmp bug [Was: Re: Advice to SAS/C 5.10b users]
  6. Originator: walker@twix.unx.sas.com
  7. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  8. Message-ID: <BznyFH.J3s@unx.sas.com>
  9. Date: Tue, 22 Dec 1992 13:50:04 GMT
  10. References: <BzD93n.JCo@usenet.ucs.indiana.edu> <BzEqDF.A5H@unx.sas.com> <1992Dec21.030843.16107@bohra.cpg.oz.au> <BzMJJB.84z@unx.sas.com>
  11. Nntp-Posting-Host: twix.unx.sas.com
  12. Organization: SAS Institute Inc.
  13. Lines: 64
  14.  
  15.  
  16. In article <BzMJJB.84z@unx.sas.com>, jamie@cdevil.unx.sas.com (James Cooper) writes:
  17. |> Doug was correct.  Out of all those people, things can still slip past... for
  18. |> instance, one of the things fixed in 6.1 over 6.0 was not being able to compile
  19. |> with the F4 key in SE.  This was finally traced down to having the system
  20. |> WildStar bit turned on.  You might claim this is a common thing to do, but none
  21. |> of the Beta testers uses that bit, so it wasn't found until after release.
  22.  
  23. ...or if they do, they don't use SE, or if they do, they don't compile
  24. using F4, or if they do, they shrugged their shoulders when it happened
  25. and used right-Amiga-B instead.
  26.  
  27. |> As for why it was broken when you got it... well, I don't know any programmers
  28. |> who use the ANSI functions unless they are porting code, and we've only had 3
  29. |> people complain about the datecmp() function so far... and all of the complaints
  30. |> were *after* 6.1 came out.  The function was there in 6.0, and hasn't been
  31. |> touched since, but we never knew there was a problem, so we couldn't fix it.
  32.  
  33. Huh?  Many, many people use the ANSI functions.  datecmp() is not an
  34. ANSI function, however, it's an AmigaDOS function.  This is probably
  35. why it got by unnoticed.
  36.  
  37. The bug was a simple = vs == typo in datecmp().  I have fixed it and
  38. the fix will be in 6.2.  I suggest coding a datecmp() yourself,
  39. it's pretty obvious how it has to work.  In fact, here it is:
  40.  
  41.    #include <exec/types.h>
  42.    #include <dos/dos.h>
  43.  
  44.    int datecmp(struct DateStamp *a, struct DateStamp *b)
  45.    {
  46.       LONG tmp;
  47.       if((tmp = a->ds_Days - b->ds_Days) == 0)
  48.       {
  49.          if((tmp = a->ds_Minute - b->ds_Minute) == 0)
  50.          {
  51.             if((tmp = a->ds_Tick - b->ds_Tick) == 0)
  52.                return(0);
  53.          }
  54.       }
  55.       return(tmp < 0 ? -1 : 1);
  56.    }
  57.  
  58. (Actually, assuming the fields in the DateStamp structure can
  59. never be negative, you could use a simple memcmp() on it...
  60. hmmm....)
  61.  
  62. Right now, 6.2 is being held pending discovery of a weird memory-
  63. trashing bug on '040 machines that was introduced after 6.1 was
  64. shipped.  I apologize for the delay;  I'd love to be able to ship
  65. it right now, but until we locate this problem, we can't ship
  66. anything.
  67.  
  68. |> Jim Cooper
  69.  
  70. -- 
  71.   *****
  72. =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
  73.  *|. o.| ||                                          1200/2400/9600 Dual
  74.   | o  |//     For all you do, this bug's for you!
  75.   ====== 
  76. usenet: walker@unx.sas.com                            bix: djwalker 
  77. Any opinions expressed are mine, not those of SAS Institute, Inc.
  78.  
  79.