Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
83fd594a
Commit
83fd594a
authored
Feb 02, 2000
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add short chapter in developer's guide on formatting source code.
parent
6454ae37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
3 deletions
+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
No files found.
doc/src/sgml/postgres.sgml
View file @
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
View file @
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
View file @
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:
-->
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment