There seems to be a couple very annoying bugs in the astyle styling...

1. bitfields

unsigned int transparent:
    1;  /* transparent proxy */

Issues:
        Broken into multiple lines after the :
        Always flushed fully to the left, not indented.

Should read:
    unsigned int transparent:1   /* transparent proxy */


2. struct and typedef "inline" variable declarations

    struct
    {
        [...]
    }

    Wais;

Issues:
        Blank line between the } and the variable/typedef name.

Should read:

    struct
    {
        [...]
    } Wais;


There might be more bugs, but these are the most striking ones.


Combined these two make a real disaster of most header files as can be
seen below:


struct _PeerDigest
{
    [...]
    struct
    {

unsigned int needed:
        1;      /* there were requests for this digest */

unsigned int usable:
        1;      /* can be used for lookups */

unsigned int requested:
        1;      /* in process of receiving [fresh] digest */
    }

    flags;

    struct
    {
        /* all times are absolute unless augmented with _delay */
        time_t initialized;     /* creation */
    [...]
};

Reply via email to