[ 永远的UNIX::UNIX技术资料的宝库 ]

首页 > 数据库 > 其它 > 正文
PostgreSQL7.0手册-开发者手册 -60. Postgres 源代码
编译:何伟平 laser@zhengmai.com.cn (2001-04-21 23:31:29)
第六十章. Postgres 源代码
格式
源代码格式使用每个制表符(tab)4列的空白,目前是保留制表符状态(也就是说制表符不被展开为空白)。 
对于使用 emacs 的人,把下面行(或者类似的东西)增加到你的~/.emacs 初始化文件里面去: 

;; check for files with a path containing "postgres" or "pgsql"
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.[ch]\\'" . pgsql-c-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.cc\\'" . pgsql-c-mode) auto-mode-alist))

(defun pgsql-c-mode ()
  ;; sets up formatting for Postgres C code
  (interactive)
  (c-mode)
  (setq-default tab-width 4)
  (c-set-style "bsd")             ; set c-basic-offset to 4, plus other stuff
  (c-set-offset 'case-label '+)   ; tweak case indent to match PG custom
  (setq indent-tabs-mode t))      ; make sure we keep tabs when indenting
对于 vi,你的 ~/.vimrc 或者相当的文件应该包含下面的东西: 
set tabstop=4
或者在 vi 里面键入 
:set ts=4
文本浏览工具 more 和 less 可以用下面命令调用 
more -x4
less -x4

--------------------------------------------------------------------------------
(http://www.fanqiang.com)
    进入【UNIX论坛

相关文章
PostgreSQL7.0手册-附录-文档 (2001-04-21 23:50:44)
PostgreSQL7.0手册-附录-日期/时间支持-CVS 仓库 (2001-04-21 23:48:48)
PostgreSQL7.0手册-教程 -73. Postgres SQL 高级特性 (2001-04-21 23:45:36)
PostgreSQL7.0手册-教程 -72. 查询语言 (2001-04-21 23:44:40)
PostgreSQL7.0手册-教程 -71. 开始 (2001-04-21 23:42:54)
PostgreSQL7.0手册-教程 -70. 体系结构 (2001-04-21 23:41:58)
PostgreSQL7.0手册-教程 -69. SQL (2001-04-21 23:41:23)
PostgreSQL7.0手册-开发者手册 -68. 分页文件 (2001-04-21 23:39:22)
PostgreSQL7.0手册-开发者手册 -67. 后端接口 (2001-04-21 23:38:34)
PostgreSQL7.0手册-开发者手册 -66. gcc 缺省优化 (2001-04-21 23:37:20)

===更多相关===
 

★  樊强制作 欢迎分享  ★