URI: 
       tsrc.1 - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       tsrc.1 (1142B)
       ---
            1 .TH SRC 1 
            2 .SH NAME
            3 src  \- find source code for executable
            4 .SH SYNOPSIS
            5 .B src
            6 [
            7 .B -n
            8 ]
            9 [
           10 .B -s
           11 .I symbol
           12 ]
           13 .I file
           14 .B ...
           15 .SH DESCRIPTION
           16 .I Src
           17 examines the named
           18 .I files
           19 to find the corresponding source code, which is then sent to the editor using
           20 .B B
           21 (see
           22 .MR sam (1) ).
           23 If
           24 .I file
           25 is an
           26 .MR rc (1)
           27 script, the source is the file itself.
           28 If
           29 .I file
           30 is an executable, the source is defined to be the single file containing the
           31 definition of
           32 .B main
           33 and
           34 .I src
           35 will point the editor at the line that begins the definition.
           36 .I Src
           37 uses
           38 .MR db (1)
           39 to extract the symbol table information that identifies the source.
           40 .PP
           41 .I Src
           42 looks for each
           43 .I file
           44 in the current directory, in
           45 .BR /bin ,
           46 and in the subdirectories of
           47 .BR /bin ,
           48 in that order.
           49 .PP
           50 The
           51 .B -n
           52 flag causes
           53 .B src
           54 to print the file name but not send it to the editor.
           55 The
           56 .B -s
           57 flag identifies a
           58 .I symbol
           59 other than
           60 .B main
           61 to locate.
           62 .SH EXAMPLES
           63 Find the source to the
           64 .B main
           65 routine in
           66 .BR /bin/ed :
           67 .IP
           68 .EX
           69 src ed
           70 .EE
           71 .PP
           72 Find the source for
           73 .BR strcmp :
           74 .IP
           75 .EX
           76 src -s strcmp rc
           77 .EE
           78 .SH SOURCE
           79 .B \*9/bin/src
           80 .SH "SEE ALSO"
           81 .MR db (1) ,
           82 .MR plumb (1) ,
           83 .MR sam (1) .