寫程式的人員閱讀source code的機率相當大,這時候擁有一套好了source code瀏覽器就很重要了。
在這裡,我推薦GNU Global這一套軟體,他的優點如下:
GNU GLOBAL has following features:
* support C, C++, Yacc, Java and PHP4.
* work the same way across diverse environments. Currently, support followings:
o Generic shell command line
o Bash shell
o Vi clone editor (nvi, elvis, vim)
o Emacs editor (emacs, mule, xemacs)
o Glimmer editor
o Less viewer
o Web browser (See UNIX kernel source tour!.)
o Doxygen documentation system
如果你有使用過lxr(Linux Cross Reference)這個工具的話,就會更了解這個軟體的意義,比lxr更好用的地方是還能搭配editor,例如VIM(see global with Vim)。
安裝你的distribution所附的global軟體,在Debian下只要apt-get install global就可以了。接下來,把要檢視的source code解壓縮後,在目錄下執行
gtags
它會產生四個檔案:
'GTAGS'
Tag file for function definitions.
'GRTAGS'
Tag file for function references.
'GSYMS'
Tag file for other symbols.
'GPATH'
Tag file for path of source files.
如果你要產生HTML的文件方便瀏覽的話,請繼續執行
htags -Fnsa
會在目錄下產生一個HTML目錄,可以用browser觀看,畫面如這裡(感謝Rex)。
如果要有查詢的功能,指令要改成
htags -Ffnsa
也就是多加一個"f"的參數,這個功能要搭配web server才能用喔!因為有了global這一套,我現在寫軟體都是利用global + Vim
1. OpenOffice.org 的代替字型設定
2. OpenOffice.org Writer 部份的中文設定
3. OpenOffice.org Calc 的進階中文設定
4. OpenOffice.org Impress 的進階中文設定
5. OpenOffice.org 的基本中文設定