Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sbrowser(1)

.sbinit(5)

SBQUERY(1)  —  USER COMMANDS

NAME

sbquery — command-line interface to Sun SourceBrowser

SYNOPSIS

sbquery [ −break_lock ] [ −files_only ] [ −help_focus ] [ −help_filter [ language ]]
[ −max_memory size ] [ −no_case ] [ −no_source ] [ −no_update ] [ −o file ] [ −reg_expr ]
[ −symbols_only ] [ −version ] symbol

AVAILABILITY

Available with Sun FORTRAN 1.4, Modula-2 2.3, Pascal 2.1, C 1.1, and C++ 2.1

DESCRIPTION

sbquery is the command-line interface to Sun SourceBrowser, a source-level code browser. To use SourceBrowser, you issue queries which instruct SourceBrowser to find all occurrences of the symbol you have identified. These occurrences are called matches. 

To collect data for SourceBrowser, add the −sb option to the compiler command line. 

To issue a query from the command line, type sbquery followed by any command-line options and their arguments, followed by the symbol you want to search for. SourceBrowser then displays a listing of matches that includes the file in which the symbol appears, the line number, the function containing the symbol, and the source code containing the symbol. 

SourceBrowser includes two options designed to narrow your search. The Filter option is used to search for symbols based on how they are used in  program. For example, you could limit your search to declarations of variables. The Focus option limits your search to specific classes of code, such as particular programs, functions, or libraries. 

OPTIONS

−break_lock
Breaks the lock on a locked database. When you use this option, your database may be in an inconsistent state. To ensure consistency, remove the .sb subdirectory and recompile your program.

−files_only
Lists the files in which the symbols you are searching for appear.

−help_focus
Typing sbquery followed by this option displays a list of focusing options. To issue a focused query, type sbquery followed by a focusing option, followed by the symbol you want to search for. 

−help_filter language
Issuing this option without arguments causes SourceBrowser to display a list of languages for which filtering options are available. To display a list of filtering options for a language, type −help_filter, followed by the language name. To conduct a filtered query, type sbquery, followed by the filtering option, followed by the symbol you want to search for. 

−max_memory size
Specifies the approximate amount of memory, in bytes, that should be allocated before SourceBrowser uses temporary files when building the index file.

−no_case
Instructs sbquery not to consider case when searching for symbols in the source code that match the query symbol. 

−no_source
Causes SourceBrowser to display only the filename and line number associated with each match, and not to display the source.

−no_update
Causes SourceBrowser not to rebuild the index file when you issue a query following compilation.

−o file
Sends output to a named file instead of to standard out.

−reg_expr
Indicates that you are using regular expressions when issuing a query that includes wildcards.

−symbols_only
Displays a list of all symbols that match the patterns specified in your search pattern.

−version
Displays SourceBrowser’s current version number.

ENVIRONMENT

Environment variables store information SourceBrowser needs to know to browse the database. 

HOME The name of the user’s login directory. 

NSE_ENV The name of the activated NSE environment. 

PWD The full pathname of the current directory. 

SB_ATTEMPTS_MAX
The maximum number of times the index builder will try to access a locked database.

SUN_SOURCE_BROWSER_EX_FILE
The absolute pathname of the file sun_source_browser.ex . 

SUN_SOURCE_BROWSER_INIT_FILE
The absolute pathname of the .sbinit file. 

SEE ALSO

sbrowser(1), .sbinit(5)

Sun SourceBrowser Reference Manual for SunView

Sun SourceBrowser Reference Manual for OpenWindows

  —  Last change: 2 January 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026