1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
5
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
6
<title>Libdmapsharing Coding Standards</title>
7
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2" />
8
<link rel="home" href="index.html" title="libdmapsharing Reference Manual" />
9
<link rel="up" href="ch03.html" title="Libdmapsharing Internals" />
10
<link rel="prev" href="ch03.html" title="Libdmapsharing Internals" />
11
<link rel="next" href="server-internals.html" title="Libdmapsharing Server Internals" />
12
<meta xmlns="" name="generator" content="GTK-Doc V1.15 (XML mode)" />
13
<link xmlns="" rel="stylesheet" href="style.css" type="text/css" />
16
<table xmlns="" class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
19
<a accesskey="p" href="ch03.html">
20
<img src="left.png" width="24" height="24" border="0" alt="Prev" />
24
<a accesskey="u" href="ch03.html">
25
<img src="up.png" width="24" height="24" border="0" alt="Up" />
29
<a accesskey="h" href="index.html">
30
<img src="home.png" width="24" height="24" border="0" alt="Home" />
33
<th width="100%" align="center">libdmapsharing Reference Manual</th>
35
<a accesskey="n" href="server-internals.html">
36
<img src="right.png" width="24" height="24" border="0" alt="Next" />
41
<div class="refentry" title="Libdmapsharing Coding Standards">
42
<a id="coding-standards"></a>
43
<div class="titlepage"></div>
44
<div xmlns="" class="refnamediv">
49
<span xmlns="http://www.w3.org/1999/xhtml" class="refentrytitle">Libdmapsharing Coding Standards</span>
51
<p>Libdmapsharing Coding Standards —
52
Description of libdmapsharing's coding standards
55
<td valign="top" align="right"></td>
59
<div class="refsect1" title="Libdmapsharing Coding Standards">
61
<h2>Libdmapsharing Coding Standards</h2>
62
<div class="itemizedlist">
63
<ul class="itemizedlist" type="disc">
64
<li class="listitem">Use tabs to indent</li>
65
<li class="listitem">Use spaces to align</li>
66
<li class="listitem">Attempt to limit lines to 80 characters</li>
67
<li class="listitem">Use whitespace to keep expressions clear:
68
<pre class="programlisting">
69
int foo = x + 1 - bar (y);
71
<li class="listitem">In order to protect against an accidental use of assignment in a Boolean expression, use:
72
<pre class="programlisting">if (CONSTANT == variable)</pre>
74
<pre class="programlisting">if (variable == CONSTANT)</pre></li>
75
<li class="listitem">Braces should be formatted as follows:
76
<pre class="programlisting">
81
or, in the case of function definitions:
82
<pre class="programlisting">
88
<li class="listitem">Place a semicolon following function-like preprocessor macros because the lack of one might confuse tools such as <span class="application">indent</span> (even if the semicolon is actually repetitive):
89
<pre class="programlisting">
92
<li class="listitem">Perform a Git commit after finishing a single
94
<li class="listitem">Patches submitted should perform one task (e.g.,
95
don't add functionality and reformat existing code in the same
97
<li class="listitem">Git commit messages should be of the following form:
98
<div class="literallayout"><p>single�line�summary�with�no�period<br />
100
Optional�detailed�description.�This�should�use�paragraph�grammar,<br />
101
including�periods.�This�may�be�any�number�of�lines�long.�Paragraphs�are<br />
102
separated�by�an�empty�line�but�are�not�indented.�Lines�are�less�than�80<br />
103
characters�long.<br />
105
<li class="listitem">Use GObject conventions for things not covered here</li>
106
<li class="listitem">You may use the following indent command to format libdmapsharing code:
107
<pre class="programlisting">
108
indent -i8 -bad -bap -br -ce -d0 -ndj -lp -pcs -psl -sc -sob foo.c
114
<div xmlns="" class="footer"><hr />
115
Generated by GTK-Doc V1.15</div>
b'\\ No newline at end of file'