www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/02/23/17:34:19

Date: Tue, 23 Feb 1999 17:34:16 -0500
Message-Id: <199902232234.RAA16489@envy.delorie.com>
X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <36D32A2B.9E148C05@cartsys.com> (message from Nate Eldredge on
Tue, 23 Feb 1999 14:22:35 -0800)
Subject: Re: FAT32
References: <199902230944 DOT KAA04890 AT juno DOT erisoft DOT se> <199902231549 DOT KAA10790 AT envy DOT delorie DOT com> <36D32A2B DOT 9E148C05 AT cartsys DOT com>
Reply-To: djgpp-workers AT delorie DOT com

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019