added -l/--lines function, which is a bit like tail/head, also switched to c99