diff options
Diffstat (limited to 'ja_JP.eucJP/man/man1/global.1')
-rw-r--r-- | ja_JP.eucJP/man/man1/global.1 | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/ja_JP.eucJP/man/man1/global.1 b/ja_JP.eucJP/man/man1/global.1 new file mode 100644 index 0000000000..4f5dc5c4f6 --- /dev/null +++ b/ja_JP.eucJP/man/man1/global.1 @@ -0,0 +1,135 @@ +.\" +.\" Copyright (c) 1996, 1997 Shigio Yamaguchi. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by Shigio Yamaguchi. +.\" 4. Neither the name of the author nor the names of any co-contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" jpman %Id: global.1,v 1.3 1997/07/27 12:54:52 horikawa Stab % +.\" +.Dd Apr 21, 1997 +.Dt GLOBAL 1 +.Os BSD 4 +.Sh 名称 +.Nm global +.Nd 指定した関数の位置を表示する +.Sh 書式 +.Nm global +.Op Fl acrx +.Ar name +.Sh 解説 +.Nm +は C や Yacc のソースファイル中から特定の関数の位置を見つけ出します。 +.Nm +は、ソースツリー(サブディレクトリやソースファイルを持つディレクトリ)も +扱うことができます。 +ツリー内のどこにあろうと、オブジェクトの相対パスを得ることができます。 + +.Nm +は関数定義だけではなく、関数参照の位置も把握し、二重のエントリも +取り扱うことができます。 +.Pp +このコマンドを使う前に、ソースツリーのルートディレクトリで +.Xr gtags 1 +を実行しなければなりません。 +.Pp +以下のオプションが使用可能です: +.Bl -tag -width Ds +.It Fl a +絶対パスで表示します。デフォルトでは相対パス名で表示します。 +.It Fl c +指定された文字列で始まる名前の関数の候補を表示します。 +文字列が指定されない場合、すべての関数の名前を表示します。 +.It Fl r +関数の参照場所を表示します。 +デフォルトでは、関数の定義場所を表示します。 +.It Fl x +デフォルトの出力に加えて、行番号と行の内容を表示します。 +.It Ar name +関数の名前です。perl の正規表現を用いることができます。 +.Sh 関連ファイル +.Bl -tag -width tags -compact +.It Pa GTAGS +関数定義に関するタグファイルです。 +.It Pa GRTAGS +関数参照に関するタグファイルです。 +.El +.Sh 環境変数 +以下の環境変数が global の実行に影響します。 +.Pp +.Bl -tag -width indent +.It Ev GTAGSROOT +ソースツリーのルートディレクトリです。 +.It Ev GTAGSDBPATH +gtags のデータベースが存在するディレクトリです。 +この値は GTAGSROOT が定義されていない場合は無視されます。 +.It Ev GTAGSLIBPATH +この変数が設定されていると、ライブラリ関数を探すパスとして +用いられます。指定された関数がソースツリー内に見つからない場合、 +global はこのパスも検索します。 +.Sh 使用例 + + % ls -F + Makefile src/ lib/ + % gtags + % global main + src/main.c + % global -x main + main 10 src/main.c main (argc, argv) { + % global -x '^[sg]et' + set_num 20 lib/util.c set_num(values) + get_num 30 lib/util.c get_num() { + % global -rx '^[sg]et' + set_num 113 src/op.c set_num(32); + set_num 225 src/opop.c if (set_num(0) > 0) { + get_num 90 src/op.c while (get_num() > 0) { + % cd lib + % global -rx '^[sg]et' + set_num 113 ../src/op.c set_num(32); + set_num 225 ../src/opop.c if (set_num(0) > 0) { + get_num 90 ../src/op.c while (get_num() > 0) { + % global strlen + % (cd /usr/src/sys; gtags) + % setenv GTAGSLIBPATH /usr/src/sys + % global strlen + ../../../usr/src/sys/libkern/strlen.c + % (cd /usr/src/lib; gtags) + % setenv GTAGSLIBPATH /usr/src/lib:/usr/src/sys + % global strlen + ../../../usr/src/lib/libc/string/strlen.c + +.Sh 診断 +.Nm +はエラーが発生すると 0 以外の値を、そうでなければ 0 を返します。 +.Sh 関連項目 +.Xr btreeop 1 , +.Xr gctags 1 , +.Xr gtags 1 , +.Xr htags 1 . +.Sh 作者 +Shigio Yamaguchi (shigio@wafu.netgate.net) +.Sh 歴史 +.Nm +コマンドは FreeBSD 2.2 で登場しました。 |