Mail Archives: djgpp-workers/1999/02/23/17:34:19
> Do you have a preferred style scheme? It can be a bit difficult to
> conform to the existing style if you don't know it exactly, especially
> when using an auto-indenting editor like Emacs. If I knew what to set
> Emacs to for DJGPP sources, it would help.
Basically, it's like this:
if (foo == bar(1, 2, 3))
{
printf("Grill!\n");
}
else
{
}
Although I omit the braces if there's only one statement in them.
The new malloc.c is probably all my style, since I wrote it. Here's
something for your .emacs:
(c-add-style
"DJ"
'((c-basic-offset . 2)
(c-comment-only-line-offset . (0 . 0))
(c-offsets-alist . ((substatement-open . 0)
(label . 0)
(statement-case-open . +)
(statement-cont . +)
(arglist-intro . c-lineup-arglist-intro-after-paren)
(arglist-close . c-lineup-arglist)
))
))
(c-set-style "DJ")
> Does `diff -b' help with (2)?
Probably, but some people move braces to different lines.
- Raw text -