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 )
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 , 20 years ago
comment:2 by , 17 years ago
| Priority: | high → low |
|---|
we should fix this, if it has not been done, but the priority is not very high.
comment:3 by , 16 years ago
| Component: | code std → docs |
|---|---|
| Description: | modified (diff) |
| Owner: | changed from to |
| Status: | new → assigned |

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