    ======================================================================
                      Brief Extension Macro Package (BX)
    
                                 Version 6.0
    
                            U S E R   M A N U A L
    
                     Copyright (c) 1997 Streamware Limited
                                 London - UK
    ======================================================================
    
    
    BX_INDEX_KEY={    }{Table of}|{[0-9]}|{Appendix}


    Table of contents

     1  Introduction..........................................  1
     2  Installing BX.........................................  2
     3  Short tutorial........................................  4
        3.1  Introduction.....................................  4
        3.2  The BX help macro................................  4
        3.3  Executing a BX macro.............................  4
        3.4  The smart search macro...........................  5
        3.5  The notes facility...............................  5
        3.6  The BX open macro................................  6
     4  The BX Files..........................................  7
        4.1  Files supplied in the BX package.................  7
        4.2  Other files used by BX...........................  7
           4.2.1     Configuration file.......................  8
           4.2.2     Control files............................  8
           4.2.3     Temporary files..........................  9
           4.2.4     History files............................  10
     5  Help facilities.......................................  11
     6  The BX macros.........................................  12
        6.1  General purpose macros...........................  13
           6.1.1     bx_count.................................  14
           6.1.2     bx_del...................................  14
           6.1.3     bx_do....................................  14
           6.1.4     bx_ffile.................................  17
           6.1.5     bx_gr....................................  18
           6.1.6     bx_grep..................................  19
           6.1.7     bx_gs....................................  20
           6.1.8     bx_index.................................  20
           6.1.9     bx_keys..................................  22
           6.1.10    bx_licence...............................  22
           6.1.11    bx_lpt...................................  22
           6.1.12    bx_mac...................................  22
           6.1.13    bx_notes.................................  23
           6.1.14    bx_open..................................  24
           6.1.16    bx_viewhex...............................  25
        6.2  C support macros.................................  25
           6.2.1  C shorthand macros..........................  25
              6.2.1.1   bx_case...............................  25
              6.2.1.2   bx_comment............................  26
              6.2.1.3   bx_curl_brkts.........................  26
              6.2.1.4   bx_for................................  26
              6.2.1.5   bx_hop................................  26
              6.2.1.6   bx_if.................................  27
              6.2.1.7   bx_ifelse.............................  27
              6.2.1.8   bx_jump...............................  27
              6.2.1.9   bx_pntr...............................  27
              6.2.1.10  bx_switch.............................  27
              6.2.1.11  bx_while..............................  28
           6.2.2  C-oriented search macros....................  28
              6.2.2.1   bx_fbb................................  28
              6.2.2.2   bx_fbf................................  29
              6.2.2.3   bx_ffun...............................  29
              6.2.2.4   bx_funhdr.............................  31
              6.2.2.5   bx_funlist............................  31
              6.2.2.7   bx_srchf..............................  32
        6.3  Replacement macros...............................  32
           6.3.1     marksrch.................................  32
           6.3.2    _bad_key..................................  32

           6.3.3     _context_help............................  33
           6.3.4     help.....................................  33
           6.3.5     print....................................  33
     7  Customising BX........................................  34
        7.1  Overview.........................................  34
        7.2  Reconfiguring your keyboard......................  34
        7.3  The BX configuration parameters..................  34
           7.3.1     XCINDX...................................  37
           7.3.2     XCMD.....................................  37
           7.3.3     XCONFIG..................................  37
           7.3.4     XGREPMENU................................  37
           7.3.5     XIKEY....................................  37
           7.3.6     XLPT.....................................  38
           7.3.7     XMAC.....................................  38
           7.3.8     XOPATH1..................................  38
           7.3.9     XOPATH2..................................  38
           7.3.10    XPAD.....................................  38
           7.3.11    XPMAC....................................  38
           7.3.12    XTEMP....................................  39
        7.4  The BX configuration file........................  39
     8  Using a mouse with BX.................................  41
     9  BX licence............................................  42
        9.1  Registration procedure...........................  42
        9.2  Entering your licence number.....................  43
        9.3  Error messages...................................  43
        9.4  File LICENCE.BX..................................  43
     10  Product support......................................  45
     11  Disclaimer...........................................  46
     Appendix A - BX macros in alphabetical order.............  47
     Appendix B - BX macro files in alphabetical order........  48
    
                                     - 1 -
    
    1  Introduction
    ===============
    The Brief Extension Macro package (BX) consists of a set of macros
    which significantly enhance the functionality of Brief v3.1. 
    
    BX offers two main groups of macros: general purpose macros and C
    support macros.
    
    The general purpose macros may be used with any type of text files.
    
    The C support macros were designed to ease the task of the C
    programmer. This group includes a set of C shorthand macros and a set
    of C-oriented search macros.
    
    In many cases, BX minimises the amount of typing you need to do. Here
    are a few examples:
    
        If you wish to edit a file whose name is displayed on your
        screen, simply place the cursor on the file name and execute
        the "bx_open" macro.
    
        A similar method may be used to initiate a search for a
        text string. If the text is displayed on your screen, place
        the cursor on it (or marked the text) and execute the BX
        smart search macro "bx_srchf" or "bx_srchb".
    
        If you wish to find a C function, place the cursor on the
        function name, anywhere in the current window, and execute
        "bx_ffun". BX will find the C function for you (whether it
        be in the current file or not).
    
        You can place the DOS commands or programs you often use
        in a file which you specify in your BX configuration. The
        macro "bx_do" will display your file in a menu window and
        let you pick a command to execute. Commands may have 
        parameters supplied at run-time.
    
    BX is a SHAREWARE product. If after trying it for a while, you decide
    to continue using it, you should obtain a licence (see section 9). 
    
    An unlicensed copy of BX is intended to be used for evaluation only. 
    All the BX macros are fully functional but you cannot execute more
    than 6 macros per Brief session. Also, an unlicensed copy of BX
    always displays a registration form each time you start a new Brief
    session.  You can skip the registration form until you are ready to
    register.
    
    The BX package is owned by Streamware Ltd. You may not modify it
    (except for your own use) and you may not sell it.
    
    You may duplicate any UNLICENSED copy of BX and you may distribute it
    freely as long as you keep it complete and unchanged in its original
    ZIP file.  You may not distribute a licensed copy of BX.
    
       ----------------------------------------------------------
       Before using BX, please read the Disclaimer in section 11.
       ----------------------------------------------------------
                                     - 2 -
    
    2  Installing BX
    ================
    The installation procedure assumes that you will install BX on your
    hard disc in directory \BXMAC. If you choose a different directory,
    you will need to amend two of the files supplied. In any case, all
    instances of the word "BXMAC" below stand for the actual name of your
    BX home directory.
    
    Step by step installation procedure:
    
       1) Create directory \BXMAC.
    
       2) Put file BX060.ZIP in \BXMAC and unpack it or put file
       BX060.EXE in directory \BXMAC and execute it.
    
       Both files contain exactly the same BX files. BX060.EXE is
       a self-extracting archive file. To unpack BX060.ZIP, you will
       need a utility program such as PKUNZIP.
       
       3) File BX060.EXE or BX060.ZIP is no longer required and can be
       deleted.
    
       4) If your BX directory is not called \BXMAC, replace all
       occurrences of BXMAC with the appropriate pathname in the following
       files:
    
          CONFIG.BX
          BX.BAT
    
       File CONFIG.BX is the BX configuration file. Its purpose is
       explained in section 7.4.
    
       File BX.BAT is a command file which you can run to enable BX. It
       contains two commands which amend the Brief environment variables
       BPATH and BFLAGS:
    
          set BPATH=%BPATH%;\BXMAC
          set BFLAGS=%BFLAGS% -mbx_init -mbx_confi
    
       The first command appends ";\BXMAC" to BPATH so that Brief will
       know where to find the BX macros.
    
       The second command appends "-mbx_init -mbx_confi" to BFLAGS. This
       tells Brief that macros "bx_init" and "bx_confi" must be executed
       at the start of each new session. If you prefer, you can specify
       these two macros on the Brief command line. In any case, they must
       be executed AFTER your initials macro. Please refer to the Brief
       User's Guide for more information on this subject.
    
       These are the ONLY changes which you will need to make to your
       Brief installation in order to be able to use BX.
    
       File BX.BAT enables you to try the BX macros without having to
       change your AUTOEXEC.BAT file. You may find it more convenient to
       amend the definition of BPATH and BFLAGS in AUTOEXEC.BAT as shown
       in the examples below (the changes required are underlined):
    
                                     - 3 -
    
    
       SET BPATH=\BRIEF\MACROS;\BXMAC
                              -------
    
       SET BFLAGS=-pi120kl160ru300Mt -mPR -D101key -mbx_init -mbx_confi
                   ^              ^   ^^^          --------------------
                   |              |    |
                   |              |     Initials macro
                   |              |
                   |              M = swapping is enabled
                   |
                   -p = use video page 0
    
       NOTES: ---------------------------------------------------------
              For best performance and to make it possible to run large
              programs inside Brief, "swapping" should be enabled. This
              is done by including the M flag in BFLAGS.
    
              Normally Brief uses video page 1. The -p flag tells Brief
              to use page 0. At the end of section 6.1.3 we explain why
              you might want to do this when you use the "bx_do" macro.
              ---------------------------------------------------------
    
       5) Execute BX.BAT to enable BX.
    
       6) You can use the DOS SET command to verify that BPATH and BFLAGS
       have been amended correctly.
    
       7) You are now ready to try BX. At this point it is best to leave
       the BX directory so that it does not get polluted with unwanted
       files. We also recommend that you run RONLY.BAT in order to protect
       the BX files which should not be deleted.
    
       If you intend to use macro "bx_grep", make sure GREP.EXE is on the
       current path. (GREP.EXE is not supplied).
    
    Once you are familiar with the basic BX facilities you can refer to
    section 7 to learn how to customise BX.
    
    The next section is a short tutorial which should help you to get
    started.
                                     - 4 -
    
    3  Short tutorial
    =================
    3.1  Introduction
    
    Start Brief as usual.
    
    As you do not have a BX licence, the BX registration form will
    be displayed. You do not have to register now. Simply follow the
    instructions on the screen.
    
    Until you have obtained a valid licence, the registration form
    will be displayed each time you start Brief (if BX is enabled). Also,
    the number of times you can use a BX macro in any Brief session IS
    LIMITED TO SIX.  Once you have used BX six times in a session, any
    further attempt to use a BX macro is ignored. The normal working of
    Brief is not affected at all by this limit.
    
    Two BX macros are not subject to the limit just mentioned. These are
    the BX help macro and macro "bx_keys". The latter is used to assign
    BX macros to keys.  This is explained in section 7.2.
    
    3.2  The BX help macro
    
    The BX help macro is invoked like the Brief help macro (usually by
    pressing Alt-h). When BX is installed, the first help menu displayed
    has two lines:
    
                             Standard Brief help
                                   BX help
    
    If you select the first line, the usual Brief help menu is displayed.
    If you select the second line, the BX help menu is displayed.  From
    either menu you can return to the top menu by pressing <Keypad-minus>.
    Use ESC to terminate.
    
    If you do not wish to read through this User Manual just yet you
    should at least spend some time browsing through the help
    information.  To do that, select "BX help" on the first help menu and
    select "Macros" on the next menu. You will then see a list of all the
    BX macros with a short description.  To obtain detailed information
    on a BX macro, position the selection bar on the macro which
    interests you and press Enter.
    
    3.3  Executing a BX macro
    
    You can try the BX macros without reconfiguring your keyboard. You can
    execute any macro by using the Brief "execute_macro" macro (which is
    assigned to F10 by default) to execute any BX macro.
    
    For instance, to execute macro "bx_gs":
    
        Press F10
        Type bx_gs
    
                                     - 5 -
    
    Macro "bx_gs" performs a global search on selected files. If you wish
    to try it now, follow the instructions given by the context help
    facility.
    
    An easy way to gain access to any BX macro (or indeed any macro) is by
    means of the macro "bx_mac". To execute this macro:
    
       Press F10
       Type bx_mac
    
    If your BX installation was completed correctly, a menu of macros
    will be displayed on your screen. From this menu, you can select a
    macro to execute.
    
    You can also add your own macros to the menu. To do this, press Alt-e
    while the menu is displayed.
    
    3.4  The smart search macro
    
    This macro simplifies the search process when the text you want to
    look for is on your screen.  For instance, if you place the cursor on
    the word "the" and then execute "bx_srchf", a search forward for
    "the" is initiated.  Of course, this is most useful when the
    "bx_srchf" macro is assigned to a key. We explain how to do this
    later. Another way to specify the text you want to look for is to
    mark it before executing "bx_srchf".  The text marked must be a
    portion of a line. The BX search macros are fully documented below
    and in the on-line help.
    
    3.5  The notes facility
    
    The "bx_notes" macro enables you to switch from your current file to
    your notes file and later to return to your current file with
    single key depressions (on condition that "bx_notes" is assigned to
    a key).
    
    The configuration file supplied contains the line "XPAD = notes.txt".
    This declares the name of the notes file. If you execute
    "bx_notes", file "notes.txt" will be opened. You can then edit it
    and, when you have finished, return to your original file by executing
    "bx_notes" again.
    
    The configuration file supplied also contains the line:  "XPMAC =
    bx_index".  This means that whenever the notes file becomes
    current, the "bx_index" macro will be executed.  This macro displays
    a menu of all the headings in your notes file. This is explained in
    section 6.1.8.
    
    You can experiment with "bx_notes" using F10:
    
       Press F10
       Type bx_notes
    
                                     - 6 -
    
    3.6  The BX open macro
    
    The "bx_open" macro allows you to edit a file without having to type
    its name.  To be most effective, it should be assigned to a key. 
    
    As an example, we will open the file AUTOEXEC.BAT in the root
    directory:
    
       Place the cursor on the file name \AUTOEXEC.BAT
       Press F10
       Type bx_open
    
    In this example, the file name is delimited by a white space on the
    left and the end of the line on the right. Other delimiters are
    allowed (any character which is not allowed in a file name). When the
    file name is not clearly delimited, you must mark it (e.g. with Alt-a)
    before executing "bx_open".
                                     - 7 -
    
    4  The BX Files
    ===============
    4.1  Files supplied in the BX package
    
    The BX package comprises the following files:
    
       Compiled macros               all *.CM files
       Support programs              all *.EXE files
       Help menus                    all *.MNU files
       Help text files               all *.HLP files and HELP.TXT
       Documentation files           README.TXT and MANUAL.TXT
       Keyboard configuration macro  BX_CONFI.CB
    
          This file contains the "bx_confi" macro. It is amended and
          recompiled when you run "bx_keys" to assign BX macros to keys.
    
    All the files listed above reside in the BX home directory. Apart
    from "BX_CONFI.CB", all the other files are read-only and should not
    be amended or deleted. 
    
    The three BX support programs are:
    
          BDIR.EXE    used by bx_gr, bx_gs and bx_ffile
          BXLPT.EXE   used by bx_lpt
          DUMP.EXE    used by bx_viewhex
    
    4.2  Other files used by BX
    
    In addition to the files mentioned above, BX uses the following files:
    
       Registration file             REG.BX
    
          This file contains your registration details. It resides in the
          BX home directory. It is created by the "bx_reg" macro. It is
          deleted by the "bx_licence" macro when you enter your licence
          number.
    
          File "REG.BX" should not be deleted or amended once you have
          sent us a copy of it to obtain a BX licence.
    
       Licence control file          LICENCE.BX
    
          This file contains your licence number. It is created in the
          BX home directory by macro "bx_licence" 
    
       Configuration file            CONFIG.BX
       Command list for "bx_do"      file name assigned by user
       Macro list for "bx_mac"       file name assigned by user
       Index file for "bx_ffun"      file name assigned by user
       Temporary files               *.TMP
       History files                 *.HST
    
                                     - 8 -
    
    4.2.1  Configuration file
    
    The use of a configuration file is optional. A configuration file is
    not required when you use the default BX configuration. On the other
    hand, you can choose to have several configuration files (for 
    instance, a separate file for each of your applications). The use of
    the BX configuration file is explained in detail in  section 7.4.
    
    
    4.2.2  Control files
    
    Control files are optional data files used by some BX macros.
    Currently, three BX macros use a control file. These macros are:
    
       bx_do       This macro enables you to execute a DOS command inside
                   Brief. The command can be typed on the keyboard or
                   selected from a menu. The control file used by "bx_do"
                   contains the command list which is displayed in the
                   menu.
    
       bx_mac      This macro executes a macro selected from a menu. Its
                   control file contains a list of macros which is
                   displayed in the menu.
    
       bx_ffun     This macro finds a C function. If the function is not
                   in the current source file, the macro uses its control
                   file (which contains an index) to locate the function.
    
    The default control files for the three macros above are
    respectively:
    
       .\cmd.bx
       .\macros.b
       .\cindex.bx
    
    These defaults may be changed by setting the appropriate BX
    configuration parameters or environment variables (XCMD, XMAC and
    XCINDX) to the value required.
    
    In the sample BX configuration file supplied, the path of each control
    file is defined as follows:
    
       XCMD = \BXMAC\cmd.bx
       XMAC = \BXMAC\macros.bx
       XCINDX = cindex.bx      (i.e. the file is assumed to be in the 
                                current directory)
    
    BXMAC is the default directory of the BX package. If you have
    installed BX in a different directory, you must amend CONFIG.BX
    accordingly.
    
    The table below summarises all this.
                                     - 9 -
    
       ==================================================================
       Macro       Default        File Content          Config parameter.
                   control file                         Environment var.
       ------------------------------------------------------------------
       bx_do       .\CMD.BX       List of DOS commands       XCMD
       bx_mac      .\MACROS.BX    List of macros             XMAC
       bx_ffun     .\CINDEX.BX    C function index           XCINDX
       ==================================================================
    
    
    4.2.3  Temporary files
    
    Temporary files have the extension TMP.  They are used in particular
    to receive output from programs executed inside Brief. They are
    placed in the directory specified by the configuration parameter
    XTEMP or, if XTEMP is undefined, in the current directory.
    
    Some temporary files are used internally by BX and are automatically
    deleted when no longer required. Others are created for your benefit
    and are not deleted. You can delete them whenever you wish. The
    temporary files use by BX are:
    
       bxkeys.tmp
       bx!!!!.tmp
       do.tmp
       ffdir.tmp         output file of DIR or BDIR
       ffedit.tmp        list of file names to be edited by user
       funlist.tmp
       grep.tmp          output file of GREP
       gredit.tmp        list of file names to be edited by user
       gsdir.tmp         output file of DIR
       gsedit.tmp        list of file names to be edited by user
       hex.tmp
    
                                     - 10 -
    
    4.2.4  History files
    
    Macros "bx_gs" and "bx_gr" (which perform global searches and global
    replacements respectively) use history files to keep a record of your
    search and replacement details.  The use of these files enables you
    to recall details entered earlier when starting a new search.
    
    Like the temporary files, the history files are placed in the
    directory specified by the environment variable XTEMP or, if XTEMP is
    undefined, in the current directory.
    
    History files are kept across successive Brief sessions but you can
    delete or amend them as you wish.
    
       ==================================================================
       History      Used by    Used by     File content
       file         bx_gs      bx_gr
       ------------------------------------------------------------------
       gspatt.hst     y          y         last 12 search patterns
       gsfiles.hst    y          y         last 12 file specifications
                                           (list of files to be searched)
       gsskip.hst     y          y         last 12 skip specifications
                                           (list of files to be skipped)
       gsstr.hst                 y         last 12 replacement strings
       ------------------------------------------------------------------
                                     - 11 -
    
    5  Help facilities
    ===================
    The BX help facilities include general help screens and
    context-sensitive help screens.
    
    When the BX package is activated, the BX help facilities are
    automatically enabled.
    
    You can display the BX general help screens by pressing the Brief help
    key (Alt-h by default) while you are editing a file. The first help
    menu displayed has two lines:
    
                           ========================
                           |  Standard Brief help |
                           |        BX help       |
                           ========================
    
    If you select the first line, the Brief top help menu is displayed.
    If you select the second line, the BX top help menu is displayed. 
    From either menu, you can return to the initial menu shown above by
    pressing <Keypad-minus>. Use ESC to terminate.
    
    NOTE: Please note that the implementation of the BX help facilities
    does not affect Brief in any way. NO BRIEF FILES ARE AMENDED. If you
    disable the BX package, the usual operation of the Brief help is
    reinstated. For enabling or disabling BX, please see section 7.
                                     - 12 -
    
    6  The BX macros
    ================
    The BX package offers two main types of macro. Some macros are useful
    with any type of text file and may be described as general purpose
    macros. Others are designed specifically to facilitate the task of
    the C programmer and are called C support macros.
    
    The C support macros can be further classified in two categories:
    
          *  C shorthand macros
          *  C-oriented search macros
    
    In addition, BX includes several Replacement macros (see your Brief
    manual for information about this type of macro).
    
    The general purpose macros, the C support macros and the Replacement
    macros are described respectively in sections 6.1, 6.2 and 6.3.
     Appendix A contains a list of all the macros in alphabetical order
    with a short description of each. Appendix B contains a list of all
    the BX macro files in alphabetical order.
    
    The general purpose macros are:
    
      bx_count         count occurrences of a pattern in current file
      bx_del           delete current file (after confirming)
      bx_do            execute a DOS command or a Brief macro
      bx_ffile         find file names matching a pattern (global search)
      bx_gr            do global replacements in selected files
      bx_grep          run GREP inside Brief
      bx_gs            do global searches in selected files
      bx_index         display subject index
      bx_keys          change BX key assignments
      bx_licence       create BX licence control file
      bx_lpt           select printer LPT1 or LPT2
      bx_mac           execute a macro selected from a menu
      bx_notes         edit notes file
      bx_open          edit file whose name is under cursor or marked
      bx_sort          run DOS SORT inside Brief
      bx_viewhex       show a file in hexadecimal
    
    
    The C shorthand macros are:
    
      bx_case          insert a "case" statement at cursor position
      bx_comment       insert "/*  */" at cursor position
      bx_curl_brkts    insert "{  }" at cursor position
      bx_for           insert a "for" statement at cursor position
      bx_hop           put cursor within next { }
      bx_if            insert an "if" statement at cursor position
      bx_ifelse        insert "if-then-else" at cursor position
      bx_jump          put cursor after next }
      bx_pntr          insert "->" at cursor position
      bx_switch        insert a "switch" statement at cursor position
      bx_while         insert a "while" statement at cursor position
                                     - 13 -
    
    The C-oriented search macros are:
    
      bx_fbb           find matching { backward
      bx_fbf           find matching } forward
      bx_ffun          find a C function
      bx_funhdr        put cursor on start of current C function
      bx_funlist       make a list of function prototypes in current file
      bx_srchb         do a smart search backward
      bx_srchf         do a smart search forward
    
    The Replacement macros are:
    
       _marksrch
       _bad_key
       _context_help
       help
       print
    
    6.1  General purpose macros
    
    The BX general purpose macros provide a number of facilities which are
    not related to any programming language.
    
    * The file management macros allow you to:
    
       Edit a file (see NOTE below)                    bx_open
       Find the files whose names match a pattern      bx_ffile
       View a file in hexadecimal                      bx_viewhex
       Delete the current file                         bx_del
       Sort a file                                     bx_sort
    
       NOTE:    When the file name is displayed on your screen 
                you do not need to key it in.
    
    
    * The search macros may be used to:
    
       Count the occurrences of a pattern in the
          current file                                 bx_count
       Perform a global search for a pattern           bx_gs
       Perform global replacements of a pattern        bx_gr
       Run GREP inside Brief                           bx_grep
    
       NOTE :   When the pattern you want to work with is displayed
                on your screen, you never need to key it in.
    
    
    * The printer selection macro enables you to:
    
       Select LPT1 or LPT2 before using the Brief
          print command.                               bx_lpt
    
    * The notes macro enables you to:
    
       Switch between you current file and your
          notes file with just one key depression.     bx_notes
                                     - 14 -
    
    
    * The index macro enables you to:
    
       Display the headings in your current file.
          (You specify what a heading is)              bx_findex
    
    * The remaining general purpose macros enables you to
    
       Assign keys to the BX macros                    bx_keys 
    
    
    6.1.1  ----- bx_count
    
    This macro counts the occurrences of a pattern in the current buffer. 
    The search is subject to the current regular expression and case
    sensitivity settings.
    
    The pattern to look for may be typed in the command line.  For
    instance, if you want to count the number of times the string "abcd"
    occurs in your current buffer you can type:
    
          bx_count abcd
    
    In the next example, "bx_count" counts the number of lines with
    trailing blanks. The pattern is a regular expression and must be
    enclosed between quotes:
    
          bx_count "[ ]+>"
    
    If no pattern is specified in the command line, "bx_count" tries to
    "guess" what the pattern is as follows:
    
       *  If a part of a line is marked, the text marked is taken as the
          pattern. Otherwise, if the cursor is positioned on an
          alphanumeric string, that string is assumed to be the pattern.
    
       *  In either case, the pattern selected is shown in the command
          line where you can edit it before pressing Enter.
    
    
    6.1.2  ----- bx_del
    
    This macro deletes the current file (the file in the current window).
    It asks you to confirm that you want to delete the file and if you
    answer Y or y, it deletes the file from your disc.
    
    The request is rejected if the file is the only one currently being
    edited.
    
    
    6.1.3  ----- bx_do
    
    This macro enables you to run DOS commands inside Brief.  The command
    output is redirected to a file.  When the command has completed, the
    output file is automatically edited so that you can examine the result.
                                     - 15 -
    
    
    The error output which is normally sent to stderr can also be
    redirected to the output file.
    
    The default output file is "do.tmp". It is created in the directory
    specified XTEMP configuration parameter or, if XTEMP is undefined, in
    the current directory.
    
    If the output file is currently open and is not in the current
    buffer, "bx_do" closes it before executing the command. After the
    output file is closed, "bx_do" deletes it except if the new output is
    to be appended to the file as specified with ">>" (this is explained
    below). 
    
    "bx_do" can also be used to execute Brief macros.
    
    When "bx_do" is activated it displays the prompt "DO:" in the status
    line. You can then
    
          *  type a DOS command and press Enter or
    
          *  press the Enter key to see a menu of DOS commands and Brief
             macros or
    
          *  press the "bx_do" key again to execute the bx_macro which
             displays a menu of macros.
    
    These three modes of operation are explained below.
    
    To enter a command from the keyboard
    ------------------------------------
    Press the "bx_do" key and type your command in response to the "DO:"
    prompt.
    
    For instance, if you type
    
       DIR /B /AA *.c
    
    you obtain a list of all the C files in the current directory which
    have the Archive bit set. 
    
       NOTE: In the example given, DIR gives the file names in the bare
             format "fname.ext". You can therefore very easily open any of
             the files listed with the "bx_open" macro: simply place the
             cursor on the file name and press the "bx_open" key.
    
    To select a command or macro from a menu
    ----------------------------------------
    If you press only the Enter key in response to the "DO:" prompt,
    "bx_do" displays the content of the command file in a menu.  You can
    then select the command or macro you wish to execute or you can press
    Alt-e to edit the command file.  The command file is a text file in
    which you put the commands you often use. Its format is explained
    further down.  The full path of the command file is given by the XCMD
    configuration parameter. If XCMD is undefined, "bx_do" looks for the
    file "CMD.BX" in the current directory.
                                     - 16 -
    
    To select a macro from a menu
    -----------------------------
    If you press the "bx_do" key twice in succession, the bx_mac macro is
    invoked.  This feature obviates the need to assign a separate key to
    "bx_mac".
    
    The use of "bx_mac" is documented in section 6.1.12.
    
    The command file
    ----------------
    The command file is read by "bx_do". It contains a list of the
    commands you may want to execute inside Brief. It is a text file
    which you can prepare with Brief.
    
    There may be only one command per line.  Empty lines are ignored. 
    Leading white spaces are discarded.  Comments prefixed by "//" are
    allowed.
    
    A command may have one or more parameters. Parameters must be
    separated by white spaces.
    
    The standard output is always redirected to a file. If you do not
    specify an output file, "bx_do" directs the output to "DO.BX" in the
    directory specified by XTEMP (or in the current directory if XTEMP is
    undefined).  Examples:
    
       DIR *.c                 // output file is default file "do.tmp".
       DIR *.c >dir.tmp        // output file is .\dir.tmp
       DIR *.c >>dir.tmp       // output is appended to .\dir.tmp
    
    The error output may also be redirected to the output file. If you do
    not specify an output file, "bx_do" re-directs the error output to
    "DO.BX". To redirect the error output to the output file, you must
    put an ampersand "&" between the redirection indicator ">" and the
    file name. Examples:
    
       DIR *.c                 // output file is default file "do.tmp"
       DIR *.c >&dir.tmp       // output file is .\dir.tmp
       DIR *.c >>&dir.tmp      // output is appended to .\dir.tmp
    
    When the error output is not re-directed to the output file, Brief
    clears the screen before running the command.
    
    The standard input may also be re-directed. Example:
    
       SORT <%F >&newfile      // Sort current file (%F is explained below)
    
    Please refer to the dos() macro in the Brief Macro Language Guide for
    further information.
    
    Before a command is executed, some text replacement may take place. 
    This feature is controlled by the five symbols %D, %E, %F, %N, %M.
    
       %D is replaced with the name of the CURRENT WORKING DIRECTORY.
    
       %F is replaced with the FULL NAME of the current file, e.g.
          "\dir1\dir2\myfile.txt" (the current file is the file in
                                     - 17 -
    
          the current window).
    
       %E is replaced with the EXTENSION of the current file name.
    
       %N is replaced with the NAME of the current file, without the
          extension part or path.
    
       %M is replaced with the portion of text which is MARKED on your
          screen. If the area marked exceeds a single line, it is ignored
          and %M is deleted from the command. The same happens if no text
          is marked.
    
    Further examples of valid commands:
    
       %M                           // Execute command marked on screen
       DIR /ON /AA /B *.c           // List amended C files in bare format
                                    // (files may then be edited with
                                    // bx_open)
       SORT <%F >&newfile           // Sort current file --> newfile
       GREP -i+ %M \dir1\dir2\*.h   // Run GREP with pattern marked on
                                    // screen
       LINT -zero -b std.lnt %F >&lint.log   // Run LINT on current file
       \DOS\FC /L /W %F \brief\backup\%N.%E  // compare current file with
                                             // previous copy
    
    Finally, you may also include Brief macros in the command file. Each
    macro name must be preceded by the keyword "MAC ". The text
    replacement symbols "%M" etc. may be used in macro calls. Examples:
    
       MAC bx_ffile %M               // Find file whose name is marked on
                                     // screen
       MAC bx_grep                   // Execute bx_grep. Macro will prompt
       MAC bx_grep "abcd *.c"        // Execute macro bx_grep
       MAC bx_grep "%M"              // %M must be replaced by full
                                     // option line
       MAC tabs 5 14 21 30 33        // Set tabs
       MAC %M                        // Execute macro marked on screen
    
       NOTE: in "bx_grep "%M"" above, the quotes around %M are necessary to
       ensure that the macro is called with a single parameter e.g.
       "-i+ abcdef \dir1\dir2\*.h"
    
    Note on video page used by Brief
    -------------------------------
    By default, Brief uses video page 1. If you run a program inside Brief
    which writes explicitly to video page 0 (rather than to the active
    page), you will not see the output unless you ask Brief to use video
    page 0. See -p flag in Brief User's Guide.
    
    
    6.1.4  ----- bx_ffile
    
    This macro performs a file search.  It can search all the directories
    or just a branch. The characters "*" and "?" can be used to specify
    the files to look for.
    
    The files found are shown in a menu from which any number of files may
                                     - 18 -
    
    be selected for editing. Alternatively, you can press Alt-e to edit
    the list of files.
    
    NOTE: "bx_ffile" does not find hidden files or files in hidden
    directories.
    
    When activated, "bx_ffile" displays the prompt "BX findfile:". You
    should then type a file specification such as:
    
       *.h         to search the current directory and its sub-directories
       \*.h        to search all the directories
       \dira\*.h   to search "dira" and its sub-directories
    
    If a valid file specification is marked on your screen when you
    invoke "bx_ffile", this specification is automatically inserted after
    the prompt. You can then amend it before pressing Enter.
    
    
    6.1.5  ----- bx_gr
    
    This macro performs global replacements in selected files.
    
    When activated, "bx_gr" displays a dialogue box in which you enter your
    search and replacement details. These are:
    
       *  the search pattern
       *  the replacement string
       *  one or more file specifications (e.g. *.h \dira\*.c)
       *  a list of file extensions to exclude from the search. (This
          facility is useful if you specified "*.*" for the files to be
          searched. Please remember that Brief is not designed to search
          binary files).
       *  whether the search should be case sensitive
       *  whether the search pattern should be treated as a regular
          expression
       *  whether subdirectories should be searched
    
    The first four parameters listed above are saved in history files so
    that you can recall them later. The history files are called
    "GSPATT.HST", "GSSTR.HST", "GSFILES.HST" and "GSSKIP.HST". They are
    created in the temporary directory specified by XTEMP or in the
    current directory if XTEMP is undefined.
    
    Each time the "bx_gr" dialogue box is displayed, the input fields
    contain the data you entered the previous time.
    
    Before invoking "bx_gr", you can mark a portion of a line on your
    screen to indicate the pattern you want to look for.  This pattern is
    automatically inserted in the search pattern field of the dialogue
    box.
    
    Global replacements are performed in three steps:
    
          *  "bx_gr" makes a list of all the files which contain the
              pattern you wish to replace.
    
          *  the list of files found is presented to you in a selection
                                     - 19 -
    
             menu. You can then tag the files you wish to amend.
    
          *  Once you have tagged the files to be amended, you press a key
             to initiate the third step in which the global replacements
             are performed.
    
    You can press ESC at any time to abort the operation.
    
    
    6.1.6  ----- bx_grep
    
    This macro enables you to run the GREP utility inside Brief.
    GREP.EXE must be in the current path (GREP is not supplied with the
    BX package).
    
    In general, the output produced by GREP is placed in a file called
    "GREP.TMP".  This file is created in the directory specified by the
    configuration parameter XTEMP or, if XTEMP is undefined, in the
    current directory.
    
    "GREP.TMP" is automatically opened so that you can look at the output
    produced by GREP without leaving Brief.
    
    Depending on the switches used, GREP may display file names only. In
    this case, the list of files produced by GREP may optionally be shown
    in a selection menu from which you can pick any number of files for
    editing. You can obtain more information about this feature by
    pressing Alt-h when a selection menu is displayed.
    
    A selection menu is used only if the BX configuration parameter
    XGREPMENU is set to "yes" (see also -M+ below).
    
    When invoked, "bx_grep" displays a prompt such as "GREP (RE on):" to
    invite you to type a search command. You can then type any valid GREP
    command, for instance:  -i+ abc[0-9] *.c *.h
    
       NOTE: Currently, "bx_grep" requires that each GREP option be
             specified separately. For instance, you should type
             "-i -r -c" rather than "-irc"
    
    Note that the prompt indicates whether Brief regular expressions are
    currently enabled. If they are and if you do not want GREP to treat
    your search pattern as a regular expression, you must include the
    switch -r- in your command.  Conversely, if Brief regular expressions
    are disabled, you may need to include -r+ in your command.
    
    Sometimes you may wish to override the effect of XGREPMENU. You can do
    this by including the switch -M- or -M+ in front of your GREP
    command.  -M- means that you do not want "bx_grep" to use a selection
    menu.
    
    When the use of a selection menu is enabled, you never need to include
    the switch -l+ in your GREP command.  "bx_grep" adds -l+ to your
    command when this is not incompatible with your other switches.
    
    Before invoking "bx_grep", you can mark a portion of a line on your
    screen to indicate the text you want GREP to look for. This text is
                                     - 20 -
    
    automatically inserted in the GREP command where you can edit it
    before pressing Enter.
    
    To see the GREP help summary, simply type "?" after the prompt.  The
    summary is shown in a file called "GREP.TMP".  You must close the
    file before invoking "bx_grep" again.
    
    
    6.1.7  ----- bx_gs
    
    This macro is functionally similar to the GREP utility. It enables you
    to search a group of files for a pattern.
    
    When activated, "bx_gs" displays a dialogue box in which you enter
    your search details. These are:
    
       *  the search pattern
       *  one or more file specifications (e.g. *.h \dira\*.c)
       *  a list of file extensions to exclude from the search. (This
          facility is useful if you specified "*.*" for the files to be
          searched. Please remember that Brief is not designed to search
          binary files).
       *  whether the search should be case sensitive
       *  whether the search pattern should be treated as a regular
          expression
       *  whether subdirectories should be searched
    
    The first three parameters listed above are saved in history files so
    that you can recall them later for other searches. The history files
    are called "GSPATT.HST", "GSFILES.HST" and "GSSKIP.HST". They are
    created in the temporary directory specified by XTEMP or in the
    current directory if XTEMP is undefined.
    
    Each time the "bx_gs" dialogue box is displayed, the input fields
    contain the data you entered in your last search.
    
    Before invoking "bx_gs", you can mark a portion of a line on your screen
    to indicate the pattern you want to look for.  This pattern is
    automatically inserted in the search pattern field of the dialogue box.
    
    After completing a search, "bx_gs" displays a menu showing the name
    of the files which have at least one instance of the pattern.  From
    this menu you can select one or more files to edit. Alternatively,
    you can press Alt-e to edit the list of file names. You can obtain
    more information about this feature by pressing Alt-h when the file
    menu is displayed.
    
    
    6.1.8  ----- bx_index
    
    This macro searches the current buffer for lines starting with a
    particular pattern which you have previously defined as a key.  The
    first 500 matching lines found are displayed in a menu.  From this
    menu you can select the position where you want to place the cursor
    in your file. If no matches are found, the pattern is displayed in
    the status line to help you investigate the reason.
                                     - 21 -
    
    
    The indexing facility offered by "bx_index" enables you, for
    instance, to structure a text file in sections with headings and to
    see all the headings in a menu (if you are currently reading this
    file with Brief, you may find it useful to run "bx_index" to see all
    the headings).  As another example, "bx_index" can also be used to
    display a menu of all the C structure definitions in a C header file.
    
    The search pattern used by "bx_index" is referred to as an index key.
    It may be specified in two ways:
    
          *  by the configuration parameter XIKEY
    
          *  by the keyword BX_INDEX_KEY which you may place in 
             individual text files (near the beginning preferably).
    
    The index key specified with XIKEY is used only when the keyword
    BX_INDEX_KEY is not found in the current file.  (In the sample
    configuration file supplied with BX, XIKEY is set to "!--".)
    
    The index key is always treated as a regular expression.
    
    The search always starts in column 1 of each line, i.e. the character
    "<" is always prepended to the index key.
    
    By default, the search is performed with case sensitivity on.  You
    can change that option if you use the keyword BX_INDEX_KEY.  (See
    example near the begining of this file).
    
    BX_INDEX_KEY should be placed near the top of the file.
    
    The syntax is:    BX_INDEX_KEY = pattern [case] [DEBUG]
    
    There can be any number of white spaces before and after "=" .
    
       pattern  may include embedded white spaces.
    
       case     is optional. It may be CASE_ON or CASE_OFF.
    
       DEBUG    is optional. When DEBUG is specified, the key is displayed
                in the bottom line and no menu is displayed. This enables
                you to check if you have specified the key correctly.
    
    Examples:
    
      BX_INDEX_KEY=[0-9].
                        ^ note the dot
    
         "bx_index" will find all lines starting with a number followed by
         a dot ".".
    
      /* BX_INDEX_KEY = {struct}|{union}
      */
          "bx_index" will find all lines starting with "struct" or "union".
    
      BX_INDEX_KEY = {  }[A-Z]{ }\t
    
          "bx_index" will find all lines starting with two spaces followed
                                     - 22 -
    
          by an upper case letter, another space and a TAB.
    
    
    "bx_index" may be used in conjunction with the "bx_notes" macro. If
    the configuration parameter XPMAC is set to "bx_index", the headings
    in your notes file are automatically displayed when you invoke
    "bx_notes". (See XPMAC in the sample configuration file supplied).
    
    
    6.1.9  ----- bx_keys
    
    This macro enables you to reconfigure your keyboard and to assign
    your favourite BX macros to keys. Please refer to section 7.2 for
    details.
    
    
    6.1.10  ----- bx_licence
    
    This macro will save your BX licence number in file LICENCE.BX. 
    Please refer to section 9 for more information.
    
    
    6.1.11  ----- bx_lpt
    
    This macro lets you select the printer port which Brief will use when
    you invoke the Brief print command.  The printer port may be LPT1 or
    LPT2.
    
    Any selection which you make with this macro does not affect the
    printer port selected with the DOS print command.
    
    By default Brief uses LPT1.  You can change this to LPT2 by setting
    the XLPT configuration parameter to "LPT2".  For instance, you can
    include the line:
    
       XLPT = LPT2 
       
    in your BX configuration file or you can add the following SET command
    in your AUTOEXEC.BAT file:
    
       SET XLPT=LPT2
    
    When "bx_lpt" is called from the keyboard, the printer port may be
    specified in the command line, e.g.:
    
         bx_lpt LPT2
    
    If you do not specify a printer, "bx_lpt" displays a dialogue box
    which shows the printer port currently selected.
    
    
    6.1.12  ----- bx_mac
    
    This macro displays a list of macros in a selection menu and lets you
                                     - 23 -
    
    choose a macro to execute.
    
    The list of macros is held in a text file which you can prepare with
    Brief.  There may be only one macro per line.  Blank lines and
    leading white spaces are ignored.  Comments prefixed by "//" are
    ignored.  A macro may have one or more parameters. Parameters must be
    separated by spaces.
    
    For instance, your file might look like this:
    
       toupper
       use_tab_char  y   // fill empty areas with tab characters
       use_tab_char  n   // fill empty areas with spaces
       tabs 10 20 30
       edit_file \dir1\dir2\dir3\dir4\myfile
       bx_count          // count occurrences of a pattern in current file
       bx_viewhex        // view a file in hexadecimal
       bx_funlist        // make list of C functions in current file
       bx_keys           // change BX key assignments
    
    
    The full path of the macro list file is given by the XMAC
    configuration parameter. If XMAC is undefined, "bx_mac" looks for the
    file "MACROS.BX" in the current directory.
    
    When the macro selection menu is displayed, you can press Alt-e if you
    wish to edit the macro list.
    
    If "bx_do" is assigned to a key, you do not need to assign "bx_mac"
    to another key because "bx_mac" is executed if you press the "bx_do"
    key twice in succession.
    
    
    6.1.13  ----- bx_notes
    
    This macro enables you to edit a notes file at any time without losing
    your position in the current buffer.
    
    "bx_notes" is most effective when assigned to a key. When you press
    the key, "bx_notes" takes you immediately to your notes file. You
    can then work on the notes file in the usual way. When you later press
    the "bx_notes" key again, "bx_notes" takes you back to your 
    original buffer. You can also close the notes file or edit another
    file in the usual way.
    
    The full path of your notes file is given by the XPAD configuration
    parameter.  For instance, you can define your notes file with a SET
    command:
    
       set XPAD=\dir1\notes.txt
    
    By default, XPAD is set to ".\notes.txt".
    
    "bx_notes" may be used in conjunction with "bx_index". This is
    useful if your notes file is organised in sections with headings.
    
    The "bx_index" macro is executed automatically by "bx_notes" if the
                                     - 24 -
    
    configuration parameter XPMAC is set to "bx_index", e.g.:
    
       SET XPMAC=bx_index
    
    
    6.1.14  ----- bx_open
    
    This macro may be used to edit a file without having to type its name.
    This is possible when the file name is in your current buffer.
    
    Only files which already exist can be edited in this way.
    
    Suppose that your current buffer contains the text "myfile.txt". If
    you place the cursor on, for instance, the "f" of "myfile" and press
    the "bx_open" key, bx_open will try to edit ".\myfile.txt".
    
    Obviously, this method can only work if the file name is clearly
    delimited at each end. More information is given about this later.
    
    Another method can also be used to specify a file name unambiguously:
    you can mark the file name on your screen (as for a copy or cut
    operation) before executing "bx_open".
    
    A file can be specified by a relative path (cases 1 and 2 below) or
    by a full path (case 3):
    
          1) myfile.txt
          2) subdir1\myfile.txt
          3) \mydir\subdir1\myfile.txt
    
    When a file specified by a relative path cannot be found, "bx_open"
    also tries the paths specified by the XOPATH1 and XOPATH2
    configuration parameters. For instance, if file .\subdir1\myfile.txt
    does not exist and if your configuration file includes the line
    
             XOPATH1 = \dir1;c:\dir2
    
    "bx_open" will also try to edit:    \dir1\subdir1\myfile.txt
    and if this fails, it will try:     \dir2\subdir1\myfile.txt
    
    Delimiters
    ----------
    A file identifier may be delimited at each end by any character which
    is not allowed in a file name:  tab space * + = [ ] ; | < > ? "
    
    The file identifier may also be delimited on the left by the beginning
    of the line and on the right by the end of the line or ":".
    
    In addition, if the cursor is on a left parenthesis, the characters
    "(" and ")" are then treated as delimiters. In case 1 below, "bx_open"
    attempts to edit "myfile" while in case 2 it will edit "(myfile)".
    
           case 1    (myfile)               case 2   (myfile)
                     ^                                 ^
                                     - 25 -
    
    6.1.15  ----- bx_sort
    
    This macro enables you to run the DOS SORT program inside Brief. It
    displays a dialogue box in which you type the parameters for the SORT
    program. These are:
    
          *  the name of the file to be sorted
          *  the name of the sorted file
          *  the column number
          *  the sort order
    
    You can obtain more information on this macro by pressing Alt-h when
    the dialogue box is displayed.
    
    
    6.1.16  ----- bx_viewhex
    
    This macro displays a file in hexadecimal.  The hexadecimal display is
    placed in a file called "HEX.TMP" and this file is automatically
    opened for viewing.
    
    6.2  C support macros
    
    There are two categories of C support macros: C shorthand macros and
    C-oriented search macros.
    
    
    6.2.1  C shorthand macros
    
    The C shorthand macros enable you to insert C statements in your
    source file with single key depressions.  The source file BX_C1.CB
    which contains all these macros is supplied so that you can amend the
    macros to match your style of C writing.
    
    To be really useful, each C shorthand macro should be assigned to a
    key. You will find how to do this in section 7.
    
    
    6.2.1.1  ----- bx_case
    
    This macro inserts a "case" statement at the cursor position and
    leaves the cursor on the colon ":"
    
        case :
        {
    
          break;
        }
    
    Once you have typed the case value, you can use "bx_hop" to place the
    cursor just above the "b" of "break".
    
    After you have typed the case statement, you can use "bx_jump" to
                                     - 26 -
    
    place the cursor just after the closing curly bracket "}".
    
    
    6.2.1.2  ----- bx_comment
    
    This macro inserts /* */ at the cursor position and leaves the cursor
    between the comment delimiters.
    
    
    6.2.1.3  ----- bx_curl_brkts
    
    This macro inserts a matching pair of curly brackets at the cursor
    position and leaves the cursor between the brackets as shown below. 
    The exact position of the cursor depends on your current tab settings.
    
      {
         
      }
    
    When you have finished typing between the brackets, you can use
    "bx_jump" to place the cursor just after the closing bracket "}".
    
    
    6.2.1.4  ----- bx_for
    
    This macro inserts a "for" statement at the cursor position and leaves
    the cursor between the parentheses:
    
        for(  )
        {
          1
        }
    
    You can use "bx_hop" to place the cursor in position 1.
    
    
    6.2.1.5  ----- bx_hop
    
    This macro places the cursor between the next pair of curly brackets.
    
    For instance, if the cursor is in position 1 when you run "bx_hop",
    the cursor moves to position 2.  Next time it moves to position 3.
    
        if( 1 )
        {
           2
        }
        else
        {
           3
        }
    
    
                                     - 27 -
    
    6.2.1.6  ----- bx_if
    
    This macro inserts an "if" statement at the cursor position and leaves
    the cursor between the parentheses:
    
        if(  )
        {
          1
        }
    
    You can use "bx_hop" to place the cursor in position 1.
    
    When you have finished typing your code in the "if" body, you can
    use "bx_jump" to place the cursor just after the closing bracket "}".
    
    
    6.2.1.7  ----- bx_ifelse
    
    This macro inserts an "if-then-else" statement at the cursor position
    and leaves the cursor between the parenthesises:
    
        if(  )
        {
          1
        }
        else
        {
          2
        }
    
    You can use "bx_hop" to place the cursor in position 1 and then 2.
    
    
    6.2.1.8  ----- bx_jump
    
    This macro places the cursor just after the next curly bracket "}".
    
    
    6.2.1.9  ----- bx_pntr
    
    This macro inserts "->" at the cursor position and leaves the cursor
    on the right of the ">".
    
    
    6.2.1.10  ----- bx_switch
    
    This macro inserts a switch statement at the current cursor position
    and leaves the cursor between the parentheses:
    
        switch( )
        {
          1
        }
                                     - 28 -
    
    
    You can use "bx_hop" to place the cursor in position 1 and then
    "bx_case" to insert a case statement.
    
    
    6.2.1.11  ----- bx_while
    
    This macro inserts a "while" statement at the cursor position and
    leaves the cursor between the parentheses:
    
        while(  )
        {
          1
        }
    
    You can use "bx_hop" to place the cursor in position 1.
    
    
    6.2.2  C-oriented search macros
    
    The macros in this group greatly facilitate the task of browsing
    through a package written in C, especially when you are dealing with
    a large number of source files. 
    
    The "bx_ffun" macro is particularly useful. It enables you to find
    the start of a C function easily whether it is in the current file
    or another file.  You do not need to search the file(s) (one by one)
    yourself. This is all done automatically. You do not even need to
    type the name of the function if it is displayed on your screen.
    
    The BX smart search macros allow you to initiate a Brief search
    command without having to key in the text string you are looking for
    if the text is displayed on your screen.
    
    The BX function tracking feature operates in conjunction with the
    Brief search command:  whenever an instance of the search pattern is
    found, the name of the function to which the particular instance
    belongs is displayed in the Brief status line.  Function tracking is
    optional. It is enabled by the statement load_macro( "bx_marksrch" )
    in file BX_CONFI.CB.
    
    
    6.2.2.1  ----- bx_fbb
    
    This macro searches backwards for the left curly bracket "{" which
    matches the right curly bracket "}" currently under the cursor.
    
    "bx_fbb" assumes that the current buffer contains a C source file. 
    Starting from the beginning of the file, it performs a syntax
    analysis in order to find the matching "{".  While doing so, it skips
    any curly brackets which are present in comments (e.g. /* } */), or
    between single or double quotes.
    
    The search may become slow when the construct "{....}" is far down the
    file.
                                     - 29 -
    
    
    A fast but less rigorous version of this macro is also available.
    
    
    6.2.2.2  ----- bx_fbf
    
    This macro looks forwards for the right curly bracket "}" which
    matches the left curly bracket "{" currently under the cursor.
    
    "bx_fbf" assumes that the current buffer contains a C source file. It
    performs a syntax analysis in order to skip any curly brackets which
    are present in comments (e.g. /* } */), or between single or double
    quotes.
    
    The search may become slow if the closing "}" is far from the opening
    "{".
    
    A fast but less rigorous version of this macro is also available.
    
    
    6.2.2.3  ----- bx_ffun
    
    This macro looks for the first line of a C (or CB) function
    definition and places the cursor on it. "bx_ffun" first searches the
    current file (the file in the current window).  If the function is
    not in the current file, "bx_ffun" may also search other files if you
    have previously set up a function index. This method is explained
    later.
    
    Like the Brief "routines" macro, "bx_ffun" can only find function
    definitions which start in column 1 and occupy a single line
    terminated by ")".  White spaces after the ")" are ignored.
    
    When "bx_ffun" is invoked, it checks whether the character currently
    under the cursor is a letter, a digit or the underscore "_".  These
    are the only characters allowed in a C function name and we refer to
    them here as "F-chars".
    
    If the character under the cursor is an "F-char", "bx_ffun" assumes
    that the text string under the cursor is the name of the function you
    are looking for.  The function name is delimited at each end by any
    non "F-char".
    
    If on the other hand, the cursor is not positioned on an "F-char",
    "bx_ffun" asks you to type the name of the function you are looking
    for.
    
    The function index
    ------------------
    As mentioned above, you can set up a function index to tell "bx_ffun"
    which C source files to search when you look for a C function.  The
    index is held in a text file which can be prepared with Brief. The
    content of the index file is explained below with a few examples.
    
    Suppose you are working on a package which consists of four source
    files: "init.c", "main.c", "ios.c" and "stop.c".  Suppose also that
                                     - 30 -
    
    you have adopted a systematic naming scheme for your functions such
    that, for instance, all functions in file "init.c" are called
    "in_...", all those in "main.c" are called "ma_...."  etc.
    
    In this case, the function index is easy to set up. It should contain
    (starting in column 1):
    
       in_   init.c
       ma_   main.c
       io_   ios.c
       st_   stop.c
    
    For any function starting with "in_", "bx_ffun" will search file
    "init.c".
    
    Suppose now that some functions in "init.c" are called "INI_..." and
    that file "main.c" is replaced by "main1.c", "main2.c" and "main3.c". 
    The function index should be amended as follows:
    
       in_   init.c
       INI_
       ma_   main1.c
       +     main2.c
       +     main3.c
       io_   ios.c
       st_   stop.c
    
    The first 2 lines tell "bx_ffun" that it should search "init.c" for
    any function with the prefix "in_" or "INI_".
    Lines 3 - 5 specify that "main1.c", "main2." and "main3.c" should be
    searched for any function name starting with "ma_".
    
    Suppose finally that you have two more files "\dir1\misc1.c" and
    "misc2.c" in which the function names do not follow any rule.  This
    can also be accommodated. You simply need to add two lines to the
    index:
    
       *     \dir1\misc1.c
       +     misc2.c
    
    These lines mean that "bx_ffun" should search "misc1.c" and "misc2.c"
    for any function name not found in the other files.
    
    The "*" matches any function name.
    
    In the worst case, the index would look something like this:
    
       *    file1
       +    file2
       +    file3
       etc.
    
    Note that the following index is valid but inefficient since file
    "file1.c" will always be searched before the other files.
    
       *       file1.c
       abc     file2.c     (search file2.c if function name is abc....)
       def     file3.c
                                     - 31 -
    
    
    The layout of the index file must obey the following rules:
    ----------------------------------------------------------
       An index line can have one or more fields. Fields are separated
       by white spaces (space or tab characters).  The length of an index
       line is limited by the maximum line length configured in Brief.
    
       The first field is always a function name prefix, or the character
       "+"  or "*".  It must start in column 1. (If the character in
       column 1 is NOT a letter, an underscore "_", an asterisk "*" or a
       plus "+", the line is ignored).
    
    A name prefix will match any function name starting with that prefix.
    The character "*" matches any function name.  The character "+"
    always stands for the last prefix or "*" encountered.
    
    The second field, when present, is always a file name.  This may be a
    full pathname or a path relative to the current directory.
    
    When no file name is specified, the last file name encountered is used
    by "bx_ffun".
    
    Any text found after the second field is ignored.
    
    The full path of the index file is given by the BX configuration
    parameter XCINDX whose default value is ".\cindex.bx".
    
    
    6.2.2.4  ----- bx_funhdr
    
    This macro places the cursor on the first line of the C or CB function
    within which the cursor is currently positioned.  This enables you to
    see easily where you are in your source file.
    
    You can use Undo to return the cursor to its original position.
    
    
    6.2.2.5  ----- bx_funlist
    
    This macro makes a list of all the function definitions found in the
    current buffer.  The list is placed in a file called "FUNLIST.TMP"
    which is automatically opened for editing. This file is created in
    the directory specified by the configuration parameter XTEMP or, if
    XTEMP is undefined, in the current directory.
    
    "bx_funlist" assumes that the current buffer contains a C or CB source
    file.
    
    Like the Brief "routines" macro, "bx_funlist" can only find function
    definitions which start in column 1 and occupy a single line
    terminated by ")".  White spaces after the ")" are ignored.
    
    
                                     - 32 -
    
    6.2.2.6  ----- bx_srchb
    
    This macro initiates a search backwards for the text which is
    currently under the cursor or which is marked. Regular expressions
    are always turned off while the macro is running.
    
    If no text is marked, the following rules apply:
    
    The text string may contain letters, digits, underlines "_" and dots
    ".".  Other characters are treated as delimiters.
    
    The dot has a special function. It is treated as a delimiter except
    when the cursor is positioned on it.
    
    For instance, if you invoke "bx_srchb" while the cursor is positioned
    under "user_id" as shown
                               user_id.name
                                    ^
    a search for "user_id" is initiated.  However, if the cursor is on
    the dot
                               user_id.name
                                      ^
    
    a search for "user_id.name" is initiated.
    
    After using "bx_srchb", you can use the Brief "search_again" macro to
    find the next instance of the pattern.
    
    
    6.2.2.7  ----- bx_srchf
    
    This macro is similar to "bx_srchb" but initiates a forward search.
    
    
    6.3  Replacement macros
    
    Four Replacement macros are included in the BX package. They are
    automatically activated as explained below.
    
    6.3.1  ----- _marksrch
    
    This macro is called by Brief after each successful search. The
    original Brief version of this macro highlights the string found. The
    Replacement macro supplied in BX checks whether the string found is
    inside a C or CB function and, if so, it displays the name of that
    function in the status line.  The use of this macro is optional. It
    is enabled by the statement load_macro( "bx_marksrch" ) in file
    BX_CONFI.CB.
    
    
    6.3.2  ----- _bad_key
    
    This macro is called by Brief if an unexpected character is typed in
                                     - 33 -
    
    response to a prompt. It is used in various BX macros to intercept
    user input.
    
    
    6.3.3  ----- _context_help
    
    This macro is executed when the user presses Alt-h while a prompt is
    pending.  If the macro which issued the prompt is a BX macro,
    _context_help() displays the appropriate help screen, otherwise it
    calls the replaced macro.
    
    
    6.3.4  ----- help
    
    This macro is executed when the user presses Alt-h while no command
    is pending. It display a two line menu which offers the standard
    Brief help and the BX help.
    
    
    6.3.5  ----- print
    
    This macro is used only if the BX_LPT.CM macro file is loaded. It
    enables LPT1 or LPT2 according to the current setting.
                                     - 34 -
    
    7  Customising BX
    =================
    7.1  Overview
    --------------
    Once you have become a little familiar with BX you will probably want
    to customise it according to your needs. The BX customisation
    facilities enable you to
    
       -  specify the location of the files used by BX
       -  enable or disable various options
       -  assign BX macros to keys
    
    All this can be done safely WITHOUT AFFECTING YOUR CURRENT BRIEF
    SET-UP. If at any time you decide that you no longer want to use BX,
    all you need to do is
    
       -  delete the BX directory and
       -  remove "-mbx_init" and "-mbx_confi" from the SET BPATH command
          in AUTOEXEC.BAT.
    
    7.2  Reconfiguring your keyboard
    
    You can reconfigure your keyboard to assign each of your favourite BX
    macros to a key (or sequence of keys). A special macro, "bx_keys", is
    provided for this purpose. You can use "bx_keys" whenever you like.
    It is similar to the Brief "keys" macro but easier to use (context
    help is available at all stages).
    
    When you assign a macro to a key (or key sequence), "bx_keys"
    searches BX_CONFI.CB (in the BX directory) to verify that the key is
    not already assigned.  It also verifies that the key is not assigned
    in the Brief file "KEYBOARD.H" either (if this file can be found).
    If the key is currently free, "bx_keys" amends file BX_CONFI.CB. 
    "bx_keys" also lets you amend or delete any BX key assignments.
    
    Once you have finished re-configuring your keyboard, "bx_keys" gives
    you the option to save your changes. If you choose to save your
    changes, file BX_CONFI.CB is saved and recompiled. If you choose not
    to save your changes, they are no longer effective the next time you
    start a new Brief session.
    
    File BX_CONFI.CB contains the macro "bx_confi" which is executed
    after macro "bx_init" when Brief starts. Please refer back to section
    2 for more information on this.
    
    7.3  The BX configuration parameters
    
    The BX configuration parameters may be used to specify the location of
    files and to enable or disable various BX options.
    
    Parameter values may be specified in a configuration file. For
    instance, the sample configuration file supplied contains the line
    
             "XTEMP =.\     Path for temporary files used by BX package"
                                     - 35 -
    
    
    which specifies where BX will place its temporary files.
    
    Most parameters can also be assigned a value with a DOS SET command.
    For instance, the following command would have the same effect as the
    configuration file line shown above:
    
             SET XTEMP=.\
    
    Please remember that in a SET command there must be no space before
    or after the equals sign "=".
    
    When a parameter is assigned a value both in a configuration file and
    with a SET command, the value given in the SET command is ignored.
    
    If you do not assign any value to a BX configuration parameter, BX
    uses a default value or leaves the parameter undefined.
    
    Parameter XCONFIG can be defined only in a SET command. This
    parameter specifies the path of the BX configuration file
    "CONFIG.BX".
    
    When BX starts, it locates the configuration file as follows. First
    BX looks for "CONFIG.BX" in the current directory. If file
    ".\CONFIG.BX" does not exist, BX looks for "CONFIG.BX" in the
    directory specified by the XCONFIG environment variable. If XCONFIG
    is undefined, BX looks for "CONFIG.BX" in the directory where BX is
    installed. The use of a configuration file is NOT mandatory. BX will
    not complain if it cannot find one.
    
    You can choose to have a single configuration file or a separate file
    for each of your applications. During an editing session you can use
    the BX help facility to check which configuration file is in use.
    
    The method for creating a configuration file is given in section 7.4.
    
    The table below shows all the BX parameters. For each parameter, it
    gives a short description and the default value (an empty space
    indicates that there is no default value) and indicates whether the
    parameter can be assigned a value with a DOS SET command.
                                     - 36 -
    
       ------------------------------------------------------------------
       Parameter   SET   Default        Parameter purpose
                   cmd   value
       ------------------------------------------------------------------
       XCINDX      yes   cindex.bx      Specifies the path of the control
                                        file used by bx_ffun. By default,
                                        the file is in the current
                                        directory.
    
       XCMD        yes   cmd.bx         Specifies the path of the control
                                        file used by bx_do. By default,
                                        the file is in the current
                                        directory.
    
       XCONFIG     yes                  Specifies the path of BX
                                        configuration file CONFIG.BX. See
                                        text above.
    
       XGREPMENU         "yes"          Specifies whether GREP should
                                        display the names of the files
                                        found in a menu.
    
       XIKEY                            Specifies the default index key
                                        used by bx_index when none is
                                        defined in the current file. See
                                        section 6.1.8.
    
       XLPT              LPT1           Specifies the printer port which
                                        Brief should used.
    
       XMAC        yes   MACROS.BX      Specifies the path of the control
                                        file used by bx_mac. By default,
                                        the file is in the current
                                        directory.
    
       XOPATH1     yes                  Specifies the alternate paths
                                        which bx_open should try when it
                                        cannot find a file.
    
       XOPATH2     yes                  Specifies further alternate paths
                                        for bx_open.
    
       XPAD        yes   notes.txt      Specifies the path of the file to
                                        be used by bx_notes. By default,
                                        the file is in the current
                                        directory.
    
       XPMAC                            Specifies the macro which must be
                                        executed when a file is made
                                        current by bx_notes.
    
       XTEMP       yes                  Specifies the path of the BX
                                        temporary files.
       ------------------------------------------------------------------
    
    
    The BX configuration parameters are explained in detail below. For
                                     - 37 -
    
    more information about the use of a particular parameter please refer
    to the description of the related macro(s).
    
    7.3.1  XCINDX
    
    This parameter gives the full path of the control file used by the
    "bx_ffun" macro.  Its default value is ".\cindex.bx".
    
    Example:    XCINDX = \dir1\dir2\myindex.bx
    
    The content and format of the file are specified in section 6.2.2.3.
    
    7.3.2  XCMD
    
    This parameter gives the full path of the control file used by "bx_do".
    Its default value is ".\cmd.bx".
    
    Example:    XCMD = \dir1\dir2\mycmds.bx
    
    The content and format of the file are specified in section 6.1.3.
    
    7.3.3  XCONFIG
    
    This parameter specifies the directory of the configuration file
    "CONFIG.BX".  By default, XCONFIG is undefined.  BX always looks for
    "CONFIG.BX" in the current directory first, irrespective of the value
    assigned to XCONFIG.
    
    Only the DOS SET command can be used to define XCONFIG.
    
    Example:    set XCONFIG=\dir1\dir2
    
    7.3.4  XGREPMENU
    
    This parameter is used by the "bx_grep" macro only. Its default value
    is "yes".  Anything else is assumed to mean "no". When the value is
    "yes", the names of all the files selected by GREP are shown in a
    menu.
    
    Example     set XGREPMENU=no
    
    7.3.5  XIKEY
    
    This parameter specifies the index key which should be used by
    "bx_index" when no other value is specified in the current file.
    By default, XIKEY is undefined. In the sample configuration file
    supplied, XIKEY is set to "!--".  In the present file ("MANUAL.TXT"),
    this value is overridden by the use of the BX_INDEX_KEY keyword and
    you can see a menu of all the headings by executing "bx_index".
    
                                     - 38 -
    
    7.3.6  XLPT
    
    This parameter specifies which printer port Brief should use when you
    use the print macro. Currently only LPT1 or LPT2 can be selected. By
    default, XLPT is set to "LPT1".
    
    Example  XLPT = LPT2
    
    7.3.7  XMAC
    
    This parameter gives the full path of the control file used by
    "bx_mac".  Its default value is ".\MACROS.BX".
    
    Example:    XMAC = \dir1\dir2\mymacs.bx
    
    The content and format of the file are specified in section 6.1.12.
    
    7.3.8  XOPATH1
    
    This parameter and the next can be used to specify the paths which
    "bx_open" should try when it cannot find a file. The paths are tried
    in the order specified. The paths given in XOPATH1 are tried before
    those in XOPATH2.
    
    By default XOPATH1 and XOPATH2 are undefined.
    
    Example:    XOPATH1 = \dir1\dir2;\dir3
    
    7.3.9  XOPATH2
    
    Please see XOPATH1 above.
    
    7.3.10  XPAD
    
    This parameter specifies the path of the file to be used by the
    "bx_notes" macro. Its default value is ".\notes.txt".
    
    Examples    set XPAD=\dir1\notes.txt
                set XPAD=.\notes.txt
    
    7.3.11  XPMAC
    
    This parameter specifies the macro which must be executed when a file
    is made current by "bx_notes". By default XPMAC is undefined.
    
    In the sample configuration file supplied, XPMAC is set to "bx_index"
    so that the "bx_index" macro is invoked automatically each time you
    execute "bx_notes".
    
    Example:    set XPMAC=bx_index
                set XPMAC=my_mac
    
                                     - 39 -
    
    7.3.12  XTEMP
    
    This parameter specifies the path of the temporary files used by BX.
    By default, XTEMP is undefined and the temporary files are created in
    the current directory.
    
    Example:      XTEMP = \dir1\temp
    
    
       NOTE: ----------------------------------------------------------
             When a configuration parameter specifies that a file is in
             the current directory (e.g. XMAC = .\macros.bx) or that the
             file path is relatif to the current directory
             (e.g. XMAC = mysubdir\macros.bx) Bx will not be able to
             find the file if you change the current working directory
             with the Brief "cd" command.
             -----------------------------------------------------------
    
    7.4  The BX configuration file
    -------------------------------
    The name of a BX configuration file is "CONFIG.BX". The method used
    by BX to locate the file is given in section 7.3. 
    
    The configuration file is read once only at the start of a new Brief
    session. 
    
    The configuration file is a text file (ASCII file) which you can
    create with Brief.
    
    All the parameter names start with the prefix "X".
    
    A configuration parameter line can have one of the three formats shown
    below.  (The examples are indented to make them stand out. In the
    configuration file, they should start in column 1.)
    
          Xname = value
          Xname = value  comment
          Xname =
          
    Examples:
    
          XTEMP =.\               This comment is ignored.
          XCMD = \BXMAC\cmd.bx
          XOPATH1 =
    
    
    The prefix X must be in column 1.  White spaces on each side of the
    equals sign "=" are ignored. The value field is terminated by a
    white space or by the end of the line. It can be followed by a free
    format comment.
    
    Blank lines and lines which do not have an "X" in column 1 are
    ignored.
    
    All the parameter values specified in the configuration file have
    precedence over those specified with SET commands.
                                     - 40 -
    
    
    If the equals sign is followed by white spaces only, the parameter
    value becomes undefined. This can be used to cancel the value already
    assigned to a parameter with a SET command without assigning a new
    value.
    
                                     - 41 -
    
    8  Using a mouse with BX
    ========================
    A mouse can be used with most BX windows (menus and dialogue boxes),
    as with other Brief windows. There are however two small differences:
    
       -  to cancel an operation you must click outside the window 
       -  to terminate an input and proceed with the execution of the
          macro which displayed the window, you must click the close
          button in the top left corner.
    
                                     - 42 -
    
    9  BX licence
    =============
    If you intend to use BX on an ongoing basis, you should obtain a
    licence.
    
    Once you have a licence, BX no longer displays the registration form
    every time you start Brief and no longer limits the number of times
    you can use a BX macro during a Brief session. 
    
    If you are planning to use BX on several PCs at the same time, you
    will need one licence per PC.
    
    9.1  Registration procedure
    
    The price of the BX licence is 25 pounds sterling. 
    
    You can pay by cheque (UK only), credit card/charge card or cash.
    Cheques should be in pounds sterling and made payable to Streamware
    Limited.  If you prefer to pay in cash, please send 25 or $40 or 250
    French francs. 
    
    To obtain a licence please follow this procedure:
    
       1) Start Brief and answer YES to the question "Register now ?".
    
          BX displays a registration form.
    
       2) Fill in the registration form. 
    
          Some fields are mandatory. These are:
    
             Name 
             Address
             Town
             Post code (zip code) 
             Country
             Number of licences required
    
          BX writes all your registration details in file "REG.BX". This
          file is stored in the BX home directory (where BX is installed).
    
       3) This step depends on the method of payment you choose.
    
          -- If you are paying by cheque or cash, print your registration
             form and send it to us with your cheque or cash at:
    
                BX registration
                Streamware Ltd
                6 Marlborough Road
                London W5 5NY
                UK
    
          -- If you prefer to pay by credit card (charge card), please 
             select one of the registration sites listed in README.TXT
             and follow the instructions given for the site.
    
                                     - 43 -
    
          IMPORTANT NOTE: Please take care not to amend "REG.BX" after
          you have entered your details, otherwise the next and final
          step of the registration procedure may fail. 
    
    9.2  Entering your licence number
    
    Once you receive your licence number, you can run macro "bx_licence"
    to transform your copy of BX into a fully licensed copy.  If the
    procedure is successful, file "REG.BX" is deleted and a new file,
    "LICENCE.BX", is created in the BX home directory. 
    
    To enter your licence number in BX, follow this procedure:
    
       1) Start Brief and answer NO to the question "Register now ?".
       2) Execute macro "bx_licence":
    
             Press F10
             Type bx_licence
          
          When prompted, type in your licence number.
    
    9.3  Error messages
    
    The following error messages may be displayed by "bx_licence":
    
       ------------------------------------------------------------------
       Error message                    Meaning
       ------------------------------------------------------------------
    
       Invalid BX licence number(n)     The licence number was most
                                        probably typed incorrectly.
    
       BX registration err 8            The registration file has been
                                        damaged.
    
       BX registration err 9            The licence number you typed
                                        seemed OK but does not match your
                                        registration details in REG.BX.
       ------------------------------------------------------------------
    
    9.4  File LICENCE.BX
    
    If file LICENCE.BX is accidentally damaged or lost, you can recreate
    it as long as you keep a copy of your licence number.
    
    To recreate LICENCE.BX:
    
       1) Delete LICENCE.BX.
    
       2) Start Brief. The BX registration form will be displayed.
          Re-enter your BX registration details. Your name and company
          name must be typed exactly as you originally typed them.
    
                                     - 44 -
    
       3) Execute macro "bx_licence". You will be prompted to key-in your
          licence number.
    
    
       NOTE: ----------------------------------------------------------
             File LICENCE.BX must not be edited with Brief. The command 
       
                   Brief LICENCE.BX
    
             causes Brief to lock up.
             -----------------------------------------------------------
    
                                     - 45 -
    
    10  Product support
    ==================
    As with any software, problems may arise. We believe that in general
    you will be able to find the answer to any difficulty you may have in
    the BX documentation or in your Brief manuals.
    
    If you encounter a problem which you cannot resolve on your own, you
    can contact us for help at bx_support@streamware.demon.co.uk or at the
    postal address given above.
    
    If you would like to be helped with a problem, please send us the
    following material by email or by post:
    
       - a clear description of the problem 
    
       - a copy of your initials macro source file (see your Brief manual)
         
       - a copy of file LICENCE.BX
    
       - a copy of file BX_CONFI.CB 
    
       - a copy of file BXINFO.BX
    
             This file is created when you select "Log BX info" in the
             BX help menu. If you cannot create this file, please send
             the following instead:
                   
                 - a copy of file CONFIG.BX
                      
                      If you have several such files, please make
                      sure you select the right one.
    
                 - a copy of your Brief command line
    
                 - a copy of the Brief and BX environment variables you
                   obtained (with the DOS SET command) immediately prior
                   to starting Brief.
                                     - 46 -
    
    11  Disclaimer
    =============
    The BX package was designed and tested with care. In particular it
    was thoroughly tested and used under DOS 3.3, 5.00 and 6.2 on several
    PCs from various manufacturers. We are confident that BX is a stable
    and reliable product but we do not and cannot guarantee that it is
    totally error-free.
    
    Before trying BX on your computer, you should take every precaution
    you judge necessary to protect your files against accidental damage. 
    If after a trial period you are satisfied that BX meets your
    requirements and is reliable, you may decide to continue using it.
    This is your responsibility entirely.
    
    Streamware will not be liable for any damages whatsoever arising out
    of the use of the BX package. If you do not accept these conditions,
    please do not use BX.  If you do use BX, you implicitly accept all
    the conditions stated.
    
                                     - 47 -
    
    Appendix A - BX macros in alphabetical order
    ============================================
    
    All the macros in file BX_C1.CM are C shorthand macros.
    
      -------------------------------------------------------------------
      Macro            Description                            Macro file
      -------------------------------------------------------------------
      bx_case          insert a "case" statement              bx_c1.cm
      bx_comment       insert /*  */                          bx_c1.cm
      bx_count         count occurrences of a pattern         bx_count.cm
      bx_curl_brkts    insert "{  }"                          bx_c1.cm
      bx_del           delete current file (after confirm)    bx_del.cm
      bx_do            execute a DOS command or Brief macro   bx_do.cm
      bx_fbb           find next matching }                   bx_c2.cm
      bx_fbf           find next matching {                   bx_c2.cm
      bx_ffile         find files matching pattern            bx_ffile.cm
      bx_ffun          find C function                        bx_ffun.cm
      bx_for           insert a "for" statement               bx_c1.cm
      bx_funhdr        put cursor on C function header        bx_c2.cm
      bx_funlist       make list of C functions               bx_misc.cm
      bx_gr            do global replacements                 bx_gs.cm
      bx_grep          run GREP inside Brief                  bx_grep.cm
      bx_gs            do global search                       bx_gs.cm
      bx_hop           put cursor within next { }             bx_c1.cm
      bx_if            insert an "if" statement               bx_c1.cm
      bx_ifelse        insert "if-then-else"                  bx_c1.cm
      bx_index         display subject index                  bx_index.cm
      bx_jump          put cursor after next }                bx_c1.cm
      bx_keys          change BX key assignments              bx_keys.cm
      bx_licence       create BX licence control file         bx_licen.cm
      bx_lpt           select printer LPT1 or LPT2            bx_lpt.cm
      bx_mac           execute a macro selected from a menu   bx_mac.cm
      bx_notes         edit notes file                        bx_index.cm
      bx_open          edit file named on screen              bx_open.cm
      bx_pntr          insert "->"                            bx_c1.cm
      bx_sort          run DOS SORT inside Brief              bx_sort.cm
      bx_srchb         do smart search backwards              bx_c2.cm
      bx_srchf         do smart search forwards               bx_c2.cm
      bx_switch        insert a "switch" statement            bx_c1.cm
      bx_viewhex       show a file in hexadecimal             bx_misc.cm
      bx_while         insert a "while" statement             bx_c1.cm
      -------------------------------------------------------------------
    
                                     - 48 -
    
    Appendix B - BX macro files in alphabetical order
    =================================================
    
       -------------------------------------------------------------------
       Macro file       Macros
       -------------------------------------------------------------------
       bx_c1.cm         bx_case         bx_hop      bx_jump      bx_switch
                        bx_curl_brkts   bx_if       bx_pntr      bx_while
                        bx_for          bx_ifelse   bx_comment
       bx_c2.cm         bx_fbb          bx_fbf      bx_srchf
                        bx_fbf          bx_srchb    bx_funhdr
                        bx_fbb
       bx_confi.cm      bx_confi
       bx_count.cm      bx_count
       bx_del.cm        bx_del
       bx_do.cm         bx_do
       bx_ffile.cm      bx_ffile
       bx_ffun.cm       bx_ffun
       bx_grep.cm       bx_grep
       bx_gs.cm         bx_gr           bx_gs
       bx_help.cm       BX help macros 
       bx_index.cm      bx_index        bx_notes
       bx_init.cm       bx_init
       bx_licen.cm      bx_licence
       bx_lpt.cm        bx_lpt
       bx_lpt2.cm       bx_lpt
       bx_mac.cm        bx_mac
       bx_marks.cm      _marksrch (Replacement macro)
       bx_misc.cm       bx_viewhex      bx_funlist
       bx_open.cm       bx_open
       bx_sort.cm       bx_sort
       bx_ureg.cm       bx_ureg
       bx_keys.cm       bx_keys
       -------------------------------------------------------------------
    
    
                              END OF MANUAL.TXT
