bug-indent
[Top][All Lists]
Advanced

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

Re: bug-indent Digest, Vol 50, Issue 8


From: John A. Crow
Subject: Re: bug-indent Digest, Vol 50, Issue 8
Date: Thu, 19 Jun 2008 11:36:48 -0500

I'm pretty sure if you have hundreds of typedefs, it would be pretty easy to harvest them and include them -- project-wide -- in an indent.pro file.



On Jun 19, 2008, at 11:00 AM, address@hidden wrote:

Send bug-indent mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.gnu.org/mailman/listinfo/bug-indent
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of bug-indent digest..."


Today's Topics:

   1. Re: white space after star unexpected (david ingamells)
   2. Re: white space after star unexpected (Lin Ming)
   3. RE: white space after star unexpected (Moore, Robert)
   4. RE: white space after star unexpected (Moore, Robert)


----------------------------------------------------------------------

Message: 1
Date: Wed, 18 Jun 2008 20:13:17 +0200
From: david ingamells <address@hidden>
Subject: Re: white space after star unexpected
To: "Moore, Robert" <address@hidden>
Cc: "Brown, Len" <address@hidden>, bug-indent
        <address@hidden>, "Lin,      Ming M" <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Moore, Robert wrote:
In a large subsystem with potentially hundreds of typedefs, this is a
problem.  Why is the space inserted in the first place?

Bob



