From c94bbb169889ec8827c373ebd6cfadf9f330218e Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Wed, 5 May 2021 08:56:43 -0400 Subject: Add format rule --- Makefile | 3 +++ dirconvert.c | 3 ++- opendircolors.c | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cc2c299..7a0c5d5 100644 --- a/Makefile +++ b/Makefile @@ -9,4 +9,7 @@ SYMLINKS+= opendircolors.1.gz ${MANDIR}1/dircolors.1.gz MAKEOBJDIR=obj +format: + find ${.CURDIR} -type f -name '*.c' -exec clang-format -i {} \; + .include diff --git a/dirconvert.c b/dirconvert.c index 3cafd51..41982c1 100644 --- a/dirconvert.c +++ b/dirconvert.c @@ -96,6 +96,7 @@ usage(const char *progname) char *path; path = strdup(progname); - (void)fprintf(stderr, "usage: %s LSCOLORS | LS_COLORS\n", basename(path)); + (void)fprintf( + stderr, "usage: %s LSCOLORS | LS_COLORS\n", basename(path)); exit(EX_USAGE); } diff --git a/opendircolors.c b/opendircolors.c index bda00dc..21855ba 100644 --- a/opendircolors.c +++ b/opendircolors.c @@ -119,7 +119,6 @@ main(int argc, char **argv) if (*line == '.') { sprintf(out + strlen(out), "*%s=%s:", fmttype, val); continue; - ; } else if (*line == '*') { sprintf(out + strlen(out), "%s=%s:", fmttype, val); continue; -- cgit v1.2.3-56-ge451