Enhanced Flag v1.00 by Drew [PWA] File: DETAILS.DOC Last: 08-04-94 See EFLAG.DOC for general documentation. CONTENTS/TOPICS --------------- 00) Introduction 01) Some info about some of the important variables/data structures 02) To change the default values/colors 03) To get rid of the need for reading from the config file 04) To change the internal commands ("F"lag, "V"iew, "Q"uit) 05) To make this PPE run as fast as possible 06) About cursor positioning 07) About PWAFV (Defcon read this!) --------------------------------------------------------------------------- 00) Introduction --------------------------------------------------------------------------- This document covers mostly source level descriptions and information. If you have no interest in modifying the source or do not own the PPL compiler, you may want to ignore this file. You may do just about whatever you wish with this source. I would just rather not see people redistributing modified versions and claiming it is EFLAG.PPE. If you make changes that you think is useful and should be included as part of the EFLAG.PPE, please send them to me for review so I may decide to add it as part of the regular EFLAG.PPE program. Basically, I'd like to keep the same caveats as the original FLAG.PPE. --------------------------------------------------------------------------- 01) Some info about some of the important variables/data structures --------------------------------------------------------------------------- string allfiles(1) ; array of all file names; will be redimensioned ; at run time to the the user's page length This simply contains an array of filenames that are found on the screen. It is redimensioned to the size of the user's page length. If the page length is zero (continuous), then it is set to 23. string flagcmd(1) ; contains both the highlighted and unhighlighted ; text for each command available at the flag ; prompt as well as the program to execute Another array that is redimensioned. It contains (in this order): 1. Unhighlighted text of a command 2. Highlighted text of a command 3. The hotkey associated with this command 4. The ppe to execute, file to display, whatever for this command So by default, there are three commands: flag, view, quit. That means this array will be redimensioned to 1 + (3 * 4). We add 1 to it so that we can avoid using the zero'th (1st) element of the array. That just gets confusing to keep track of zero-based arrays. string xpos(1) ; will track xpos (column) for cmds at flag prompt Yet another redimensioned array. This one contains: 1. The x-position (column) of the first command 2. The x-position (column) of the second command 3. etc. byte curflagcmd ; current command number in "flag" mode While in "flag" (or "mark") mode, the commands available are tracked with command numbers. By default, there are three commands: Flag, View, Quit. And they are numbered one through three. This numbering system corresponds to certain array elements inside the arrays "flagcmd" and "xpos", so referencing both arrays requires using this variable in some manner. For example, the x-position of the second command would be "xpos(2)". (Even though the arrays are 0-indexed, the 0'th item is not used so that we can reference things like this more easily.) --------------------------------------------------------------------------- 02) To change the default values/colors --------------------------------------------------------------------------- Edit the variables that are set inside the subroutine "Initialize". (The very last subroutine in the source file.) --------------------------------------------------------------------------- 03) To get rid of the need for reading from the config file: --------------------------------------------------------------------------- In the subroutine "Initialize", you will see code that looks something like this: eflag_cfg = ppepath() + "EFLAG.CFG" if (!exist(eflag_cfg)) then ...
... else ... ... endif Simply remove the "if", "else", "endif", the "eflag_cfg =" statements and the body of the "else" clause. So the only thing you are left with is the body of the original "if" clause. (You can also remove the eflag_cfg variable declaration at the beginning of the source as well.) Removing the need for the config file will speed up initial startup for the ppe by a little bit. You might want to do this if you have a slow cpu, but overall, I didn't notice any significant difference. --------------------------------------------------------------------------- 04) To change the internal commands ("F"lag, "V"iew, "Q"uit) --------------------------------------------------------------------------- Look for the subroutine called "ParseSelected". This is where these three internal commands are checked for in a hard-coded manner. If you have gotten rid of the config file usage and wish to add more commands or change the internal commands, do it here. The command checking obviously has to do a lookup inside the structure "flagcmd" (described in the last section), so that is what you need to do as well. Lastly, you will need to manually set "flagcmd" with the values of hotkey(s) and of command(s) inside of the subroutine "Initialize". --------------------------------------------------------------------------- 05) To make this PPE run as fast as possible --------------------------------------------------------------------------- Hard code everything. Take out the need for the config file, eliminate the usage of "flagcmd" array, and hardcode all commands into the subroutine "ParseSelected". This is probably not worth the work, as you won't see that much of an improvement in speed (unless you have a heinously slow system, say a 386-25 with four nodes or a 286