-----Original Message-----
From: david ingamells [mailto:address@hidden
Sent: Wednesday, June 18, 2008 8:30 AM
To: Lin, Ming M
Cc: bug-indent; Moore, Robert
Subject: Re: white space after star unexpected

Lin Ming wrote:

On Tue, 2008-06-17 at 17:41 +0200, david ingamells wrote:


Lin Ming wrote:


Hi,

When indent a C file with some "typedef struct", indent adds a
unexpected whitespace after "*".

# cat test1.c
typedef struct mystruct s;

void test(s *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs test1.c

# cat test1.c
typedef struct mystruct s;

void test(s * p);
             ^Here is an unexpected white space


# cat test2.c
typedef struct mystruct s;

void foo()
{
        return;
}

s test(struct mystruct *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs test2.c

# cat test2.c
typedef struct mystruct s;

void foo()
{
        return;
}

s test(struct mystruct * p);
                        ^Here is an unexpected white space


Thanks,
Lin Ming






_______________________________________________
bug-indent mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-indent





#cat test1.c
typedef struct mystruct s;

void test(s *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -T s test1.c


Thanks, but there are more than 200 typedefs in our project.
Not easy to specify each of them with -T.

Is there another solution?

Thanks,
Lin Ming



#cat test1.c
typedef struct mystruct s;

void test(s *p);


# QED



indent does not know what a type is (apart from standard basic types)
unless you tell it.





Well .. .let's think ... what else is a * used for in C?
Why wouldn't you want a space?





------------------------------

Message: 2
Date: Wed, 18 Jun 2008 10:24:54 +0800
From: Lin Ming <address@hidden>
Subject: Re: white space after star unexpected
To: david ingamells <address@hidden>
Cc: bug-indent <address@hidden>, "Moore, Robert"
        <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain


On Tue, 2008-06-17 at 17:41 +0200, david ingamells wrote:
Lin Ming wrote:
Hi,

When indent a C file with some "typedef struct", indent adds a
unexpected whitespace after "*".

# cat test1.c
typedef struct mystruct s;

void test(s *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs test1.c

# cat test1.c
typedef struct mystruct s;

void test(s * p);
             ^Here is an unexpected white space


# cat test2.c
typedef struct mystruct s;

void foo()
{
        return;
}

s test(struct mystruct *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs test2.c

# cat test2.c
typedef struct mystruct s;

void foo()
{
        return;
}

s test(struct mystruct * p);
                        ^Here is an unexpected white space


Thanks,
Lin Ming






_______________________________________________
bug-indent mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-indent



#cat test1.c
typedef struct mystruct s;

void test(s *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -T s test1.c

Thanks, but there are more than 200 typedefs in our project.
Not easy to specify each of them with -T.

Is there another solution?

Thanks,
Lin Ming


#cat test1.c
typedef struct mystruct s;

void test(s *p);


# QED





------------------------------

Message: 3
Date: Wed, 18 Jun 2008 11:03:18 -0700
From: "Moore, Robert" <address@hidden>
Subject: RE: white space after star unexpected
To: "david ingamells" <address@hidden>, "Lin, Ming M"
        <address@hidden>
Cc: "Brown, Len" <address@hidden>, bug-indent
        <address@hidden>
Message-ID:
        <address@hidden>
Content-Type: text/plain;       charset="us-ascii"

In a large subsystem with potentially hundreds of typedefs, this is a
problem.  Why is the space inserted in the first place?

Bob


-----Original Message-----
From: david ingamells [mailto:address@hidden
Sent: Wednesday, June 18, 2008 8:30 AM
To: Lin, Ming M
Cc: bug-indent; Moore, Robert
Subject: Re: white space after star unexpected

Lin Ming wrote:
On Tue, 2008-06-17 at 17:41 +0200, david ingamells wrote:

Lin Ming wrote:

Hi,

When indent a C file with some "typedef struct", indent adds a
unexpected whitespace after "*".

# cat test1.c
typedef struct mystruct s;

void test(s *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs test1.c

# cat test1.c
typedef struct mystruct s;

void test(s * p);
             ^Here is an unexpected white space


# cat test2.c
typedef struct mystruct s;

void foo()
{
        return;
}

s test(struct mystruct *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs test2.c

# cat test2.c
typedef struct mystruct s;

void foo()
{
        return;
}

s test(struct mystruct * p);
                        ^Here is an unexpected white space


Thanks,
Lin Ming






_______________________________________________
bug-indent mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-indent




#cat test1.c
typedef struct mystruct s;

void test(s *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -T s test1.c


Thanks, but there are more than 200 typedefs in our project.
Not easy to specify each of them with -T.

Is there another solution?

Thanks,
Lin Ming


#cat test1.c
typedef struct mystruct s;

void test(s *p);


# QED



indent does not know what a type is (apart from standard basic types)
unless you tell it.






------------------------------

Message: 4
Date: Wed, 18 Jun 2008 11:27:13 -0700
From: "Moore, Robert" <address@hidden>
Subject: RE: white space after star unexpected
To: "david ingamells" <address@hidden>
Cc: "Brown, Len" <address@hidden>, bug-indent
        <address@hidden>, "Lin,      Ming M" <address@hidden>
Message-ID:
        <address@hidden>
Content-Type: text/plain;       charset="us-ascii"

Well .. .let's think ... what else is a * used for in C?
Why wouldn't you want a space?

I believe that the Linux coding style is no space and this is what we
must adhere to.

-----Original Message-----
From: david ingamells [mailto:address@hidden
Sent: Wednesday, June 18, 2008 11:13 AM
To: Moore, Robert
Cc: Lin, Ming M; bug-indent; Brown, Len
Subject: Re: white space after star unexpected

Moore, Robert wrote:
In a large subsystem with potentially hundreds of typedefs, this is a
problem.  Why is the space inserted in the first place?

Bob



-----Original Message-----
From: david ingamells [mailto:address@hidden
Sent: Wednesday, June 18, 2008 8:30 AM
To: Lin, Ming M
Cc: bug-indent; Moore, Robert
Subject: Re: white space after star unexpected

Lin Ming wrote:

On Tue, 2008-06-17 at 17:41 +0200, david ingamells wrote:


Lin Ming wrote:


Hi,

When indent a C file with some "typedef struct", indent adds a
unexpected whitespace after "*".

# cat test1.c
typedef struct mystruct s;

void test(s *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs test1.c

# cat test1.c
typedef struct mystruct s;

void test(s * p);
             ^Here is an unexpected white space


# cat test2.c
typedef struct mystruct s;

void foo()
{
        return;
}

s test(struct mystruct *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs test2.c

# cat test2.c
typedef struct mystruct s;

void foo()
{
        return;
}

s test(struct mystruct * p);
                        ^Here is an unexpected white space


Thanks,
Lin Ming






_______________________________________________
bug-indent mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-indent





#cat test1.c
typedef struct mystruct s;

void test(s *p);

# indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -T s test1.c


Thanks, but there are more than 200 typedefs in our project.
Not easy to specify each of them with -T.

Is there another solution?

Thanks,
Lin Ming



#cat test1.c
typedef struct mystruct s;

void test(s *p);


# QED



indent does not know what a type is (apart from standard basic
types)
unless you tell it.





Well .. .let's think ... what else is a * used for in C?
Why wouldn't you want a space?





------------------------------

_______________________________________________
bug-indent mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-indent


End of bug-indent Digest, Vol 50, Issue 8
*****************************************





reply via email to

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