fix a terrible bug caused by the abuse of sizeof().
bar length
more decent way to display printlist
a little change
add the ctrl-n and ctrl-p