[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-indent] Indent tool
From: |
Cherry Wade-EWC008 |
Subject: |
[Bug-indent] Indent tool |
Date: |
Wed, 13 Aug 2003 13:31:14 -0400 |
Hello,
I'm a member of team working on improving coding style and practices. Our team
is investigating using the Indent tool to automatically beautify code upon
submission to the version-controlled file repository. We have endeavored to
define a set of options that conform to our standards while minimizing extra
changes. We have been pleased with how Indent handles beautification especially
with respect to preprocessor conditionals. There was actually a case in which
the tool caught a latent coding defect regarding preprocessor condtionals.
We have a couple issues to resolve before incorporating Indent into our
process. Hopefully, you will be able to help us identify solutions.
Below are some code snippets followed by Indent beautified code, which is
separated by ->->. These are cases in which the code actually becomes less
beautiful. The profile used to obtain these results is attached in the
indent.pro file. Is there a way to make Indent not beautify the types of
situations described below without modifying our legacy code? If not, perhaps
these examples could be used to make Indent a better tool. Most of the examples
we have seen in which the code actually becomes less beautiful is outside of
functions. And the only item within functions that becomes a problem are the
variable declarations. Thus, our suggestion is to have a profile tag that will
only beautify code within functions excluding variable declarations.
---------------------------------------------------------------------------------------------
option_select_setup(); /* This function enables option select
interruptability */
/* for optsel1 and optsel2
*/
->->
option_select_setup(); /* This functions enable option select
interruptability */
/* for optsel1 and optsel2 */
---------------------------------------------------------------------------------------------
EXPORT const UINT config_block[] =
{
0, 0, 24576, 30720, 65535, 10, /* mbf 5 */ /*
negative_large */
28672, 30720, 30720, 32768, 31, 31, /* mbf 6 */ /*
negative_small */
30720, 32768, 32768, 34816, 31, 31, /* mbf 7 */ /*
zero */
32768, 34816, 34816, 36864, 31, 31, /* mbf 8 */ /*
positive_small */
34816, 40960, 65535, 65535, 10, 65535, /* mbf 9 */ /*
positive_large */
->->
EXPORT const UINT config_block[] = {
0, 0, 24576, 30720, 65535, 10, /* mbf 5 *//* negative_large */
28672, 30720, 30720, 32768, 31, 31, /* mbf 6 *//* negative_small */
30720, 32768, 32768, 34816, 31, 31, /* mbf 7 *//* zero */
32768, 34816, 34816, 36864, 31, 31, /* mbf 8 *//* positive_small */
34816, 40960, 65535, 65535, 10, 65535, /* mbf 9 *//* positive_large */
---------------------------------------------------------------------------------------------
UINT pa_monitoring_interval; /* monitoring interval counter */
UINT pa_flowctrl_interval; /* flow control interval counter */
BOOL pa_flowctrl_state; /* flow control ON=TRUE/OFF=FALSE
*/
UINT num_of_inputs; /* number of crisp inputs */
UINT num_of_outputs; /* number of crisp outputs */
UINT mbf_degree[MAX_MBFS]; /* membership function array */
UINT crisp_input[MAX_INPUTS]; /* input array */
UINT crisp_output[MAX_OUTPUTS]; /* output array */
UCHAR num_of_rules; /* max 255 rules allowed */
UINT cfg_index; /* config_block array index */
UINT mbf_index; /* membership function array index */
->->
UINT pa_monitoring_interval; /* monitoring interval counter */
UINT pa_flowctrl_interval; /* flow control interval counter */
BOOL pa_flowctrl_state; /* flow control ON=TRUE/OFF=FALSE */
UINT num_of_inputs; /* number of crisp inputs */
UINT num_of_outputs; /* number of crisp outputs */
UINT mbf_degree[MAX_MBFS]; /* membership function array */
UINT crisp_input[MAX_INPUTS]; /* input array */
UINT crisp_output[MAX_OUTPUTS]; /* output array */
UCHAR num_of_rules; /* max 255 rules allowed */
UINT cfg_index; /* config_block array index */
UINT mbf_index; /* membership function array index */
<<indent.pro>>
Wade Cherry
Software Design Engineer
iDEN Subscriber Division
Global Telecom Solutions Sector
8000 West Sunrise Blvd., Plantation, FL 33322
Tel: (954) 723-3242 Fax: (954) 723-4538
Email: address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-indent] Indent tool,
Cherry Wade-EWC008 <=