DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Browsing through your code with cscope

Troubleshooting

Unknown terminal type

You may see the error message

   Sorry, I don't know anything about your "term"
      terminal
If this message appears, your terminal may not be listed in the Terminal Information Utilities (terminfo) database that is currently loaded. Make sure you have assigned the correct value to TERM. If the message reappears, try reloading the Terminal Information Utilities.

You may also see

   Sorry, I need to know a more specific terminal type
      than "unknown"
If this message appears, set and export the TERM as described in ``Step 1: Set Up the Environment''.

Command line syntax for editors

cscope invokes the vi editor by default. You may override the default setting by assigning your preferred editor to the EDITOR environment variable and exporting EDITOR, as described in the section ``Step 1: Set Up the Environment''. Note, however, that cscope expects the editor it uses to have a command line syntax of the form

   $ editor +linenum filename
as does vi. If the editor you want to use does not have this command line syntax, you must write an interface between cscope and the editor.

Suppose you want to use ed, for example. Because ed does not allow specification of a line number on the command line, you will not be able to use it to view or edit files with cscope unless you write a shell script (called myedit here) that contains the following line:

   /usr/bin/ed $2
Now set the value of EDITOR to your shell script and export EDITOR:
   $ EDITOR=myedit export EDITOR
When cscope invokes the editor for the list item you have specified, for example, line 17 in main.c, it will invoke your shell script with the command line
   $ myedit +17 main.c
myedit will discard the line number ($1) and call ed correctly with the file name ($2). You will then have to execute the appropriate ed commands to display and edit the line because you will not be moved automatically to line 17 of the file.
Previous topic: Changing the value of a variable

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005