Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Is it possible for the parser to support newlib prototypes?

<< < (8/12) > >>

Teybeo:
I remembered this thread when I saw the 9916 changelog about macros and functions stuff.
So I just download and tested the 9916 build but the post-OpenGL 1.x functions are still not detected as functions but as macros, so the calltip don't show the function parameters. OpenGL 1.x function dates back 20 years ago, we are now at OpenGL 4.5 and there are now TONS of functions which we can't see the parameters types and names.

Example:


Basically all the detected functions are the 20 years old and sometimes deprecated ones, and the macros are the modern ones.

I've read some of you guys posts but I didn't understand a lot. Do you think it can be supported ?

Huki:

--- Quote from: White-Tiger on September 14, 2014, 04:30:30 pm ---yes an no.. the reported case works, same for the real world code I based it on... (at least it looks like that, didn't miss any function)
But another case I've used to work with, does not work.

I'll post the almost non-stripped code just in case there's another "bug" (had to strip it a bit because of 20k character limit for posts^^)
...

Basically the problem already appears at the first function... at "getClientLibVersion"... it's detected... but only as
public int(* getClientLibVersion): unsignedSo there's a problem with unsigned int as a return because it only picks up the first identifier...

--- End quote ---


--- Quote from: ollydbg on September 15, 2014, 08:29:24 am ---Candidate patch to fix your problem
[...]

--- End quote ---
Hi, yes, we need to handle return types with more than one token, like "unsigned int". Thanks for the patch, I'll review it and the macros handling part tomorrow.

Huki:

--- Quote from: Teybeo on September 16, 2014, 11:05:20 pm ---I remembered this thread when I saw the 9916 changelog about macros and functions stuff.
So I just download and tested the 9916 build but the post-OpenGL 1.x functions are still not detected as functions but as macros, so the calltip don't show the function parameters. OpenGL 1.x function dates back 20 years ago, we are now at OpenGL 4.5 and there are now TONS of functions which we can't see the parameters types and names.

--- End quote ---
The support added in build 9916 is for function calltips. Just select the function from the code completion list and start typing the opening bracket, you should see the calltip showing the arguments and return type. See the screenshot below:


However the code completion list itself will only show it as a macro definition as you can see.

Teybeo:
Oops yeah, I confirm, it works like in your screenshot, good job :) !

(Minor UI detail, it would be nice if the function calltip was showing the true name of the function and not PFNGLDRAWARRAYSINSTANCEDPROC)

Huki:

--- Quote from: Teybeo on September 17, 2014, 02:52:54 pm ---Oops yeah, I confirm, it works like in your screenshot, good job :) !

(Minor UI detail, it would be nice if the function calltip was showing the true name of the function and not PFNGLDRAWARRAYSINSTANCEDPROC)

--- End quote ---
Yes, I think it would be better to show the variable name rather than the typedef name. See here:


I'll submit the patch soon...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version