Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ctree(1) — NEXTSTEP 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctags(1)

ptags(1)

cman(1)

CTREE(1)  —  UNIX Programmer’s Manual

NAME

ctree − print C function-call trees

SYNOPSIS

ctree [-nqFGMST] [-i indent] [-l level] [-c columns] [-t tagpath] [functions...]

DESCRIPTION

Ctree uses the tags file produced by ctags(1) to print a display of the calling hierarchy in C programs.  This can be used as a “road map” for browsing large or unfamiliar software systems.  If no functions are given, all uncalled functions in the tags file (like main) are used.  Options provide control over formatting.  Default output looks like this:

Mptags(){ Case# Default#
   Error(){ Quiet Status }
   Int# Quiet^ Quote Status^ Verbose
   doTag(){
      FindTag(){ Error^
         SearchTagsFile(){ Error^ }
         null# tagpath
      }
   }
   ...
}

Mptags is the main function in a file called ptags.c.  Functions − Mptags, Error, doTag, etc − are marked with parenthesis ().  Macros − Case, Define, Int, etc − are marked with a pound sign #.  A circumflex ^ means a symbol has appeared earlier in the listing (so functions are only enumerated once).  Unmarked symbols − Quiet, Status, etc − are global variables.  Indentation and curly braces show the calling hierarchy; thus, doTag calls FindTag, which calls Error, SearchTagsFile, null, and tagpath. 

OPTIONS

-nput each symbol on a new line, instead of the compact form above. 

-FGMST
suppress printing of functions, globals, macros, structs, or typedefs, respectively.

-qquiet - don’t print the type labels (#, ()). 

-c columns
wrap lines greater than columns wide (default=80). 

-i indent
Use indent as the indentation string (three spaces is the default). 

-l level
limit the depth of the tree to level. 

-t tagpath
set the path of tag files searched to tagpath (the default is $TAGS, or failing that, tags). 

DIAGNOSTICS

Exits with status 1 if nothing was printed. 

FILES

tagstags file used

SEE ALSO

ctags(1), ptags(1), cman(1)

AUTHOR

Michael Hawley

4th Berkeley Distribution  —  May 30 1985

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