From 7c3ef9105418cf58ff08c341181f22c8a2d8be01 Mon Sep 17 00:00:00 2001
From: Jordan Bancino Update project code requirements (ANSI C, POSIX.1c)Clean up dark mode colors (tables, background, code snippets)indent(1)
instead.Update Code Style to not include indent or line rules, but to use
+indent(1)
instead.Fix typo "Subitting Patches" in Table of ContentsMake a note in Getting The Code that the password for the
anoncvs
account is just anoncvs
.
-Telodendria's code style is very unique. In general, these are -the conventions used by the code base. +In general, these are the conventions used by the code base. This +guide may be slightly outdated or subject to change, however. The +source code itself is the absolute source of truth, so as long as +you make your code look like the code surrounding it, you should +be fine.
enum
s and struct
s are always
typedef
-ed to their same name. The typedef
occurs in the public API header, and the actual declaration occurs in
-the private implementation header.
+the implementation file.
expand
. A unit of indentation
-is 4 spaces.
+A feature of the code base lives in a single .c
file that
+has a matching header file. The header file should only export public
+symbols, everything else in the .c
file should be
+static
.
vi(1)
in an 80x24 terminal to write code.
+Anywhere curly braces are optional, there must still be curly braces.
+This makes it easy to add on to the code later, and just makes things
+less ambiguous.
-This guide may be subject to change. The source code is the absolute
-source of truth, so as long as you make your code look like the
-code surrounding it, you should be fine.
+As far as actually formatting the code goes, such as where to put
+brackets and whether you use tabs or spaces, use indent(1)
+to take care of all of that. The root of the repository has a
+.indent.pro
file that should automatically be loaded by
+indent(1)
to set the correct rules. If you don't have
+access to a working indent(1)
, just indicate in your patch
+that I should run indent(1)
on the code after applying it.
+I'll likely run my indent(1)
on the code anyway though,
+just to make sure the spacing is consistent, if nothing else.