Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » C edit/format question
C edit/format question [message #68915] Wed, 07 May 2003 01:40 Go to next message
Eclipse UserFriend
Originally posted by: chris.javadisciple.com

I am editing some ten year old C source under Windows XP using Eclipse:

Version: 2.1.0
Build id: 200303272130

I opened up the C source and most of the functions are coded into the
one source along with the main() module. But the source diagram (the
cascading display) only shows the main() module and the one immediately
following it.

Is this "working as designed" and the source is supposed to be split up
into a whole bunch of files, or is this a bug with me or Eclipse?

--
Chris Rehm
chris@javadisciple.com

Thou shalt not avenge, nor bear any grudge against the children of thy
people, but shalt love thy neighbour as thyself. [Lev. 19:18]
Re: C edit/format question [message #69084 is a reply to message #68915] Wed, 07 May 2003 17:12 Go to previous messageGo to next message
Eclipse UserFriend
I've seen the same problem and I believe this is a bug with Eclipse.
Since your code is ten years old it probably uses the old fashioned
function declaration format where the types of the input parameters are
defined outside of the parentheses:

void function_name(i, l)
int i;
long l;
{
/* function body */
}

I don't think that the Eclipse source parser knows how to interpret this
so it gives up. If you changed this declaration to void
function_name(int i, long l) { /* fb */} Eclipse could interpret it
properly.

Chris Rehm wrote:
>
> I am editing some ten year old C source under Windows XP using Eclipse:
>
> Version: 2.1.0
> Build id: 200303272130
>
> I opened up the C source and most of the functions are coded into the
> one source along with the main() module. But the source diagram (the
> cascading display) only shows the main() module and the one immediately
> following it.
>
> Is this "working as designed" and the source is supposed to be split up
> into a whole bunch of files, or is this a bug with me or Eclipse?
>
> --
> Chris Rehm
> chris@javadisciple.com
>
> Thou shalt not avenge, nor bear any grudge against the children of thy
> people, but shalt love thy neighbour as thyself. [Lev. 19:18]
Re: C edit/format question [message #69105 is a reply to message #69084] Wed, 07 May 2003 18:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chris.javadisciple.com

Works great!

Thanks much for your help, Pete. Eclipse looks like a wonderful solution
for my particular situation and I'm really glad I can easily get around
this "bug" by just updating the declarations.

Pete Fischer wrote:
> I've seen the same problem and I believe this is a bug with Eclipse.
> Since your code is ten years old it probably uses the old fashioned
> function declaration format where the types of the input parameters are
> defined outside of the parentheses:
>
> void function_name(i, l)
> int i;
> long l;
> {
> /* function body */
> }
>
> I don't think that the Eclipse source parser knows how to interpret this
> so it gives up. If you changed this declaration to void
> function_name(int i, long l) { /* fb */} Eclipse could interpret it
> properly.

--
Chris Rehm
chris@javadisciple.com

Thou shalt not avenge, nor bear any grudge against the children of thy
people, but shalt love thy neighbour as thyself. [Lev. 19:18]
Re: C edit/format question [message #69285 is a reply to message #69084] Thu, 08 May 2003 14:08 Go to previous message
Eclipse UserFriend
Its a deficiency in the parser for CDT right now.
Our parser only works for ANSI C/C++.
Once we get the build model hooked up we will be able to add different
parsers that can be set per-project should you be using non-ANSI code, like
K&R C.

"Pete Fischer" <pfischer@bbn.com> wrote in message
news:3EB976BD.D5819D21@bbn.com...
> I've seen the same problem and I believe this is a bug with Eclipse.
> Since your code is ten years old it probably uses the old fashioned
> function declaration format where the types of the input parameters are
> defined outside of the parentheses:
>
> void function_name(i, l)
> int i;
> long l;
> {
> /* function body */
> }
>
> I don't think that the Eclipse source parser knows how to interpret this
> so it gives up. If you changed this declaration to void
> function_name(int i, long l) { /* fb */} Eclipse could interpret it
> properly.
>
> Chris Rehm wrote:
> >
> > I am editing some ten year old C source under Windows XP using Eclipse:
> >
> > Version: 2.1.0
> > Build id: 200303272130
> >
> > I opened up the C source and most of the functions are coded into the
> > one source along with the main() module. But the source diagram (the
> > cascading display) only shows the main() module and the one immediately
> > following it.
> >
> > Is this "working as designed" and the source is supposed to be split up
> > into a whole bunch of files, or is this a bug with me or Eclipse?
> >
> > --
> > Chris Rehm
> > chris@javadisciple.com
> >
> > Thou shalt not avenge, nor bear any grudge against the children of thy
> > people, but shalt love thy neighbour as thyself. [Lev. 19:18]
Previous Topic:Windows Installation Instructions
Next Topic:CDT update server?
Goto Forum:
  


Current Time: Mon Jul 14 08:50:17 EDT 2025

Powered by FUDForum. Page generated in 0.46700 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top