Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
83fd594a
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
83fd594a
编写于
2月 02, 2000
作者:
T
Thomas G. Lockhart
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add short chapter in developer's guide on formatting source code.
上级
6454ae37
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
86 addition
and
3 deletion
+86
-3
doc/src/sgml/postgres.sgml
doc/src/sgml/postgres.sgml
+2
-0
doc/src/sgml/programmer.sgml
doc/src/sgml/programmer.sgml
+8
-3
doc/src/sgml/sources.sgml
doc/src/sgml/sources.sgml
+76
-0
未找到文件。
doc/src/sgml/postgres.sgml
浏览文件 @
83fd594a
...
...
@@ -91,6 +91,7 @@
<!entity page SYSTEM "page.sgml">
<!entity protocol SYSTEM "protocol.sgml">
<!entity signals SYSTEM "signals.sgml">
<!entity sources SYSTEM "sources.sgml">
]>
<!-- entity manpages SYSTEM "man/manpages.sgml" subdoc -->
<Book Id="postgres">
...
...
@@ -268,6 +269,7 @@ Your name here...
suggestions for future development.
</Para>
</PartIntro>
&sources;
&arch-dev;
&options;
&geqo;
...
...
doc/src/sgml/programmer.sgml
浏览文件 @
83fd594a
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.2
0 1999/12/06 16:37:11
thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.2
1 2000/02/02 16:25:04
thomas Exp $
Postgres Programmer's Guide.
$Log: programmer.sgml,v $
Revision 1.21 2000/02/02 16:25:04 thomas
Add short chapter in developer's guide on formatting source code.
Revision 1.20 1999/12/06 16:37:11 thomas
Remove references to PostgreSQL as "public-domain" since that has a
specific meaning wrt copyright (or lack thereof).
...
...
@@ -81,6 +84,7 @@ Make new file current.sgml to hold release info for the current release.
<!entity page SYSTEM "page.sgml">
<!entity protocol SYSTEM "protocol.sgml">
<!entity signals SYSTEM "signals.sgml">
<!entity sources SYSTEM "sources.sgml">
]>
<book id="programmer">
...
...
@@ -187,6 +191,7 @@ Disable it until we put in some info.
<!-- development -->
&sources;
&arch-dev;
&options;
&geqo;
...
...
@@ -214,7 +219,7 @@ Disable it until we put in some info.
<!-- Keep this comment at the end of the file
Local variables:
mode:
sgml
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
...
...
@@ -224,7 +229,7 @@ sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:
"/usr/lib/sgml/CATALOG"
sgml-local-catalogs:
("/usr/lib/sgml/CATALOG")
sgml-local-ecat-files:nil
End:
-->
doc/src/sgml/sources.sgml
0 → 100644
浏览文件 @
83fd594a
<chapter>
<title>Postgres Source Code</title>
<sect1>
<title>Formatting</title>
<para>
Source code formatting uses a 4 column tab spacing, currently with
tabs preserved (i.e. tabs are not expanded to spaces).
</para>
<para>
For emacs, add the following (or something similar)
to your <filename>~/.emacs</filename>
initialization file:
<programlisting>
;; 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
</programlisting>
</para>
<para>
For <application>vi</application>, your
<filename>~/.vimrc</filename> or equivalent file should contain
the following:
<programlisting>
set tabstop=4
</programlisting>
or equivalently from within vi, try
<programlisting>
:set ts=4
</programlisting>
</para>
<para>
The text browsing tools <application>more</application> and
<application>less</application> can be invoked as
<programlisting>
more -x4
less -x4
</programlisting>
</para>
</sect1>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/lib/sgml/CATALOG")
sgml-local-ecat-files:nil
End:
-->
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录