IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 20 years ago

Last modified 16 years ago

#702 assigned defect

C Code Standards astyle appendix is deficient — at Initial Version

Reported by: jhoblitt Owned by: rhl@…
Priority: low Milestone:
Component: docs Version: unspecified
Severity: normal Keywords:
Cc:

Description

There are a couple of issues with the .astylerc options as specified in appendix
D and at least astyle 1.15.3. If astyle is incapable of handling some of these
issues it would be nice to see an appendix for how to configure indent.

if-then-else statements are "un-cuddled".

if (!*dest)
{

*dest = psStringCopy("");
oldLength = 0;

}
else
{

size of existing string
oldLength = strlen(*dest);

}

There is no space between variable declarations and there types.

va_list args;
size_t length; complete string length (sans \0)
size_t oldLength;
original string length (sans \0

Switch statement blocks are "un-cuddled" as well

switch (pType)
{

case PS_TYPE_S8:

PS_NAN_ALLOC(myNaN, psS8, PS_MAX_S8);
break;

.
.

Trailing comments are not alligned in some situations.

psListIterator *cursor; row iterator
psMetadataItem *item;
field in row
mysqlType *mType; type tmp variable
static bool isNull = true;
used in a MYSQL_BIND to indicate NULL,
this will be used outside of this func
psU32 i;
field index

Change History (0)

Note: See TracTickets for help on using tickets.