home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / useful / dist / cbm / v39 / prog-info < prev    next >
Text File  |  1993-10-11  |  4KB  |  89 lines

  1. (This material was emailed to me by Carolyn Scheppner at CBM - CATS.  -Fred)
  2.  
  3. Using 3.x Amiga Includes and Libs
  4. =================================
  5. (c) Copyright 1993 Commodore-Amiga, Inc.  All Rights Reserved
  6. Disclaimer: All use is at your own risk.
  7.  
  8. Compiling New Code to Work on Older OS's
  9. ----------------------------------------
  10. This is relatively easy.  Just don't use any functions/flags/tags
  11. which are newer than the OS you need to work under.  Consult the
  12. comments in the include files and autodocs for notes on when various
  13. functions/flags/tags/structures were added.  If starting from example
  14. code, you should probably start with examples written for the
  15. earliest OS you need to work under, or search out backwards-compatible
  16. example code which conditionally take advantage of new features.
  17. Check out the 2.0 Addison-Wesley Rom Kernel Manuals, and also the
  18. example code from the 2.0 and 1.3 Rom Kernel Manuals (on Fish Disks).
  19. Then , whenever new functions are available to replace old methods
  20. of allocation or initialization, conditionally use the new methods.
  21. Read all of the compatibility documents you can find (see back of
  22. the 2.0 RKM Libraries manual, and see any 3.x Compatibility documents.
  23. And be sure to test your code under all OS's you support.
  24.  
  25. NOTE: New ASL Tags
  26. The asl.library now supports some new individual tags for
  27. old features.  Many features which could previously only be accessed
  28. via FuncFlag tag bits now have their own tags.  Warning - even
  29. though many of these features existed even in V37 asl.library,
  30. the new individual tags for requesting them ARE NOT INTERPRETED until
  31. V38 asl.library.  If you need to be compatible with V37 asl.library,
  32. see the old tag and bit definitions at the end of asl.h.
  33. A better solution for Workbench license-holders is to distribute
  34. the V38 asl.library with your program (a free ASL amendment is
  35. available for Workbench license holders.  The V38 asl.library also
  36. is the earliest asl.library which contains the screen mode requester.
  37.  
  38.  
  39. NOTE: Newer Safer Intuition Flag Names
  40. Old code often had problems with Intuition flags being set in the
  41. wrong fields or being used incorrectly.  New consistent flag
  42. names with prefixes were added in V37.  Use of these new names
  43. for old features (such as WFLG_SIZEGADGET and IDCMP_GADGETUP)
  44. makes it difficult to sets flag bits in the wrong places. 
  45. Note that these new flag names for old intuition features
  46. generally have the same bit values as the old names, and may
  47. be used for any version of Intuition which support the feature.
  48. To enforce use of the newer/safer/consistent naming conventions, new
  49. code which uses Intuition should include the following #define before
  50. including any intuition headers, and should use only the new names for
  51. the various Intuition flags.  Use of the following #define will prevent
  52. use of the old flag names which are now in  intuition/iobsolete.h
  53.  
  54. #define INTUI_V36_NAMES_ONLY
  55.  
  56.  
  57.  
  58. Compiling Old Code
  59. ------------------
  60. Old code should compile fine with newer includes except for the
  61. fact that compilers have grown smarter and pickier.  Many old
  62. coding mistakes may be picked up.  In addition, the default settings
  63. for compilers have changed, often to base-relative settings, so
  64. code containing subtasks or handlers will probably require newer
  65. compiler switches to disable base-relative data or special compiler
  66. directives added to the subtask or handler code (consult your
  67. compiler manual).  In addition, by default, many compilers now
  68. require prototypes (ours are in clib/) and this is good, so you
  69. might need to start including prototype files, and perhaps add some
  70. casting to places where compilers didn't complain before.  One other
  71. compiler-dependent thing is how to disable a compiler's CTRL-C handling.
  72. For example, old code might disable old Lattice's  CTRL-C handling but
  73. the same lines might not disable SAS's CTRL-C handling.
  74.  
  75. For SAS of Lattice, these lines should work fine unless you need
  76. to include the SAS root level dos.h header which contains an incorrect
  77. prototype which conflicts with this:
  78.  
  79. #ifdef __SASC
  80. void __regargs __chkabort(void) {}      /* Disable SAS CTRL-C checking. */
  81. #else
  82. #ifdef LATTICE
  83. void chkabort(void) {}                  /* Disable LATTICE CTRL-C checking */
  84. #endif
  85. #endif
  86.  
  87.  
  88.  
  89.