Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ABRIDGED DOCUMENTATION
DESCRIPTION
-----------
QCP is a program to run compilers & other utilities from within
QEdit 2.08+. You hit a function key in QEdit, QCP decides which
program to run based on the name of the file you are editing,
runs it, and then "reads" the error messages from the compiler to
tell QEdit how to jump to the errors in your source code.
QCP can interface in the same manner to any external utility that
generates redirectable output containing "line numbers" that
refer to your original source file.
TABLE OF CONTENTS
-----------------
Description ................................................ 1
Table Of Contents .......................................... 2
File List .................................................. 3
Quick Installation ......................................... 3
Quick Start ................................................ 4
Running QCP ................................................ 5
Command Line Switches and QCP .............................. 6
/R -- Read Config Info from Disk ...................... 7
/C -- Configure QCP.EXE's Defaults .................... 7
/S -- Show QCP.EXE's Current Defaults ................. 7
/W -- Write New Error Output File ..................... 7
/O -- Output File Name ................................ 7
/M -- Macro File Name ................................. 8
file -- File to Compile ............................... 8
options -- Compiler Options ........................... 8
QEdit Macro Key Customization .............................. 9
Compiler Compatibility ..................................... 9
Custom Compiler Configurations ........................ 9
Compatible Compilers .................................. 10
I/O Redirection Problems, Tips ........................ 12
Microsoft Fortran 3.x ............................ 12
Microsoft MASM 4.0 ............................... 13
DBFAST 1.03 ...................................... 13
Norton Guides Database Compiler 1.04 ............. 14
Microsoft Quick Pascal 1.00 ...................... 14
Incompatible Compilers ................................ 15
Configuration Via QCP.DAT .................................. 15
Substitution Strings .................................. 16
QCP Configuration Commands ............................ 16
Summary of Command Line Switches ........................... 17
Summary of Substitution Strings ............................ 17
Summary of Configuration Commands .......................... 18
Error Messages ............................................. 18
Informative & Warning Messages ............................. 20
Acknowledgements & Contacts ................................ 21
Revision History ........................................... 22
QCP 2.08 Documentation Page 3
FILE LIST
---------
The following files constitute QCP:
LICENSE
-------
QCP is part of your QEdit package, and is covered by the QEdit
license agreement.
QUICK INSTALLATION
------------------
STEP 0
------
Set aside your original copies of all the QCP files in a safe
place. Always work on a copy, not the original!
STEP 1
------
PUT QCP.EXE AND QCP.DAT IN A CONVENIENT DIRECTORY ON YOUR DISK.
If you are going to use the macro creation feature of QCP, and
this is highly recommended, then make sure QMAC.EXE is accessible
along your PATH as well.
STEP 2
------
EDIT QCP.DAT TO SUIT THE FILE EXTENSION(S) YOU USE AND THE
COMPILER OR UTILITY PROGRAM THAT SHOULD BE INVOKED FOR EACH ONE.
It is assumed that the command line you specify for your compiler
will redirect the error messages from the compiler to a file, by
default called ERRORS.LST. This file can then be loaded into
QEdit for viewing, but more importantly it is read by QCP in
order to construct QEdit macros that will move your cursor to
each error in your file. So, typically each command line you use
in QCP.DAT should end with ">$O", which causes the output to be
redirected to the error file.
If this is the only configuration you are going to use, you will
probably want to "install" these options into your copy of
QCP.EXE permanently by typing "QCP /C" at a DOS prompt.
STEP 3
------
ADD THE MACRO DEFINITION(S) FROM QCP.TXT INTO YOUR
QCONFIG.DAT, AND USE QCONFIG TO INSTALL THESE KEY(S) INTO YOUR
COPY OF QEDIT.
Note that the default macro is set up to always create and read
the ERRORS.LST and ERRORS.MAC file in the CURRENT directory. If
you have a RAM disk or other fast disk drive, you will probably
want to edit the macro definition to put these files there.
Within the macro, the /O and /M command line switches for QCP are
used to make sure the filenames match. You may want to configure
these filenames into QCP permanently, and remove the references
to /O and /M in the macro definition.
QUICK START
-----------
Edit a file for which you created a definition in QCP.DAT. I.e.,
if you defined something for .C, then edit TEMP.C. Put in a
deliberate syntax error, something that you know the compiler
will generate an error message for. Save the file to disk.
QCP 2.08 Documentation Page 5
There are some other features of QCP you may want to take
advantage of, read on to find out about those, as well as how to
configure QCP's behavior to suit your specific needs.
RUNNING QCP
-----------
If you are having trouble getting QCP to work as described, more
than likely your file names are getting out of sync. Please make
sure that the file names (1) in your QEdit macro key, (2) in QCP
itself, and (3) in any batch files you use to run compilers; all
agree as to where and under what name each file is placed.
----------------------------------------------------------------
QCP: QEdit Compiler Program x.yy dd-mmm-yyyy
Copyright (C) 1989, Tim Farley. All Rights Reserved.
All QCP switches MUST precede the file name. Both "/" and "-"
are recognized as switch characters. However, each switch must be
preceded by its own switch character. Each switch must be
separated from the others by at least one space.
The switches that contain file names (/M and /O, optionally on /C
and /R) MUST NOT contain a space between the switch and the file
name.
The boolean switches, like /G and /Q, can have "+" or "-" behind
them to set the specified switch on or off. If nothing is behind
the switch, it is set on. If any character other than "+" or "-"
is behind a boolean switch, for instance "=", then the current
value is TOGGLED.
Please be aware that since /C writes data into the EXE file, it
is possible for your copy of QCP to be damaged by this operation.
Make sure you always have a clean, uninstalled copy of QCP safely
tucked away.
The Output file name can also be configured with the "..O"
command in QCP.DAT, however if /O is present it will override the
value specified in QCP.DAT.
The macro file name can also be configured using the "..M"
command in QCP.DAT, however if /M is present it will override the
value specified in QCP.DAT.
You may not want this to happen, especially if you want to insure
that the file names referred to in your QEdit macro key are the
same as those used by QCP. If so, just include a drive and/or
path specification in the file name. If you want them always to
be in the "current" directory, then use ".\" prior to each file
name.
COMPILER COMPATIBILITY
----------------------
The macro creation feature of QCP hinges on QCP's ability to read
the error messages created by your compiler. By default, QCP
assumes that your compiler issues error messages in this form:
Either single or double quotes can be used, but they must match
on either end of a given string. If you need to include a quote
mark inside one of the strings, use the other type of quote mark
to delimit it. Any number of commas and/or spaces (if present)
between the strings will be ignored.
QCP 2.08 Documentation Page 10
Command line is the normal compiler command line that would have
been on the line by itself.
Example:
You would set your unique string to "***ERROR" and your lead-in
string to "line".
COMPATIBLE COMPILERS
--------------------
Below are some cases of specific compilers, and the command line
switches or other actions necessary to make them conform to what
QCP is expecting. In many cases, you will want to add or
subtract switches to or from the sample command lines. Consult
your compiler manual.
QCP 2.08 Documentation Page 11
NOTES:
The /H switch for Microsoft Pascal is undocumented.
The Microsoft BASIC and FORTRAN, Clipper and FoxBase command
lines have not been tested by us personally.
Microsoft Menu Maker comes with the Microsoft Mouse.
We recommend you use the /W+ option when working with
Clipper, because of the way that Clipper writes its
output.
Many compilers will compile files other than the one specified,
due to an automatic "make" function built into the compiler.
This can sometimes result in either (1) QCP ignoring error
messages from the compiler, because they don't pertain to the
current file or (2) QCP jumping to erroneous error lines in the
current file, because it was unable to distinguish that they did
not pertain to the current file. Some of the compilers that are
prone to this are Clipper, Turbo Pascal, both of the Modula-2
compilers, and others. We plan to address this in a future
version of QCP.
QCP 2.08 Documentation Page 12
Below are some instances where just a simple command line will
not do the trick. Even if you do not use one of them, you may
want to read through them to see what kinds of configuration
tricks are possible.
We know of two utilities that can assist with compilers that use
Standard Error to display error messages. One is ERROUT.EXE,
which is a utility Microsoft ships with many of its recent
compiler products.
See the sections below for examples of the use of ERROUT and
CONCOPY with QCP.
You may wish to put this command line in a batch file instead of
invoking it directly, so that you can call up PAS2 and PAS3 of
the compiler as needed. If so, be sure to pass $O to the batch
file as a command line parameter.
QCP 2.08 Documentation Page 13
DBFAST 1.03
-----------
This dBASE III+ compatible compiler does not generate error
messages compatible with the default case. They look like this:
ECHO OFF
DBCOMP %1 -W -PF
COPY %1.ERR %2
DEL %1.ERR
The -PF switch redirects output to a file. This file always has
the same root name as the file being compiled, with an extension
of "ERR". The -W switch causes "warning" messages to also be
issued, which you may or may not desire. Use this line in
QCP.DAT:
which sets both the unique string and the lead-in string to the
string "Line #:"
QCP 2.08 Documentation Page 14
INCOMPATIBLE COMPILERS
----------------------
The following compilers cannot be made to work with QCP's macro
generation feature as far as we can tell. If you can figure out
a way to make one of these work, we'll be glad to add that
information to a future version of this DOC file.
and so on.
QCP 2.08 Documentation Page 16
SUBSTITUTION STRINGS
--------------------
Various sub-strings, in the form of "$c" where c is some
character, can be included in compiler command lines, macro key
templates and the QMAC command line template (see below), in
order to substitute values at run-time. They can be included in
any order. Some make more sense than others in certain contexts.
There is a chart listing all of them, with sample values, later
in this document.
You need not supply all or any of these commands in QCP.DAT, you
can mix and match as you see fit. Any that are not included will
default to the previously installed values in QCP.EXE. If more
than one of the same directive occurs in QCP.DAT, the last one
takes precendence.
ERROR MESSAGES
--------------
Various error conditions can occur when QCP operates, in which
case it will issue the following error messages. Each of these
will be preceeded by "QCP Error:" to remind you that an error
condition has occurred, and followed by a console beep.
You may have more than one QCP.EXE on your disk, or more than one
version of QCP present. If that is not true, your copy of QCP
may have been damaged due to disk error. Get a fresh copy from
your backup.
This means some sort of DOS error occurred while reading the data
file, either a bad sector, or premature EOF or something.
After parsing out the various switches, QCP could not find an
actual file name to pass to your compiler.
You specified a "/x" switch on the command line that QCP did not
recognize. Check the documentation for valid switches.
Only one of these errors will be displayed during any single run
of QCP. If any of these error messages were displayed, the DOS
ERRORLEVEL value will be set to 128 or higher when QCP exits.
QCP found a command named "..x" in your QCP.DAT, and did not
recognize it. See elsewhere in this documentation for the list
of supported configuration commands.
SemWare
4343 Shallowford Road
Suite C3A
Marietta, GA 30062-5022
REVISION HISTORY
----------------
Version 1.0 - 7-Feb-1989 - Initial release.