Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Beautify your c/c++ source code

http://uncrustify.sourceforge.net/
Ident code, aligning on parens, assignments, etc
Align on '=' and variable definitions
Align structure initializers
Align #define stuff
Align backslash-newline stuff
Reformat comments (a little bit)
Fix inter-character spacing
Add or remove parens on return statements
Add or remove braces on single-statement if/do/while/for statements
Supports embedded SQL 'EXEC SQL' stuff
Highly configurable - 385 configurable options as of version 0.56
Output :
const char *token_names[] =
{
[CT_POUND] = "POUND",
[CT_PREPROC] = "PREPROC",
[CT_PREPROC_BODY] = "PREPROC_BODY",
[CT_PP] = "PP",
};
int main(int argc, char *argv[])
{
struct junk a[] =
{
{ "version", 0, 0, 0 },
{ "file", 1, 150, 'f' },
{ "config", 1, 0, 'c' },
{ "parsed", 25, 0, 'p' },
{ NULL, 0, 0, 0 }
};
}
color_t colors[] =
{
{ "red", { 255, 0, 0 } }, { "blue", { 0, 255, 0 } },
{ "green", { 0, 0, 255 } }, { "purple", { 255, 255, 0 } },
};
struct foo_t bar =
{
.name = "bar",
.age = 21
};
struct foo_t bars[] =
{
[0] = { .name = "bar",
.age = 21 },
[1] = { .name = "barley",
.age = 55 },
};
void foo(void)
{
int i;
char *name;
i = 5;
name = "bob";
}
/**
* This is your typical header comment
*/
int foo(int bar)
{
int idx;
int res = 0; // trailing comment
// that spans two lines
for (idx = 1; idx < bar; idx++)
/* comment in virtual braces */
res += idx;
res *= idx; // some comment
// almost continued, but a NL in between
// col1 comment in level 1
return(res);
}
// col1 comment in level 0
#define foobar(x) \
{ \
for (i = 0; i < x; i++) \
{ \
junk(i, x); \
} \
}


Ïà¹ØÎĵµ£º

ÈçºÎʹÓ÷ºÐÍÄ£擬virtual? (C/C++) (template)

ÍøÉÏÒ»µÀ½ðɽµÄÃæÊÔÌ⣺
http://topic.csdn.net/u/20100524/14/0eff992a-2849-4db6-bdaa-d4a200e79b7c.html
Çë·Ö±ðÓÃC++µÄÃæÏò¶ÔÏóºÍ·ºÐÍ»úÖÆ£¬±àдʵÏÖTemplate MethodģʽµÄʾÀý´úÂ룬²¢±È½ÏÁ½ÖÖ·½Ê½¸÷×ÔµÄÓÅȱµã¡£
ÓÃÐ麯ÊýʵÏÖTemplate MethodµÄ·½Ê½¾Í²»¶à˵ÁË¡£Ó÷ºÐ͵ķ½Ê½ÊµÏÖ¶à̬ÔÚATLÀïÃæÓдóÁ¿µÄÓõ½£¡
·ºÐ͵ ......

Îĵµ´¦ÀíµÄcº¯Êý

Îļþº¯Êý´ò¿ªÎļþº¯Êý
[º¯ÊýÍ·]
FILE *fopen£¨char *filename, Char *mode£© 
[²ÎÊý]
filename ×Ö·ûÐÍÖ¸Õ룬ָÏòµÄ×Ö·û´®ÊÇÒª´ò¿ªµÄ´ÅÅÌÎļþÃû£»mode ×Ö·ûÐÍÖ¸Õ룬ָÏòµÄ×Ö·û´®ÊÇÎļþʹÓ÷½Ê½¡£ÕâÁ½¸ö²ÎÊý¶ÔÓ¦µÄʵ²Î¿ÉÒÔÊÇ×Ö·ûÖг£Á¿£¬Ò²¿ÉÒÔÊDz¹·ûÊý×éÊ×µØÖ·£¬»òÕßÊÇÖ¸Ïò×Ö·û´®µÄÖ¸Õë±äÁ¿¡£ 
ÎļþʹÓ÷½Ê½¿ ......

SD¿¨µÄдÎļþ ÒÔ¼° CÖÐ#·ûºÅ

Ò»  Ê×ÏÈ×ܽáÒ»ÏÂSD¿¨µÄдÎļþ£¬Ðè×¢ÒâµÄÊÂÏîÈçÏ£º
1. FAT16 дµÄʱºò±ØÐëÖÁÉÙдһ¸öÉÈÇø¡£
2. FAT±í²»ÄÜƵ·±µÄ¶Áд£¬·ñÔò»á³ö´í¡£ÉêÇëеÄÒ»¸ö´Øʱ£¬Ö±½ÓÔÚÕâ¸ö´ØÀïÃ棨¼´ÏÂÒ»´ØºÅ£©µÄдΪ0XFFFF¡£
3. FATËƺõ±ØÐëת»¯³Éu16²ÅÄÜд¡£Ã²ËÆÊÇÕâÑù£¬¾ßÌåû×Ðϸ¿´¡£
4. »ñȡеÄË÷Òý´ØµÄʱºò£¬Ö±½Ó´Ó¾ÉµÄË÷Òý´ØµÄºóÃæ ......

CºÍC++ÖеÄÖ÷ÒªÊý¾ÝÀàÐͺÍ×Ö½Ú´óС

CºÍC++ÖеÄÖ÷ÒªÊý¾ÝÀàÐͺÍ×Ö½Ú´óС(
    C/C++µÄд·¨ÊDz»¿ÆѧºÍ²»ÑϽ÷µÄ¡£ÒòΪCºÍC++ËäÈ»ÓïÒ壬µ«ÊÇÉè¼Æ˼ÏëÊǽṹ»¯ÓëÃæÏò¶ÔÏó. C±ê×¼¹æ·¶ÓëC++µÄ±ê×¼¹æ·¶Ò²ÊÇÁ½¸öÎı¾¡£½üÀ´×ÐϸÑо¿ÁËËüÃǵÄÊý¾ÝÀàÐÍ£¬²ÅÖªµÀÆäÀ´ÁúÈ¥Âö£¬ÕæÕý×öµ½ÆäʵËùÒÔÈ»¡£
1¡¢CÓïÑÔ¶¨ÒåÁË5ÖÖ»ù±¾Êý¾ÝÀàÐÍ
  char(×Ö·û), int(Õ ......

ÅжÏC?ÐÐ??¾³µÄ³ÌÐò

/*
**ÅжÏC?ÐÐ??¾³µÄ³ÌÐò
*/
/*
**¾²?³õʼ»¯
*/
int static_variable=5;
void
f()
{
 register int i1, i2, i3, i4, i5, i6, i7, i8, i9, i10;
 register char *c1, *c2, *c3, *c4, *c5, *c6, *c7 , *c8, *c9, *c10;
 extern int a_very_long_name_to_sec_how_long_they_can_be;
 double ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