home *** CD-ROM | disk | FTP | other *** search
- (This material was emailed to me by Carolyn Scheppner at CBM - CATS. -Fred)
-
- Using 3.x Amiga Includes and Libs
- =================================
- (c) Copyright 1993 Commodore-Amiga, Inc. All Rights Reserved
- Disclaimer: All use is at your own risk.
-
- Compiling New Code to Work on Older OS's
- ----------------------------------------
- This is relatively easy. Just don't use any functions/flags/tags
- which are newer than the OS you need to work under. Consult the
- comments in the include files and autodocs for notes on when various
- functions/flags/tags/structures were added. If starting from example
- code, you should probably start with examples written for the
- earliest OS you need to work under, or search out backwards-compatible
- example code which conditionally take advantage of new features.
- Check out the 2.0 Addison-Wesley Rom Kernel Manuals, and also the
- example code from the 2.0 and 1.3 Rom Kernel Manuals (on Fish Disks).
- Then , whenever new functions are available to replace old methods
- of allocation or initialization, conditionally use the new methods.
- Read all of the compatibility documents you can find (see back of
- the 2.0 RKM Libraries manual, and see any 3.x Compatibility documents.
- And be sure to test your code under all OS's you support.
-
- NOTE: New ASL Tags
- The asl.library now supports some new individual tags for
- old features. Many features which could previously only be accessed
- via FuncFlag tag bits now have their own tags. Warning - even
- though many of these features existed even in V37 asl.library,
- the new individual tags for requesting them ARE NOT INTERPRETED until
- V38 asl.library. If you need to be compatible with V37 asl.library,
- see the old tag and bit definitions at the end of asl.h.
- A better solution for Workbench license-holders is to distribute
- the V38 asl.library with your program (a free ASL amendment is
- available for Workbench license holders. The V38 asl.library also
- is the earliest asl.library which contains the screen mode requester.
-
-
- NOTE: Newer Safer Intuition Flag Names
- Old code often had problems with Intuition flags being set in the
- wrong fields or being used incorrectly. New consistent flag
- names with prefixes were added in V37. Use of these new names
- for old features (such as WFLG_SIZEGADGET and IDCMP_GADGETUP)
- makes it difficult to sets flag bits in the wrong places.
- Note that these new flag names for old intuition features
- generally have the same bit values as the old names, and may
- be used for any version of Intuition which support the feature.
- To enforce use of the newer/safer/consistent naming conventions, new
- code which uses Intuition should include the following #define before
- including any intuition headers, and should use only the new names for
- the various Intuition flags. Use of the following #define will prevent
- use of the old flag names which are now in intuition/iobsolete.h
-
- #define INTUI_V36_NAMES_ONLY
-
-
-
- Compiling Old Code
- ------------------
- Old code should compile fine with newer includes except for the
- fact that compilers have grown smarter and pickier. Many old
- coding mistakes may be picked up. In addition, the default settings
- for compilers have changed, often to base-relative settings, so
- code containing subtasks or handlers will probably require newer
- compiler switches to disable base-relative data or special compiler
- directives added to the subtask or handler code (consult your
- compiler manual). In addition, by default, many compilers now
- require prototypes (ours are in clib/) and this is good, so you
- might need to start including prototype files, and perhaps add some
- casting to places where compilers didn't complain before. One other
- compiler-dependent thing is how to disable a compiler's CTRL-C handling.
- For example, old code might disable old Lattice's CTRL-C handling but
- the same lines might not disable SAS's CTRL-C handling.
-
- For SAS of Lattice, these lines should work fine unless you need
- to include the SAS root level dos.h header which contains an incorrect
- prototype which conflicts with this:
-
- #ifdef __SASC
- void __regargs __chkabort(void) {} /* Disable SAS CTRL-C checking. */
- #else
- #ifdef LATTICE
- void chkabort(void) {} /* Disable LATTICE CTRL-C checking */
- #endif
- #endif
-
-
-
-