home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / c / rqtls21b.lha / ReqTools / RTPatch / RTPatch.doc < prev    next >
Text File  |  1992-12-06  |  16KB  |  371 lines

  1.  
  2.                       **********************************
  3.  
  4.                             RTPatch 1.1a
  5.  
  6.                             The ReqTools Patcher
  7.  
  8.                             (c) 1992 Nico François
  9.  
  10.                       **********************************
  11.  
  12.  
  13. Preface
  14. =======
  15.  
  16. The programs and files in this distribution are freely distributable, but are
  17. also copyright (c) Nico François.  They may be freely distributed as long as
  18. no more than a nominal fee is charged to cover time and copying costs.
  19.    No commercial usage is permitted without written permission from the
  20. author.  Everything in this distribution must be kept together, in original
  21. unmodified form.
  22.    The above is generally known as freeware.
  23.  
  24.    If you have suggestions or remarks about this program, or if you find
  25. any bugs, please let me know.
  26.  
  27.    Contacting the author:
  28.  
  29.      Fido:  2:292/603.10 (Nico Francois)
  30.  
  31.      UUCP:  Nico.Francois@p10.f603.n292.z2.FidoNet.Org
  32.  
  33.      Mail:  Nico François
  34.             Corbielaan 13
  35.             B-3060 Bertem
  36.             BELGIUM
  37.  
  38.    If you can please use e-mail.  That way you'll stand a much better chance
  39. of getting a reply quickly.
  40.  
  41.  
  42. Contents
  43. ========
  44.  
  45. 1. Introduction
  46.  
  47. 2. Usage
  48.  
  49. 3. Compatibility
  50.  
  51. 4. Controlling RTPatch
  52.  
  53.  
  54. 1. Introduction
  55. ===============
  56.  
  57.    RTPatch is a small program that will re-route functions from most popular
  58. requester libraries to ReqTools.  Libraries currently supported are Arp, Req
  59. and Asl.  RTPatch will also patch some functions in Intuition to give you
  60. improved system requesters.
  61.  
  62.    The patches RTPatch makes are these:
  63.  
  64.      o Intuition  : AutoRequest and EasyRequest (on 2.0) are patched so
  65.                     normal system requesters, like 'Insert Disk...'
  66.                     requesters, will be replaced by ReqTools EZRequesters.
  67.                     They will appear near the mouse pointer and respond to
  68.                     many keyboard shortcuts.  On 2.0 OpenScreenTagList() is
  69.                     also patched to always open a new-look 3D screen.  This
  70.                     will make for example CygnusEd 2.12 open a nice new-look
  71.                     screen.  You may also ask RTPatch to patch OpenScreen()
  72.                     to open _all_ screens with a 3D look.  Beware however
  73.                     that this makes a lot of old programs look ugly!
  74.      o req.library: File requester, font requester, palette requester,
  75.                     string requester and integer requester are replaced by
  76.                     ReqTools requesters.
  77.      o arp.library: File requester is replaced by ReqTools file requester.
  78.      o asl.library: Currently only file requester is replaced by ReqTools
  79.                     file requester.  Font and screen mode requesters are not
  80.                     patched yet.
  81.  
  82.    RTPatch uses an intelligent patch mechanism.  It will only patch a
  83. library when it is actually opened.  This means that if you never use the
  84. arp.library (for example) it will not be patched and, more importantly, it
  85. will not unnecessaryly be loaded into memory!  If you do run a program that
  86. uses Arp and you quit it, it will close Arp.  RTPatch will then allow the
  87. patched Arp to be expunged from memory.  If Arp is reloaded again later it
  88. will be re-patched.  Note that RTPatch patches exec.library/OpenLibrary() and
  89. exec.library/OldOpenLibrary() to accomplish all this.
  90.  
  91.    RTPatch is a 100% assembly program, for maximum efficiency.  It only
  92. takes about 4.5K of memory once installed (excluding memory occupied by
  93. reqtools.library).  It uses *NO* processor time while installed.
  94.  
  95.  
  96. 2. Usage
  97. ========
  98.  
  99.    RTPatch can be used from Workbench and from the Shell (CLI).
  100.  
  101.    Shell usage:
  102.    ~~~~~~~~~~~~
  103.      RTPatch 1.1 © 1992 Nico François
  104.      Usage: RTPatch [NOREQ] [NOASL] [NOARP] [NOINTUITION]
  105.                     [OPENSCRPATCH] [NOOPENSCRTAGPATCH]
  106.  
  107.    Explanation of options:
  108.  
  109.       NOREQ             : Do not patch req.library.
  110.       NOASL             : Do not patch asl.library.
  111.       NOARP             : Do not patch arp.library.
  112.       NOINTUITION       : Do not patch intuition.library.
  113.       OPENSCRPATCH      : Patch OpenScreen() in intuition.library so _all_
  114.                           screens will open with a 3D look.  Only use this
  115.                           option on Kickstart 2.0 and higher!
  116.       NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
  117.                           intuition.library.
  118.  
  119.    Workbench usage:
  120.    ~~~~~~~~~~~~~~~~
  121.    RTPatch recognizes following tooltypes:
  122.  
  123.       NOREQ             : Do not patch req.library.
  124.       NOASL             : Do not patch asl.library.
  125.       NOARP             : Do not patch arp.library.
  126.       NOINTUITION       : Do not patch intuition.library.
  127.       OPENSCRPATCH      : Patch OpenScreen() in intuition.library so _all_
  128.                           screens will open with a 3D look.  Only use this
  129.                           tooltype on Kickstart 2.0 and higher!
  130.       NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
  131.                           intuition.library.
  132.       QUIET             : Don't open requester informing patches have been
  133.                           installed.  Set this tooltype if you intend to drag
  134.                           RTPatch to your WbStartup drawer.
  135.  
  136. NOTE: Run RTPatch when *NO* program has req.library, asl.library or
  137.       arp.library open!  RTPatch will complain if one of these libraries
  138.       is in use and will refuse to install or remove patches.  Running
  139.       RTPatch in your user-startup or from your WbStartup should be ok.
  140.  
  141. WARNING: Asl V38 (distributed with Workbench 2.1) always keeps its library
  142.          open count at 0.  It does this so ramlib will always call its
  143.          Expunge() function when memory is low.  This does however mean
  144.          RTPatch cannot see if this library is in use or not.  So you must
  145.          be very careful not to install or remove RTPatch when you have a
  146.          program running that uses Asl.  If you are still using Workbench 1.3
  147.          or 2.0 there is no problem.
  148.  
  149.  
  150. 3. Compatibility
  151. ================
  152.  
  153.    RTPatch supports all basic requester functions and options.  Other
  154. supported things that are worth mentioning:
  155.  
  156.      arp.library (V39)
  157.      ~~~~~~~~~~~~~~~~~
  158.      o File callback function (FRF_DoWildFunc).  The A4 global data register
  159.        is valid when this callback function is called (documented feature).
  160.      o Message callback function (FRF_DoMsgFunc) for requesters which share
  161.        their IDCMP port with the parent window.
  162.      o Save mode (FRF_DoColor flag).
  163.      o Shared IDCMP with parent window or new IDCMP (FRF_NewIDCMP flag).
  164.      o 'Empty filename is ok' behaviour is supported.
  165.  
  166.      asl.library (V36/V38)
  167.      ~~~~~~~~~~~~~~~~~~~~~
  168.      o File callback function/hook (FRF_DOWILDFUNC and ASLFR_FilterFunc tag).
  169.        The A4 global data register is valid when this callback function is
  170.        called for maximum compatibility (undocumented feature of Asl V36).
  171.      o Intuition message callback function/hook (FRF_DOMSGFUNC and
  172.        ASLFR_IntuiMsgFunc tag) for requesters with shared IDCMP.
  173.      o Multi-selection (FRB_DOMULTISELECT flag or ASLFR_DoMultiSelect tag).
  174.      o Directory requester, no files. (FRF_DRAWERSONLY flag or
  175.        ASLFR_DrawersOnly tag).
  176.      o Save mode (FRF_DOSAVEMODE flag or ASLFR_DoSaveMode tag).
  177.      o Shared IDCMP with parent window or new IDCMP (FRF_PRIVATEIDCMP flag
  178.        or ALSFR_PrivateIDCMP tag).
  179.      o Putting to sleep of parent window (ASLFR_SleepWindow tag).
  180.      o Font for requester (ASLFR_TextAttr tag).  Note that if a proportional
  181.        font is supplied it will be rejected by the ReqTools file requester.
  182.      o Pattern gadget (FRF_DOPATTERNS flag or ASLFR_DoPatterns tag).
  183.      o 'Empty filename is ok' behaviour is supported to ensures compatibility
  184.        with e.g. AssignX, PageStream 2.2 and no doubt many other programs.
  185.      o Undocumented fields in file requester structure are filled in, so even
  186.        "dirty" programs will work.
  187.      o Accept and reject patterns (ASLFR_AcceptPattern/ASLFR_RejectPattern).
  188.  
  189.      req.library (V2)
  190.      ~~~~~~~~~~~~~~~~
  191.      o Multi-selection.
  192.      o Buffers for file and font requester.
  193.      o Directory requester (no files).
  194.      o Save mode (FRQSAVINGM flag).
  195.      o Minimum and maximum value of GetLong() requester.
  196.  
  197.      Additional enhancements
  198.      ~~~~~~~~~~~~~~~~~~~~~~~
  199.      o Buffered directories for Asl file requester.
  200.  
  201.  
  202.      Following things are NOT supported (yet?):
  203.                           ¯¯¯
  204.      arp.library
  205.      ~~~~~~~~~~~
  206.      o FRF_NewWindFunc and FRF_AddGadFunc/FRF_GEventFunc callback functions
  207.        are not called.  As far as I can tell nobody ever used the latter two
  208.        and the former function is certainly not used a lot.
  209.        In short: this should not pose any problems.
  210.  
  211.      asl.library
  212.      ~~~~~~~~~~~
  213.      o ASLFR_InitialWidth and ASLFR_NegativeText tags are ignored.
  214.      o FRB_REJECTICONS flag and ASLFR_RejectIcons tag are ignored.
  215.      o FRB_FILTERDRAWERS flag and ASLFR_FilterDrawers tag are ignored.
  216.  
  217.      req.library
  218.      ~~~~~~~~~~~
  219.      o Timeout and abort mask (req.library requester will be used).
  220.      o freq->frq_Hide is ignored (freq->frq_Show is however supported).
  221.      o TR_KeyMask is not completely supported.  If it is not 0xffff
  222.        (no qualifers) the requester will only respond to Left Amiga V/B.
  223.        This should suffice in most cases however.
  224.  
  225.    If you find any compatibility problems let me know.  Please give a detailed
  226. description of the problem.  Not 'RTPatch doesn't work with NeatProg',
  227. but more like: 'when I do this and this in NeatProg ... doesn't work".
  228.  
  229.  
  230. 4. Controlling RTPatch
  231. ======================
  232.  
  233.    From version 1.1 on RTPatch's message port can be used to control certain
  234. patches from an external program.
  235.  
  236.    The message port is called 'RTPatch.rendezvous' and looks like this:
  237.  
  238.    struct RTPatchPort {
  239.       /* PRIVATE FIELDS */
  240.       struct MsgPort rtport_port;
  241.       ULONG rtport_version;
  242.       /* PUBLIC */
  243.       UWORD rtport_easyreqautocancel;
  244.       UWORD rtport_skipeasyreqpatch;
  245.       UWORD rtport_skipopenscrpatch;
  246.       };
  247.  
  248.    Set the rtport_autocancel field to non-zero to make easy requesters cancel
  249. themselves automatically.  The rtport_skipeasyreqpatch field can be used to
  250. temporarily disable the patch for EasyRequestArgs().  Note that the
  251. rtport_easyreqautocancel field will be ignored if the rtport_skipeasyreqpatch
  252. field is non-zero (TRUE).  RTPatch must have been installed _without_ the
  253. NOINTUITION argument (default).
  254.  
  255.    Set the rtport_skipopenscrpatch field to non-zero to temporarily disable
  256. the OpenScreen() patch.  This will of course only work if the OPENSCRPATCH
  257. argument was used (not the default!).
  258.  
  259.    To change these fields simply do a FindPort() for 'RTPatch.rendezvous' and
  260. change the fields like this:
  261.  
  262.    Forbid();
  263.    if (rtport = (struct RTPatchPort *)FindPort ("RTPatch.rendezvous")) {
  264.       rtport->rtport_easyreqautocancel = TRUE;
  265.       }
  266.    Permit();
  267.    if (!rtport) Message ("RTPatch not found!");
  268.    else Message ("Easy requesters will now be canceled!");
  269.  
  270.    Note that you absolutely _must_ use the Forbid()/Permit() pair since
  271. RTPatch can quit at any time.
  272.  
  273.                                                        Enjoy.
  274.  
  275.  
  276.                                PROGRAM HISTORY:
  277.  
  278. *****************************************************************************
  279. RELEASE 0.9ß
  280.  
  281.     o First BETA release.
  282.  
  283. *****************************************************************************
  284. RELEASE 0.91ß
  285.  
  286.     o Bug fixes: Req GetLong requester no longer returns FALSE when you enter
  287.       the value 0 and Req file requester now properly returns full pathname.
  288.     o Now correctly patches AutoRequest when run on Kickstart 1.2/1.3.
  289.  
  290. *****************************************************************************
  291. RELEASE 1.0
  292.  
  293.     o First "real" release, big improvement over previous beta versions.
  294.     o Fixed some small bugs.
  295.     o Now only patches libraries when they are actually opened.  This saves
  296.       oodles of memory, especially when you never or rarely use certain
  297.       libraries!  Also allows patched libraries to be expunged from memory
  298.       unlike many other patchers.
  299.     o In conjunction with ReqTools V38 empty directories are now allowed for
  300.       improved compatibility.  This makes it e.g. possible to use AssignX.
  301.     o Asl (V36-V38) library is now also patched (file requester only).
  302.     o Command line arguments/icon tooltypes to set some options.
  303.  
  304. *****************************************************************************
  305. RELEASE 1.0a
  306.  
  307.     o ASLFR_AcceptPattern and ASLFR_RejectPattern tags are now supported.
  308.     o Req TextRequest() patch now handles textrequests without gadgets.
  309.       An 'Ok' gadget will be added by RTPatch.
  310.     o Bug fixed: Asl callback hook (filter function) is now only called for
  311.       files, not for directories as well.  The callback hook also makes
  312.       sure the fr_Drawer field of the Asl requester is pointing to the
  313.       current directory (only with ReqTools release 2.0b or higher!).
  314.     o Now allows you to also patch OpenScreen() to force _all_ screens to
  315.       open with a 3D look. This is not default because it makes a lot of old
  316.       programs look ugly.
  317.       WARNING: NOOPENSCRPATCH switch has been changed to NOOPENSCRTAGPATCH!
  318.     o OpenScreenTagList() patch tweeked a bit.
  319.     o On Kickstart 2.0 or higher RTPatch will now set the RNF_WILDSTAR flag
  320.       in the DOS rootnode. This allows you to use '*' as a wildcard.
  321.  
  322. *****************************************************************************
  323. RELEASE 1.0b
  324.  
  325.     o OpenScreenTagList() patch tweeked a bit more :)  Will not force a 3D
  326.       look if no taglist was supplied. Will also leave the picking of the
  327.       pens completely up to Intuition. Patch made more future-compatible :)
  328.     o Bug fix: Arp message callback function didn't work.  This caused TxEd
  329.       Plus 2.2 to crash.  Thanks to Bill Sorensen for reporting this bug.
  330.     o Fixed problem with AutoRequest() and EasyRequest() patches.  Requesters
  331.       weren't opened on the default public screen if the window argument was
  332.       NULL.  They were opened on the screen of the window in pr_WindowPtr.
  333.       Thanks to Roger Nordin for reporting this.
  334.  
  335. *****************************************************************************
  336. RELEASE 1.1
  337.  
  338.     o RTPatch's message port is now documented and allows external program
  339.       to change the behaviour of some patches.  It is now possible to let
  340.       RTPatch automatically cancel easy requesters and to temporarily switch
  341.       off the OpenScreen() patch.
  342.     o Bug fix: OpenScreen() patch now recognizes the NS_EXTENDED flag.
  343.       Fixes problems with DPaint, DirOpus and PowerVisor.
  344.     o Handling of ASLFR_DrawersOnly tag was broken.  Fixed.
  345.     o Fixed bug in AutoRequest() patch (no longer worked on Kickstart 1.3).
  346.     o OpenLibrary() patch rewritten for (hopefully) better compatibility
  347.       with buggy programs.  Now keeps _all_ registers 100% compatible with
  348.       normal OpenLibrary() call.
  349.  
  350. *****************************************************************************
  351. RELEASE 1.1a
  352.  
  353.     o Clears EZREQF_NORETURNKEY for single-button EZRequesters (latest
  354.       release of ReqTools libraries no longer clear this automatically).
  355.  
  356. *****************************************************************************
  357.  
  358. RTPatch 1.1a written by Nico François (Yes, Nico is my first name :-)
  359.  
  360.  
  361. "Is that you Mo-Dean?
  362.  It's me Mo-Dean
  363.  The Interdimensional outer space being" - The B-52's
  364.  
  365.  
  366. (c) 1992 Nico François
  367.  
  368.                                    //
  369.                        Thanks to \X/ Amiga for being the best computer ever!
  370.  
  371.