From: "Alfred M. Szmidt" <ams@kemisten.nu>
Cc: help-gnu-emacs@gnu.org
Subject: Re: please explain diff bet. K&R and Linux c-mode styles
Date: Tue, 29 Oct 2002 14:55:27 +0100 [thread overview]
Message-ID: <E186Wq7-0007Y8-00@lgh163a.kemisten.nu> (raw)
In-Reply-To: <Pine.LNX.4.33.0210290823140.3877-100000@klaatu.canisius.edu> (message from Kevin Dziulko on Tue, 29 Oct 2002 08:28:23 -0500 (EST))
I think Linux style is the same as GNU style. You could
also just type in a few functions and see the fundamental
differences.
Linux style and GNU style are completely different. The coding style
that is used in Linux looks similar to K&R. The main difference
between Linux and K&R style is that Linux uses TAB characters to
indent where as K&R uses four spaces.
The GNU Coding Standard describes the GNU style
(http://www.gnu.org/pre/standards.html), and the file
Documentation/CodingStyle in the source code for Linux described the
Linux style.
if statements:
GNU style Linux style K&R style
if (foobar) if (foobar) { if (foobar) {
{ foo; foo;
foo; } }
}
functions:
GNU style Linux style K&R style
int
foobar (void) int foobar (void) int foobar (void)
{ { {
return 1; return 1; return 1;
} } }
next prev parent reply other threads:[~2002-10-29 13:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1035590178.16479.help-gnu-emacs@gnu.org>
2002-10-26 3:26 ` please explain diff bet. K&R and Linux c-mode styles Matt Armstrong
2002-10-29 0:37 ` seberino
2002-10-29 13:28 ` Kevin Dziulko
2002-10-29 13:55 ` Alfred M. Szmidt [this message]
[not found] ` <mailman.1035851913.4061.help-gnu-emacs@gnu.org>
2002-10-29 2:33 ` Edgar Antonio Luna Díaz
2002-11-15 2:54 ` Emacs Lisp: Problem with nested condition-case and catch in byte compiled code Greg Hill
2002-11-15 18:22 ` Greg Hill
[not found] ` <mailman.1037661783.25741.help-gnu-emacs@gnu.org>
2002-11-19 0:08 ` Stefan Monnier <foo@acm.com>
2002-11-19 2:47 ` Greg Hill
2002-11-20 21:14 ` Lisp: Functions for multiple comparisons Greg Hill
[not found] ` <mailman.1037827276.893.help-gnu-emacs@gnu.org>
2002-11-20 23:03 ` Stefan Monnier <foo@acm.com>
2002-11-21 19:56 ` Pascal Bourguignon
2002-11-27 19:07 ` Index of element in a sequence Greg Hill
[not found] ` <mailman.1038424169.3933.help-gnu-emacs@gnu.org>
2002-11-27 19:23 ` Barry Margolin
2002-10-25 23:55 please explain diff bet. K&R and Linux c-mode styles seberino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E186Wq7-0007Y8-00@lgh163a.kemisten.nu \
--to=ams@kemisten.nu \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).