2012年(18)
分类: LINUX
2012-04-07 01:03:29
推荐使用,cb注释(左右对齐比较好看点)
推荐使用,cu反注释 (比较好记,也比较好敲,不是吗?)
(1),cc
buf = malloc ( sizeof(<+TYPE+>) );
if ( buf==NULL ) {
fprintf ( stderr, "\ndynamic memory allocation failed\n" );
exit (EXIT_FAILURE);
}
/*buf = malloc ( sizeof(<+TYPE+>) );*/
/*if ( buf==NULL ) {*/
/*fprintf ( stderr, "\ndynamic memory allocation failed\n" );*/
/*exit (EXIT_FAILURE);*/
/*}*/
(2),c
/*buf = malloc ( sizeof(<+TYPE+>) );*/
/*if ( buf==NULL ) {*/
/*fprintf ( stderr, "\ndynamic memory allocation failed\n" );*/
/*exit (EXIT_FAILURE);*/
/*}*/
buf = malloc ( sizeof(<+TYPE+>) );
if ( buf==NULL ) {
fprintf ( stderr, "\ndynamic memory allocation failed\n" );
exit (EXIT_FAILURE);
}
(3),cm
/*buf = malloc ( sizeof(<+TYPE+>) );
if ( buf==NULL ) {
fprintf ( stderr, "\ndynamic memory allocation failed\n" );
exit (EXIT_FAILURE);
}*/
(4),cl或者,cr或者,cb
向左对齐(,cl),或向右对齐(,cr),或同时左右对齐(,cb)。
/*buf = malloc ( sizeof(<+TYPE+>) ); */
/*if ( buf==NULL ) { */
/* fprintf ( stderr, "\ndynamic memory allocation failed\n" );*/
/* exit (EXIT_FAILURE); */
/*} */
,cu
|NERDComUncommentLine|
取消选中行的注释。