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

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

Description (last modified by eugene)

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 (3)

comment:1 by jhoblitt, 20 years ago

This really needs to be fixed... would you like me to take care of it?

comment:2 by eugene, 17 years ago

Priority: highlow

we should fix this, if it has not been done, but the priority is not very high.

comment:3 by eugene, 16 years ago

Component: code stddocs
Description: modified (diff)
Owner: changed from rhl@… to eugene
Status: newassigned
Note: See TracTickets for help on using tickets.