Re: bug-indent Digest, Vol 50, Issue 8
"John A. Crow" <[email protected]>
| Newsgroups | gmane.comp.gnu.indent.bugs |
|---|---|
| Message-ID | <[email protected]> |
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, [email protected] wrote: > Send bug-indent mailing list submissions to > [email protected] > > 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 > [email protected] > > You can reach the person managing the list at > [email protected] > > 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 <[email protected]> > Subject: Re: white space after star unexpected > To: "Moore, Robert" <[email protected]> > Cc: "Brown, Len" <[email protected]>, bug-indent > <[email protected]>, "Lin, Ming M" <[email protected]> > Message-ID: <[email protected]> > 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:[email protected]] >>> 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 >>>>>> [email protected] >>>>>> 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 <[email protected]> > Subject: Re: white space after star unexpected > To: david ingamells <[email protected]> > Cc: bug-indent <[email protected]>, "Moore, Robert" > <[email protected]> > Message-ID: <[email protected]> > 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 >>> [email protected] >>> 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" <[email protected]> > Subject: RE: white space after star unexpected > To: "david ingamells" <[email protected]>, "Lin, Ming M" > <[email protected]> > Cc: "Brown, Len" <[email protected]>, bug-indent > <[email protected]> > Message-ID: > <9D39833986E69849A2A8E74C1078B6B386423D@orsmsx415.amr.corp.intel.com> > 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:[email protected]] >> 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 >>>>> [email protected] >>>>> 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" <[email protected]> > Subject: RE: white space after star unexpected > To: "david ingamells" <[email protected]> > Cc: "Brown, Len" <[email protected]>, bug-indent > <[email protected]>, "Lin, Ming M" <[email protected]> > Message-ID: > <9D39833986E69849A2A8E74C1078B6B3864299@orsmsx415.amr.corp.intel.com> > 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:[email protected]] >> 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:[email protected]] >>>> 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 >>>>>>> [email protected] >>>>>>> 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 > [email protected] > http://lists.gnu.org/mailman/listinfo/bug-indent > > > End of bug-indent Digest, Vol 50, Issue 8 > *****************************************