PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 1/14 TITLE : Brief common issues, questions and answers. Common BRIEF Installation/Configuration Issues: =============================================== Introduction ============ This document describes some common BRIEF Installation and Configuration issues. It discusses tips for troubleshooting and optimizing your BRIEF configuration and provides answers to some common questions. Where appropriate, page numbers from the Borland BRIEF User's Guide are given for the corresponding topic. Consult these pages for additional information. On-Line Support =============== Down Load BBS 408-439-9096 TechFax 800-822-4269 CompuServe GO BDEVTOOLS BIX JOIN BORLAND GEnie BORLAND Clean Boot ========== If you are experiencing problems in BRIEF that you cannot solve, CLEAN BOOT! The importance of a clean boot cannot be overemphasized. A clean boot means starting up your machine with as few programs as possible. Only the programs that are absolutely essential to DOS and BRIEF are loaded. For most users, this means that CONFIG.SYS has only the statements "FILES=...", "BUFFERS=...", and "SHELL=..." and the AUTOEXEC.BAT has only "PATH...", "PROMPT...", and "SET ..." Strange behaviors are often due to conflicts with other programs. By starting your machine in this minimal configuration, you can often identify the offending program. Configuration Parameters ======================== PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 2/14 TITLE : Brief common issues, questions and answers. BRIEF stores its configuration parameters in two places: the AUTOEXEC.BAT and the initial macros files. To best way to modify these parameters is to use BRIEF's Setup program, which will automatically place the correct parameter in the correct file. Alternatively, you can modify the two files directly to change your configuration. If you do so, however, please note that most flags and variables are case sensitive. Also, be sure your changes take effect by rebooting your machine and/or recompiling your initials macro file. Note that Setup sometimes will add additional macros in your initials macro file, so you should use Setup as your primary configuration tool. Setting Environment Variables (pages 141-157) ============================================== Because BRIEF relies on many environment variables to function correctly, you should understand how DOS handles these variables. By default, BRIEF will set up variables in the AUTOEXEC.BAT file with SET statements: eg. SET BHELP=c:\brief\help. Note that there is no space on either side of '='. These statements take effect when the batch file containing them is executed. If you notice that BRIEF is not behaving as expected, check that these statements have taken effect by typing "SET" at the DOS command line, and DOS will print out the current value of each environment variable. The space for these environment variables is allocated by the /e parameter in the line "SHELL=... /e:800" in the file CONFIG.SYS. By default, BRIEF will set aside 800 bytes. You should increase this number if you suspect that your variables are not taking effect. One note of caution: if you are using MSDOS' COMMAND.COM, be sure you have the /p parameter on this line, or else your AUTOEXEC.BAT will not execute. Also, if you manually set these environment variables from the command line, do so only at the primary shell, not the secondary shell. A secondary shell is a DOS prompt that a program provides you while it is still in memory. Typically, one would type "exit" to quit this shell and return to the executing program. Variables that are set here are lost when control is returned to the active program. For this reason, make sure you have PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 3/14 TITLE : Brief common issues, questions and answers. completely quit any active program (including BRIEF) before you set any environment variables from the command line. Memory (pages 144-146) ======================= One of BRIEF's most useful features is its ability to invoke your compiler, or to let you run other DOS programs. This ability is enhanced when you enable DOS commands to swap to EMS or disk in the Miscellaneous option of the Setup program. When swapping is off (the default), programs that are run from within BRIEF have a greatly reduced amount of memory in which to work. This is because BRIEF can only give these programs the largest block of memory that it's not using for itself. With swapping enabled, BRIEF steps aside and frees most of its memory for use by other programs by swapping most of itself to EMS memory or to disk. If you have enough EMS or a fast hard disk, you should consider turning this feature on. SET BPACKAGES=... (pages 159-166) ================================== For BRIEF to compile your programs, be sure the BCxxx and BPACKAGES variables have been configured correctly. See page 155 for a description of the BCxxx variables. In its simplest form, the SET BPACKAGES=... statement looks something like this: SET BPACKAGES=c:t which tells BRIEF to use template editing package for files with a .c extension. The 't' is short for Template. Additional packages for the same extension (such as Version Control through Sourcerer's Apprentice) are separated with commas: SET BPACKAGES=c:t,vc Additional extensions and packages are separated with a semicolon: PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 4/14 TITLE : Brief common issues, questions and answers. SET BPACKAGES=c:t,vc;pas:s Some packages allow you to specify parameters, which appear after the package specification. For example, the package for C supports up to four additional parameters: SET BPACKAGES=c:t 1 1 0 1;pas:s For file extensions that BRIEF doesn't automatically support, use a hyphen to tell BRIEF to treat those files the same as files of another extension. For example, in the C/C++ programming language, files have .c, .h, .cpp, and .hpp extensions. By default, the C package supports .c extensions only. To use the C package on these other files, use the following: SET BPACKAGES=c,h,cpp,hpp-c:t 1 1 0 1;pas:s This line tells BRIEF to consider all extensions before the hyphen (.c, .h, .cpp, .hpp) equivalent to the extension after the hyphen (.c) and use the .c package for these extensions. Note that .c must also appear before the hyphen. Common Questions and Answers ============================ Q: What is the latest revision of BRIEF? A: Version 3.11. Q: How do I know what version of BRIEF I'm using? A: To find the specific revision look at the time stamp of the B.EXE. This time will reflect the version, major revision and minor revision for example 3:11 AM or 15:11 AM are version 3.11 BRIEF. Q: Why do I get an "Integer Divide by Zero Error" when I try to save a file or exit from BRIEF? A: This is a problem on newer machines that use the local bus video: e.g. Gateway 2000 using the Micronics motherboard. PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 5/14 TITLE : Brief common issues, questions and answers. Call TechFax or Borland's BBS for TI1047, which explains the problem and provides instructions on patching your copy of BRIEF. Q: Why do I get problems running the Setup program? A: There is probably a program or device driver already in memory that is conflicting with Setup. Do a clean boot and rerun Setup. After you are satisfied with Setup, then restore your AUTOEXEC.BAT and CONFIG.SYS to their original state. Q: Can I tell the Setup program not to write to my AUTOEXEC.BAT or CONFIG.SYS? A: Yes, Brief's Setup notifies you of changes and lets you specify alternate files to write to. Thus, you can make the changes yourself or write to other files. Q: I used the Setup program to set the borderless background color. But why doesn't it seem to have any effect? A: You also need to tell brief not to display borders as a default, for the borderless background color parameter to take effect. Q: Why doesn't my mouse work? A: Unlike Windows, BRIEF doesn't automatically load a mouse driver. Try running another DOS (not Windows) application that uses a mouse, to determine whether your mouse works correctly with other programs. Check to see that your mouse is a Microsoft-compatible mouse, as BRIEF supports only Microsoft and Microsoft-compatible mice. Also, try toggling the Mouse Reset Type in the Setup program from "Soft" to "Hard" and vice versa. Other solutions are to try the clone mouse with a real Microsoft mouse driver, or contact the mouse manufacturer for updated drivers. PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 6/14 TITLE : Brief common issues, questions and answers. Q: I've toggled the Mouse Reset Type from "Soft" to "Hard" (or vice versa.) But when I run Setup again, why does it tell me the mouse is set back to "Soft" ? A: If the Setup program does not reflect the correct Mouse Reset Type from your last Setup session, you need to edit and compile your initials macro yourself. Look for the line "(set_mouse_type 2 0 1 4)" in your initials macro file. The third parameter refers to the mouse reset type. Set it to 0 for Hard, and 1 for Soft. Then compile the macro by using "cm js.m" on the DOS command line, where "js.m" is the name of your initials macro file. Then BRIEF and Setup will properly recognize the reset type. Q: How do I remap the keyboard in BRIEF? A: The easiest way to reassign a key in BRIEF is to execute the KEYS macro, which lets you remap all of BRIEF's key assignments (p. 119). To assign a key to your own macro, first read about "assign_to_key(...)" in the BRIEF Macro Reference Guide. Then view BRIEF's keyboard.h file, which is where BRIEF makes most of its key assignments. We do not recommend changing keyboard.h yourself, but it is a good way to learn how macros are assigned. The best way to assign keys to your own macros is to define your macros in a file and invoke the "assign_to_key" statements in a macro that has the same name as the file. Then load this macro file on BFLAGS or explicitly on the command line. You may also want to check the BRIEF macros on our bulletin boards, as many popular keyboard layouts have been uploaded by others. Q: Why doesn't my keyboard behave properly? A: There are two parameters that affect keyboard behavior, both of which are configured in AUTOEXEC.BAT as part of "SET BFLAGS=..." First, try loading the enhanced keyboard driver by specifying "-D101key" as a parameter to BFLAGS. The file 101KEY.DRV must be in the directory as B.EXE. Another flag is the "-k" parameter, which helps make BRIEF more compatible with certain keyboards. (p. 147,150) PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 7/14 TITLE : Brief common issues, questions and answers. Q: When I start BRIEF, why don't I see a cursor? Q: Why do I get video display problems? A: Try adding the -p parameter to BFLAGS. (p. 147) Q: How can I configure BRIEF to run in 132 columns? A: BRIEF will only automatically switch into 43 or 50 line modes if the EGA.DRV driver is loaded. To use BRIEF in 132 column mode, or any other text mode, you must switch to that mode manually prior to running BRIEF. BRIEF will then display in the selected resolution. Keep in mind that BRIEF can run only in text modes; it does not support graphics modes. Q: Why don't Smart and Template Indenting work for my .CPP files? A: You need to tell BRIEF to treat .CPP files as if they were .C files like the following example: "SET BPACKAGES=...;cpp-c:t;..." Q: I have configured BRIEF to use spaces instead of tabs, but why do I still have tabs in my file? A: BRIEF will use spaces for tabs only from that point forward. BRIEF will not change the existing tabs to spaces. Use Translate to convert existing tabs into spaces. Q: What is the maximum number of characters I can have on a line? A: You can explicitly set the number of characters per line through Setup or the "-l#" parameter in BFLAGS. The maximum number of characters is 512. The default is 144. If you load a file with lines longer than the number of characters you have configured, BRIEF will never truncate a line as long as you do not modify it. However, if a line is PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 8/14 TITLE : Brief common issues, questions and answers. modified, it can have no more characters than your specified number. Modified lines with any character past this limit will be truncated. (p. 146) Q: Why do I see only one line when I edit my file? Q: Why are parts of my line missing? A: Make sure the lines in your file do not exceed the line length you specified (default = 144). If so, the file probably has only Line Feed () characters at the end of lines. BRIEF does not work on files with only as the line terminator. BRIEF requires each line to end in at least a Carriage Return () character. Any line which is created or modified inside BRIEF will have at the end. Q: Can BRIEF edit binary files? A: No. Q: Can I edit Unix files? A: No. Since Unix files typically end in only , BRIEF will not work on those files for the reasons above. Q: Why doesn't BRIEF recognize my long pathnames? A: Like DOS, BRIEF will not handle pathnames over 255 characters long. There are utilities and tools that allow longer pathnames, but that is nonstandard and application specific. Q: I have a small file and BRIEF adds a to the end of the file. Is there any way I can stop BRIEF from doing this? A: No, BRIEF will automatically append to the end. However, you can insert your own ^Z (End Of File) character PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 9/14 TITLE : Brief common issues, questions and answers. (ASCII 26) wherever you want the file to "terminate". By doing so, programs that use EOF characters will be happy. Q: Why doesn't BRIEF find the string I am looking for when I Search or Translate, but I know the string exists? A: Check the toggle on case-sensitivity with . Also, check the toggle on regular expressions with . Regular expression search is a powerful feature of BRIEF that uses special characters described in Chapter 3 of the User's Guide. If you're searching for one of these characters, you should precede it with '\' or turn off regular expressions. If you are trying to use regular expressions, make sure you understand the regular expression characters you are using. (p. 90-106) Q: Why don't I see any changes when I modify my environment variables? A: See the section above on setting environment variables. In short, make sure that you have allocated enough environment space, and that you are in a primary shell, not the shell from BRIEF. Also, if you are modifying BFLAGS, check that you don't have two flags canceling each other out, since almost all the flags in BLAGS act as toggles. Q: How can I send extended ASCII values to a printer? A: The handling of the Extended ASCII character set is printer dependent. You have to either set the printer in a mode that handles Extended ASCII or put a printer setup string in the document you want to print. Q: Why does BRIEF have troubles printing on my my network printer? A: The likely causes of this problem are in the configuration of the network printer. First, BRIEF prints only to the standard PRN device. Make sure your network correctly PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 10/14 TITLE : Brief common issues, questions and answers. handles redirection to PRN. Usually whatever you assign to LPT1: will act as PRN. Next increase the timeout value your printer uses. If this value is set too low, you will start getting each line printed on a separate sheet of paper. If you do not see the last page of your printout, make sure you have turned on EndCap, if available. Many printers will not automatically print the last page unless EndCap is turned on. Another way of forcing out the last page is to insert a formfeed (ASCII 12) as the last character in the file. To do so, hold down the press <1> and <2> on the numeric keypad while holding down the key. Q: My machine is on a network and/or using an expanded memory manager. Why is BRIEF behaving strangely? Q: Why am I getting garbage characters in my file, or why are parts of my file changing location? A: The most likely cause is memory corruption. If you are using QEMM, make sure the version is 6.02 or later. Earlier versions of QEMM (v6.00, v6.01, v6.01a, and v6.02a) have problems that may affect BRIEF. In general, you should use the latest versions of existing drivers. If you are using QEMM or another expanded memory manager (EMM), you may need to exclude areas of memory that other devices are using. EMMs often conflict with network drivers, so you should make sure that the EMM is used correctly with an exclude parameter(s). Another solution is to set the environment variable BEMS=0, which will disable BRIEF's expanded memory usage but will still allow it to swap to disk when swapping is turned on. Q: Why am I running out of memory when I compile or running macros that exit to DOS? A: Be sure you have swapping turned on, and enough expanded memory (EMS) or disk space to swap to. To verify, first run MEM or CHKDSK and note the amount of memory available to load your programs. Then run BRIEF and press to shell out to DOS. Check your memory again. If swapping is turned on, you'll notice that you have about 8K fewer bytes available. If the difference is significantly greater, then PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 11/14 TITLE : Brief common issues, questions and answers. swapping is either not turned on, or you don't have enough EMS or disk space to swap to. Check that you have exactly one 'M' (upper-case M, the swapping flag) in BFLAGS. If there are two, the second is toggling off the first. Also be sure the 'M' is not followed by a number, which gives the flag a different meaning. Q: I have swapping turned on, but why am I still getting out of memory messages? A: This is usually caused by a combination of things: dBRIEF, macros, and long line lengths are some of the factors that impact memory. As a rule, explicitly specify a line length just long enough to accommodate your longest lines. The longer the specified length, the more memory BRIEF is using. dBRIEF is a set of add-on macros that provide dBase language support. Like any other macro, loading dBRIEF will reduce the amount of memory with which BRIEF works. In general, if you run out of memory while trying to run a macro,temporarily reduce your line length or don't load any other macros such as dBRIEF. Q: How do I compile from within BRIEF if my compiler is not in the Setup program's list? A: Use the Setup program's File Extensions to create/select the file extension for type of source code you want to compile. Then when prompted, select Custom as your compiler and type in the command line to invoke your compiler. This should be the same command you would use at the DOS prompt to compile (without linking). After Setup updates your configuration, reboot your machine and test your compiler from within BRIEF. If your Custom compiler uses Microsoft style error messages and sets an Errorlevel > 0 for compilation errors, BRIEF parses the error file, displays any error message on the status line, and locates the line number for you. If BRIEF does not parse your error file, entering will allow you to see the output from your compiler. Alternatively, if you have a good knowledge of Regular Expressions, you can customize BRIEF's compile/error handling macros to parse your error file. You will need to PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 12/14 TITLE : Brief common issues, questions and answers. modify two macro files: COMPILE.CB and ERRORFIX.CB. COMPILE.CB assembles the command line that BRIEF passes to DOS, and ERRORFIX.CB contains regular expression statements that check for errors. Also, call the company that makes your compiler, as they may have information on how to modify BRIEF to work with their products. Q: Why am I having problems compiling my macros from the DOS command line? A: To compile the C-style macros with the .cb extension, use "cb". To compile the initials macro, which has a .m extension and is in the older Lisp-style syntax, use "cm". Q: I wrote a BRIEF macro to cut and paste between buffers, but it keeps giving me out of memory messages. A: In order for BRIEF's Undo to work every time you cut or copy to scrap, BRIEF has to create a buffer to hold the selected text. If the cutting and pasting occurs within a loop, then memory gets used up at a much faster rate. Usually you will just get a message that you are losing your Undo information, because BRIEF needs to flush its buffers. Q: Where can I get help writing macros? A: First, consult the Macro Language Guide for a description of the macro language and of the existing macros. Since the macro language is very similar to the C programming language, users who already know C can jump right in after noting the small differences between the two languages. For additional help, look at Borland's bulletin board or that of various on-line services for macros that have already been written by other BRIEF users. Even if you don't find a macro that does exactly what you expect, you may be able to study the source and tailor it to your needs, to provide examples on usage, or to give you suggestions in writing your own macros. PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 13/14 TITLE : Brief common issues, questions and answers. BRIEF for OS/2 ============== Q: Is BRIEF for OS/2 an Presentation Manager application. A: No, it is a DOS application rewritten for OS/2 and the HPFS file system (BRIEF v3.1). Q: What is the current version of BRIEF for OS/2? A: The current version of BRIEF for OS/2 is v3.15 dated 10/28/92 Q: I can't close the BRIEF OS/2 session, what do I do? A: This problem started occurring after the release of OS/2 v2.0. It seems that BRIEF can't exit when other DOS windows are opened after the BRIEF session has started. To exit, you need to close all the DOS applications started after BRIEF. Then BRIEF will exit. Q: Why can't another application access a file I am editing with BRIEF? A: Since OS/2 is multitasking, BRIEF opens files using Deny All attribute. This is BRIEF's way of locking the file and notifying other applications that work is in progress. Q: Why is BRIEF's CPU usage is so high? A: This is due to the method BRIEF uses for mouse control. The only way around this situation is turning off mouse support in BRIEF. dBRIEF ====== Q: What is dBRIEF?. PRODUCT : Brief NUMBER : 1298 VERSION : 3.1 OS : DOS DATE : October 25, 1993 PAGE : 14/14 TITLE : Brief common issues, questions and answers. A: dBRIEF is a set of macro files and one executable which provide additional functionality for the dBase dialect programmer. Features like search and translate across buffers, printing of the files with lines drawn around conditionals, and reindenting of their source code are a few examples. Q: I have installed dBRIEF but why does it not seem to be work? A: Check the following: 1. BPATH must have the path to the dBRIEF macros as the last item on the line. 2. BPACKAGES must have "default-prg:s" as the first item on the line. 3. BFLAGS must include "-mdbrief" as a parameter. Q: How do I set dBRIEF to use a different language dialect? A: While in dBRIEF press . Type setup and press return. When the setup dialog appears, specify the dialect into the area labeled Language Dialect. Check the dBRIEF User's Guide for the dialects supported by dBRIEF. Q: Does dBRIEF work with BRIEF for OS/2? A: No, the dBRIEF.COM program is a DOS application only. BRIEF and dBRIEF should run in an OS/2 DOS window though. DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.