lytsing.org logo GNU - tools

工具库

svncolor 彩色显示文件比较

Ubuntu 8.04:

sudo apt-get install colordiff

svn diff 默认的颜色不好看,可以设置成 git diff的效果:

$ vim ~/.bashrc
alias svndiff='svn diff --diff-cmd=colordiff'
$ vim ~/.colordiffrc
banner=no
color_patches=no
plain=off
newtext=darkgreen
oldtext=darkred
diffstuff=white
cvsstuff=darkyellow

检查内存泄漏工具valgrind

sudo apt-get install splint
splint debug4.c

代码格式化indent

经典K&R风格

indent -kr -i4 -l200 -bad -bap -ip8  post.c

BSD Style

-orig -i8 -ci4 -ts8 -lp -nbad -bap -nbbb -nsob -fc1 -fca -c9 -cd9 -cp9 -cdb -sc -br -ce -cdw -cli0 -cbi8 -ss -npcs -ncs -saf -sai -saw -nprs -di2 -nbfda -psl -brs -ip4 -lps -bbo -hnl -nbc -l79 -ut

从网上下载下来的。 贴出来代码,最好把tab改为四个空格。

diff/patch

diff -urN deli.cpp deli-mm.cpp

艺术字 figlet

sudo apt-get install figlet