1
1
Fork
You've already forked loc
0
[Complete] Simple C code line counter
  • C 67.5%
  • Makefile 23.3%
  • Roff 9.2%
Find a file
Mattias Andrée d367031437
Fix mistakes
Signed-off-by: Mattias Andrée <m@maandree.se>
2026年05月23日 20:58:20 +02:00
tests Add missing test case 2018年02月20日 22:05:31 +01:00
.gitignore First commit 2018年02月19日 18:44:13 +01:00
arg.h First commit 2018年02月19日 18:44:13 +01:00
config.mk m fixes 2026年02月22日 13:43:41 +01:00
LICENSE Fix mistakes 2026年05月23日 20:58:20 +02:00
loc.1 Fix mistakes 2026年05月23日 20:58:20 +02:00
loc.c Fix mistakes 2026年05月23日 20:58:20 +02:00
Makefile Improve makefile and fix warnings 2021年09月16日 18:25:31 +02:00
README Fix mistakes 2026年05月23日 20:58:20 +02:00

NAME
	loc - count number of lines of code
SYNOPSIS
	loc [-s] [file] ...
DESCRIPTION
	loc counts the number of lines of code for each specified
	file. loc will treat each file as a C source code or C header
	file. If file is -, or if a file is not specified, the
	standard input is read.
	If more than one file is specified, each successfully
	processed file will have its line count output in the
	format
		"%s:%*s%zu\n", <file>, <some positive integer>, "", <#lines of code>
	The total for all processed files is printed on the last
	line with the format
		"%zu\n", <total #lines of code>
	If exactly one or no files are specified, this will be the
	only line output.
OPTIONS
	-s
		Only output the last line. (The total over all files.)