home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / editor / elvis / ref.doc < prev    next >
Text File  |  1994-01-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. REF(1)              UNIX Programmer's Manual               REF(1)
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ref - Display a C function header
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      rrrreeeeffff [-t] [-c _c_l_a_s_s]... [-f _f_i_l_e]... _t_a_g
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _r_e_f quickly locates and displays the header of a function.
  16.      To do this, _r_e_f looks in the "tags" file for the line that
  17.      describes the function, and then scans the source file for
  18.      the function.  When it locates the function, it displays an
  19.      introductory comment (if there is one), the function's
  20.      declaration, and the declarations of all arguments.
  21.  
  22. SSSSEEEEAAAARRRRCCCCHHHH MMMMEEEETTTTHHHHOOOODDDD
  23.      _r_e_f uses a fairly sophisticated tag look-up algorithm.  If
  24.      you supply a filename via ----ffff _f_i_l_e, then elvis first scans
  25.      the tags file for a static tag from that file.  This search
  26.      is limited to the tags file in the current directory.
  27.  
  28.      If you supply a classname via ----cccc _c_l_a_s_s, then elvis searches
  29.      for a tag from that class.  This search is not limited to
  30.      the current directory; You can supply a list of directories
  31.      in the environment variable _T_A_G_P_A_T_H, and _r_e_f will search
  32.      through the "tags" file in each directory until it finds a
  33.      tag in the desired class.
  34.  
  35.      If that fails, _r_e_f will then try to look up an ordinary glo-
  36.      bal tag.  This search checks all of the directories listed
  37.      in _T_A_G_P_A_T_H, too.
  38.  
  39.      If you've given the ----tttt flag, then _r_e_f will simply output the
  40.      tag line that it found, and then exit.  Without ----tttt, though,
  41.      _r_e_f will search for the tag line.  It will try to open the
  42.      source file, which should be in the same directory as the
  43.      tags file where the tag was discovered.  If the source file
  44.      doesn't exist, or is unreadable, then _r_e_f will try to open a
  45.      file called "_r_e_f_s" in that directory.  Either way, _r_e_f will
  46.      try to locate the tag, and display whatever it finds.
  47.  
  48. IIIINNNNTTTTEEEERRRRAAAACCCCTTTTIIIIOOOONNNN WWWWIIIITTTTHHHH EEEELLLLVVVVIIIISSSS
  49.      _r_e_f is used by _e_l_v_i_s' shift-K command.  If the cursor is
  50.      located on a word such as "splat", in the file "foo.c", then
  51.      _e_l_v_i_s will invoke _r_e_f with the command "ref -f foo.c splat".
  52.  
  53.      If _e_l_v_i_s has been compiled with the -DEXTERNAL_TAGS flag,
  54.      then _e_l_v_i_s will use _r_e_f to scan the tags files.  This is
  55.      slower than the built-in tag searching, but it allows _e_l_v_i_s
  56.      to access the more sophisticated tag lookup provided by _r_e_f.
  57.      Other than that, external tags should act exactly like
  58.      internal tags.
  59.  
  60.  
  61.  
  62.  
  63. Printed 6/13/92                                                 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. REF(1)              UNIX Programmer's Manual               REF(1)
  71.  
  72.  
  73.  
  74. OOOOPPPPTTTTIIIIOOOONNNNSSSS
  75.      ----tttt   Output tag info, instead of the function header.
  76.  
  77.      ----ffff _f_i_l_e
  78.           The tag might be a static function in _f_i_l_e.  You can
  79.           use several -f flags to have _r_e_f consider static tags
  80.           from more than one file.
  81.  
  82.      ----cccc _c_l_a_s_s
  83.           The tag might be a member of class _c_l_a_s_s.  You can use
  84.           several -c flags to have _r_e_f consider tags from more
  85.           than one class.
  86.  
  87. FFFFIIIILLLLEEEESSSS
  88.      ttttaaaaggggssss List of function names and their locations, generated
  89.           by _c_t_a_g_s.
  90.  
  91.      rrrreeeeffffssss Function headers extracted from source files
  92.           (optional).
  93.  
  94. EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  95.      TTTTAAAAGGGGPPPPAAAATTTTHHHH
  96.           List of directories to be searched.  The elements in
  97.           the list are separated by either semicolons (for MS-
  98.           DOS, Atari TOS, and AmigaDos), or by colons (every
  99.           other operating system).  For each operating system,
  100.           _r_e_f has a built-in default which is probably adequate.
  101.  
  102. NNNNOOOOTTTTEEEESSSS
  103.      You might want to generate a "tags" file the directory that
  104.      contains the source code for standard C library on your sys-
  105.      tem.  If licensing restrictions prevent you from making the
  106.      library source readable by everybody, then you can have
  107.      _c_t_a_g_s generate a "refs" file, and make "refs" readable by
  108.      everybody.
  109.  
  110.      If your system doesn't come with the library source code,
  111.      then perhaps you can produce something workable from the
  112.      _l_i_n_t libraries.
  113.  
  114. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  115.      elvis(1), ctags(1)
  116.  
  117. AAAAUUUUTTTTHHHHOOOORRRR
  118.      Steve Kirkendall
  119.      kirkenda@cs.pdx.edu
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Printed 6/13/92                                                 2
  130.  
  131.  
  132.  
  133.