Author Topic: CodeCompletion Questions  (Read 10244 times)

Offline jayatk

  • Multiple posting newcomer
  • *
  • Posts: 40
CodeCompletion Questions
« on: February 03, 2006, 02:03:53 pm »
Is the CodeCompletion code geared more towards just C++? Or is it still supposed to incorporate C as well?

I'm asking, because I'm working in a C project right now, and the code completion is missing a lot of structures that are declared using old C-style structures.  The problem could also be because there are some preprocessor define words mixed into the structure declarations that might be throwing off the code completion.

Here's an example:
Code
typedef struct cmd_connect_ctrl_s
{
  /** State */
  INT8  state;
  /** Rsvd */
  UINT8  rsvd1;
  /** Rsvd */
  UINT16  rsvd2;
} __PACKED__ cmd_connect_ctrl_t;

The "__PACKED__" is a macro for inserting compiler directives for packing structures.

Here's one that doesn't show up either:
Code
   
typedef struct
   {
      /** header */
      CCT_MSG_HEADER          header;
      /** interface ID */
      UINT32                  ifId;
      /** min job ID handled by these interface */
      UINT32                  minUserId;
      /** max job ID handled by these interface */
      UINT32                  maxUserId;
      /** interface name, pipe or socket ip addr */
      CHAR                    ifName[64];
   }
   CCT_MSG_OPEN_USER_IF;

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: CodeCompletion Questions
« Reply #1 on: February 03, 2006, 05:27:38 pm »
AFAIK, It was designed with C++ in mind.

Offline jayatk

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: CodeCompletion Questions
« Reply #2 on: February 03, 2006, 06:22:07 pm »
Any chance C support can be implemented in the future, since you advertise C::B as a C/C++ IDE? :)

It would certainly be nice to be able to use with existing C projects I have.  I can still use it for our newer projects running a C++ OS.


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: CodeCompletion Questions
« Reply #3 on: February 03, 2006, 06:46:03 pm »
Actually this has nothing to do with C or C++. The parser does not handle the typedef keyword properly.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."