home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!gatech!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!mcdchg!mcdphx!udc!qbarnes
- From: qbarnes@urbana.mcd.mot.com (Quentin Barnes)
- Newsgroups: comp.sys.amiga.programmer
- Subject: AmigaDOS library functions and ANSI-C programming
- Message-ID: <1992Dec29.221144.26405@urbana.mcd.mot.com>
- Date: 29 Dec 92 22:11:44 GMT
- Sender: news@urbana.mcd.mot.com (News)
- Organization: Motorola Computer Group, Urbana Design Center
- Lines: 29
- Nntp-Posting-Host: neptune.urbana.mcd.mot.com
-
- I am learning to write AmigaDOS-specific programs on my Amiga using
- SAS/C 6.1.
-
- I ran across a widespread problem with the AmigaDOS specific
- prototypes/libraries with writing ANSI-C code. AmigaDOS
- functions which take pointers to objects when the objects
- aren't modified are not marked as "const". For example,
- the ANSI-C code:
- const char *s = "mylib";
- OpenLibrary(s,0L);
-
- will generate a warning from SAS/C since the prototype in the
- header file (as well as in the RKMs) says that the first argument
- to the OpenLibrary() call is not qualifed as "const". [I didn't
- actually compile the example; it's for illustrative purposes only.]
-
- I don't care about hacks such as marking those errors ignored
- or casting. The real problem is that the AmigaDOS library
- function calls need their signatures cleaned up. This may be
- an annoying problem with ANSI-C code, but it will prove fatal
- with C++.
-
- Has the problem been covered before? Is there plans in the
- works to support ANSI-C/C++ clean AmigaDOS library calls?
-
-
- --
- Quentin Barnes
- qbarnes@urbana.mcd.mot.com | ..!uiucuxc!udc!qbarnes
-