Pelles C forum

Pelles C => Add-ins => Topic started by: TimoVJL on August 25, 2010, 02:26:24 pm

Title: Add-In CFuncList (based CLR code)
Post by: TimoVJL on August 25, 2010, 02:26:24 pm
Add-In CFuncList (based CLR code)
This version just lists C functions to new include file.

This code was a problem:
Code: [Select]
__declspec(dllexport)
void __stdcall FooBar(void)
{
return;
}
void
__stdcall FooBar1(void)
{
return;
}


Quote
         case '{':   // open curly {
            curlys++;
            if (inFunc == 0)
            {
               if (strchr(buffer, 40) && strchr(buffer, 41))
               {
                  int len = strlen(buffer);   //
                  if (len) len--;   // point to last char
                  if (buffer[len] == ' ') buffer[len] = 0;   // remove ' '
                  if (fnStart) fnStart(lines, buffer);
                  inFunc = 1;
               }
               else
               {
                  memset(buffer, 0, BUFSIZE);
                  n = 0;
               }
            }
            break;

Quote
         case 10:
            lines++;
            cCurChar = ' ';   // LF -> ' '
            addchar(buffer, cCurChar, BUFSIZE);   // put space to buffer
            break;
20111020 EDIT: bug fix resetting buffer and 32/64 workspace (CFuncList_WS.zip)
Quote
         case '{':   // open curly {
            curlys++;
            if (inFunc == 0)
            {
               if (strchr(buffer, 40) && strchr(buffer, 41))
               {
                  int len = strlen(buffer);   //
                  if (len) len--;   // point to last char
                  if (buffer[len] == ' ') buffer[len] = 0;   // remove ' '
                  if (fnStart) fnStart(lines, buffer);
                  inFunc = 1;
               }
               //else
               //{
               memset(buffer, 0, BUFSIZE);
               n = 0;
               //}
            }
            break;
EDIT 2019-03-19: UNICODE version CFuncList_UC_WS.zip
Title: Re: Add-In CFuncList (based CLR code)
Post by: CLR on August 26, 2010, 03:19:16 am
Hi timovjl. Now I can't play with c but it is nice to see the code is still alive. Thanks for improve it.
Title: Re: Add-In CFuncList (based CLR code)
Post by: lingo on August 27, 2010, 09:40:57 am
Hi timovjl,

works like magic. That's very valuable!
Not only for the lazy programmer ;-)

It's like an utility from good old *nix times:
Don't work for your machine, let the machine work for you!

Thx
Lingo
Title: Re: Add-In CFuncList (based CLR code)
Post by: TimoVJL on August 27, 2010, 09:50:31 am
Thanks !

We should thanks CLR for his code.
I just put another Add-In code around his code.

Title: Re: Add-In CFuncList (based CLR code)
Post by: TimoVJL on October 20, 2011, 09:14:42 am
Bug fix for resetting buffer and 32/64 workspace (CFuncList_WS.zip)