home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / amiga / programm / 18099 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.8 KB  |  45 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!gatech!concert!sas!mozart.unx.sas.com!walker
  3. From: walker@twix.unx.sas.com (Doug Walker)
  4. Subject: Re: AmigaDOS library functions and ANSI-C programming
  5. Originator: walker@twix.unx.sas.com
  6. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  7. Message-ID: <C0C2wK.G1s@unx.sas.com>
  8. Date: Mon, 4 Jan 1993 14:29:07 GMT
  9. References:  <1992Dec29.221144.26405@urbana.mcd.mot.com>
  10. Nntp-Posting-Host: twix.unx.sas.com
  11. Organization: SAS Institute Inc.
  12. Lines: 31
  13.  
  14.  
  15. In article <1992Dec29.221144.26405@urbana.mcd.mot.com>, qbarnes@urbana.mcd.mot.com (Quentin Barnes) writes:
  16. |> I ran across a widespread problem with the AmigaDOS specific
  17. |> prototypes/libraries with writing ANSI-C code.  AmigaDOS
  18. |> functions which take pointers to objects when the objects
  19. |> aren't modified are not marked as "const".  For example,
  20. |> the ANSI-C code:
  21. |>         const char *s = "mylib";
  22. |>         OpenLibrary(s,0L);
  23. ...
  24. |> Has the problem been covered before?  Is there plans in the
  25. |> works to support ANSI-C/C++ clean AmigaDOS library calls?
  26.  
  27. |> Quentin Barnes
  28.  
  29. I hope that Commodore addresses these issues soon.  Fortunately,
  30. if and when they do SAS/C is prepared to deal with it.  There
  31. is a command-line option to tell the compiler to treat all
  32. quoted strings as "const char *" instead of "char *", and all
  33. the code is present to deal with const correctly.  We can't
  34. turn the option on by default because of this exact problem.
  35.  
  36. -- 
  37.   *****
  38. =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
  39.  *|. o.| ||                                          1200/2400/9600 Dual
  40.   | o  |//     For all you do, this bug's for you!
  41.   ====== 
  42. usenet: walker@unx.sas.com                            bix: djwalker 
  43. Any opinions expressed are mine, not those of SAS Institute, Inc.
  44.  
  45.