Tapatalk

complex function prototype

complex function prototype

4
NewbieNewbie
4

    Feb 15, 2005#1

    ultraedit see this as a function named "BOOL" in function list, but it is just a function declaration
    BOOL (*g_pfnReadAc97) (BYTE Offset, UINT16 * Data, BYTE DevId);

    i know it's strange code but i got tons of them from microsoft source code :roll:

    80
    Advanced UserAdvanced User
    80

      Feb 15, 2005#2

      Function Strings need some work. I've written some I think are better than the defaults. You're welcome to try them.

      Code: Select all

      //
      // Handles the case where Class:: is the type
      //                  type                 function name              (  parameters or none                
      /Function String = "[a-zA-Z_0-9*&]+[:]+^([~(){} ^t^p]+[ ^t]++[(]+[~;{]++)[~;{:]++^)[{=]+"
      //
      // Handles the case where type on same line as function
      //                                    type                         function name       ( parameters or none              
      /Function String 2 = "%[~(){} ^t^p#/]+[a-zA-Z_0-9*&<>: ^t^"]+[ ^t]+^([~(){} ^t^p]+[ ^t]++([~(=;]+)[~()=;{]+^)[{=]+"
      //
      // Handles the case where type on different line as function
      //                    type                           function name              (  parameters or none              
      /Function String 3 = "[a-zA-Z_0-9*&<>]+[ ^t]++[^p]+^([a-zA-Z_0-9*&=<^~]+[ ^t]++[(]+[a-zA-Z_0-9<>&* ^t,^p:/^[^]]++[)]+[ ^t^pa-zA-Z/]++^)[{=]+"
      //
      
      Note that the function strings should not wrap. They are just long.

      4
      NewbieNewbie
      4

        Feb 15, 2005#3

        opppppps :oops:
        it is not a function at all it is a function pointer declaration!
        i was working overnight so i overlooked it.........!! in fact it's almost 20 hours now. 7:00 am local time.
        but here comes another problem, it shouldn't be listed in the function list in the first place.....! 8O
        and forgot to mention, it's version 11. function with comment for parameter in multi line are now listed corrected! it solved one of my headages.

        function foo(
        int bar1;//foo
        int bar2;//foo2
        )
        was not listed correctly in older versions.