home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 6.ddi / DOC.ZIP / UTIL.DOC < prev    next >
Encoding:
Text File  |  1992-06-10  |  177.2 KB  |  4,419 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Online document
  8. ___________________________________________________________________________
  9.  
  10.                                                             Other utilities
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. ===========================================================================
  18. HOW TO USE THIS FILE
  19. ===========================================================================
  20.  
  21.                     This file has a table of contents and an index that
  22.                     refer to "pages" in this file. If your editor has a
  23.                     search facility, you can use it to search for the page
  24.                     numbers listed in either the table of contents or in
  25.                     the index. The phrase "Page n" (where n represents the
  26.                     actual page number) appears at the bottom left of the
  27.                     "page" it refers to. Thus, at the bottom of page 1,
  28.                     you'll find "Page 1" as the last item on that "page."
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. CONTENTS
  36. ___________________________________________________________________________
  37.  
  38.  
  39.  
  40.  
  41.  
  42.            Other utilities                 Report by external references
  43.                                            (/RX) . . . . . . . . . . . . 27
  44. BGIOBJ: Converting graphics drivers        Report of module sizes
  45. and fonts  . . . . . . . . . . . . 2       (/RS) . . . . . . . . . . . . 27
  46.   Adding the new .OBJ files to             Report by class type (/RC)  . 27
  47.   GRAPHICS.LIB . . . . . . . . . . 3       Report of unreferenced symbol
  48.   Registering the drivers and              names (/RU) . . . . . . . . . 28
  49.   fonts  . . . . . . . . . . . . . 3       Verbose reporting (/RV) . . . 29
  50.     An example . . . . . . . . . . 4     Examples of how to use
  51.   The /F option  . . . . . . . . . 5     OBJXREF . . . . . . . . . . . . 29
  52.   Advanced features  . . . . . . . 5       Example 1 . . . . . . . . . . 29
  53. CPP: The preprocessor  . . . . . . 9       Example 2 . . . . . . . . . . 29
  54.   CPP as a macro preprocessor  .  10       Example 3 . . . . . . . . . . 29
  55.   An example . . . . . . . . . .  10       Example 4 . . . . . . . . . . 30
  56. GREP: A text-search utility  . .  11     OBJXREF error messages and
  57.   Command-line syntax  . . . . .  11     warnings  . . . . . . . . . . . 30
  58.   GREP options . . . . . . . . .  12       Error messages  . . . . . . . 30
  59.     Order of precedence  . . . .  14       Warnings  . . . . . . . . . . 30
  60.   The search string  . . . . . .  14   PRJCFG: Configuration file
  61.     Operators in regular               utility . . . . . . . . . . . . . 31
  62.     expressions  . . . . . . . .  15   PRJCNVT: Old projects for new . . 31
  63.   File specifications  . . . . .  16   PRJ2MAK: From project file to MAKE
  64.   Some GREP examples . . . . . .  16   file  . . . . . . . . . . . . . . 32
  65.     Example 1  . . . . . . . . .  16   THELP: The Turbo Help utility . . 33
  66.     Example 2  . . . . . . . . .  17     Loading and invoking THELP  . . 33
  67.     Example 3  . . . . . . . . .  17     Navigating THELP  . . . . . . . 34
  68.     Example 4  . . . . . . . . .  17     THELP options . . . . . . . . . 35
  69.     Example 5  . . . . . . . . .  18       /C#xx (select color)  . . . . 35
  70.     Example 6  . . . . . . . . .  18       /Fname (full path and name for
  71.     Example 7  . . . . . . . . .  19       help file)  . . . . . . . . . 36
  72.     Example 8  . . . . . . . . .  19       /H, /?, and ? (display help
  73. OBJXREF: The object module cross-          screen) . . . . . . . . . . . 37
  74. reference utility  . . . . . . .  20       /Kxxyy (reassign hot key) . . 37
  75.   The OBJXREF command line . . .  20       /U (remove THELP from
  76.     The OBJXREF command-line               memory) . . . . . . . . . . . 38
  77.     options  . . . . . . . . . .  21       /Wx,y,w,h (set the window size
  78.       Control options  . . . . .  21       and location) . . . . . . . . 38
  79.       Report options . . . . . .  23   TOUCH . . . . . . . . . . . . . . 38
  80.   Response files . . . . . . . .  24   TRANCOPY: A project transfer item
  81.     Free-form response files . .  24   utility . . . . . . . . . . . . . 39
  82.     Project files  . . . . . . .  24   TRIGRAPH: A character-conversion
  83.     Linker response files  . . .  25   utility . . . . . . . . . . . . . 39
  84.   Sample OBJXREF reports . . . .  25   Transfer macros . . . . . . . . . 40
  85.     Report by public names                   State macros  . . . . . . . 40
  86.     (/RP)  . . . . . . . . . . .  26         File name macros  . . . . . 41
  87.     Report by module (/RM) . . .  26         Instruction macros  . . . . 41
  88.     Report by reference (/RR)  .  26     Running DOS commands  . . . . . 46
  89.  
  90.  
  91.  
  92.                                      i
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.   Transfer memory settings . . .  47     Named keys  . . . . . . . . . . 50
  100. Turbo Editor macros  . . . . . .  47   Predefined editor commands  . . . 51
  101. TEMC command line  . . . . . . .  47
  102. Syntax . . . . . . . . . . . . .  48   Index                             61
  103. Key codes  . . . . . . . . . . .  49
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.                                     ii
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.                     Borland C++ comes with a host of standalone utilities
  165.                     that you can use with your Borland C++ files or other
  166.                     modules. Several are documented in the Tools and
  167.                     Utilities Guide; others are documented here.
  168.  
  169.  
  170.                     -------------------------------------------------------
  171.                     Name       Description
  172.                     -------------------------------------------------------
  173.  
  174.                     Documented in the Tools and Utilities Guide
  175.  
  176.                     IMPDEF     Creates a module definition file
  177.                     IMPLIB     Generates an import library
  178.                     IMPLIBW    Windows application that generates an import
  179.                                library
  180.                     MAKE       Standalone program manager
  181.                     TLIB       Turbo Librarian
  182.                     TLINK      Turbo Linker
  183.                     WinSight   Windows message monitor
  184.  
  185.                     Documented in this file
  186.  
  187.                     BGIOBJ     Conversion utility for graphics drivers and
  188.                                fonts
  189.                     CPP        Preprocessor
  190.  
  191.  
  192.  
  193.                                    - 1 -
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.                     GREP       File-search utility
  201.                     OBJXREF    Object module cross-referencer
  202.                     PRJCFG     Updates options in a project file from a
  203.                                configuration file, or converts a project
  204.                                file to a configuration file
  205.                     PRJCNVT    Converts Turbo C project files to the
  206.                                Borland C++ format
  207.                     PRJ2MAK    Converts Borland C++ project files to MAKE
  208.                                files
  209.                     THELP      Turbo Help utility
  210.                     TOUCH      Updates file date and time
  211.                     TRANCOPY   Copies transfer items from one project to
  212.                                another
  213.                     TRIGRAPH   Character-conversion utility
  214.                     TEML/TEMC  Turbo Editor Macro Language and Compiler
  215.  
  216.                     -------------------------------------------------------
  217.  
  218.                     This file explains what each utility is and
  219.                     illustrates, with code and command-line examples, how
  220.                     to use them.
  221.  
  222.  
  223.  
  224. ===========================================================================
  225. BGIOBJ: Converting graphics drivers and fonts
  226. ===========================================================================
  227.  
  228.                     You can use BGIOBJ to convert graphics driver files and
  229.                     character sets (stroked font files) to object (.OBJ)
  230.                     files. Once they're converted, you can link them into
  231.                     your program, making them part of the executable file.
  232.                     This is in addition to the graphics package's dynamic
  233.                     loading scheme, in which your program loads graphics
  234.                     drivers and character sets (stroked fonts) from disk at
  235.                     run time.
  236.  
  237.                     Linking drivers and fonts directly into your program is
  238.                     advantageous because the executable file contains all
  239.                     (or most) of the drivers and/or fonts it might need,
  240.                     and doesn't need to access the driver and font files on
  241.                     disk when running. However, linking the drivers and
  242.                     fonts into your executable file increases its size.
  243.  
  244.                     To convert a driver or font file to a linkable object
  245.                     file, use the BGIOBJ.EXE utility. This is the
  246.                     simplified syntax:
  247.  
  248.                       BGIOBJ source_file
  249.  
  250.                     where source_file is the driver or font file to be
  251.                     converted to an object file. The object file created
  252.                     has the same file name as the source file, with the
  253.  
  254.  
  255.  
  256.  
  257.                                    - 2 -
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.                     extension .OBJ; for example, EGAVGA.BGI yields
  265.                     EGAVGA.OBJ, SANS.CHR gives SANS.OBJ, and so on.
  266.  
  267.  
  268.     Adding the new  =======================================================
  269.      .OBJ files to
  270.       GRAPHICS.LIB  You should add the driver and font object modules to
  271.                     GRAPHICS.LIB, so the linker can locate them when it
  272.                     links in the graphics routines. If you don't add these
  273.                     new object modules to GRAPHICS.LIB, you'll have to add
  274.                     them to the list of files in the project (.PRJ) file,
  275.                     on the BCC command line, or on the TLINK command line.
  276.                     To add these object modules to GRAPHICS.LIB, invoke
  277.                     TLIB with the following command line:
  278.  
  279.                       tlib graphics + object_file_name [+ object_file_name
  280.                     ...]
  281.  
  282.                     where object_file_name is the name of the object file
  283.                     created by BGIOBJ.EXE (such as CGA, EGAVGA, GOTH, and
  284.                     so forth). The .OBJ extension is implied, so you don't
  285.                     need to include it. You can add several files with one
  286.                     command line to save time; see the example in the
  287.                     following section.
  288.  
  289.  
  290.    Registering the  =======================================================
  291.  drivers and fonts
  292.                     After adding driver and font object modules to
  293.                     GRAPHICS.LIB, you have to register all the drivers and
  294.                     fonts that you want linked in; you do this by calling
  295.                     registerbgidriver and registerbgifont in your program
  296.                     (before calling initgraph). This informs the graphics
  297.                     system of the presence of those files, and ensures that
  298.                     they will be linked in when the executable file is
  299.                     created by the linker.
  300.  
  301.                     The registering routines each take one parameter; a
  302.                     symbolic name defined in graphics.h. Each registering
  303.                     routine returns a nonnegative value if the driver or
  304.                     font is successfully registered.
  305.  
  306.                     The following table shows the names to be used with
  307.                     registerbgidriver and registerbgifont. It is a complete
  308.                     list of drivers and fonts included with Borland C++.
  309.  
  310.  
  311. ---------------------------------------------------------------------------
  312.  Driver file     registerbgidriver      Font file   registerbgifont
  313.  (*.BGI)         symbolic name          (*.CHR)     symbolic name
  314. ---------------------------------------------------------------------------
  315.  
  316.  CGA             CGA_driver             TRIP        triplex_font
  317.  EGAVGA          EGAVGA_driver          LITT        small_font
  318.  
  319.  
  320.  
  321.                                    - 3 -
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  HERC            Herc_driver            SANS        sansserif_font
  329.  ATT             ATT_driver             GOTH        gothic_font
  330.  PC3270          PC3270_driver
  331.  IBM8514         IBM8514_driver
  332.  
  333. ---------------------------------------------------------------------------
  334.  
  335.  
  336. ------------------  Suppose you want to convert the files for the CGA
  337.         An example  graphics driver, the gothic font, and the triplex font
  338. ------------------  to object modules, then link them into your program.
  339.                     Here's what you do:
  340.  
  341.                     1. Convert the binary files to object files using
  342.                        BGIOBJ.EXE, as shown in the following separate com-
  343.                        mand lines:
  344.  
  345.                         bgiobj  cga
  346.                         bgiobj  trip
  347.                         bgiobj  goth
  348.  
  349.                        This creates three files: CGA.OBJ, TRIP.OBJ, and
  350.                        GOTH.OBJ.
  351.  
  352.                     2. You can add these object files to GRAPHICS.LIB with
  353.                        this TLIB command line:
  354.  
  355.                           tlib  graphics  +cga  +trip  +goth
  356.  
  357.                     3. If you don't add the object files to GRAPHICS.LIB,
  358.                        you must add the object file names CGA.OBJ,
  359.                        TRIP.OBJ, and GOTH.OBJ to your project list (if you
  360.                        are using Borland C++'s integrated environment), or
  361.                        to the BCC command line. For example, the BCC com-
  362.                        mand line would look like this:
  363.  
  364.                           BCc  niftgraf graphics.lib  cga.obj  trip.obj
  365.                        goth.obj
  366.  
  367.                     4. You register these files in your graphics program
  368.                        like this:
  369.  
  370.  If you ever get a      /* Header file declares CGA_driver, triplex_font &
  371.       linker error      gothic_font */
  372.    Segment exceeds      #include <graphics.h>
  373.  64K after linking
  374.    in some drivers      /* Register and check for errors (one never
  375.      and/or fonts,      knows...) */
  376.       refer to the
  377. following section.      if (registerbgidriver(CGA_driver) < 0) exit(1);
  378.                         if (registerbgifont(triplex_font) < 0) exit(1);
  379.                         if (registerbgifont(gothic_font)  < 0) exit(1);
  380.  
  381.                         /* ... */
  382.  
  383.  
  384.  
  385.                                    - 4 -
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.                         initgraph(....);     /* initgraph should be called
  393.                                                 after registering */
  394.  
  395.                         /* ... */
  396.  
  397.  
  398.      The /F option  =======================================================
  399.  
  400.                     This section explains what steps to take if you get the
  401.                     linker error Segment exceeds 64K (or a similar error)
  402.                     after linking in several driver and/or font files
  403.                     (especially with small- and compact-model programs).
  404.  
  405.                     By default, the files created by BGIOBJ.EXE all use the
  406.                     same segment (called _TEXT). This can cause problems if
  407.                     your program links in many drivers and/or fonts, or
  408.                     when you're using the small or compact memory model.
  409.  
  410.                     To solve this problem, you can convert one or more of
  411.                     the drivers or fonts with the BGIOBJ /F option. This
  412.                     option directs BGIOBJ to use a segment name of the form
  413.                     filename_TEXT, so that the default segment is not
  414.                     overburdened by all the linked-in drivers and fonts
  415.                     (and, in small and compact model programs, all the pro-
  416.                     gram code). For example, the following two BGIOBJ com-
  417.                     mand lines direct BGIOBJ to use segment names of the
  418.                     form EGAVGA_TEXT and SANS_TEXT.
  419.  
  420.                      bgiobj  /F  egavga
  421.                      bgiobj  /F  sans
  422.  
  423.                     When you select /F, BGIOBJ also appends F to the target
  424.                     object file name (EGAVGAF.OBJ, SANSF.OBJ, and so
  425.                     forth), and appends _far to the name that will be used
  426.                     with registerfarbgidriver and registerfarbgifont. (For
  427.                     example, EGAVGA_driver becomes EGAVGA_driver_far.)
  428.  
  429.                     For files created with /F, you must use these far
  430.                     registering routines instead of the regular
  431.                     registerbgidriver and registerbgifont. For example,
  432.  
  433.                      if (registerfarbgidriver(EGAVGA_driver_far) < 0)
  434.                      exit(1);
  435.                      if (registerfarbgifont(sansserif_font_far)  < 0)
  436.                      exit(1);
  437.  
  438.  
  439.  Advanced features  =======================================================
  440.  
  441.                     This section explains some of BGIOBJ's advanced
  442.                     features, and the routines registerfarbgidriver and
  443.                     registerfarbgifont. Only experienced users should use
  444.                     these features.
  445.  
  446.  
  447.  
  448.  
  449.                                    - 5 -
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.                     This is the full syntax of the BGIOBJ.EXE command line:
  457.  
  458.                        BGIOBJ  [/F] source destination public-name seg-name
  459.                     seg-class
  460.  
  461.                     This table describes each component of the BGIOBJ com-
  462.                     mand line.
  463.  
  464.  
  465.                     -------------------------------------------------------
  466.                     Component              Description
  467.                     -------------------------------------------------------
  468.  
  469.  
  470.                     /F or -F               This option instructs BGIOBJ.EXE
  471.                                            to use a segment name other than
  472.                                            _TEXT (the default), and to
  473.                                            change the public name and
  474.                                            destination file name. (See page
  475.                                            5 for a detailed discussion of
  476.                                            /F.)
  477.  
  478.                     source                 This is the driver or font file
  479.                                            to be converted. If the file is
  480.                                            not one of the driver/font files
  481.                                            shipped with Borland C++, you
  482.                                            should specify a full file name
  483.                                            (including extension).
  484.  
  485.                     destination            This is the name of the object
  486.                                            file to be produced. The default
  487.                                            destination file name is
  488.                                            source.OBJ, or sourceF.OBJ if
  489.                                            you use the /F option.
  490.  
  491.                     public-name            This is the name that will be
  492.                                            used in the program in a call to
  493.                                            registerbgidriver or
  494.                                            registerbgifont (or their
  495.                                            respective far versions) to link
  496.                                            in the object module.
  497.  
  498.                                            The public name is the external
  499.                                            name used by the linker, so it
  500.                                            should be the name used in the
  501.                                            program, prefixed with an
  502.                                            underscore. If your program uses
  503.                                            Pascal calling conventions, use
  504.                                            only uppercase letters, and do
  505.                                            not add an underscore.
  506.  
  507.                     seg-name               This is an optional segment
  508.                                            name; the default is _TEXT (or
  509.  
  510.  
  511.  
  512.  
  513.                                    - 6 -
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.                                            filename_TEXT if /F is
  521.                                            specified)
  522.  
  523.                     seg-class              This is an optional segment
  524.                                            class; the default is CODE.
  525.  
  526.                     -------------------------------------------------------
  527.  
  528.                     All parameters except source are optional. However, if
  529.                     you need to specify an optional parameter, all the
  530.                     parameters preceding it must also be specified.
  531.  
  532.                     If you choose to use your own public name(s), you have
  533.                     to add declaration(s) to your program, using one of the
  534.                     following forms:
  535.  
  536.                      void public_name(void);        /* if /F not used, */
  537.                                                     /* default segment name
  538.                      used */
  539.  
  540.                      extern int far public_name[];  /* if /F used, or */
  541.                                                     /* segment name not
  542.                      _TEXT */
  543.  
  544.                     In these declarations, public_name matches the public-
  545.                     name you used when converting with BGIOBJ. The
  546.                     graphics.h header file contains declarations of the
  547.                     default driver and font public names; if you use those
  548.                     default public names you don't have to declare them as
  549.                     just described.
  550.  
  551.                     After these declarations, you have to register all the
  552.                     drivers and fonts in your program. If you don't use the
  553.                     /F option and don't change the default segment name,
  554.                     you should register drivers and fonts through
  555.                     registerbgidriver and registerbgifont; otherwise, use
  556.                     registerfarbgidriver and registerfarbgifont.
  557.  
  558.                     Here is an example of a program that loads a font file
  559.                     into memory:
  560.  
  561.                      /* Example of loading a font file into memory */
  562.  
  563.                      #include <graphics.h>
  564.                      #include <io.h>
  565.                      #include <fcntl.h>
  566.                      #include <stdio.h>
  567.                      #include <conio.h>
  568.                      #include <stdlib.h>
  569.                      #include <process.h>
  570.                      #include <alloc.h>
  571.  
  572.                      main()
  573.                      {
  574.  
  575.  
  576.  
  577.                                    - 7 -
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.                         void    *gothic_fontp;    /* points to font buffer
  585.                      in memory */
  586.                         int      handle;          /* file handle used for
  587.                      I/O */
  588.                         unsigned fsize;           /* size of file (and
  589.                      buffer) */
  590.  
  591.                         int errorcode;
  592.                         int graphdriver;
  593.                         int graphmode;
  594.  
  595.                      /* open font file */
  596.                         handle = open("GOTH.CHR", O_RDONLY|O_BINARY);
  597.                         if (handle == -1)
  598.                         {
  599.                            printf("unable to open font file 'GOTH.CHR'\n");
  600.                            exit(1);
  601.                         }
  602.                      /* find out size of the file */
  603.                         fsize = filelength(handle);
  604.                      /* allocate buffer */
  605.                         gothic_fontp = malloc(fsize);
  606.                         if (gothic_fontp == NULL)
  607.                         {
  608.                           printf("unable to allocate memory for font file
  609.                      'GOTH.CHR'\n");
  610.                           exit(1);
  611.                         }
  612.                      /* read font into memory */
  613.                         if (read(handle, gothic_fontp, fsize) != fsize)
  614.                         {
  615.                            printf("unable to read font file 'GOTH.CHR'\n");
  616.                            exit(1);
  617.                         }
  618.                      /* close font file */
  619.                         close(handle);
  620.                      /* register font */
  621.                         if (registerfarbgifont(gothic_fontp) !=
  622.                      GOTHIC_FONT)
  623.                         {
  624.                            printf("unable to register font file
  625.                      'GOTH.CHR'\n");
  626.                            exit(1);
  627.                         }
  628.                      /* detect and initialize graphix */
  629.                         graphdriver = DETECT;
  630.                         initgraph(&graphdriver, &graphmode, "..");
  631.                         errorcode = graphresult();
  632.                         if (errorcode != grOk)
  633.                         {
  634.                            printf("graphics error:
  635.                      %s\n",grapherrormsg(errorcode));
  636.                            exit(1);
  637.                         }
  638.  
  639.  
  640.  
  641.                                    - 8 -
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.                         settextjustify(CENTER_TEXT, CENTER_TEXT);
  649.                         settextstyle(GOTHIC_FONT, HORIZ_DIR, 4);
  650.                         outtextxy(getmaxx()/2,getmaxy()/2,
  651.                                   "Borland Graphics Interface (BGI)");
  652.                      /* press a key to terminate */
  653.                         getch();
  654.                      /* shut down graphics system */
  655.                         closegraph();
  656.                         return(0);
  657.                      }
  658.  
  659.  
  660.  
  661. ===========================================================================
  662. CPP: The preprocessor
  663. ===========================================================================
  664.  
  665.     CPP produces a  Often, when the compiler reports an error inside a
  666.   list (in a file)  macro or an include file, you can get more information
  667.      of a C source  about what the error is if you can see the include
  668.   program in which  files or the results of the macro expansions. In many
  669.  include files and  multi-pass compilers, a separate pass performs this
  670.     #define macros  work, and the results of the pass can be examined.
  671.          have been  Since Borland C++ uses an integrated single-pass com-
  672.    expanded. It is  piler, we provided CPP to supply the first-pass
  673.     not needed for  functionality found in other compilers.
  674.     normal compil-
  675.        ations of C  You use CPP just as you would use BCC, the standalone
  676.          programs.  compiler. CPP reads the same TURBOC.CFG file for
  677.                     default options, and accepts the same command-line
  678.                     options as BCC.
  679.  
  680.                     The BCC options that don't pertain to CPP are simply
  681.                     ignored by CPP. To see the list of arguments handled by
  682.                     CPP, type cpp at the DOS prompt. To see how those
  683.                     arguments work, see Chapter 5 in the Programmer's
  684.                     Guide.
  685.  
  686.                     With one exception, the file names listed on the CPP
  687.                     command line are treated like they are in BCC, with
  688.                     wildcards allowed. The exception to this is that all
  689.                     files are treated as C source files. There is no
  690.                     special treatment for .OBJ, .LIB, or .ASM files.
  691.  
  692.                     For each file processed by CPP, the output is written
  693.                     to a file in the current directory (or the output
  694.                     directory named by the -n option) with the same name as
  695.                     the source name but with an extension of .I.
  696.  
  697.                     This output file is a text file containing each line of
  698.                     the source file and any include files. Any preproces-
  699.                     sing directive lines have been removed, along with any
  700.                     conditional text lines excluded from the compile.
  701.                     Unless you use a command-line option to specify other-
  702.  
  703.  
  704.  
  705.                                    - 9 -
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.                     wise, text lines are prefixed with the file name and
  713.                     line number of the source or include file the line came
  714.                     from. Within a text line, any macros are replaced with
  715.                     their expansion text.
  716.  
  717.         Important!  The resulting output of CPP cannot be compiled because
  718.                     of the file name and line number prefix attached to
  719.                     each source line.
  720.  
  721.  
  722.     CPP as a macro  =======================================================
  723.       preprocessor
  724.                     The -P option to CPP tells it to prefix each line with
  725.                     the source file name and line number. If you give it -
  726.                     P- (turning this option off), CPP omits this line
  727.                     number information. With this option turned off, CPP
  728.                     can be used as a macro preprocessor; the resulting .I
  729.                     file can then be compiled with BC or BCC.
  730.  
  731.  
  732.         An example  =======================================================
  733.  
  734.                     The following simple program illustrates how CPP
  735.                     preprocesses a file, first with -P selected, then with
  736.                     -P-.
  737.  
  738.                     Source file: HELLOAJ.C
  739.                      #define NAME "H.R. Floyd"
  740.                      #define BEGIN {
  741.                      #define END   }
  742.  
  743.                      main()
  744.                      BEGIN
  745.                         printf("%s\n", NAME);
  746.                      END
  747.  
  748.                     Command line used to invoke CPP as a preprocessor:
  749.                        CPP HELLOAJ.C
  750.  
  751.                     Output:
  752.                      HELLOAJ.c 1:
  753.                      HELLOAJ.c 2:
  754.                      HELLOAJ.c 3:
  755.                      HELLOAJ.c 4:
  756.                      HELLOAJ.c 5: main()
  757.                      HELLOAJ.c 6: {
  758.                      HELLOAJ.c 7:    printf("%s\n","H.R. Floyd");
  759.                      HELLOAJ.c 8: }
  760.  
  761.                     Command line used to invoke CPP as a macro
  762.                     preprocessor:
  763.                        CPP -P- HELLOAJ.C
  764.  
  765.                     Output:
  766.  
  767.  
  768.  
  769.                                   - 10 -
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.                      main()
  777.                      {
  778.                         printf("%s\n","H.R. Floyd");
  779.                      }
  780.  
  781.  
  782.  
  783. ===========================================================================
  784. GREP: A text-search utility
  785. ===========================================================================
  786.  
  787.                     GREP (Global Regular Expression Print) is a powerful
  788.                     text-search program derived from the UNIX utility of
  789.                     the same name. GREP searches for a text pattern in one
  790.                     or more files or in its standard input stream.
  791.  
  792.                     Here's a quick example of a situation where you might
  793.                     want to use GREP. Suppose you wanted to find out which
  794.                     text files in your current directory contained the
  795.                     string "Bob". You would issue the command
  796.  
  797.                        grep Bob *.txt
  798.  
  799.                     and GREP would respond with a list of the lines in each
  800.                     file (if any) that contained the string "Bob". Because
  801.                     the default for GREP is to ignore case, the strings
  802.                     "bob" and "BoB" would also be considered matches. You
  803.                     can use options to make your search case sensitive.
  804.  
  805.                     GREP can do a lot more than match a single, fixed
  806.                     string. In the section that follows, you'll see how to
  807.                     make GREP search for any string that matches a
  808.                     particular pattern.
  809.  
  810.  
  811.       Command-line  =======================================================
  812.             syntax
  813.                     The general command-line syntax for GREP is
  814.  
  815.                       grep [options] searchstring [file(s) ... ]
  816.  
  817.                     options consist of one or more letters, preceded by a
  818.                     hyphen (-), that let you change various aspects of
  819.                     GREP's behavior.
  820.  
  821.                     searchstring gives the pattern to search for.
  822.  
  823.                     file(s) tells GREP which files to search. (If you don't
  824.                     specify a file, GREP searches its standard input; this
  825.                     lets you use GREP with pipes and redirection.) If you
  826.                     find that the results of your GREP are longer than one
  827.                     screen, you can redirect the output to a file. For
  828.                     example, you could use this command
  829.  
  830.  
  831.  
  832.  
  833.                                   - 11 -
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.                        GREP "Bob" *.txt >gfile
  841.  
  842.                     which searches all files in the current directory that
  843.                     end with .TXT, then places the results in a file called
  844.                     GFILE. (You can name this file anything you like.)
  845.                     Then, use your word processor (or Borland C++'s editor)
  846.                     to access GFILE to read the results of the search.
  847.  
  848.                     The command
  849.  
  850.                        GREP ?
  851.  
  852.                     prints a brief help screen showing GREP's command-line
  853.                     options, special characters, and defaults. (See the
  854.                     description of the -u command-line option for
  855.                     information on how to change GREP's defaults.)
  856.  
  857.  
  858.       GREP options  =======================================================
  859.  
  860.                     In the command line, options are one or more single
  861.                     characters preceded by a hyphen (-). Each individual
  862.                     character is a switch that you can turn on or off: A
  863.                     plus symbol (+) after a character turns the option on;
  864.                     a hyphen (-) after the character turns the option off.
  865.                     The + sign is optional; for example, -r means the same
  866.                     thing as -r+. You can list multiple options
  867.                     individually (like this: -i -d -l), or you can combine
  868.                     them (like this: -ild or -il, -d, and so on); it's all
  869.                     the same to GREP.
  870.  
  871.                     Here are the GREP option characters and their meanings:
  872.  
  873.  
  874. ------------------------------------------------------------------------------
  875. Option Meaning
  876. ------------------------------------------------------------------------------
  877.  
  878.  
  879.   -c   Match Count only: Prints only a count of matching lines. For each file
  880.        that contains at least one matching line, GREP prints the file name and
  881.        a count of the number of matching lines. Matching lines are not
  882.        printed. This option is off by default.
  883.  
  884.   -d   Search subdirectories: For each file specified on the command line,
  885.        GREP searches for all files that match the file specification, both in
  886.        the directory specified and in all subdirectories below the specified
  887.        directory. If you give a file without a path, GREP assumes the files
  888.        are in the current directory. This option is off by default.
  889.  
  890.   -i   Ignore case: GREP ignores upper/lowercase differences (case folding).
  891.        When this option is on, GREP treats all letters a to z as identical to
  892.        the corresponding letters A to Z in all situations. This option is on
  893.        by default.
  894.  
  895.  
  896.  
  897.                                   - 12 -
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.   -l   List file names only: Prints only the name of each file containing a
  905.        match. After GREP finds a match, it prints the file name and processing
  906.        immediately moves on to the next file. This option is off by default.
  907.  
  908.   -n   Line Numbers: Each matching line that GREP prints is preceded by its
  909.        line number. This option is off by default.
  910.  
  911.   -o   UNIX output format: Changes the output format of matching lines to
  912.        support more easily the UNIX style of command-line piping. All lines of
  913.        output are preceded by the name of the file that contained the matching
  914.        line. This option is off by default.
  915.  
  916.   -r   Regular expression search: The text defined by searchstring is treated
  917.        as a regular expression instead of as a literal string. This option is
  918.        on by default. This option is on by default.
  919.  
  920.        A regular expression is one or more occurrences of one or more
  921.        characters optionally enclosed in quotes. The following symbols are
  922.        treated specially:
  923.         ^  start of line       $  end of line
  924.         .  any character       \  quote next character
  925.         *  match zero or more  +  match one or more
  926.  
  927.         [aeiou0-9]             match a, e, i, o, u, and 0 thru 9
  928.         [^aeiou0-9]            match anything but a, e, i, o, u, and 0 thru 9
  929.  
  930.   -u   Update options: GREP will combine the options given on the command line
  931.        with its default options and write these to the GREP.COM file as the
  932.        new defaults. (In other words, GREP is self-configuring.) This option
  933.        allows you to tailor the default option settings to your own taste. If
  934.        you want to see what the defaults are in a particular copy of GREP.COM,
  935.        type
  936.  
  937.         GREP ?
  938.  
  939.        at the DOS prompt. Each option on the help screen will be followed by a
  940.        + or a - depending on its default setting. This option is off by
  941.        default.
  942.  
  943.   -v   Nonmatch: Prints only nonmatching lines. Only lines that do not contain
  944.        the search string are considered to be nonmatching lines. This option
  945.        is off by default.
  946.  
  947.   -w   Word search: Text found that matches the regular expression is
  948.        considered a match only if the character immediately preceding and
  949.        following cannot be part of a word. The default word character set
  950.        includes A to Z, 0 to 9, and the underscore ( _ ). This option is off
  951.        by default.
  952.  
  953.        An alternate form of this option lets you specify the set of legal word
  954.        characters. Its form is -w[set], where set is any valid regular
  955.        expression set definition.
  956.  
  957.  
  958.  
  959.  
  960.  
  961.                                   - 13 -
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.        If you define the set with alphabetic characters, it is automatically
  969.        defined to contain both the uppercase and lowercase values for each
  970.        letter in the set (regardless of how it is typed), even if the search
  971.        is case-sensitive. If you use the -w option in combination with the -u
  972.        option, the new set of legal characters is saved as the default set.
  973.  
  974.   -z   Verbose: GREP prints the file name of every file searched. Each
  975.        matching line is preceded by its line number. A count of matching lines
  976.        in each file is given, even if the count is zero. This option is off by
  977.        default.
  978.  
  979. ------------------------------------------------------------------------------
  980.  
  981.  
  982. ------------------  Remember that each of GREP's options is a switch: Its
  983.           Order of  state reflects the way you last set it. At any given time,
  984.         precedence  each option can only be on or off. Each occurrence of a
  985. ------------------  given option on the command line overrides its previous
  986.                     definition. Given this command line,
  987.  
  988.                        grep -r -i - -d -i -r -  main( my*.c
  989.  
  990.                     GREP runs with the -d option on, the -i option on, and the
  991.                     -r option off.
  992.  
  993.                     You can install your preferred default setting for each
  994.                     option in GREP.COM with the -u option. For example, if you
  995.                     want GREP to always do a verbose search (-z on), you can
  996.                     install it with the following command:
  997.  
  998.                        grep -u -z
  999.  
  1000.  
  1001.  The search string  ==========================================================
  1002.  
  1003.                     To use GREP well, you'll need to become proficient at
  1004.                     writing search strings. The value of searchstring defines
  1005.                     the pattern GREP searches for. A search string can be
  1006.                     either a regular expression or a literal string.
  1007.  
  1008.                     o In a regular expression, certain characters have special
  1009.                       meanings: They are operators that govern the search.
  1010.  
  1011.                     o In a literal string, there are no operators: Each
  1012.                       character is treated literally.
  1013.  
  1014.                     You can enclose the search string in quotation marks to
  1015.                     prevent spaces and tabs from being treated as delimiters.
  1016.                     The text matched by the search string cannot cross line
  1017.                     boundaries; that is, all the text necessary to match the
  1018.                     pattern must be on a single line.
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.                                   - 14 -
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.                     A regular expression is either a single character or a set
  1033.                     of characters enclosed in brackets. A concatenation of
  1034.                     regular expressions is a regular expression.
  1035.  
  1036.  
  1037. ------------------  When you use the -r option (on by default), the search
  1038.       Operators in  string is treated as a regular expression (not a literal
  1039.            regular  expression). The following characters take on special
  1040.        expressions  meanings:
  1041. ------------------
  1042.  
  1043. ---------------------------------------------------------------------------
  1044. Option Meaning
  1045. ---------------------------------------------------------------------------
  1046.  
  1047.  
  1048.   ^    A circumflex at the start of the expression matches the start of a
  1049.        line.
  1050.  
  1051.   $    A dollar sign at the end of the expression matches the end of a
  1052.        line.
  1053.  
  1054.   .    A period matches any character.
  1055.  
  1056.   *    An expression followed by an asterisk wildcard matches zero or more
  1057.        occurrences of that expression. For example, in to*, the * operates
  1058.        on the expression o; it matches t, to, too, etc. (t followed by zero
  1059.        or more os), but doesn't match ta.
  1060.  
  1061.   +    An expression followed by a plus sign matches one or more
  1062.        occurrences of that expression: to+ matches to, too, etc., but not
  1063.        t.
  1064.  
  1065.   [ ]  A string enclosed in brackets matches any character in that string,
  1066.        but no others. If the first character in the string is a circumflex
  1067.        (^), the expression matches any character except the characters in
  1068.        the string.
  1069.  
  1070.        For example, [xyz] matches x, y, or z, while [^xyz] matches a and b,
  1071.        but not x, y, or z. You can specify a range of characters with two
  1072.        characters separated by a hyphen (-). These can be combined to form
  1073.        expressions (like [a-bd-z?], which matches the ? character and any
  1074.        lowercase letter except c).
  1075.  
  1076.   \    The backslash escape character tells GREP to search for the literal
  1077.        character that follows it. For example, \. matches a period instead
  1078.        of "any character." The backslash can be used to quote itself; that
  1079.        is, you can use \\ to indicate a literal backslash character in a
  1080.        GREP expression.
  1081.  
  1082. ---------------------------------------------------------------------------
  1083.  
  1084.               Note  Four of the "special" characters ($, ., *, and +) don't
  1085.                     have any special meaning when used within a bracketed
  1086.  
  1087.  
  1088.  
  1089.                                   - 15 -
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.                     set. In addition, the character ^ is only treated
  1097.                     specially if it immediately follows the beginning of
  1098.                     the set definition (immediately after the [ delimiter).
  1099.  
  1100.                     Any ordinary character not mentioned in the preceding
  1101.                     list matches that character. For example, the greater
  1102.                     than sign, >, matches the greater than sign (>), #
  1103.                     matches #, and so on.
  1104.  
  1105.  
  1106.               File  =======================================================
  1107.     specifications
  1108.                     file(s) tells GREP which files (or groups of files) to
  1109.                     search. file(s) can be an explicit file name, or a
  1110.                     "generic" file name incorporating the DOS ? and *
  1111.                     wildcards. In addition, you can enter a path (drive and
  1112.                     directory information) as part of file(s). If you give
  1113.                     file(s) without a path, GREP searches the current
  1114.                     directory.
  1115.  
  1116.                     If you don't specify any files, input to GREP must come
  1117.                     from redirection (<) or a vertical bar (|).
  1118.  
  1119.  
  1120. Some GREP examples  =======================================================
  1121.  
  1122.                     The following examples show how to combine GREP's
  1123.                     features to do different kinds of searches. They assume
  1124.                     GREP's default settings are unchanged.
  1125.  
  1126.  
  1127. ------------------  The search string here tells GREP to search for the
  1128.          Example 1  word main with no preceding lowercase letters ([^a-z]),
  1129. ------------------  followed by zero or more occurrences of blank spaces
  1130.                     (\ *), then a left parenthesis.
  1131.  
  1132.                     Since spaces and tabs are normally considered to be
  1133.                     command-line delimiters, you must quote them if you
  1134.                     want to include them as part of a regular expression.
  1135.                     In this case, the space after main is quoted with the
  1136.                     backslash escape character. You could also accomplish
  1137.                     this by placing the space in double quotes.
  1138.  
  1139.                     Command line:
  1140.                                 grep -r [^a-z]main\ *( *.c
  1141.  
  1142.                     Matches:    main(i:integer)
  1143.                                 main(i,j:integer)
  1144.                                 if (main  ()) halt;
  1145.                                 if (MAIN  ()) halt;
  1146.  
  1147.                     Does not match:
  1148.                                 mymain()
  1149.  
  1150.  
  1151.  
  1152.  
  1153.                                   - 16 -
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.                     Files searched:
  1161.                                 *.C in current directory.
  1162.  
  1163.  
  1164. ------------------  Because the backslash (\) and period (.) characters
  1165.          Example 2  usually have special meaning in path and file names,
  1166. ------------------  you must place the backslash escape character immedi-
  1167.                     ately in front of them if you want to search for them.
  1168.                     The -i option is used here, so the search is not case
  1169.                     sensitive.
  1170.  
  1171.                     Command line:
  1172.                                 grep -ri [a-c]:\\data\.fil *.c *.inc
  1173.  
  1174.                     Matches:    A:\data.fil
  1175.                                 c:\Data.Fil
  1176.                                 B:\DATA.FIL
  1177.  
  1178.                     Does not match:
  1179.                                 d:\data.fil
  1180.                                 a:data.fil
  1181.  
  1182.                     Files searched:
  1183.                                 *.C and *.INC in current directory.
  1184.  
  1185.  
  1186. ------------------  This format defines how to search for a given word.
  1187.          Example 3
  1188. ------------------  Command line:
  1189.                                 grep -ri [^a-z]word[^a-z] *.doc
  1190.  
  1191.                     Matches:    every new word must be on a new line.
  1192.                                 MY WORD!
  1193.                                 word--smallest unit of speech.
  1194.                                 In the beginning there was the WORD, and
  1195.                                 the WORD
  1196.  
  1197.                     Does not match:
  1198.                                 Each file has at least 2000 words.
  1199.                                 He misspells toward as toword.
  1200.  
  1201.                     Files searched:
  1202.                                 *.DOC in the current directory.
  1203.  
  1204.  
  1205. ------------------  This format defines another, even more basic single-
  1206.          Example 4  word search.
  1207. ------------------
  1208.                     Command line:
  1209.                                 grep -iw word *.doc
  1210.  
  1211.                     Matches:    every new word must be on a new line
  1212.                                 However,
  1213.                                 MY WORD!
  1214.  
  1215.  
  1216.  
  1217.                                   - 17 -
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.                                 word: smallest unit of speech which conveys
  1225.                                 In the beginning there was the WORD, and
  1226.  
  1227.                     Does not match:
  1228.                                 each document contains at least 2000 words!
  1229.                                 He seems to continually misspell "toward"
  1230.                                 as "toword."
  1231.  
  1232.                     Files searched:
  1233.                                 *.DOC in the current directory.
  1234.  
  1235.  
  1236. ------------------  This is an example of how to search for a string with
  1237.          Example 5  embedded spaces.
  1238. ------------------
  1239.                     Command line:
  1240.                                 grep "search string with spaces" *.doc *.c
  1241.                                 a:\work\myfile.*
  1242.  
  1243.                     Matches:    This is a search string with spaces in it.
  1244.  
  1245.                     Does not match:
  1246.                                 This search string has spaces in it.
  1247.  
  1248.                     Files searched:
  1249.                                 *.DOC and *.C in the current directory, and
  1250.                                 MYFILE.* in a directory called \WORK on
  1251.                                 drive A.
  1252.  
  1253.  
  1254. ------------------  This example searches for any one of the characters
  1255.          Example 6  " . : ? ' and , at the end of a line.
  1256. ------------------
  1257.                     The double quote within the range is preceded by an
  1258.                     escape character so it is treated as a normal character
  1259.                     instead of as the ending quote for the string. Also,
  1260.                     the $ character appears outside of the quoted string.
  1261.                     This demonstrates how regular expressions can be
  1262.                     concatenated to form a longer expression.
  1263.  
  1264.                     Command line:
  1265.                                 grep -rd "[ ,.:?'\"]"$ \*.doc
  1266.  
  1267.                     Matches:    He said hi to me.
  1268.                                 Where are you going?
  1269.                                 In anticipation of a unique situation,
  1270.                                 Examples include the following:
  1271.                                 "Many men smoke, but fu man chu."
  1272.  
  1273.                     Does not match:
  1274.                                 He said "Hi" to me
  1275.                                 Where are you going? I'm headed to the
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.                                   - 18 -
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.                     Files searched:
  1289.                                 *.DOC in the root directory and all its
  1290.                                 subdirectories on the current drive.
  1291.  
  1292.  
  1293. ------------------  This example ignores case and just prints the names of
  1294.          Example 7  any files that contain at least one match. The three
  1295. ------------------  command-line examples show different ways of specifying
  1296.                     multiple options.
  1297.  
  1298.                     Command line:
  1299.                                 grep -ild " the " \*.doc
  1300.                                 or
  1301.                                 grep -i -l -d " the " \*.doc
  1302.                                 or
  1303.                                 grep -il -d " the " \*.doc
  1304.  
  1305.                     Matches:    Anyway, this is the time we have
  1306.                                 do you think? The main reason we are
  1307.  
  1308.                     Does not match:
  1309.                                 He said "Hi" to me just when I
  1310.                                 Where are you going? I'll bet you're headed
  1311.  
  1312.                     Files searched:
  1313.                                 *.DOC in the root directory and all its
  1314.                                 subdirectories on the current drive.
  1315.  
  1316.  
  1317. ------------------  This example redefines the current set of legal
  1318.          Example 8  characters for a word as the assignment operator (=)
  1319. ------------------  only, then does a word search. It matches C assignment
  1320.                     statements, which use a single equal sign (=), but not
  1321.                     equality tests, which use a double equal sign (==).
  1322.  
  1323.                     Command line:
  1324.                                 grep -w[=] = *.c
  1325.  
  1326.                     Matches:    i = 5;
  1327.                                 j=5;
  1328.                                 i += j;
  1329.  
  1330.                     Does not match:
  1331.                                 if (i == t) j++;
  1332.                                 /* ======================= */
  1333.  
  1334.                     Files searched:
  1335.                                 *.C in the current directory.
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.                                   - 19 -
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352. ===========================================================================
  1353. OBJXREF: The object module cross-reference utility
  1354. ===========================================================================
  1355.  
  1356.                     OBJXREF examines a list of object files and library
  1357.                     files and produces reports on their contents. One type
  1358.                     of report lists definitions of public names and
  1359.                     references to them. The other type lists the segment
  1360.                     sizes defined by object modules.
  1361.  
  1362.                     There are two categories of public names: global
  1363.                     variables and function names. The TEST1.C and TEST2.C
  1364.                     files in the section "Sample OBJXREF reports" (page 25)
  1365.                     illustrate definitions of public names and external
  1366.                     references to them.
  1367.  
  1368.                     Object modules are object (.OBJ) files produced by BC,
  1369.                     BCC or TASM. A library (.LIB) file contains multiple
  1370.                     object modules. An object module generated by BC is
  1371.                     given the same name as the .C source file it was com-
  1372.                     piled from. This is also true for BCC, unless a
  1373.                     different output file name is specifically indicated
  1374.                     with the -o BCC command-line option.
  1375.  
  1376.  
  1377.   The OBJXREF com-  =======================================================
  1378.          mand line
  1379.                     The OBJXREF command line consists of the word OBJXREF
  1380.                     followed by a series of command-line options and a list
  1381.                     of object and library file names, separated by a space
  1382.                     or tab character. The syntax is as follows:
  1383.  
  1384.                       OBJXREF  options   filename  filename ...
  1385.  
  1386.                     The command-line options determine the kind of reports
  1387.                     that OBJXREF will generate and the amount of detail
  1388.                     that OBJXREF will provide. They are discussed in more
  1389.                     detail in the next section.
  1390.  
  1391.                     Each option begins with a forward slash (/) followed by
  1392.                     a one- or two-character option name.
  1393.  
  1394.                     Object files and library files may be specified either
  1395.                     on the command line or in a response file. On the com-
  1396.                     mand line, file names are separated by a space or a
  1397.                     tab. All object modules specified as .OBJ files are
  1398.                     included in reports. Like TLINK, however, OBJXREF
  1399.                     includes only those modules from .LIB files which
  1400.                     contain a public name referenced by an .OBJ file or by
  1401.                     a previously included module from a .LIB file.
  1402.  
  1403.                     As a general rule, you should list all the .OBJ and
  1404.                     .LIB files that are needed if the program is to link
  1405.  
  1406.  
  1407.  
  1408.  
  1409.                                   - 20 -
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.                     correctly, including the startup .OBJ file and one or
  1417.                     more C libraries.
  1418.  
  1419.                     File names may include a drive and directory path. The
  1420.                     DOS ? and * wildcard characters may be used to identify
  1421.                     more than one file. File names may refer to .OBJ object
  1422.                     files or to .LIB library files. (If you don't give a
  1423.                     file extension, the .OBJ extension is assumed.)
  1424.  
  1425.                     Options and file names may occur in any order in the
  1426.                     command line.
  1427.  
  1428.                     OBJXREF reports are written to the DOS standard output.
  1429.                     The default is the screen. The reports can be sent to a
  1430.                     printer (as with >LPT1:) or to a file (as with
  1431.                     >lstfile) with the DOS redirection character (>).
  1432.  
  1433.                     Entering OBJXREF with no file names or options produces
  1434.                     a summary of available options.
  1435.  
  1436.  
  1437. ------------------  OBJXREF command-line options fall into two categories:
  1438.        The OBJXREF  control options and report options.
  1439.       command-line
  1440.            options
  1441. ------------------  Control options
  1442.                     =======================================================
  1443.  
  1444.                     Control options modify the default behavior of OBJXREF
  1445.                     (the default is that none of these options are
  1446.                     enabled).
  1447.  
  1448.  
  1449.                     -------------------------------------------------------
  1450.                     Option Meaning
  1451.                     -------------------------------------------------------
  1452.  
  1453.  
  1454.                       /I   Ignore case differences in public names. Use
  1455.                            this option if you use TLINK without the /C
  1456.                            option (which makes case differences
  1457.                            significant).
  1458.  
  1459.                       /D   Look for .OBJ files in another directory. If you
  1460.                            want OBJXREF to look for .OBJ files in a
  1461.                            directory other than the current one, include
  1462.                            the directory name on the command line, prefixed
  1463.                            with /D:
  1464.  
  1465.                               OBJXREF /Ddir1 [; dir2 [; dir3]]
  1466.  
  1467.                            or
  1468.  
  1469.                               OBJXREF /Ddir1 [/Ddir2] [/Ddir3]
  1470.  
  1471.  
  1472.  
  1473.                                   - 21 -
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.                            OBJXREF will search each of the directories in
  1481.                            the specified order for all object and library
  1482.                            files.
  1483.  
  1484.         Important!         If you don't use a /D option, OBJXREF will
  1485.                            search only the current directory. If you do use
  1486.                            a /D option, however, the current directory will
  1487.                            not be searched unless it is included in the
  1488.                            directory list. For example, if you wanted
  1489.                            OBJXREF to search first the BORLAND directory
  1490.                            and then the current directory for files, you
  1491.                            would enter
  1492.  
  1493.                               OBJXREF /Dborland;.
  1494.  
  1495.                            The period denotes the current directory.
  1496.  
  1497.  
  1498.                       /F   Include full library. All object modules in
  1499.                            specified .LIB files are included even if they
  1500.                            do not contain public names that are referenced
  1501.                            by an object module being processed by OBJXREF.
  1502.                            This provides information on the entire contents
  1503.                            of a library file. (See example 4 in the section
  1504.                            "OBJXREF examples.")
  1505.  
  1506.                       /O   Allows you to specify an output file where
  1507.                            OBJXREF will send any reports generated. Its
  1508.                            syntax is as follows:
  1509.  
  1510.                               OBJXREF filename.obj /report option
  1511.                               /Ooutputfilename.ext
  1512.  
  1513.                            By default all output is sent to the screen.
  1514.  
  1515.  
  1516.                       /V   Verbose output. Lists names of files read and
  1517.                            displays totals of public names, modules,
  1518.                            segments, and classes.
  1519.  
  1520.                       /Z   Include zero-length segment definitions. Object
  1521.                            modules may define a segment without allocating
  1522.                            any space in it. Listing these zero length
  1523.                            segment definitions normally makes the module
  1524.                            size reports harder to use but it can be
  1525.                            valuable if you are trying to remove all defini-
  1526.                            tions of a segment.
  1527.  
  1528.                     -------------------------------------------------------
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.                                   - 22 -
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.                     Report options
  1545.                     =======================================================
  1546.  
  1547.                     Report options govern what sort of report is generated,
  1548.                     and the amount of detail that OBJXREF provides.
  1549.  
  1550.  
  1551.                     -------------------------------------------------------
  1552.                     Option Report generated
  1553.                     --------------------------------------------------
  1554.  
  1555.  
  1556.                       /RC  Report by class type: Module sizes ordered
  1557.                            by class type of segment.
  1558.  
  1559.                       /RM  Report by module: Public names ordered by
  1560.                            defining module.
  1561.  
  1562.                       /RP  Report by public names: Public names in
  1563.                            order with defining module name.
  1564.  
  1565.        This is the    /RR  Report by reference: Public name defini-
  1566.           default.         tions and references ordered by name.
  1567.  
  1568.                       /RS  Report of module sizes: Module sizes
  1569.                            ordered by segment name.
  1570.  
  1571.                       /RU  Report of unreferenced symbol names:
  1572.                            Unreferenced public names ordered by
  1573.                            defining module.
  1574.  
  1575.                       /RV  Verbose reporting: OBJXREF produces a
  1576.                            report of every type.
  1577.  
  1578.                       /RX  Report by external reference: External
  1579.                            references ordered by referencing module
  1580.                            name.
  1581.  
  1582.                     --------------------------------------------------
  1583.  
  1584.                     Public names defined in .C files appear in reports with
  1585.                     a leading underscore in the reports unless the -U-
  1586.                     option was specified when the file was compiled (main
  1587.                     appears as _main).
  1588.  
  1589.                     You can limit the modules, segments, classes, or public
  1590.                     names that OBJXREF reports on by entering the
  1591.                     appropriate name on the command line prefixed with the
  1592.                     /N option. For example,
  1593.  
  1594.                        OBJXREF filelist /RM /NC0
  1595.  
  1596.                     tells OBJXREF to generate a report listing information
  1597.                     only for the module named C0.
  1598.  
  1599.  
  1600.  
  1601.                                   - 23 -
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.     Response files  =======================================================
  1609.  
  1610.                     The command line is limited by DOS to a maximum of 128
  1611.                     characters. If your list of options and file names will
  1612.                     exceed this limit, you must place your file names in a
  1613.                     response file.
  1614.  
  1615.                     A response file is a text file that you make with a
  1616.                     text editor. Since you may already have prepared a list
  1617.                     of the files that make up your program for other
  1618.                     Borland C++ programs, OBJXREF recognizes several
  1619.                     response file types.
  1620.  
  1621.                     Response files are called from the command line using
  1622.                     one of the following options. The response file name
  1623.                     must follow the option without an intervening space
  1624.                     (so, for example, you would type /Lresp, not /L resp).
  1625.  
  1626.                     You can specify more than one response file on the com-
  1627.                     mand line; additional .OBJ and .LIB file names can
  1628.                     precede or follow them.
  1629.  
  1630.  
  1631. ------------------  You can create a free-form response file with a text
  1632. Free-form response  editor. Just list the names of all .OBJ and .LIB files
  1633.              files  needed to make your .EXE file.
  1634. ------------------
  1635.      Any file name  To use free-form files with OBJXREF, type in each
  1636.      listed in the  response file name on the command line, preceded by an
  1637.      response file  @, and separate it from other command-line entries with
  1638.  without an exten-  a space or tab:
  1639. sion is assumed to
  1640.   be an .OBJ file.     @filename  @filename ...
  1641.  
  1642.  
  1643. ------------------  You can also use project files of the type generated by
  1644.      Project files  Borland C++'s integrated environment as response files.
  1645. ------------------  In the command line, precede the project file name with
  1646.                     /P, like this:
  1647.  
  1648.                        /Pfilename
  1649.  
  1650.                     If the file name does not include an explicit exten-
  1651.                     sion, a .PRJ extension is assumed.
  1652.  
  1653.                     File names in the project file with a .C extension or
  1654.                     no extension are interpreted as specifying the
  1655.                     corresponding .OBJ file. You need not remove file
  1656.                     dependencies specified inside parentheses; they are
  1657.                     ignored by OBJXREF.
  1658.  
  1659.               Note
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.                                   - 24 -
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.                     By itself, the list of files in a .PRJ file does not
  1673.                     specify a complete program--you must also specify a
  1674.                     startup file (C0x.OBJ) and one or more Borland C++
  1675.                     library files (MATHX.LIB, EMU.LIB, and CX.LIB, for
  1676.                     example). In addition, you may need to use the /D
  1677.                     option to specify the directory where OBJXREF should
  1678.                     look for your .OBJ files.
  1679.  
  1680.  
  1681. ------------------  Files in TLINK response-file format can also be used by
  1682.    Linker response  OBJXREF. A linker response file called from the command
  1683.              files  line is preceded by /L, like so:
  1684. ------------------
  1685.                        /Lfilename
  1686.  
  1687.                     To see how to use one of these files, refer to Example
  1688.                     2 in the section "Examples of how to use OBJXREF."
  1689.  
  1690.  
  1691.     Sample OBJXREF  =======================================================
  1692.            reports
  1693.                     Suppose you have two source files in your Borland C++
  1694.                     directory, and want to generate OBJXREF reports on the
  1695.                     object files compiled from them. The source files are
  1696.                     called TEST1.C and TEST2.C, and they look like this:
  1697.  
  1698.                      /* test1.c */
  1699.                      int i1;                       /* defines i1 */
  1700.                      extern int i2;                /* refers to i2 */
  1701.                      static int i3;                /* not a public name */
  1702.                      extern void look(void);       /* refers to look */
  1703.  
  1704.                      void main(void)               /* defines main */
  1705.                      {
  1706.                         int i4;                    /* not a public name */
  1707.  
  1708.                         look();                    /* refers to look */
  1709.                      }
  1710.  
  1711.                      /* test2.c */
  1712.                      #include <process.h>
  1713.                      extern int i1;                /* refers to i1 */
  1714.                      int i2;                       /* defines i2 */
  1715.  
  1716.                      void look(void)               /* defines look */
  1717.                      {
  1718.                         exit(i1);                  /* refers to exit... */
  1719.                      }                             /* and to i1 */
  1720.  
  1721.                     The object modules compiled from these source files are
  1722.                     TEST1.OBJ and TEST2.OBJ. You can tell OBJXREF what kind
  1723.                     of report to generate about these .OBJ files by
  1724.                     entering the file names on the command line, followed
  1725.                     by a /R and a second letter denoting report type.
  1726.  
  1727.  
  1728.  
  1729.                                   - 25 -
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.               Note  The following examples show only useful parts of the
  1737.                     output.
  1738.  
  1739.  
  1740. ------------------  A report by public names lists each of the public names
  1741.   Report by public  defined in the object modules being reported on,
  1742.        names (/RP)  followed by the name of the module in which it is
  1743. ------------------  defined.
  1744.  
  1745.                     If you enter this on the command line:
  1746.  
  1747.                        OBJXREF  /RP  test1  test2
  1748.  
  1749.                     OBJXREF generates a report that looks like this:
  1750.  
  1751.                      SYMBOL           DEFINED IN
  1752.                      _i1              TEST1
  1753.                      _i2              TEST2
  1754.                      _look            TEST2
  1755.                      _main            TEST1
  1756.  
  1757.  
  1758. ------------------  A report by module lists each object module being
  1759.   Report by module  reported on, followed by a list of the public names
  1760.              (/RM)  defined in it.
  1761. ------------------
  1762.                     If you enter this on the command line:
  1763.  
  1764.                        OBJXREF  /RM  test1  test2
  1765.  
  1766.                     OBJXREF generates a report that looks like this:
  1767.  
  1768.                      MODULE: TEST1 defines the following symbols:
  1769.                              public: _i1
  1770.                              public: _main
  1771.                      MODULE: TEST2 defines the following symbols:
  1772.                              public: _i2
  1773.                              public: _look
  1774.  
  1775.  
  1776. ------------------  A report by reference lists each public name with the
  1777.          Report by  defining module in parentheses on the same line.
  1778.    reference (/RR)  Modules that refer to this public name are listed on
  1779. ------------------  following lines indented from the left margin.
  1780.  
  1781.        This is the  If you enter this on the command line:
  1782.      default if no
  1783.   report option is     OBJXREF  /RR  C0  test1  test2  CS.LIB
  1784.         specified.
  1785.                     OBJXREF generates a report that looks like this:
  1786.  
  1787.                      _exit (EXIT)
  1788.                           C0
  1789.  
  1790.  
  1791.  
  1792.  
  1793.                                   - 26 -
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.                           TEST2
  1801.                      _i1 (TEST1)
  1802.                           TEST2
  1803.                      _i2 (TEST2)
  1804.                      _look (TEST2)
  1805.                           TEST1
  1806.                      _main (TEST1)
  1807.                           C0
  1808.  
  1809.  
  1810. ------------------  A report by external references lists each module
  1811. Report by external  followed by a list of external references it contains.
  1812.   references (/RX)
  1813. ------------------  If you enter this on the command line:
  1814.  
  1815.                        OBJXREF  /RX  C0  test1  test2  CS.LIB
  1816.  
  1817.                     OBJXREF generates a report that looks like this:
  1818.  
  1819.                      MODULE: C0 references the following symbols:
  1820.                              _main
  1821.                      MODULE: TEST1 references the following symbols:
  1822.                              _i2
  1823.                              _look
  1824.                      MODULE: TEST2 references the following symbols:
  1825.                              _exit
  1826.                              _i1
  1827.  
  1828.  
  1829. ------------------  A report by sizes lists segment names followed by a
  1830.   Report of module  list of modules that define the segment. Sizes in bytes
  1831.        sizes (/RS)  are given in decimal and hexadecimal notation. The word
  1832. ------------------  uninitialized appears where no initial values are
  1833.                     assigned to any of the symbols defined in the segment.
  1834.                     Segments defined at absolute addresses in a .ASM file
  1835.                     are flagged Abs to the left of the segment size.
  1836.  
  1837.                     If you enter this on the command line:
  1838.  
  1839.                        OBJXREF  /RS  test1  test2
  1840.  
  1841.                     OBJXREF generates a report that looks like this:
  1842.  
  1843.   These files were   TEST1_TEXT
  1844. compiled using the           6 (00006h)   TEST1
  1845.       large memory           6 (00006h)   total
  1846.             model.   TEST2_TEXT
  1847.                             10 (0000Ah)   TEST2
  1848.                             10 (0000Ah)   total
  1849.                      _BSS
  1850.                              4 (00004h)   TEST1, uninitialized
  1851.                              2 (00002h)   TEST2, uninitialized
  1852.                              6 (00006h)   total
  1853.  
  1854.  
  1855.  
  1856.  
  1857.                                   - 27 -
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864. ------------------  A report by class type lists segment size definitions
  1865.    Report by class  by segment class. The CODE class contains instructions,
  1866.         type (/RC)  DATA class contains initialized data and BSS class
  1867. ------------------  contains uninitialized data. Segments which do not have
  1868.                     a class type will be listed under the notation No class
  1869.                     type.
  1870.  
  1871.                     If you enter this on the command line:
  1872.  
  1873.                        OBJXREF  /RC  C0  test1  test2  CS.LIB
  1874.  
  1875.                     OBJXREF generates a report that looks like this:
  1876.  
  1877.                      BSS
  1878.                             4  (00004h)   TEST1
  1879.                             2  (00002h)   TEST2
  1880.                           ...
  1881.                           132  (00084h)   total
  1882.                      CODE
  1883.                             6  (00006h)   TEST1
  1884.                            10  (0000Ah)   TEST2
  1885.                            16  (00010h)   total
  1886.                      DATA
  1887.                           143  (0008Fh)   C0
  1888.                           143  (0008Fh)   total
  1889.  
  1890.  
  1891. ------------------  A report of unreferenced symbol names lists modules
  1892.          Report of  that define public names not referenced in other
  1893.       unreferenced  modules. Such a symbol is either:
  1894. symbol names (/RU)
  1895. ------------------  o referenced only from within the defining module and
  1896.                       does not need to be defined as a public symbol (in
  1897.                       that case, if the module is in C, the keyword static
  1898.                       should be added to the definition; if the module is
  1899.                       in TASM, just remove the public definition).
  1900.  
  1901.                     o never used (therefore, it can be deleted to save code
  1902.                       or data space).
  1903.  
  1904.                     If you enter this on the command line:
  1905.  
  1906.                        OBJXREF  /RU  test1  test2
  1907.  
  1908.                     OBJXREF generates a report that looks like this:
  1909.  
  1910.                        MODULE: TEST2 defines the unreferenced symbol _i2.
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.                                   - 28 -
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928. ------------------  If you enter /RV on the command line, OBJXREF generates
  1929.  Verbose reporting  one report of each type.
  1930.              (/RV)
  1931. ------------------
  1932. Examples of how to  =======================================================
  1933.        use OBJXREF
  1934.                     These examples assume that the application files are in
  1935.                     the current directory of the default drive and that the
  1936.                     Borland C++ startup files (C0x.OBJ) and the library
  1937.                     files are in the \BORLANDC\LIB directory.
  1938.  
  1939.  
  1940. ------------------  C>OBJXREF \BORLANDC\lib\c0l test1 test2
  1941.          Example 1  \BORLANDC\lib\cl.lib
  1942. ------------------
  1943.                     In this example, the TEST1.OBJ and TEST2.OBJ files and
  1944.                     the Borland C++ startup file \BORLANDC\LIB\C0L.OBJ and
  1945.                     the library file \BORLANDC\LIB\CL.LIB are specified.
  1946.                     Since no report type is specified, the resulting report
  1947.                     is the default report by reference, listing public
  1948.                     names and the modules that reference them.
  1949.  
  1950.  
  1951. ------------------  C>OBJXREF /RV /Ltest1.arf
  1952.          Example 2
  1953. ------------------  The TLINK response file TEST1.ARF contains the same
  1954.                     list of files as the command line in Example 1. The /RV
  1955.                     option is specified, so a report of every type will be
  1956.                     generated. TEST1.ARF contains
  1957.  
  1958.                      \BORLANDC\lib\c0l
  1959.                      test1 test2
  1960.                      test1.exe
  1961.                      test1.map
  1962.                      \BORLANDC\lib\cl
  1963.  
  1964.  
  1965. ------------------  C>OBJXREF /RC B:c0s /Ptest1 @libs
  1966.          Example 3
  1967. ------------------  The Borland C++ project file TEST1.PRJ specifies
  1968.                     TEST1.OBJ and TEST2.OBJ. The response file @libs
  1969.                     specifies libraries on a disk in the B drive. TEST1.PRJ
  1970.                     contains
  1971.  
  1972.                      test1
  1973.                      test2.c
  1974.  
  1975.                     The file LIBS contains
  1976.  
  1977.                        b:maths.lib b:emu.lib b:cs.lib
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.                                   - 29 -
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.                     The startup and library files specified depend on the
  1993.                     memory model and floating point options used in compil-
  1994.                     ation. The /RC causes a report of class type to be
  1995.                     output.
  1996.  
  1997.  
  1998. ------------------  C>OBJXREF /F /RV \BORLANDC\lib\cs.lib
  1999.          Example 4
  2000. ------------------  This example reports on all the modules in the Borland
  2001.                     C++ library file CS.LIB; OBJXREF can produce useful
  2002.                     reports even when the files specified do not make a
  2003.                     complete program. The /F causes all modules in CS.LIB
  2004.                     file to be included in the report.
  2005.  
  2006.  
  2007.      OBJXREF error  =======================================================
  2008.       messages and
  2009.           warnings  OBJXREF generates two sorts of diagnostic messages:
  2010.                     error messages and warnings.
  2011.  
  2012.  
  2013. ------------------  Out of memory
  2014.     Error messages  OBJXREF performs its cross referencing in RAM memory
  2015. ------------------  and may run out of memory even if TLINK is able to link
  2016.                     the same list of files successfully. When this happens,
  2017.                     OBJXREF aborts. Remove memory resident programs to get
  2018.                     more space, or add more RAM.
  2019.  
  2020.  
  2021. ------------------  WARNING: Unable to open input file <filename>
  2022.           Warnings  The input file filename could not be located or opened.
  2023. ------------------  OBJXREF proceeds to the next file.
  2024.  
  2025.                     WARNING: Unknown option - <option>
  2026.                     The option name option is not recognized by OBJXREF.
  2027.                     OBJXREF ignores the option.
  2028.  
  2029.                     WARNING: Unresolved symbol <symbol> in module <module>
  2030.                     The public name symbol referenced in module module is
  2031.                     not defined in any of the .OBJ or .LIB files specified.
  2032.                     OBJXREF flags the symbol in any reports it generates as
  2033.                     being referenced but not defined.
  2034.  
  2035.                     WARNING: Invalid file specification <filename>
  2036.                     Some part of the file name filename is invalid. OBJXREF
  2037.                     proceeds to the next file.
  2038.  
  2039.                     WARNING: No files matching <filename>
  2040.                     The file named filename listed on the command line or
  2041.                     in a response file could not be located or opened.
  2042.                     OBJXREF skips to the next file.
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.                                   - 30 -
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.                     WARNING: Symbol <symbol> defined in <module1>
  2057.                     duplicated in <module2>
  2058.                     Public name symbol is defined in modules module1 and
  2059.                     module2. OBJXREF ignores the second definition.
  2060.  
  2061.  
  2062.  
  2063. ===========================================================================
  2064. PRJCFG: Configuration file utility
  2065. ===========================================================================
  2066.  
  2067.  
  2068.                     Creates the command-line configuration file from a
  2069.                     project file. You can also use it to create or update a
  2070.                     project file from a configuration file.
  2071.  
  2072.                     The command-line compiler looks for a default
  2073.                     configuration file named TURBOC.CFG, but you can
  2074.                     specify a different file with +pathname option. To use
  2075.                     PRJCFG to create a BCC configuration file from a
  2076.                     project file, you would type the following:
  2077.  
  2078.                      PRJCFG ProjFile.PRJ ConfigFile.CFG
  2079.  
  2080.                     To make a project file from a configuration file, type
  2081.  
  2082.                      PRJCFG ConfigFile.CFG ProjFile.PRJ
  2083.  
  2084.  
  2085.  
  2086. ===========================================================================
  2087. PRJCNVT: Old projects for new
  2088. ===========================================================================
  2089.  
  2090.                     This utility converts Turbo C 1.0, 1.5, and 2.0 project
  2091.                     files to Borland C++ project files. The syntax for it
  2092.                     is
  2093.  
  2094.                        PRJCNVT infile[.PRJ] [outfile[.PRJ]]
  2095.  
  2096.                     or
  2097.  
  2098.                        PRJCNVT infile[.TC]  [outfile[.PRJ]]
  2099.  
  2100.                     If you specify a configuration file as input, it must
  2101.                     have a project file defined. The compiler options in
  2102.                     the .CFG file and the dependencies in the Turbo C 2.0
  2103.                     .PRJ file will be placed into the corresponding Borland
  2104.                     C++ .PRJ file.
  2105.  
  2106.                     If you specify a project file as input, only
  2107.                     dependencies information will be placed into the
  2108.                     Borland C++ .PRJ file. All compiler options will remain
  2109.                     default.
  2110.  
  2111.  
  2112.  
  2113.                                   - 31 -
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.                     If you don't provide an extension, .TC is assumed. If
  2121.                     PRJCNVT can't find a .TC file, it looks for a .PRJ
  2122.                     file.
  2123.  
  2124.                     The default name of the output file is the base name of
  2125.                     the input file with the extension .PRJ. For example,
  2126.                     STARS.TC will turn into STARS.PRJ. If the input and the
  2127.                     output name are the same, the old file will be renamed
  2128.                     to a .BAK file.
  2129.  
  2130.  
  2131.  
  2132. ===========================================================================
  2133. PRJ2MAK: From project file to MAKE file
  2134. ===========================================================================
  2135.  
  2136.                     This utility converts a .PRJ file to a .MAK file
  2137.                     (containing all relevant switches and settings) for use
  2138.                     with the MAKE utility. These files can be re-used
  2139.                     without accessing the IDE. The syntax for PRJ2MAK is
  2140.  
  2141.                        PRJ2MAK projectfile[.PRJ] [makefile[.MAK]
  2142.                     [config[.CFG]]]
  2143.  
  2144.                     The extension for the project file name is assumed to
  2145.                     be .PRJ unless you specify otherwise.
  2146.  
  2147.                     The default name for the new MAKE file is the base file
  2148.                     name of the .PRJ file with the extension .MAK. The
  2149.                     default name for the new .CFG file is the base file
  2150.                     name of the .MAK file with the extension .CFG.
  2151.  
  2152.                     To change the names of the makefile and configuration
  2153.                     files, just specify different names on the command
  2154.                     line.
  2155.  
  2156.                     Examples of valid execution:
  2157.  
  2158.                        PRJ2MAK MYPROJ.PRJ MAKEFILE.MAK TURBOC.CFG
  2159.  
  2160.                     This execution creates a makefile called MAKEFILE.MAK
  2161.                     with a configuration file called TURBOC.CFG.
  2162.                        PRJ2MAK MYPROJ.PRJ MAKEFILE.MAK
  2163.  
  2164.                     This execution creates a makefile called MAKEFILE.MAK
  2165.                     with a configuration file called MYPROJ.CFG.
  2166.  
  2167.                        PRJ2MAK MYPROJ
  2168.  
  2169.                     This execution creates a makefile called MYPROJ.MAK and
  2170.                     a configuration file called MYPROJ.CFG.
  2171.  
  2172.                     The makefile that PRJ2MAK creates will set up a
  2173.                     redirection file for the linker response file and for
  2174.  
  2175.  
  2176.  
  2177.                                   - 32 -
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.                     the .CFG file. They will be created when you run the
  2185.                     makefile that was generated. The linker response file
  2186.                     is a temporary file and will be deleted. The .CFG file
  2187.                     will be left as a file on disk.
  2188.  
  2189.                     PRJ2MAK places options that meet the following
  2190.                     requirements into the .CFG file: Those that are not
  2191.                     default to the Borland C++ command-line compiler and
  2192.                     have been selected in the project file.
  2193.  
  2194.                     PRJ2MAK will use the library search path as a command
  2195.                     link option to TLINK, so that TLINK can search that
  2196.                     path for the startup module and for libraries.
  2197.  
  2198.  
  2199.  
  2200. ===========================================================================
  2201. THELP: The Turbo Help utility
  2202. ===========================================================================
  2203.  
  2204.                     THELP.COM is a RAM-resident (TSR) utility that accesses
  2205.                     Borland C++'s online Help information for you when you
  2206.                     aren't using the IDE (that is, if you are using an
  2207.                     editor other than the one in the IDE, or you are using
  2208.                     the command-line version of Borland C++, or if you are
  2209.                     using another product, such as Turbo Debugger). THELP
  2210.                     requires about 21K bytes of memory.
  2211.  
  2212.  
  2213.        Loading and  =======================================================
  2214.     invoking THELP
  2215.                     You need to first load THELP in order to use it from
  2216.                     within another program (or from the command line). Make
  2217.                     sure that TCHELP.TCH, the text file containing the
  2218.    Warning! If you  Borland C++ online help information, is in the current
  2219.  are going to have  directory. (If you want to keep TCHELP.TCH in another
  2220.  THELP resident in  directory, THELP has a special /F command-line option
  2221. memory at the same  that will enable THELP to find it; the INSTALL program
  2222.   time as SideKick  inserts the correct path information into THELP.)
  2223.    1.x or SideKick
  2224.    Plus, make sure  To load THELP, just type
  2225.     you load THELP
  2226.    before you load     THELP [options]
  2227.          SideKick.
  2228.                     at the DOS command line before you go into your
  2229.                     application. This needs to be done only once, when you
  2230.                     first boot up.
  2231.  
  2232.                     Once you are in the other application, you can activate
  2233.                     THELP at any time. Just position the cursor under the
  2234.                     item you want information on, then press the THELP hot
  2235.                     key. The default hot key is 5 on the numeric keypad
  2236.                     (scan code 4ch, shift state 00h).
  2237.  
  2238.  
  2239.  
  2240.  
  2241.                                   - 33 -
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.   Navigating THELP  =======================================================
  2249.  
  2250.                     Use the following keys to navigate through the Help
  2251.                     screens that THELP displays on your monitor:
  2252.  
  2253.  
  2254. ----------------------------------------------------------------------
  2255. Key      What it does
  2256. ----------------------------------------------------------------------
  2257.  
  2258.  
  2259. Up  Down  Left  Right
  2260.          Move the highlight from keyword to keyword within the current
  2261.          Help screen.
  2262.  
  2263. Shift-Arrow
  2264.          Moves the cursor while marking a block.
  2265.  
  2266. Home and End
  2267.          Move to the beginning and end of a line, respectively.
  2268.  
  2269. Tab and Shift-Tab
  2270.          Moves to the next or previous keyword.
  2271.  
  2272. PgUp/PgDn
  2273.          Moves from screen to screen if additional screens are
  2274.          available.
  2275.  
  2276. Enter    Selects a Help entry for the item highlighted in the current
  2277.          Help screen.
  2278.  
  2279. Esc      Ends Help session.
  2280.  
  2281. F1       Displays the Help Table of Contents screen.
  2282.  
  2283. Shift-F1 Displays the Help Index. You can search for a specific
  2284.          keyword incrementally. For example, you can find printf by
  2285.          typing p r i. With each letter you type, the list jumps to
  2286.          the keyword that starts with p, then to pr, then to pri, and
  2287.          so on.
  2288.  
  2289. Alt-F1   Pressing Alt-F1 repeatedly takes you in reverse order through
  2290.          the last 20 screens you have reviewed.
  2291.  
  2292. Alt-F    Selects a new Help file (if you have specified more than one
  2293.          help file in the THELP.CFG file or on the
  2294.          command-line).
  2295.  
  2296. Ctrl-P   Pastes the marked block or example text into your current
  2297.          application.
  2298.  
  2299. ----------------------------------------------------------------------
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.                                   - 34 -
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.      THELP options  =======================================================
  2313.  
  2314.                     Here is a summary of the THELP command-line options. If
  2315.                     you use more than one option, you must separate them
  2316.                     with spaces.
  2317.  
  2318.                     The command-line options can be placed in a
  2319.                     configuration file (called THELP.CFG) for convenience.
  2320.                     THELP.CFG must be located in the same directory as
  2321.                     THELP.COM and each option in the configuration file
  2322.                     must be placed on its own line and begin in the
  2323.                     leftmost column.
  2324.  
  2325.  
  2326.                     -------------------------------------------------------
  2327. Summary of THELP     Option       Specifies
  2328.     command-line    -------------------------------------------------------
  2329.          options
  2330.                      /C#xx        Select color:
  2331.                                      # = color number
  2332.                                      xx = hex color values
  2333.  
  2334.                      /Fname       Full path and file name of Help file
  2335.  
  2336.                      /H, /?, ?    Display help screen
  2337.  
  2338.                      /Kxxyy       Change hot key:
  2339.                                      xx = shift state (hex)
  2340.                                      yy = scan code (hex)
  2341.  
  2342.                      /U           Remove THELP from memory
  2343.  
  2344.                      /Wx,y,w,h    Sets the window size and location.
  2345.  
  2346.                     -------------------------------------------------------
  2347.  
  2348.  
  2349. ------------------  This option lets you customize the background and
  2350.      /C#xx (select  foreground colors of various elements in a help screen.
  2351.             color)  The /C option is followed by the number of the color
  2352. ------------------  you want and the hex color values for background and
  2353.                     foreground, respectively.
  2354.  
  2355.                     There are twelve possible colors, numbered as follows:
  2356.  
  2357.  
  2358.                     -------------------------------------------------------
  2359.                       Number Element
  2360.                     -------------------------------------------------------
  2361.  
  2362.  
  2363.                        0     Color border attribute
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.                                   - 35 -
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.                        1     Monochrome border attribute
  2377.                        2     Color text attribute
  2378.                        3     Monochrome text attribute
  2379.                        4     Color keyword attribute
  2380.                        5     Monochrome keyword attribute
  2381.                        6     Color selected keyword word attribute
  2382.                        7     Monochrome selected keyword word attribute
  2383.                        8     Color example text attribute
  2384.                        9     Monochrome example text attribute
  2385.                        A     Color marked block attribute
  2386.                        B     Monochrome marked block attribute
  2387.  
  2388.                     -------------------------------------------------------
  2389.  
  2390.                     The color values for a standard IBM-compatible color
  2391.                     display are as follows:
  2392.  
  2393.  
  2394.                     -------------------------------------------------------
  2395.                      First digit (background)   Second digit (foreground)
  2396.                     -------------------------------------------------------
  2397.  
  2398.  
  2399.                           0   Black              0 Black
  2400.                           1   Blue               1 Blue
  2401.                           2   Green              2 Green
  2402.                           3   Cyan               3 Cyan
  2403.                           4   Red                4 Red
  2404.                           5   Magenta            5 Magenta
  2405.                           6   Brown              6 Brown
  2406.                           7   Gray               7 Gray
  2407.                                                  8 Intense black
  2408.                      ORing the color value       9 Intense blue
  2409.                      with 0x80 produces a        A Intense green
  2410.                      blinking color unless       B Intense cyan
  2411.                      blinking has been           C Intense red
  2412.                      disabled.                   D Intense magenta
  2413.                                                  E Intense brown (yellow)
  2414.                                                  F Intense gray (white)
  2415.  
  2416.                     -------------------------------------------------------
  2417.  
  2418.                     On monochrome monitors, the attribute values can differ
  2419.                     widely, so you may need to experiment.
  2420.  
  2421.  
  2422. ------------------  The name that follows the /F option should be the full
  2423.  /Fname (full path  drive/directory path name of the help file to use; for
  2424.  and name for help  example,
  2425.              file)
  2426. ------------------   THELP /FC:\BORLANDC\OWLHELP.TCH
  2427.                      THELP /FC:\BORLANDC\TCHELP.TCH
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.                                   - 36 -
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.                     You can specify multiple help files on the command-line
  2441.                     or in the THELP.CFG file.  THELP supports up to eight
  2442.                     help files.
  2443.  
  2444.  
  2445. ------------------  Any of these options displays a summary of THELP's com-
  2446.      /H, /?, and ?  mand-line options.
  2447.      (display help
  2448.            screen)
  2449. ------------------  This option allows you to reassign a function to a new
  2450.   /Kxxyy (reassign  hot key. The option must be followed by the shift state
  2451.           hot key)  (xx) and the scan code (yy) of the new key. Virtually
  2452. ------------------  any shift state/scan code combination may be selected.
  2453.                     Here's a quick summary of some common shift states and
  2454.                     scan codes:
  2455.  
  2456.  
  2457.                     -------------------------------------------------------
  2458.                       Shift states (can be OR'ed together):
  2459.  
  2460.                        Right Shift   01h
  2461.                        Left Shift    02h
  2462.                        Ctrl          04h
  2463.                        Alt           08h
  2464.  
  2465.                       Scan codes:
  2466.  
  2467.                        A   1eh   N   31h   0   0bh   F1  3bh
  2468.                        B   30h   O   18h   1   02h   F2  3ch
  2469.                        C   2eh   P   19h   2   03h   F3  3dh
  2470.                        D   20h   Q   10h   3   04h   F4  3eh
  2471.                        E   12h   R   13h   4   05h   F5  3fh
  2472.                        F   21h   S   1fh   5   06h   F6  40h
  2473.                        G   22h   T   14h   6   07h   F7  41h
  2474.                        H   23h   U   16h   7   08h   F8  42h
  2475.                        I   17h   V   2fh   8   09h   F9  43h
  2476.                        J   24h   W   11h   9   0ah   F10 44h
  2477.                        K   25h   X   2dh
  2478.                        L   26h   Y   15h
  2479.                        M   32h   Z   2ch
  2480.  
  2481.                       Enhanced keyboards only (may not work with all
  2482.                       computers or keyboards):
  2483.  
  2484.                        F11 57h
  2485.                        F12 58h
  2486.  
  2487.                     -------------------------------------------------------
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.                                   - 37 -
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504. ------------------  This option removes THELP from memory. If other TSRs
  2505.   /U (remove THELP  have been loaded after THELP, make sure to remove them
  2506.       from memory)  before removing THELP.
  2507. ------------------
  2508.  
  2509. ------------------  Where:
  2510. /Wx,y,w,h (set the    x = window column location (zero based)
  2511.    window size and    y = window row location
  2512.          location)    w = window width
  2513. ------------------    h = window height
  2514.  
  2515.                     For example, to create a full-screen help window use:
  2516.  
  2517.                      /W0,0,80,25
  2518.  
  2519.  
  2520.  
  2521. ===========================================================================
  2522. TOUCH
  2523. ===========================================================================
  2524.  
  2525.                     There are times when you want to force a particular
  2526.                     target file to be recompiled or rebuilt, even though no
  2527.                     changes have been made to its sources. One way to do
  2528.                     this is to use the TOUCH utility. TOUCH changes the
  2529.                     date and time of one or more files to the current date
  2530.                     and time, making it "newer" than the files that depend
  2531.                     on it.
  2532.  
  2533.                     You can force MAKE to rebuild a target file by touching
  2534.                     one of the files that target depends on. To touch a
  2535.                     file (or files), type
  2536.  
  2537.    You can use the    touch filename [filename ...]
  2538.    DOS wildcards *
  2539.  and ? with TOUCH.  at the DOS prompt. TOUCH will then update the file's
  2540.                     creation date(s). Once you do this, you can invoke MAKE
  2541.                     to rebuild the touched target file(s).
  2542.  
  2543.         Important!  Before you use the TOUCH utility, it's vitally
  2544.                     important to set your system's internal clock to the
  2545.                     proper date and time. If you're using an IBM PC, XT, or
  2546.                     compatible that doesn't have a battery-powered clock,
  2547.                     don't forget to set the time and date using the DOS
  2548.                     TIME and DATE commands. Failing to do this will keep
  2549.                     both TOUCH and MAKE from working properly.
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.                                   - 38 -
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568. ===========================================================================
  2569. TRANCOPY: A project transfer item utility
  2570. ===========================================================================
  2571.  
  2572.                     TRANCOPY copies transfer items from one project to
  2573.                     another. The syntax is
  2574.  
  2575.                      TRANCOPY [-r] Source[.PRJ] Dest[.PRJ]
  2576.  
  2577.                     TRANCOPY merges the transfer items in Source with the
  2578.                     transfer in Dest; Dest gets the new transfer items.
  2579.  
  2580.                     If the -r option is used, the set of the transfer items
  2581.                     in Dest is replaced by the set of transfer items in
  2582.                     Source.
  2583.  
  2584.  
  2585.  
  2586. ===========================================================================
  2587. TRIGRAPH: A character-conversion utility
  2588. ===========================================================================
  2589.  
  2590.                     Trigraphs are three-character sequences that replace
  2591.                     certain characters used in the C language that are not
  2592.                     available on some keyboards. Translating trigraphs in
  2593.                     the compiler would slow compilation down considerably,
  2594.                     so Borland C++ provides a filter named TRIGRAPH.EXE to
  2595.                     handle trigraph sequences when you need to. The syntax
  2596.                     for invoking this program is as follows:
  2597.  
  2598.                        TRIGRAPH [-u] file(s) [file(s) ...]
  2599.  
  2600.                     The following table shows the trigraph sequences that
  2601.                     TRIGRAPH.EXE recognizes:
  2602.  
  2603.  
  2604.                     -------------------------------------------------------
  2605.                       Trigraph  Character
  2606.                     -------------------------------------------------------
  2607.  
  2608.  
  2609.                        ??=        #
  2610.                        ??(        [
  2611.                        ??/        \
  2612.                        ??)        ]
  2613.                        ??'        ^
  2614.                        ??<        {
  2615.                        ??!        |
  2616.                        ??>        }
  2617.                        ??-        ~
  2618.  
  2619.                     -------------------------------------------------------
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.                                   - 39 -
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.                     TRIGRAPH.EXE works in two directions: It can convert
  2633.                     all trigraphs to their single-character representation,
  2634.                     and it can convert single characters to their trigraph
  2635.                     representation. Ordinarily, TRIGRAPH.EXE converts
  2636.                     trigraphs to single characters. You can specify the
  2637.                     inverse conversion with the -u (UNDO) command-line
  2638.                     option, which must come before any file names on the
  2639.                     command line.
  2640.  
  2641.                     TRIGRAPH.EXE takes any number of file specifiers,
  2642.                     including wildcards, on the command line. For each file
  2643.                     specified, it creates a backup copy of the file with
  2644.                     the original file name and an extension of .BAK, and
  2645.                     creates a new file with the original file name and the
  2646.                     appropriate conversions performed. For example,
  2647.  
  2648.                        trigraph test.c test1.c
  2649.  
  2650.                     removes all trigraphs from the two files TEST.C and
  2651.                     TEST1.C, creating backup files TEST.BAK and TEST1.BAK.
  2652.  
  2653.                     As another example, the following command inserts
  2654.                     trigraphs into all the files with the extension .C, and
  2655.                     makes backup copies of all those files, giving them the
  2656.                     extension .BAK.
  2657.  
  2658.                        trigraph -u *.c
  2659.  
  2660.  
  2661.  
  2662. ===========================================================================
  2663. Transfer macros
  2664. ===========================================================================
  2665.  
  2666.                     The IDE recognizes certain strings of characters called
  2667.                     transfer macros in the parameter string of the
  2668.                     Modify/New Transfer Item dialog box. There are three
  2669.                     kinds of macros: state, file name, and instruction.
  2670.  
  2671.  
  2672.       The transfer  State macros
  2673.  macros are listed  =======================================================
  2674. alphabetically and
  2675.  described in more  State macros are expanded according to the state of the
  2676. detail starting on  IDE. The state macros are
  2677.           page 41.
  2678.                     $COL                          $ERRNAME
  2679.                     $CONFIG                       $INC
  2680.                     $DEF                          $LIB
  2681.                     $ERRCOL                       $LINE
  2682.                     $ERRLINE                      $PRJNAME
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.                                   - 40 -
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.                     File name macros
  2697.                     =======================================================
  2698.  
  2699.                     File name macros are actually functions that take file
  2700.                     names as arguments and return various parts of the file
  2701.                     name. They allow you to build up new file name
  2702.                     specifications from existing file names. For example,
  2703.                     you can pass TDUMP a macro like this:
  2704.  
  2705.                        $DIR($EXENAME)$NAME($EDNAME).OBJ
  2706.  
  2707.                     This macro gives you the output directory path, the
  2708.                     file name only in the active Edit window, and an
  2709.                     explicit extension. If your current directory is
  2710.                     C:\WORK, your output directory is TEST, and the active
  2711.                     editor contains MYPROG.C, then TDUMP receives the
  2712.                     parameter
  2713.  
  2714.                        C:\WORK\TEST\MYPROG.OBJ
  2715.  
  2716.                     The file name macros are
  2717.  
  2718.                     $DIR                          $EXT()
  2719.                     $DRIVE()                      $NAME()
  2720.                     $EDNAME                       $OUTNAME
  2721.                     $EXENAME
  2722.  
  2723.  
  2724.                     Instruction macros
  2725.                     =======================================================
  2726.  
  2727.                     Instruction macros tell the IDE to perform some action
  2728.                     or make some setting. The instruction macros are
  2729.  
  2730.                     $CAP EDIT                     $PROMPT
  2731.                     $CAP MSG(filter)              $RC
  2732.                     $DEP()                        $SAVE ALL
  2733.                     $IMPLIB                       $SAVE CUR
  2734.                     $MEM(kb to reserve)           $SAVE PROMPT
  2735.                     $NOSWAP                       $TASM
  2736.  
  2737.                     $CAP EDIT: This macro tells the IDE to redirect program
  2738.                     output into a standard file. After the transfer program
  2739.                     is completed, a new editor window is created, and the
  2740.                     captured output is displayed. The captured output
  2741.                     resides in a special Edit window titled Transfer
  2742.                     Output.
  2743.  
  2744.                     For $CAP EDIT to work correctly, the transfer program
  2745.                     must write to DOS standard output.
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.                                   - 41 -
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.    You can use any  $CAP MSG(filter): Captures program output into the
  2761.   program that has  Message window, using filter as a DOS filter for
  2762.      line-oriented  converting program output into Message window format.
  2763.    messages output
  2764.     (file and line  We've provided four filters for this macro:
  2765.  number) with this  GREP2MSG.EXE for GREP, IMPL2MSG.EXE for IMPLIB,
  2766.             macro.  RC2MSG.EXE for the Resource Compiler, and TASM2MSG.EXE
  2767.                     for Turbo Assembler (TASM). We've included the source
  2768.                     code for these filters so you can write your own
  2769.                     filters for other transfer programs you install.
  2770.  
  2771.                     $COL: Column number of current editor. If the active
  2772.                     window is not an editor, then the string is set to 0.
  2773.  
  2774.                     $CONFIG: Complete file name of the current
  2775.                     configuration file. This is a null string if no
  2776.                     configuration file is defined. This macro is intended
  2777.                     for use by programs that access or modify the
  2778.                     configuration file. Besides providing the name of the
  2779.                     file, this macro causes the current configuration to be
  2780.                     saved (if modified) and reloaded when control returns
  2781.                     to the IDE.
  2782.  
  2783.  TEML is a Pascal-  Use this macro with the Turbo Editor Macro Language
  2784. like language that  (TEML) compiler. With it, you can edit the TEML script
  2785.  has many built-in  file in an editor and then invoke the Turbo Editor
  2786.   primitive editor  Macro Compiler (TEMC) to process the script. When the
  2787.  commands. Its use  configuration file is reloaded, your new or modified
  2788.   is documented in  editor commands will be in effect. When installing TEMC
  2789.         this file.  as a transfer item, use the following command line:
  2790.  
  2791.                        $EDNAME $CONFIG
  2792.  
  2793.                     This assumes the current Edit window contains the TEML
  2794.                     script file to be processed.
  2795.  
  2796.                     $DEF: Pulls in the contents of the Options|Compiler|
  2797.                     Code Generation "Defines" type-in box. Use this macro
  2798.                     to specify define directives to an external translator.
  2799.  
  2800. This macro is only  $DEP(): This macro provides the ability to
  2801.        used by the  automatically rebuild resources as part of a project
  2802.   project manager.  make if one of the resource components has been
  2803.                     modified. For example, let's say your Windows resource
  2804.                     MYAPP1.RES for your application MYAPP1.EXE consists of
  2805.                     the following files:
  2806.  
  2807.                     o MYAPP1.RC (the resource source file)
  2808.                     o MYAPP1.H (the header file for MYAPP1.EXE)
  2809.                     o MYAPP1.ICO (the icon for MYAPP1.EXE, included in
  2810.                       MYAPP1.RC)
  2811.                     o MYAPP1.BMP (the bitmap used with MYAPP1.EXE, included
  2812.                       in MYAPP1.RC)
  2813.  
  2814.  
  2815.  
  2816.  
  2817.                                   - 42 -
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.                     To ensure that MYAPP1.RES gets recompiled any time you
  2825.                     update one of the components, you'd add the following
  2826.                     dependencies to the Options field in the Project|Local
  2827.                     Options dialog box for MYAPP1.RC:
  2828.  
  2829.                        $DEP(MYAPP1.H MYAPP1.ICO MYAPP1.BMP)
  2830.  
  2831.                     When you choose Compile|Make, the project manager scans
  2832.                     for the $DEP macro and verifies that all explicit
  2833.                     dependencies given are older than the resulting
  2834.                     MYAPP1.RES file. If one or more aren't, the project
  2835.                     manager recompiles MYAPP1.RC.
  2836.  
  2837.                     You can give explicit dependencies to any makeable
  2838.                     project item. Just place the files you want the source
  2839.                     to be dependent on in parentheses, separated by blanks,
  2840.                     commas, or semicolons. If autodependency checking is
  2841.                     on, explicit dependencies are checked after any
  2842.                     autodependencies.
  2843.  
  2844.                     $DIR(): Directory of the file argument, full path.
  2845.  
  2846.                     $DRIVE(): Drive of the file argument, in the form D:.
  2847.  
  2848.                     $EDNAME: Complete file name of file in active editor.
  2849.                     This is a null string if the active window is not an
  2850.                     editor.
  2851.  
  2852.                     $ERRCOL: Column number of current error in file
  2853.                     $ERRNAME. If there are no messages, then string is
  2854.                     expanded to null string.
  2855.  
  2856.                     $ERRLINE: Line number of current error in file
  2857.                     $ERRNAME. If there are no messages, then string is
  2858.                     expanded to null string.
  2859.  
  2860.                     $ERRNAME: Complete file name of file referred to by the
  2861.                     selected messages in the Message window. This is a null
  2862.                     string if there are no messages or the currently
  2863.                     selected message does not refer to a file.
  2864.  
  2865.                     $EXENAME: Program's file name (including output path),
  2866.                     based on the project name or, if there is no project
  2867.                     defined, then the name of the .EXE that would be
  2868.                     produced from the active editor window. If the Windows
  2869.                     DLL Linker option is selected, the file's extension
  2870.                     will be .DLL.
  2871.  
  2872.                     $EXT(): Extension of the file argument; this includes
  2873.                     the dot (for example, .CPP).
  2874.  
  2875.                     $IMPLIB: Executes IMPLIB.This macro expands to
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.                                   - 43 -
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.                      $NOSWAP $CAP MSG(IMPL2MSG)
  2889.                      $DRIVE($EXENAME)$DIR($EXENAME)$NAME($EXENAME).LIB
  2890.                      $EXENAME|def_name
  2891.  
  2892.                     If the Use DLL File Exports radio button is pushed
  2893.                     (Options|MAKE|Generate Import Library), $EXENAME is
  2894.                     part of the expansion. If the Use DEF file Exports
  2895.                     radio button is pushed, the name of the DEF file in the
  2896.                     project (represented by def_name) is used.
  2897.  
  2898.                     $INC: Pulls in the contents of the Options|Directories|
  2899.                     Include Directories type-in box.
  2900.  
  2901.                     $LIB: Pulls in the contents of the Options|Directories|
  2902.                     Library Directories type-in box.
  2903.  
  2904.                     $LINE: Line number of current editor. If the active
  2905.                     window is not an editor, then the string is set to 0.
  2906.  
  2907.                     $MEM(Kb to reserve): This macro tells the IDE how much
  2908.                     memory to try to give the transfer program. The IDE
  2909.                     gives up as much memory as possible, to either the
  2910.                     amount specified or the maximum available, whichever is
  2911.                     smaller. You'll get an error if no memory is specified.
  2912.  
  2913.                     $NAME(): Name part of the file argument; does not
  2914.                     include the dot.
  2915.  
  2916.                     $NOSWAP: This macro tells the IDE not to swap to the
  2917.                     User Screen when running the program. It pops up a box
  2918.                     that indicates which transfer program is running. Use
  2919.                     this macro in conjunction with $CAP.
  2920.  
  2921.                     $OUTNAME: This macro expands to the path and file name
  2922.                     that appear in the Project|Local Options Output Path
  2923.                     type-in box (in the active edit window). For example,
  2924.                     if the project contains STARS.C, the default Output
  2925.                     Path type-in is STARS.OBJ. So if STARS.C is in the
  2926.                     active edit window, $OUTNAME expands to STARS.OBJ. If
  2927.                     you've edited the type-in box so it says ..\MOON.XYZ,
  2928.                     $OUTNAME will expand to ..\MOON.XYZ. This macro is
  2929.                     useful when you are specifying modules for your user-
  2930.                     defined translators. For example, you could define a
  2931.                     TLIB translator and set the command line to
  2932.  
  2933.                     TLIB MYLIB +$OUTNAME
  2934.  
  2935.                     which adds the object module of the file in the active
  2936.                     edit window to the library MYLIB.
  2937.  
  2938.                     $PRJNAME: The current project file. Null string if no
  2939.                     project is defined.
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.                                   - 44 -
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.                     $PROMPT: This macro tells the IDE to display the
  2953.                     expanded parameter string before calling the transfer
  2954.                     program. The command line that will be passed is
  2955.                     displayed in a dialog box. This allows you to change or
  2956.                     add to the string before it is passed.The position of
  2957.                     $PROMPT command in the command line determines what is
  2958.                     shown in the dialog prompt box. You can place constant
  2959.                     parameters in the command line by placing them before
  2960.                     $PROMPT. For example, the /c in
  2961.  
  2962.                        /c $PROMPT dir
  2963.  
  2964.                     is constant and doesn't show in the dialog box, but dir
  2965.                     can be edited before the command is run.
  2966.  
  2967.                     $RC: This macro is predefined for use with the Resource
  2968.                     Compiler. Since the Resource Compiler can be invoked
  2969.                     for two separate reasons, $RC is expanded differently
  2970.                     depending on whether you are compiling a .RC file into
  2971.                     a .RES file or binding the .RES file to an executable
  2972.                     file.
  2973.  
  2974.                     In any case, in order to change the behavior of the
  2975.                     Resource Compiler
  2976.  
  2977.                     o when compiling an .RC file, change the command line
  2978.                       for the .RC file in the Command Line Options input
  2979.                       box in the Override Options dialog box (Project|Local
  2980.                       Options)
  2981.  
  2982.                     o when binding a .RES file to an .EXE or a DLL, change
  2983.                       the options in the Command Line input box in the
  2984.                       Modify/New Transfer Items dialog box for the Resource
  2985.                       Compiler (Options|Transfer|Edit button)
  2986.  
  2987.                     If you are compiling a .RC file into a .RES file, $RC
  2988.                     is expanded like this:
  2989.  
  2990.                        $SAVE CUR $NOSWAP $CAP MSG(RC2MSG) -R -I$INC -FO
  2991.                     $OUTNAME $EDNAME
  2992.  
  2993.                     If you are binding a .RES to an .EXE file, $RC is
  2994.                     expanded like this:
  2995.  
  2996.                        $NOSWAP $CAP MSG(RC2MSG) res_name $EXENAME
  2997.  
  2998.                     The variable res_name is defined as one of the
  2999.                     following, in this order:
  3000.  
  3001.                     1. If there is a file in the project with a .RES
  3002.                        extension, res_name will be that file.
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.                                   - 45 -
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.                     2. If there is no file with a .RES extension, and there
  3017.                        is a file with a .RC extension, res_name is the name
  3018.                        given by $OUTNAME for the .RC file.
  3019.  
  3020.                     3. If neither of the above apply (implying there are no
  3021.                        resources), res_name is blank.
  3022.  
  3023.                     $SAVE ALL: This macro tells the IDE to save all
  3024.                     modified files in all Edit windows that have been
  3025.                     modified, without prompting.
  3026.  
  3027.                     $SAVE CUR: This macro tells the IDE to save the file in
  3028.                     the current editor if it has been modified. This
  3029.                     ensures that the invoked program will use the latest
  3030.                     version of the source file.
  3031.  
  3032.                     $SAVE PROMPT: This macro tells the IDE to prompt when
  3033.                     there are unsaved files in editor windows. You will be
  3034.                     asked if you want to save any unsaved files.
  3035.  
  3036.                     $TASM: This macro is predefined for use with Turbo
  3037.                     Assembler. It uses the TASM2MSG filter to trap TASM
  3038.                     messages. $TASM is essentially shorthand for this:
  3039.  
  3040.                      $NOSWAP $SAVE CUR $CAP MSG(TASM2MSG) $EDNAME,$OUTNAME
  3041.  
  3042.                     $WRITEMSG(filename): This macro copies the contents of
  3043.                     the Message window to the specified ASCII file. The
  3044.                     translator can parse the file and act on the messages
  3045.                     so desired. For example, $WRITEMSG(C:\MESSAGES.TXT)
  3046.                     writes to the file MESSAGES.TXT on your root directory.
  3047.  
  3048.  
  3049.        Running DOS  =======================================================
  3050.           commands
  3051.                     If you want to run DOS commands from within the
  3052.                     integrated environment, you can set up a simple
  3053.                     transfer macro that will let you do so. Just add this
  3054.                     transfer item:
  3055.  
  3056.                        command /c $MEM(128) $PROMPT
  3057.  
  3058.                     When you invoke this transfer item, a dialog box
  3059.                     appears and prompts you for DOS input. Since the
  3060.                     $PROMPT command appears later in the string, the text
  3061.                     command /c won't show up in the dialog's input box.
  3062.                     This lets you just type dir, chkdsk, del *.*, or
  3063.                     whatever DOS command you want to run.
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.                                   - 46 -
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.    Transfer memory  =======================================================
  3081.           settings
  3082.                     Different programs have different memory needs. For
  3083.                     example, GREP can run in very little memory, where many
  3084.                     popular editors require 200-300K to work well.
  3085.  
  3086.                     If you use the $MEM() macro, you can specify (on a
  3087.                     program-by-program basis) how much memory the IDE
  3088.                     should give to the transfer programs. The less memory
  3089.                     you devote to a transfer program, the quicker the
  3090.                     transfer to and from the program occurs.
  3091.  
  3092.                     There may be some cases where the IDE cannot give up as
  3093.                     much memory as you requested. When this happens, the
  3094.                     IDE gives up as much as it can. There are certain
  3095.                     states in the IDE that require more memory than others;
  3096.                     for example, while debugging a program, the IDE will
  3097.                     tie up more resources than when not debugging. Use
  3098.                     Program Reset (Ctrl-F2) to free up debugging memory.
  3099.  
  3100.                     In those cases where you want the IDE to give up all
  3101.                     its memory, give it a large number, like 640K. How much
  3102.                     memory is actually given up is dependent on how much
  3103.                     you have when you start Borland C++.
  3104.  
  3105.  
  3106.  
  3107. ===========================================================================
  3108. Turbo Editor macros
  3109. ===========================================================================
  3110.  
  3111.                     TEMC.EXE is an editor macro compiler for the IDE. It
  3112.                     processes a script file that defines editor macros and
  3113.                     key bindings, and produces a configuration file that is
  3114.                     read by the IDE to define the effects of keyboard
  3115.                     commands in the editor.
  3116.  
  3117.                     The file DEFAULTS.TEM contains the default macro
  3118.                     definitions and key bindings built into the IDE editor.
  3119.                     It serves as an example script, as well as a base from
  3120.                     which to customize the editor.
  3121.  
  3122.  
  3123.  
  3124. ===========================================================================
  3125. TEMC command line
  3126. ===========================================================================
  3127.  
  3128.                     TEMC is invoked from the DOS command line. Type
  3129.  
  3130.                      temc [-c] [-u] <script file> <config file>
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.                                   - 47 -
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.                     The script file extension is .TEM if not specified
  3145.                     otherwise. The configuration file extensions is assumed
  3146.                     to be .TC.
  3147.  
  3148.                     The configuration file need not exist. If it does not
  3149.                     exist, it is created. The optional -c switch can also
  3150.                     be specified as /c, and can appear in any argument
  3151.                     position on the command line. If you use this option,
  3152.                     any existing command table in your configuration file
  3153.                     is thrown away before TEMC processes the script file.
  3154.                     When -c is not used, the key bindings in the script
  3155.                     file are merged with those already defined in the
  3156.                     configuration file.
  3157.  
  3158.                     TEMC by default modifies the commands used by the IDE
  3159.                     when the Alternate command set is specified in Options|
  3160.                     Environment|Preferences. The optional -u switch, which
  3161.                     can also be specified as /u, causes TEMC to modify the
  3162.                     CUA command set instead.
  3163.  
  3164.                     You can use DEFAULTS.TEM to re-create exactly the
  3165.                     default settings of the Alternate command set.  This
  3166.                     file is included as both a sample script file and as
  3167.                     the default command table. You can copy it and modify
  3168.                     it for your own use. A file named CMACROS.TEM is
  3169.                     provided with Borland C++; this file contains many
  3170.                     useful enhancements to the IDE for C and C++
  3171.                     programming that you may wish to install.
  3172.  
  3173.  
  3174.  
  3175. ===========================================================================
  3176. Syntax
  3177. ===========================================================================
  3178.  
  3179.                     The syntax to define a macro is
  3180.  
  3181.                      MACRO <macroname>
  3182.                        <command1>;
  3183.                        [ <command2>; ... ]
  3184.                      END;
  3185.  
  3186.                     <macroname> can consist of anything that is a legal C
  3187.                     symbol, and <command> can be either the name of another
  3188.                     predefined macro or a predefined TEMC editor command. A
  3189.                     list of editor commands and what they do follows.
  3190.  
  3191.                     When you define your macro, the following points are
  3192.                     valid:
  3193.  
  3194.                     1. A statement defines either a named macro or a key
  3195.                        binding.
  3196.  
  3197.                     2. Spaces and new lines are optional.
  3198.  
  3199.  
  3200.  
  3201.                                   - 48 -
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.                     3. Comments are in C-style /* ... */ pairs.
  3209.  
  3210.                     4. Unlike C, TEMC's language is case insensitive.
  3211.  
  3212.                     5. Some of the predefined editor commands have a syntax
  3213.                        that looks like a C function call with one argument.
  3214.                        For example,
  3215.                         
  3216.                         SetMark(5);
  3217.                         
  3218.                        Depending on the command, the argumment is either a
  3219.                        decimal integer constant, a character constant, or a
  3220.                        string literal. All are specified using C syntax.
  3221.  
  3222.                     Here's an example of a macro definition from
  3223.                     DEFAULTS.TEM:
  3224.  
  3225.                      MACRO MacScrollUp
  3226.                        ScrollScreenUp; FixCursorPos;
  3227.                      END;
  3228.  
  3229.                     The syntax to define a key binding is
  3230.  
  3231.                      <key-sequence>: <command>;
  3232.  
  3233.                     or
  3234.  
  3235.                      <key-sequence>: BEGIN <command1>; [ <command2>; ... ]
  3236.                      END;
  3237.  
  3238.                     The <key-sequence> is either a key (a character
  3239.                     optionally preceded by Ctrl or Alt), or a series of
  3240.                     keys separated by a plus sign (+). Note that the
  3241.                     specification of the key characters themselves is case
  3242.                     sensitive. For example, Ctrl-k+B is different than
  3243.                     Ctrl-k+b, even though the latter is the same as CTRL-
  3244.                     K+b.
  3245.  
  3246.                     Whitespace is allowed between the key-sequence and the
  3247.                     colon, and each <command> can be either the name of a
  3248.                     previously defined macro, or one of the predefined
  3249.                     editor commands listed in Table 1.1.
  3250.  
  3251.  
  3252.  
  3253. ===========================================================================
  3254. Key codes
  3255. ===========================================================================
  3256.  
  3257.                     The IDE editor makes use of an extended character set
  3258.                     that includes key combinations not normally available
  3259.                     to DOS programs. Key codes can be specified in a script
  3260.                     through any combination of the symbols "Ctrl-",
  3261.                     "Shift-" "Alt-" and a character.
  3262.  
  3263.  
  3264.  
  3265.                                   - 49 -
  3266.  
  3267.  
  3268.  
  3269.  
  3270.  
  3271.  
  3272.                     Some keys cannot be entered directly into a TEMC
  3273.                     script. Those keys can be referred to by their names,
  3274.                     as described in the following table.
  3275.  
  3276.                     Any key in a sequence--except the first key--can be
  3277.                     preceded by one of the characters ^ or @. The caret (^)
  3278.                     indicates that any combination of case and "Ctrl" can
  3279.                     be used to type the key; that is, lowercase, uppercase,
  3280.                     or control characters. The @ sign is used to indicate
  3281.                     that case is insignificant for the following character,
  3282.                     although "Ctrl" is not accepted. For example,
  3283.  
  3284.                     o Ctrl-k+b specifies a Ctrl-K followed by a lowercase
  3285.                       b.
  3286.  
  3287.                     o Ctrl-k+^b specifies a Ctrl-K followed by any of b, B,
  3288.                       or Ctrl-B.
  3289.  
  3290.                     o Ctrl-k+@B specifies Ctrl-K followed by either b or B.
  3291.  
  3292.  
  3293.         Named keys  =======================================================
  3294.  
  3295.                     Key are specified as letters, numbers, or characters,
  3296.                     optionally preceded by one or more of Ctrl-, Alt- or
  3297.                     Shift-. The following names specify keys that cannot be
  3298.                     typed as themselves in the TEMC syntax.
  3299.  
  3300.  
  3301.                     -------------------------------------------------------
  3302.                        Key name    Notes
  3303.                     -------------------------------------------------------
  3304.  
  3305.                        Home
  3306.                        End
  3307.                        PgUp
  3308.                        PgDn
  3309.                        LfAr        Left arrow
  3310.                        RgAr        Right arrow
  3311.                        UpAr        Up arrow
  3312.                        DnAr        Down arrow
  3313.                        Ins
  3314.                        Del
  3315.                        Enter
  3316.                        Return      Same as Enter
  3317.                        BkSp        Backspace
  3318.                        Tab
  3319.                        BkTab       No longer available, use Shift-Tab
  3320.                        Esc
  3321.                        Star        * key on the numeric keypad
  3322.                        Minus       - key on the numeric keypad
  3323.                        Plus        + key on the numeric keypad
  3324.                        Space       Spacebar
  3325.                        PrtSc
  3326.  
  3327.  
  3328.  
  3329.                                   - 50 -
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.                        F1 to F10   Function keys
  3337.  
  3338.                     -------------------------------------------------------
  3339.  
  3340.  
  3341.  
  3342. ===========================================================================
  3343. Predefined editor commands
  3344. ===========================================================================
  3345.  
  3346.                     TEMC lets you use built-in editor commands and user-
  3347.                     defined macros as commands within macros
  3348.                     interchangeably, as long as you don't create any loops
  3349.                     by having two macros calling each other, even via
  3350.                     intermediate macros. Note that some commands cause an
  3351.                     escape from the editor to the surrounding IDE, for
  3352.                     example, by bringing up a dialog box. Your macro will
  3353.                     "pause" until control returns to the editor.
  3354.  
  3355.                     A list of all predefined TEMC editor commands is shown
  3356.                     next. Commands that cause an escape from the editor
  3357.                     follow.
  3358.  
  3359.  
  3360.  
  3361.                     -------------------------------------------------------
  3362.      TEMC editor
  3363.         commands
  3364.  
  3365.                     Command name                What the editor does
  3366.                     -------------------------------------------------------
  3367.  
  3368.                     BackspaceDelete             Deletes character before
  3369.                                                 the cursor.
  3370.  
  3371.                     BottomOfScreen              Moves cursor to the bottom
  3372.                                                 line of the current window,
  3373.                                                 leaving column unchanged.
  3374.  
  3375.                     CenterFixScreenPos          Adjusts the screen display
  3376.                                                 to ensure the cursor is
  3377.                                                 visible. If any adjustment
  3378.                                                 is necessary, adjust the
  3379.                                                 display so the cursor is
  3380.                                                 close to being centered in
  3381.                                                 the window.
  3382.  
  3383.                     CopyBlock                   If there is a valid and
  3384.                                                 highlighted (selected)
  3385.                                                 text block, then at the
  3386.                                                 cursor location, inserts a
  3387.                                                 copy of the characters that
  3388.                                                 are selected and makes that
  3389.  
  3390.  
  3391.  
  3392.  
  3393.                                   - 51 -
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.                     Table 1.2: TEMC editor commands (continued)____________
  3401.  
  3402.                                                 the new selected text
  3403.                                                 location.
  3404.  
  3405.                     CursorCharLeft              Moves cursor left over one
  3406.                                                 character. This command
  3407.                                                 will skip over tab
  3408.                                                 characters and move to the
  3409.                                                 end of the previous line.
  3410.  
  3411.                     CursorCharRight             Moves cursor right over one
  3412.                                                 character. This  command
  3413.                                                 will skip over tab
  3414.                                                 characters and advance to
  3415.                                                 the beginning of the next
  3416.                                                 line.
  3417.  
  3418.                     CursorDown                  Moves cursor down one row.
  3419.  
  3420.                     CursorLeft                  Moves cursor left one
  3421.                                                 screen column.
  3422.  
  3423.                     CursorRight                 Moves cursor right one
  3424.                                                 screen column.
  3425.  
  3426.                     CursorSwitchedLeft          Like CursorLeft, but pays
  3427.                                                 attention to cursor through
  3428.                                                 tab option setting (see
  3429.                                                 SetCursorThroughTabMode).
  3430.  
  3431.                     CursorSwitchedRight         Like CursorRight, but pays
  3432.                                                 attention to cursor
  3433.                                                 through tab option setting
  3434.                                                 (see
  3435.                                                 SetCursorThroughTabMode).
  3436.  
  3437.                     CursorUp                    Moves cursor up one row.
  3438.  
  3439.                     DeleteBlock                 If there is a valid and
  3440.                                                 highlighted (selected) text
  3441.                                                 block, deletes the
  3442.                                                 characters that are in it.
  3443.  
  3444.                     DeleteChar                  Deletes the character at
  3445.                                                 the current cursor
  3446.                                                 location.
  3447.  
  3448.                     DeleteLine                  Deletes the current line.
  3449.  
  3450.                     DeleteToEOL                 Deletes all characters in
  3451.                                                 the current line, leaving a
  3452.                                                 zero-length line.
  3453.  
  3454.  
  3455.  
  3456.  
  3457.                                   - 52 -
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.                     Table 1.2: TEMC editor commands (continued)____________
  3465.  
  3466.                     DeleteWord                  Deletes from cursor to
  3467.                                                 beginning of next word.
  3468.  
  3469.                     EndCursor                   Moves cursor to end of file
  3470.                                                 buffer.
  3471.  
  3472.                     ExtendBlockBeg              Initiates a series of
  3473.                                                 commands that will select a
  3474.                                                 block of text between the
  3475.                                                 initial and ending
  3476.                                                 positions of the cursor.
  3477.  
  3478.                     ExtendBlockEnd              Ends a series of commands
  3479.                                                 begun by ExtendBlockBeg.
  3480.  
  3481.                     FixCursorPos                Ensures that the cursor
  3482.                                                 value specifies a row
  3483.                                                 between 1 and the number of
  3484.                                                 lines in the buffer, a
  3485.                                                 column greater than 0. If
  3486.                                                 the cursor through tab
  3487.                                                 option is not set, the
  3488.                                                 cursor is not placed in the
  3489.                                                 middle of a tab character
  3490.                                                 (see
  3491.                                                 SetCursorThroughTabMode).
  3492.  
  3493.                     FixScreenPos                Adjusts the screen display
  3494.                                                 to ensure the cursor is
  3495.                                                 visible.
  3496.  
  3497.                     FullPaintScreen             Redraws the entire window,
  3498.                                                 making no assumptions about
  3499.                                                 what is onscreen.
  3500.  
  3501.                     HideBlock                   Sets a flag indicating that
  3502.                                                 the selected text should
  3503.                                                 not be highlighted.
  3504.  
  3505.                     HighlightBlock              Sets a flag indicating that
  3506.                                                 if the beginning and end
  3507.                                                 selected text markers are
  3508.                                                 valid, the selected text
  3509.                                                 should be highlighted.
  3510.  
  3511.                     HomeCursor                  Moves cursor to beginning
  3512.                                                 of the file buffer.
  3513.  
  3514.                     IndentBlock                 Inserts a space at the
  3515.                                                 beginning of each line in
  3516.                                                 the highlighted (selected)
  3517.                                                 text.
  3518.  
  3519.  
  3520.  
  3521.                                   - 53 -
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.                     Table 1.2: TEMC editor commands (continued)____________
  3529.  
  3530.                     InsertText                  Inserts the literal
  3531.                                                 "string" in the buffer at
  3532.                                                 the current cursor
  3533.                                                 location. Use the syntax
  3534.                                                 InsertText(string) to call
  3535.                                                 this command.
  3536.  
  3537.                     LeftOfLine                  Moves cursor to beginning
  3538.                                                 of the current line.
  3539.  
  3540.                     LiteralChar                 Inserts the character at
  3541.                                                 the current cursor
  3542.                                                 location, without doing any
  3543.                                                 special processing for
  3544.                                                 newline, tab characters,
  3545.                                                 etc. Use the syntax
  3546.                                                 LiteralChar(c), where c is
  3547.                                                 a character or integer
  3548.                                                 value.
  3549.  
  3550.                     MarkBufModified             Sets a flag indicating that
  3551.                                                 the contents of the buffer
  3552.                                                 are different than what is
  3553.                                                 in the corresponding disk
  3554.                                                 file.
  3555.  
  3556.                     MarkBufUnModified           Clears a flag, thus
  3557.                                                 indicating that the
  3558.                                                 contents of the buffer can
  3559.                                                 be assumed to be identical
  3560.                                                 to what is in the disk
  3561.                                                 file.
  3562.  
  3563.                     MatchPairBackward           Same as MatchPairForward
  3564.                                                 except if the cursor is on
  3565.                                                 a ' or ", searches backward
  3566.                                                 for the matching character.
  3567.  
  3568.                     MatchPairForward            If the cursor is on one of
  3569.                                                 the characters (, ), {, },
  3570.                                                 [, ], or on the first
  3571.                                                 character of one of the
  3572.                                                 pairs /* or */, searches in
  3573.                                                 the appropriate direction
  3574.                                                 for the closest instance of
  3575.                                                 the matching delimiter. If
  3576.                                                 the cursor is on the
  3577.                                                 character ' or ", searches
  3578.                                                 forward for the matching
  3579.                                                 character. If a match is
  3580.                                                 found, places the cursor
  3581.                                                 there.
  3582.  
  3583.  
  3584.  
  3585.                                   - 54 -
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.                     Table 1.2: TEMC editor commands (continued)____________
  3593.  
  3594.                     MoveBlock                   Like CopyBlock, but also
  3595.                                                 deletes the original
  3596.                                                 selected text.
  3597.  
  3598.                     MoveToBlockBeg              Moves cursor to the
  3599.                                                 location marked as the
  3600.                                                 beginning of the selected
  3601.                                                 text.
  3602.  
  3603.                     MoveToBlockEnd              Moves cursor to the
  3604.                                                 location marked as the end
  3605.                                                 of the selected text.
  3606.  
  3607.                     MoveToMark                  Moves the cursor to the
  3608.                                                 location saved with
  3609.                                                 SetMark(n) command. Use the
  3610.                                                 syntax MoveToMark(n), where
  3611.                                                 n is a one-digit number,
  3612.                                                 0-9.
  3613.  
  3614.                     MoveToPrevPos               Moves the cursor to the
  3615.                                                 location specified by the
  3616.                                                 "previous position marker."
  3617.  
  3618.                     MoveToTempPos               Moves the cursor to the
  3619.                                                 saved temporary marker.
  3620.  
  3621.                     NullCmd                     No operation. Calls the
  3622.                                                 editor, but performs no
  3623.                                                 function. Can be used to
  3624.                                                 cause a keystroke to have
  3625.                                                 no effect.
  3626.  
  3627.                     OutdentBlock                Deletes a leading space, if
  3628.                                                 any, from the beginning of
  3629.                                                 each line in the
  3630.                                                 highlighted (selected)
  3631.                                                 text.
  3632.  
  3633.                     PageDown                    Moves cursor down by number
  3634.                                                 of lines in the window.
  3635.  
  3636.                     PageScreenDown              Scrolls screen down by
  3637.                                                 numer of lines in the
  3638.                                                 window, leaving cursor
  3639.                                                 position unchanged.
  3640.  
  3641.                     PageScreenUp                Scrolls screen up by numer
  3642.                                                 of lines in the window,
  3643.                                                 leaving cursor position
  3644.                                                 unchanged.
  3645.  
  3646.  
  3647.  
  3648.  
  3649.                                   - 55 -
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.                     Table 1.2: TEMC editor commands (continued)____________
  3657.  
  3658.                     PageUp                      Moves cursor up by number
  3659.                                                 of lines in the window.
  3660.  
  3661.                     PaintScreen                 Redraws the entire window,
  3662.                                                 assuming that the screen
  3663.                                                 still correctly displays
  3664.                                                 what the editor last drew
  3665.                                                 on it.
  3666.  
  3667.                     ReDo                        Performs an Redo operation.
  3668.                                                 Exactly what happens
  3669.                                                 depends on the option
  3670.                                                 settings.
  3671.  
  3672.                     RightOfLine                 Moves cursor to end of
  3673.                                                 current line.
  3674.  
  3675.                     RightOfWord                 Moves cursor to the next
  3676.                                                 column that follows the end
  3677.                                                 of a word.
  3678.  
  3679.                     ScrollScreenDown            Scrolls screen down one
  3680.                                                 line, leaving cursor
  3681.                                                 position unchanged.
  3682.  
  3683.                     ScrollScreenUp              Scrolls screen up one line,
  3684.                                                 leaving cursor position
  3685.                                                 unchanged.
  3686.  
  3687.                     SetAutoIndent               Sets the Auto Indent option
  3688.                                                 On.
  3689.  
  3690.                     SetAutoOutdent              Sets the Backspace
  3691.                                                 Unindents option On.
  3692.  
  3693.                     SetBlockBeg                 Sets the beginning of the
  3694.                                                 selected text to be the
  3695.                                                 character at the current
  3696.                                                 cursor location.
  3697.  
  3698.                     SetBlockEnd                 Sets the end of the
  3699.                                                 selected text to be the
  3700.                                                 character at the current
  3701.                                                 cursor location.
  3702.  
  3703.                     SetCursorThroughTabMode     Sets the Cursor Through
  3704.                                                 Tabs option On.
  3705.  
  3706.                     SetInsertMode               Sets Insert/Overwrite
  3707.                                                 option to Insert.
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.                                   - 56 -
  3714.  
  3715.  
  3716.  
  3717.  
  3718.  
  3719.  
  3720.                     Table 1.2: TEMC editor commands (continued)____________
  3721.  
  3722.                     SetMark                     Sets a marker to point to
  3723.                                                 the character at the
  3724.                                                 current cursor location, so
  3725.                                                 a later MoveToMark(n)
  3726.                                                 comand can restore the
  3727.                                                 cursor. Use the syntax
  3728.                                                 SetMark(n), where n is a
  3729.                                                 one digit number, 0-9.
  3730.  
  3731.                     SetOptimalFillMode          Sets Optimal Fill option
  3732.                                                 On.
  3733.  
  3734.                     SetPrevPos                  Sets a marker (the previous
  3735.                                                 position marker) to point
  3736.                                                 to the character at the
  3737.                                                 current cursor location.
  3738.                                                 This marker location
  3739.                                                 changes only by a call to
  3740.                                                 SetPrevPos or SwapPrevPos.
  3741.  
  3742.                     SetTabbingMode              Sets Use Tab Char option
  3743.                                                 On.
  3744.  
  3745.                     SetTempPos                  Saves the cursor location
  3746.                                                 in a temporary marker that
  3747.                                                 can be used by some
  3748.                                                 internal editor commands.
  3749.                                                 This is not a practical
  3750.                                                 application in user-defined
  3751.                                                 macros. Use SetMark
  3752.                                                 instead.
  3753.  
  3754.                     SmartRefreshScreen          Redraws the window,
  3755.                                                 skipping any portions that
  3756.                                                 the editor is sure are
  3757.                                                 unmodified since the last
  3758.                                                 redraw.
  3759.  
  3760.                     SmartTab                    Inserts space or tab
  3761.                                                 characters in accordance
  3762.                                                 with the current settings
  3763.                                                 of the Use Tab Char option,
  3764.                                                 Tab Width.
  3765.  
  3766.                     SwapPrevPos                 Exchanges the values of the
  3767.                                                 cursor and the "previous
  3768.                                                 position marker."
  3769.  
  3770.                     ToggleAutoIndent            Toggles the state of the
  3771.                                                 Auto Indent option.
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.                                   - 57 -
  3778.  
  3779.  
  3780.  
  3781.  
  3782.  
  3783.  
  3784.                     Table 1.2: TEMC editor commands (continued)____________
  3785.  
  3786.                     ToggleAutoOutdent           Toggles the state of the
  3787.                                                 Backspace Unindents option.
  3788.  
  3789.                     ToggleCursorThroughTabMode  Toggles the state of the
  3790.                                                 Cursor Through Tabs option.
  3791.  
  3792.                     ToggleHideBlock             Toggles the state of the
  3793.                                                 highlight (selected) text
  3794.                                                 flag (see HighlightBlock).
  3795.  
  3796.                     ToggleInsert                Toggles state of
  3797.                                                 Insert/Overwrite option.
  3798.  
  3799.                     ToggleOptimalFillMode       Toggles state of Optimal
  3800.                                                 Fill option.
  3801.  
  3802.                     ToggleTabbingMode           Toggles state of Use Tab
  3803.                                                 Char option.
  3804.  
  3805.                     TopOfScreen                 Moves cursor to the top
  3806.                                                 line currently displayed in
  3807.                                                 the window, leaving column
  3808.                                                 unchanged.
  3809.  
  3810.                     UnDo                        Performs an Undo operation.
  3811.                                                 Exactly what happens
  3812.                                                 depends on the option
  3813.                                                 settings.
  3814.  
  3815.                     WordLeft                    Moves cursor to beginning
  3816.                                                 of previous word, or to end
  3817.                                                 of previous line, whichever
  3818.                                                 is first.
  3819.  
  3820.                     WordRight                   Moves cursor to beginning
  3821.                                                 of next word, or to the end
  3822.                                                 of a line, whichever is
  3823.                                                 first.
  3824.  
  3825.                     -------------------------------------------------------
  3826.  
  3827.  
  3828.                     The following commands cause an exit from the editor,
  3829.                     for example, by bringing up a dialog box. The macro
  3830.                     resumes when the editor window regains the focus.
  3831.  
  3832.  
  3833.                     The keys listed next to some of the commands below are
  3834.                     the ones used by default when the Alternate mode of the
  3835.                     IDE is selected.
  3836.  
  3837.                     AddWatch            Adds a watch item (Ctrl-F7).
  3838.  
  3839.  
  3840.  
  3841.                                   - 58 -
  3842.  
  3843.  
  3844.  
  3845.  
  3846.  
  3847.  
  3848.                     ChangeDirectory     Opens a dialog box for changing the
  3849.                                         current directory.
  3850.                     ChangeModeFlags     Used after a command such as
  3851.                                         ToggleInsert which changes the
  3852.                                         state of an editor option switch.
  3853.                                         Causes the IDE to update various
  3854.                                         menu items and/or icons.
  3855.                     ClipCopy            Copys selected text to Clipboard
  3856.                                         (Ctrl-Ins).
  3857.                     ClipCut             Cuts selected text to Clipboard
  3858.                                         (Shift-Del).
  3859.                     ClipPaste           Pastes Clipboard into buffer at
  3860.                                         cursor (Shift-Ins).
  3861.                     ClipShow            Shows Clipboard (no hot key
  3862.                                         defined).
  3863.                     CloseWindow         Closes editor window (Alt-F3).
  3864.                     CompileFile         Compiles current buffer (Alt-F9).
  3865.                     CompileMenu         Selects Compile menu (Alt-C).
  3866.                     CompilerOptions     Selects the Options Compiler menu
  3867.                     DebugMenu           Selects Debug menu (Alt-D).
  3868.                     EditMenu            elects Edit menu (Alt-E).
  3869.                     FileMenu            Selects File menu (Alt-F).
  3870.                     GetFindString       Opens a dialog box for the Search
  3871.                                         operation. (Alt-S F)
  3872.                     GotoWindow1         Selects window #1 (Alt-1).
  3873.                     GotoWindow2         Selects window #2 (Alt-2).
  3874.                     GotoWindow3         Selects window #3 (Alt-3).
  3875.                     GotoWindow4         Selects window #4 (Alt-4).
  3876.                     GotoWindow5         Selects window #5 (Alt-5).
  3877.                     GotoWindow6         Selects window #6 (Alt-6).
  3878.                     GotoWindow7         Selects window #7 (Alt-7).
  3879.                     GotoWindow8         Selects window #8 (Alt-8).
  3880.                     GotoWindow9         Selects window #9 (Alt-9).
  3881.                     Help                Opens the Help window (F1).
  3882.                     HelpMenu            Selects Help menu (Alt-H).
  3883.                     HelpIndex           Display the Help system't index
  3884.                                         (Shift-F1)
  3885.                     Inspect             Inspects item (Alt-F4).
  3886.                     LastHelp            Opens previous help window (Alt-
  3887.                                         F1).
  3888.                     MakeProject         Makes project (F9).
  3889.                     Menu                Highlights top menu bar.
  3890.                     Modify              Evaluates expression/modify
  3891.                                         variable (Ctrl-F4).
  3892.                     NextError           Moves to next item in message
  3893.                                         window (Alt-F8).
  3894.                     NextWindow          Selects next window in IDE (F6).
  3895.                     OpenFile            Opens dialog box for File Open
  3896.                                         (F3).
  3897.                     OptionsMenu         Selects Options menu (Alt-O).
  3898.                     PrevError           Moves to previous item in message
  3899.                                         window (Alt-F7).
  3900.                     PrintBlock          Writes selected text to the
  3901.                                         printer.
  3902.  
  3903.  
  3904.  
  3905.                                   - 59 -
  3906.  
  3907.  
  3908.  
  3909.  
  3910.  
  3911.  
  3912.                     ProjectMenu         Selects Project menu (Alt-P).
  3913.                     Quit                Exits the IDE (Alt-X).
  3914.                     ReadBlock           Opens dialog box requesting a file
  3915.                                         name to be read into the buffer at
  3916.                                         the cursor location and marked as
  3917.                                         selected text.
  3918.                     RepeatSearch        Searches again, using previous
  3919.                                         parameters.
  3920.                     Replace             Opens an dialog box for the Replace
  3921.                                         operation.
  3922.                     ResetProgram        Resets program being debugged
  3923.                                         (Ctrl-F2).
  3924.                     RunMenu             Selects Run menu (Alt-R).
  3925.                     RunProgram          Makes and runs current executable
  3926.                                         (Ctrl-F9).
  3927.                     RunToHere           Runs program until statement at
  3928.                                         cursor (F4).
  3929.                     SaveFile            Saves current editor buffer (F2).
  3930.                     SaveFileAs          Opens dialog for File SaveAs.
  3931.                     SearchMenu          Selects Search menu (Alt-S).
  3932.                     Step                Step over (F8).
  3933.                     SystemMenu          Selects Sytem menu (Alt-Spacebar).
  3934.                     ToggleBreakpoint    Sets/Clears a breakpoint at the
  3935.                                         cursor location
  3936.                     Trace               Trace into (F7).
  3937.                     Transfer0           Selects nth item from transfer menu
  3938.                     Transfer1           .
  3939.                     Transfer2           .
  3940.                     Transfer3           .
  3941.                     Transfer4           .
  3942.                     Transfer5           .
  3943.                     Transfer6           .
  3944.                     Transfer7           .
  3945.                     Transfer8           .
  3946.                     Transfer9           .
  3947.                     ViewCallStack       Views Call Stack (Ctrl-F3).
  3948.                     ViewUserScreen      Displays User Screen (Alt-F5).
  3949.                     WindowList          Displays window list (Alt-0).
  3950.                     WindowMenu          Selects Window menu (Alt-W).
  3951.                     WindowCascade
  3952.                     WindowTile
  3953.                     WordHelp            Context sensitive help (Ctrl-F1).
  3954.                     WriteBlock          Opens dialog box requesting a file
  3955.                                         name to which the selected text
  3956.                                         will be written.
  3957.                     ZoomWindow          Zooms/unzoomd current window (F5).
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.                                   - 60 -
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976. INDEX
  3977. ___________________________________________________________________________
  3978.  
  3979.  
  3980.  
  3981.  
  3982.  
  3983. [ ] GREP operator 15                    command line
  3984. /? THELP help option 35, 37               syntax
  3985. $ GREP operator 15                          CPP 9
  3986. * GREP operator 15                      compilers
  3987. + GREP operator 15                        Turbo editor macro 42
  3988. . GREP operator 15                      $CONFIG transfer macro 42
  3989. \ GREP operator 15                      configuration files 42
  3990. ^ GREP operator 15                        BCC file 9
  3991. ? THELP option 35, 37                     CPP (preprocessor) and 9
  3992.                                         conversion
  3993.                                           trigraphs 39
  3994. A                                       CPP (preprocessor) 9-11
  3995. autodependencies                          command-line options and syntax 9
  3996.   explicit dependencies and 43            directory 9
  3997.                                           example of use 10
  3998.                                           files
  3999. B                                           compiling 10
  4000. BGIOBJ (graphics converter) 2-9           -P option (source file names and
  4001.   advanced features 5                       line numbers) 10
  4002.   command-line syntax 2, 6                wildcards and 9
  4003.   components 6
  4004.   example 4
  4005.   graphics.h and 7                      D
  4006.   options                               -d GREP option (directories) 12
  4007.     destination file 6                  /D OBJXREF option (directory) 21
  4008.     /F 6                                debugging
  4009.     file name 6                           include files 9
  4010.     file name (/F) 5                      macros 9
  4011.     public name 6                       $DEF transfer macro 42
  4012.     segment class 7                     Defines option
  4013.     segment name 6                        transfer macro 42
  4014.     source file 6                       $DEP transfer macro 42
  4015.                                         dependencies
  4016.                                           explicit 42
  4017. C                                           autodependencies and 43
  4018. -c GREP option (count only) 12          $DIR transfer macro 43
  4019. /C THELP option (select color) 35       directories
  4020. $CAP EDIT transfer macro 41               CPP (preprocessor) 9
  4021. $CAP MSG transfer macro 41                GREP option 12
  4022. case sensitivity                          include files
  4023.   GREP option 12                            transfer macro 44
  4024. characters                                libraries
  4025.   trigraph                                  transfer macro 44
  4026.     converting 39                         .OBJ files 21
  4027. $COL transfer macro 42                    transfer macro 43
  4028. columns                                 DLLs
  4029.   numbers 42                              creating 43
  4030.  
  4031.  
  4032.  
  4033. Index                                                                    61
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040. DOS                                       path
  4041.   commands                                  macros 43
  4042.     running from the IDE 46               saving
  4043. $DRIVE transfer macro 43                    all 46
  4044.                                           searching 11-19
  4045.                                           source
  4046. E                                           BGIOBJ 6
  4047. editor                                  filters 41
  4048.   macro language (TEML)                   GREP 42
  4049.     using 42                              Resource Compiler 42
  4050. $EDNAME transfer macro 43                 TASM 42
  4051. $ERRCOL transfer macro 43               fonts
  4052. $ERRLINE transfer macro 43                adding to graphics library 3
  4053. $ERRNAME transfer macro 43                files, converting to .OBJ files 2
  4054. errors                                    included with Borland C++ 3
  4055.   linker                                  linker errors and 5
  4056.     graphics drivers and fonts 5          linking 2-9
  4057.   OBJXREF (list) 30                       registering 3, 7
  4058. examples                                  stroked 2-9
  4059.   OBJXREF 25-30                             linking 2
  4060. .EXE files
  4061.   file name transfer macro 43
  4062.   $RC transfer macro and 45             G
  4063.   .RES files and 45                     graphics drivers
  4064. $EXENAME transfer macro 43                adding to graphics library 3
  4065. $EXT transfer macro 43                    converting to .OBJ files 2, 2-9
  4066.                                           included with Borland C++ 3
  4067.                                           linker
  4068. F                                           errors and 5
  4069. /F BGIOBJ option 6                        linking 2
  4070. /F BGIOBJ option (far routines) 5         registering 3, 7
  4071. /F OBJXREF option (include full         graphics.h (header file)
  4072.   library) 22                             BGIOBJ and 7
  4073. /F THELP option 36                      GRAPHICS.LIB
  4074. /F THELP option (Help file path and       adding to 3
  4075.   name) 35                              GREP (file searcher) 11-19
  4076. files                                     capturing messages 42
  4077.   dates                                   examples 16
  4078.     changing 38                           files to search 16
  4079.   destination                             help 12
  4080.     BGIOBJ 6                              literal character 15
  4081.   extensions 43                           matches 15
  4082.   linker response, used by OBJXREF        operators 15
  4083.     25, 29                                optimizing use of 14
  4084.   macros                                  options
  4085.     expanded 9                              case sensitivity (-i) 12
  4086.   matching                                  count only (-c) 12
  4087.     GREP option 12                          default 13, 14
  4088.   names                                     discussion 12
  4089.     macros                                  file names (printing) 14
  4090.       transfer 40                           -i (case sensitivity) 12
  4091.     printing (GREP) 14                      line numbers (-n) 13
  4092.   output, generated by OBJXREF 22           lines, nonmatching (-v) 13
  4093.                                             list matching files (-l) 12
  4094.  
  4095.  
  4096.  
  4097.                                   - 62 -
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.     -n (line numbers) 13                K
  4105.     -o (UNIX output format) 13          /K THELP option (change hot key)
  4106.     precedence 14                         35, 37
  4107.     regular expression search (-r)      keyboard
  4108.     13                                    trigraph program 39
  4109.     UNIX format (-o) 13
  4110.     updating (-u) 13
  4111.     -v 14                               L
  4112.     -v (nonmatching lines) 13           -l GREP option (list matching
  4113.     verbose 14                            files) 12
  4114.     word search (-w) 13                 /L OBJXREF command (linker response
  4115.   search strings 14                       file) 25
  4116.     white space in 16                   $LIB transfer macro 44
  4117.   using 11                              libraries
  4118.   wildcards and 16                        directories
  4119. GREP.COM 14                                 transfer macro 44
  4120. GREP2MSG.EXE 42                           files 20
  4121.                                             contents of 20
  4122.                                           graphics
  4123. H                                           adding driver and font files to
  4124. /H THELP option (help) 35, 37               3
  4125. header files                              OBJXREF
  4126.   graphics.h 7                              including all 22
  4127. help                                    $LINE transfer macro 44
  4128.   GREP (file searcher) 12               lines
  4129.   OBJXREF 21                              numbering 44
  4130.   THELP 35, 37                              printing (GREP) 13
  4131. hot keys                                linker
  4132.   scan codes 37                           error: segment exceeds 64K 5
  4133.                                           response files
  4134.                                             used by OBJXREF 25, 29
  4135. I                                       linking
  4136. -i GREP option (case sensitivity)         graphics drivers 2
  4137.   12
  4138. /I OBJXREF option (case
  4139.   sensitivity) 21                       M
  4140. IMPL2MSG.EXE 42                         macros
  4141. $IMPLIB transfer macro 43                 CPP (preprocessor) and 10
  4142. import libraries                          debugging 9
  4143.   IMPLIB program                          editor 42
  4144.     executing 43                          expanded
  4145.   transfer macro 43                         list of 9
  4146. $INC transfer macro 44                    preprocessing 10
  4147. include files                             preprocessor 9
  4148.   debugging 9                           MAKE (program manager)
  4149.   directories                             modifying 38
  4150.     transfer macro 44                     project files and 32
  4151. integrated environment                  $MEM transfer macro 44, 47
  4152.   DOS commands and 46                   memory
  4153.   memory needs 47                         requirements
  4154.                                             IDE 47
  4155.                                           transfer programs 44, 47
  4156.                                         Message window
  4157.                                           capturing output into 41
  4158.  
  4159.  
  4160.  
  4161. Index                                                                    63
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.   copying text from 46                      /F (include full library) 22
  4169. messages                                    ignore case (/I) 21
  4170.   capturing from programs 41                include full library (/F) 22
  4171.   column number 43                          include zero-length segment
  4172.   file name 43                              definitions (/Z) 22
  4173.   line number 43                            list file names (/V) 22
  4174.                                             modified reports 23
  4175.                                             /O (output file) 22
  4176. N                                           reports 23
  4177. -n command-line compiler option               by class type (/RC) 23, 27,
  4178.   CPP (preprocessor) and 9                    29
  4179. -n GREP option (line numbers) 13              by external reference (/RX)
  4180. /N OBJXREF option (limit reports)             23, 27
  4181.   23                                          by module (/RM) 23, 26
  4182. $NAME transfer macro 44                       by public names (/RP) 23, 26
  4183. $NOSWAP transfer macro 44                     by reference (/RR) 23, 26, 29
  4184. numbers                                       default type 29
  4185.   column 42                                   examples 25-29
  4186.   line 44                                     of all types (/RV) 23
  4187.                                               of module sizes (/RS) 23, 27
  4188.                                               of unreferenced symbol names
  4189. O                                             (/RU) 23, 28
  4190. -o GREP option (UNIX format output)           output file (/O) 22
  4191.   13                                          verbose (/RV) 23, 29, 30
  4192. /O OBJXREF option (output file for          /V (verbose output) 22
  4193.   reports) 22                               verbose report (/RV) 29
  4194. .OBJ files                                  /Z (include zero-length segment
  4195.   converting font files into 2              definitions) 22
  4196.   converting graphics drivers files       project files
  4197.   into 2                                    as response files 24
  4198.   defined 20                              project files (/P) 24
  4199.   directories 21                          reports 21
  4200.   names 20                                  examples 25-29
  4201.   response files and 24                     modifying 23
  4202. object modules                              output file for (/O) 22
  4203.   defined 20                              response files 20, 24
  4204.   names 20                                  example 29
  4205. OBJXREF (object module cross-               linker 25
  4206.   referencer) 20-31                       warnings 30
  4207.   directories 21                          wildcards and 21
  4208.   error messages 30                     operators
  4209.   examples of reports 26, 27, 28,         GREP 15
  4210.   29                                    $OUTNAME transfer macro 44
  4211.   help 21                               output
  4212.   /L command (linker response             capturing 41
  4213.   files) 25                             output file
  4214.   linker files                            generated by OBJXREF 22
  4215.     as response files 25
  4216.   options 20
  4217.     /N (limit information) 23           P
  4218.     /RV 23                              -P CPP (preprocessor) option
  4219.     /RC 27                                (source file names and line
  4220.     control 21                            numbers) 10
  4221.     directories (/D) 21
  4222.  
  4223.  
  4224.  
  4225.                                   - 64 -
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232. /P OBJXREF command (project files)      resources
  4233.   24                                      rebuilding automatically 42
  4234. path                                    response files
  4235.   transfer macro 44                       file-name extensions and 24
  4236. precedence                                formats 24
  4237.   GREP options 14                         free-form 24
  4238. PRJ2MAK (project file converter) 32         example 29
  4239. PRJCNVT (project file converter) 31       linker files and 25
  4240. $PRJNAME transfer macro 44                OBJXREF and 20, 24, 25
  4241. programs                                    example 29
  4242.   capturing output 41                     project files and 24
  4243.   file name 43                            TLINK, OBJXREF and 29
  4244.   memory assignments 47                 /RM OBJXREF option (reports) 23
  4245. project files                           /RP OBJXREF option (reports) 23
  4246.   OBJXREF and 24                        /RR OBJXREF option (reports) 23
  4247.   used by OBJXREF 29                    /RS OBJXREF option (reports) 23
  4248. projects                                /RU OBJXREF option (reports) 23
  4249.   files                                 /RV OBJXREF option (reports) 23
  4250.     converting from old versions 31     /RX OBJXREF option (reports) 23
  4251.     converting to MAKE files 32
  4252.     file name transfer macro 44
  4253. $PROMPT transfer macro 44               S
  4254. public names                            $SAVE ALL transfer macro 46
  4255.   defined 20                            $SAVE CUR transfer macro 46
  4256.                                         $SAVE PROMPT transfer macro 46
  4257.                                         scan codes 37
  4258. R                                       searches
  4259. -r GREP option (regular expression        text files 11-19
  4260.   search) 13                            standalone utilities 1
  4261. RC2MSG.EXE 42                           strings
  4262. .RC files                                 searching for
  4263.   compiling into a .RES file 45             as expressions (GREP) 13
  4264.   $RC transfer macro and 45                 in text files 11-19
  4265. /RC OBJXREF option (report) 27          swapping
  4266. /RC OBJXREF option (reports) 23           to User Screen 44
  4267. $RC transfer macro 45                   syntax
  4268. redirecting program output 41             CPP 9
  4269. registerbgidriver (function)
  4270.   BGIOBJ and 3, 7
  4271. registerbgifont (function)              T
  4272.   BGIOBJ and 3, 7                       TASM2MSG.EXE 42
  4273. registerfarbgidriver (function)         $TASM transfer macro 46
  4274.   BGIOBJ and 5, 7                       text
  4275. registerfarbgifont (function)             Message window 46
  4276.   BGIOBJ and 5, 7                       text files
  4277. .RES files                                searching 11-19
  4278.   binding to an .EXE file 45            THELP (Turbo Help utility) 33-38
  4279.   $RC transfer macro and 45               additional Help on highlighted
  4280. Resource Compiler                         word 34
  4281.   behavior                                cursor keys 34
  4282.     changing 45                           index 34
  4283.   capturing messages 42                   invoking 33
  4284.   transfer macro 45                       keywords 34
  4285.                                           loading 33
  4286.  
  4287.  
  4288.  
  4289. Index                                                                    65
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.   options 35-38                           $MEM 44
  4297.     colors (/C) 35                        $NAME 44
  4298.     colors (/C)  35                       $NOSWAP 44
  4299.     Help file path (/F) 35                $OUTNAME 44
  4300.     help file path (/F) 36                $PRJNAME 44
  4301.     help on (/?                           $PROMPT 44
  4302.       /H                                  $RC 45
  4303.         ?) 35, 37                         $SAVE ALL 46
  4304.     Help screen colors (/C) 35            $SAVE CUR 46
  4305.     help screen colors (/C) 35            $SAVE PROMPT 46
  4306.     hot keys (/K) 35, 37                  $TASM 46
  4307.     reassign hot keys (/K) 35, 37         $WRITEMSG 46
  4308.     removing THELP (/U) 35, 38          trigraphs
  4309.     screen colors (/C) 35                 translating 39
  4310.     /U (removing THELP) 35, 38            undo option (-u) 40
  4311.     /W (window options) 35              Turbo Assembler
  4312.     window options 38                     capturing messages 42
  4313.     window options (/W) 35                $TASM macro 46
  4314.   paging through 34                     TURBOC.CFG 9
  4315.   paste page 34
  4316.   previous screens 34
  4317.   quitting 34                           U
  4318.   removing from memory 35, 38           -u GREP option (updating) 13
  4319.   scan codes 37                         /U THELP option 38
  4320.   using 34                              /U THELP option (remove THELP) 35
  4321. TLINK (linker)                          UNIX
  4322.   response files                          format (GREP) 13
  4323.     OBJXREF and 25                      User Screen 44
  4324. TOUCH 38                                utilities
  4325. transfer macros                           standalone 1
  4326.   $CAP EDIT 41                            TOUCH 38
  4327.   $CAP MSG 41
  4328.   $COL 42
  4329.   $CONFIG 42                            V
  4330.   $DEF 42                               -v GREP option (nonmatching lines)
  4331.   defined 40                              13
  4332.   $DEP 42                               /V OBJXREF option (verbose output)
  4333.   $DIR 43                                 22
  4334.   DOS commands 46
  4335.   $DRIVE 43
  4336.   $EDNAME 43                            W
  4337.   $ERRCOL 43                            -w GREP option (word search) 13
  4338.   $ERRLINE 43                           /W THELP option (ser window
  4339.   $ERRNAME 43                             size/location) 35
  4340.   $EXENAME 43                           /W THELP option (window options) 38
  4341.   $EXT 43                               wildcards
  4342.   file names 40                           CPP (preprocessor) and 9
  4343.   glossary of 41                          OBJXREF and 21
  4344.   how expanded 40                         TOUCH and 38
  4345.   $IMPLIB 43                            $WRITEMSG transfer macro 46
  4346.   $INC 44
  4347.   instruction 41
  4348.   $LIB 44                               Z
  4349.   $LINE 44                              -z GREP option (verbose) 14
  4350.  
  4351.  
  4352.  
  4353.                                   - 66 -
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360. /Z OBJXREF option (include zero-
  4361.   length segment definitions) 22
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417. Index                                                                    67
  4418.  
  4419.