Skip to content

Commit 8899b41

Browse files
-r and -t no longer need -s.
1 parent d1d7ab1 commit 8899b41

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

csloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ long
4242
cnt_single_file(const char *file, size_t cr)
4343
{
4444
FILE *f = fopen(file, "r");
45-
int cnt = 0;
45+
long cnt = 0;
4646

4747
if(f == NULL)
4848
{
@@ -51,7 +51,7 @@ cnt_single_file(const char *file, size_t cr)
5151
goto fini;
5252
}
5353

54-
char curr;
54+
int curr;
5555
int ne = 0;
5656
cr += cr == 0;
5757

csloc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
#define CSLOC_QUIET 1
1919
#define CSLOC_IGNDOT 2
2020
#define CSLOC_SIF 4
21-
#define CSLOC_SORT 010
21+
#define CSLOC_SORT 014
2222
#define CSLOC_FSIZE 020
23-
#define CSLOC_RSORT 050
23+
#define CSLOC_RSORT 054
2424
struct csloc_file_entry
2525
{
2626
size_t val;

main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#endif
1818
#include"csloc.h"
1919
#define VERSION_MINOR "8"
20-
#define VERSION_PATCH "1"
20+
#define VERSION_PATCH "2"
2121
int main(int argl,char*argv[])
2222
{
2323
if(argl==1)
@@ -33,6 +33,7 @@ int main(int argl,char*argv[])
3333
puts("-f to count file size instead.");
3434
puts("-t to sort the files by number of lines.");
3535
puts("-s to show the sloc of individual files.");
36+
puts("The options -r and -t automatically enable -s, -rs and -st are now redundant.");
3637
puts("-h to not count files beginning with a ., such files are considered hidden on linux.");
3738
puts("-cNUM specifies that NUM non-whitespace characters are required to count as a valid line.");
3839
puts("-q to not output complete sentences.");

0 commit comments

Comments
 (0)