tsp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RE : [Tsp-devel] Source indentation


From: Eric Noulard
Subject: Re: RE : [Tsp-devel] Source indentation
Date: Thu, 26 Apr 2007 16:07:06 +0200

2007/4/26, Frederik Deweerdt <address@hidden>:
On Wed, Apr 25, 2007 at 11:15:26AM +0200, TSP wrote:
>
>
> Hello {
>       World
> } /* well indented hello */
>
> >> The drawback is that some of the code looks bad as a result:
>
> Yes indent got a quite strange behaviour.
> ident -gnu -i8 seems to work better than the K&R style
> But one thing annoys me is that if you pass indent once, it's not the same 
result as if you pass it twice....
I've managed to reproduce this. The problem comes from:
1 ^M end of lines
2 _EXPORT_TSP_CONSUMER in front of functions
3 this semi-colon in tsp_url.h:
  tspUrl_create(TspUrl_t* tspUrl; const char* urlString)
I guess that MS Visual can handle Unix end of lines, so we could get
rid of (1), (2) only happens once and (3) must be corrected anyway.

My point of view is:

(1) is probably a CVS commit mistake from one of
    us during Win32 port
(2) is a bad technical choice since it is Windows specific
    We should use a separate .def file as the one used by ACPLT-ONCRPC
    but I didn't realize It was possible at the time we did TSP Win32 port :))
(3) must be corrected :)) but I know who did this:

==============================================
RCS file: /sources/tsp/tsp/src/util/libutil/tsp_url.h,v
----------------------------
revision 1.1
date: 2006-04-13 21:25:27 +0000;  author: erk;  state: Exp;
Adding draft tsp_url API
(not functionnal though)
==============================================

I did try both indent and bcpp and the 2 seems fine for me.
I would rather go for indent since it seems more widely used
(there is even a Win32 port http://unxutils.sourceforge.net/ :))
and it is an "Official GNU tools".
This make indent easy to install
(apt-get, yum, urpmi, http://www.sunfreeware.com/ ...)

The only drawback I see for indent is that it is not designed
for C++ handling.

--
Erk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]