* please explain diff bet. K&R and Linux c-mode styles
@ 2002-10-25 23:55 seberino
0 siblings, 0 replies; 6+ messages in thread
From: seberino @ 2002-10-25 23:55 UTC (permalink / raw)
Cc: kheb
Linux kernel docs recommend K&R c-mode style...
then what is "Linux c-mode style"?? How is it different?
chris
--
_______________________________________
Dr. Christian Seberino
SPAWAR Systems Center San Diego
Code 2363
49590 Lassing Road, Room A339
San Diego, CA 92152-6147
U.S.A.
Phone: (619) 553-7940
Fax: (619) 553-1269
Email: seberino@spawar.navy.mil
_______________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.1035590178.16479.help-gnu-emacs@gnu.org>]
* Re: please explain diff bet. K&R and Linux c-mode styles
[not found] <mailman.1035590178.16479.help-gnu-emacs@gnu.org>
@ 2002-10-26 3:26 ` Matt Armstrong
2002-10-29 0:37 ` seberino
[not found] ` <mailman.1035851913.4061.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Matt Armstrong @ 2002-10-26 3:26 UTC (permalink / raw)
In article <mailman.1035590178.16479.help-gnu-emacs@gnu.org>,
seberino@spawar.navy.mil wrote:
> Linux kernel docs recommend K&R c-mode style...
>
> then what is "Linux c-mode style"?? How is it different?
C-h v c-style-alist
That'll show you all the styles in their gory detail.
--
matt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: please explain diff bet. K&R and Linux c-mode styles
2002-10-26 3:26 ` Matt Armstrong
@ 2002-10-29 0:37 ` seberino
2002-10-29 13:28 ` Kevin Dziulko
[not found] ` <mailman.1035851913.4061.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 6+ messages in thread
From: seberino @ 2002-10-29 0:37 UTC (permalink / raw)
Cc: help-gnu-emacs
I tried your command... there was no function or
variable called c-style-alist in Emacs. :(
CS
On Fri, Oct 25, 2002 at 09:26:16PM -0600, Matt Armstrong wrote:
> In article <mailman.1035590178.16479.help-gnu-emacs@gnu.org>,
> seberino@spawar.navy.mil wrote:
> > Linux kernel docs recommend K&R c-mode style...
> >
> > then what is "Linux c-mode style"?? How is it different?
>
> C-h v c-style-alist
>
> That'll show you all the styles in their gory detail.
>
>
>
> --
> matt
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
--
_______________________________________
Dr. Christian Seberino
SPAWAR Systems Center San Diego
Code 2363
49590 Lassing Road, Room A339
San Diego, CA 92152-6147
U.S.A.
Phone: (619) 553-7940
Fax: (619) 553-1269
Email: seberino@spawar.navy.mil
_______________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: please explain diff bet. K&R and Linux c-mode styles
2002-10-29 0:37 ` seberino
@ 2002-10-29 13:28 ` Kevin Dziulko
2002-10-29 13:55 ` Alfred M. Szmidt
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Dziulko @ 2002-10-29 13:28 UTC (permalink / raw)
I don't see a c-style-alist either. Check out
http://www.science.uva.nl/~mes/jargon/i/indentstyle.html
I think Linux style is the same as GNU style. You could
also just type in a few functions and see the fundamental
differences.
On Mon, 28 Oct 2002 seberino@spawar.navy.mil wrote:
> I tried your command... there was no function or
> variable called c-style-alist in Emacs. :(
>
> CS
>
> On Fri, Oct 25, 2002 at 09:26:16PM -0600, Matt Armstrong wrote:
> > In article <mailman.1035590178.16479.help-gnu-emacs@gnu.org>,
> > seberino@spawar.navy.mil wrote:
> > > Linux kernel docs recommend K&R c-mode style...
> > >
> > > then what is "Linux c-mode style"?? How is it different?
> >
> > C-h v c-style-alist
> >
> > That'll show you all the styles in their gory detail.
> >
> >
> >
> > --
> > matt
> > _______________________________________________
> > Help-gnu-emacs mailing list
> > Help-gnu-emacs@gnu.org
> > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: please explain diff bet. K&R and Linux c-mode styles
2002-10-29 13:28 ` Kevin Dziulko
@ 2002-10-29 13:55 ` Alfred M. Szmidt
0 siblings, 0 replies; 6+ messages in thread
From: Alfred M. Szmidt @ 2002-10-29 13:55 UTC (permalink / raw)
Cc: help-gnu-emacs
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;
} } }
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.1035851913.4061.help-gnu-emacs@gnu.org>]
end of thread, other threads:[~2002-10-29 13:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-25 23:55 please explain diff bet. K&R and Linux c-mode styles seberino
[not found] <mailman.1035590178.16479.help-gnu-emacs@gnu.org>
2002-10-26 3:26 ` Matt Armstrong
2002-10-29 0:37 ` seberino
2002-10-29 13:28 ` Kevin Dziulko
2002-10-29 13:55 ` Alfred M. Szmidt
[not found] ` <mailman.1035851913.4061.help-gnu-emacs@gnu.org>
2002-10-29 2:33 ` Edgar Antonio Luna Díaz
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.