On Thu, Jan 22, 2015 at 11:14 PM, <
doxygen-users-requ...@lists.sourceforge.net> wrote:

> Date: Thu, 22 Jan 2015 13:47:52 +0100
> From: "Uwe Scholz" <u.schol...@gmx.de>
> Subject: [Doxygen-users] char_varying type in VOS C and doxygen
>
> I have a new issue to solve with doxygen: In VOS C there exists the type
> char_varying(n), where n is the number of characters of the variable.
>
> Imagine this file is given:
> ----------------------
> /** @file foo.c
>  */
> char_varying(256) var;
> main(){}
> ----------------------(1)
>
> Doxygen assumes that char_varying is a function here, but as said above,
> this is just the type, and var is the variable. The doxygen html output
> in this case is just:
> ----------------------
> foo.c File Reference
> Functions
>         char_varying (256)
> ----------------------(2)
>
> Is there any possibility to solve this somehow?
>
> What I tried already:
>
> MACRO_EXPANSION = YES
> EXPAND_ONLY_PREDEF = YES
> PREDEFINED = char_varying()=
>

Try:

 PREDEFINED = char_varying()=char_varying

If want the length to be captured, you would need a custom filter to
preprocess your VOS C sources.

In Perl, something like the following should work:

#!perl -w
use strict;
use warnings;
while (<>)
{

s/char_varying\s*[(]\s*(\d+)\s*[)]\s+([_A-Za-z][_A-Za-z0-9]*)\s*[;]/char_varying
$2[$1];/;
    print $_;
}

Note that the above will expect an actual, decimal (or octal) number
between the parenthesis after char_varying.

For it to accept a number or symbol, try replacing:

    (\d+)

with:

    ([_A-Za-z0-9]+)

This alternate expression will also match hexadecimal numbers.
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Reply via email to