function list with c code for this type

function list with c code for this type

4
NewbieNewbie
4

    Jul 30, 2006#1

    Hi, everybody:

    I can see the function name in the function list if the function is like this:

    Code: Select all

    void getUIMType (
      uim_rsp_buf_type *rsp_ptr
    )
    
    But I can NOT see the function name in the function list if it is like this:

    Code: Select all

    void getUIMType 
    (
      uim_rsp_buf_type *rsp_ptr
    )
    
    If I want to also see the function name in the function list for the second type, how should I modify my function strings?
    My function strings(the default settings of UE32):
    [php]
    /Function String = "%^([a-zA-Z_0-9^[^]*]+^)[ ^t]+([^p*&:, ^t^[^]a-zA-Z_0-9.!]++)[~;]"
    /Function String 1 = "%[a-zA-Z_0-9*]*::^([a-zA-Z_0-9^~]+^)[ ^t^p]++([^p*&:, ^t^[^]/*^-'=:&a-zA-Z_0-9./(!]++)[~;]"
    /Function String 2 = "%[a-zA-Z_0-9^][a-zA-Z_0-9^[^]]+[ ^t*]+^([a-zA-Z_0-9]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./(!]++)[~;]"
    /Function String 3 = "%[a-zA-Z_0-9*&$^[^]*]+[ ^t]+[a-zA-Z_0-9*&$^[^]]+[ ^t*]+^([a-zA-Z_0-9]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./(!]++)[~;]"
    /Function String 4 = "%[a-z_0-9^[^]*]++ [a-z_0-9*^[^]]+[ ^t]++[a-z_0-9*^[^]]+[ ^t]++^([*a-z_0-9]+^)[ ^t]++([^p*&:, ^t^[^]a-z_0-9./(!]++)[~;]"
    /Function String 5 = "%^([a-zA-Z_0-9^[^]*]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./()!]++)[~;]"
    [/php]

    Best Regards.

    6,686585
    Grand MasterGrand Master
    6,686585

      Jul 30, 2006#2

      Replace function string 2 by following regex string where only the ( after the function name is now inside an OR expression. After the function name and optional spaces/tabs now either CRLF followed by ( at next line OR only ( in the current line must follow.

      /Function String 2 = "%[a-zA-Z_0-9^][a-zA-Z_0-9^[^]]+[ ^t*]+^([a-zA-Z_0-9]+^)[ ^t]++^{^p(^}^{(^}[^p*&:, ^t^[^]a-zA-Z_0-9./(!]++)[~;]"

      Hope this modification has no bad effects elsewhere.

      You can use the ^{^p(^}^{(^} expression also for the other strings as replacement for the simple ( after function name. But make sure the function string will not exceed maximum length of 119 characters - see Weird Function String behaviour.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        Jul 30, 2006#3

        It does work! :o
        Thank you very much, Mofi.^_^

        Best Regards :P

          Nov 02, 2006#4

          Dear Mofi:
          If the function definition is like :

          Code: Select all

          int test
           (int a)
          {
              a= 0;
          }
          The parameter line is the second line and some spaces are in front of it.
          The function list can not be seen this api.
          How should I modify wordfile.txt to see it in function list ?

          Besides, I tried to add the second block comment for C.
          What I want is :

          Code: Select all

          #if 0
          the codes during the block #if 0 & #endif is comment
          #endif

          Code: Select all

          #if 1
          workable codes
          #else
          the codes during the block #else & #endif is comment
          #endif
          My modification is like :
          Block Comment On Alt = #if 0 Block Comment Off Alt = #endif
          But it doesn't work well. How should I modify?
          Thank you very much.

          6,686585
          Grand MasterGrand Master
          6,686585

            Nov 03, 2006#5

            /Function String 2 = "%[a-zA-Z_0-9^][a-zA-Z_0-9^[^]]+[ ^t*]+^([a-zA-Z_0-9]+^)[ ^t]++^{^p[ ^t]++(^}^{(^}[^p*&:, ^t^[^]a-zA-Z_0-9./(!]++)[~;]"

            should solve your function list problem.

            It's not possible to specify a block comment which contains a space.

            Block Comment On Alt = #if 0 Block Comment Off Alt = #endif is interpreted by UE as:
            • Block Comment On Alt = #if
            • 0 = unknown keyword - ignored
            • Block Comment Off Alt = #endif
            For a workaround see Comments from "#if 0" to "#endif".

            Hint: The forum search does not support search for an exact term in double quotes, but Google does it.
            So I entered in Google: site:ultraedit.com "#if 0" and bingo.
            Best regards from an UC/UE/UES for Windows user from Austria