|
From: Robert K. <rik...@ho...> - 2003-02-05 20:50:27
|
When I get my Java code changes in (to allow regeneration of code) I will include some code that, if adopted by the other code generators, will supply support for indentation. I agree, proper indentation is one of those things I feel obsessive about, and it drives me nuts to no end that K&R indentation is still considered proper. Rob >From: Antonio Terceiro <ter...@im...> >To: dia...@li... >Subject: [Dia2code-general] generated source code indentation >Date: Wed, 5 Feb 2003 17:36:01 -0200 >MIME-Version: 1.0 >Received: from sc8-sf-list2.sourceforge.net ([66.35.250.206]) by >mc3-f11.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 5 Feb >2003 11:41:09 -0800 >Received: from sc8-sf-list1-b.sourceforge.net ([10.3.1.13] >helo=sc8-sf-list1.sourceforge.net)by sc8-sf-list2.sourceforge.net with >esmtp (Exim 3.31-VA-mm2 #1 (Debian))id 18gVPv-0000tg-00; Wed, 05 Feb 2003 >11:41:07 -0800 >Received: from vonneumann.im.ufba.br ([200.17.147.100])by >sc8-sf-list1.sourceforge.net with esmtp (Exim 3.31-VA-mm2 #1 (Debian))id >18gVOU-0006S7-00for <dia...@li...>; Wed, 05 Feb >2003 11:39:39 -0800 >Received: from terceiro by vonneumann.im.ufba.br with local (Exim 3.35 #1 >(Debian))id 18gVKz-0000Y0-00for <dia...@li...>; >Wed, 05 Feb 2003 17:36:01 -0200 >X-Message-Info: dHZMQeBBv44lPE7o4B5bAg== >Message-ID: <200...@im...> >User-Agent: Mutt/1.3.28i >Sender: dia...@li... >Errors-To: dia...@li... >X-BeenThere: dia...@li... >X-Mailman-Version: 2.0.9-sf.net >Precedence: bulk >List-Help: ><mailto:dia...@li...?subject=help> >List-Post: <mailto:dia...@li...> >List-Subscribe: ><https://lists.sourceforge.net/lists/listinfo/dia2code-general>,<mailto:dia...@li...?subject=subscribe> >List-Id: General Dia2Code discussion ><dia2code-general.lists.sourceforge.net> >List-Unsubscribe: ><https://lists.sourceforge.net/lists/listinfo/dia2code-general>,<mailto:dia...@li...?subject=unsubscribe> >List-Archive: ><http://sourceforge.net/mailarchive/forum.php?forum=dia2code-general> >X-Original-Date: Wed, 5 Feb 2003 17:36:01 -0200 >Return-Path: dia...@li... >X-OriginalArrivalTime: 05 Feb 2003 19:41:09.0273 (UTC) >FILETIME=[88016090:01C2CD4E] > >Hi, > >Have you thought about formatting the source code output by dia2code? >For C, C++ and Java, at least, it uses the KR style and i don't like it. > >I won't enter the discussion about indentation preferences, so my >suggestion is to make possible to the user to choose the indentation >used in the output. > >Thinking about it, I wrote an extension of dia2code that makes possible >for the user to inform an indentation style (in fact, options to be >passed for the indent tool) for the output. > >I preferred to don't create new files: I added code to main.c (command >line option), dia2code.h (declaration of stuff used for indentation), >dia2code.c (implementation of the indentation), and to the code >generators of C, C++ and Java (calls to the indent function). > >Are you interested in including these changes in the dia2code >distribution ? > >I attached the patches to this message: to apply the patches untar the >tarball in the directory that contais the dia2code-0.8.1 source >directory, and run the applypatches.sh script. See the script, it's very >simple. > >Regards, > >-- >Antonio Terceiro - ter...@im... >Bacharelando em Ciência da Computação - UFBA >- >http://twiki.im.ufba.br/~AntonioTerceiro > ><< dia2code-indent-patches.tar.gz >> _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus |