From 65feadc0658d8422f30c0cce7bd9af0fb183a2fa Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 29 May 2019 17:55:10 -0400 Subject: Add xx -p option --- bin/xx.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin/xx.c') diff --git a/bin/xx.c b/bin/xx.c index 3a314c1b..6d04f2f5 100644 --- a/bin/xx.c +++ b/bin/xx.c @@ -34,10 +34,11 @@ static bool zero(const byte *ptr, size_t size) { static struct { size_t cols; size_t group; + size_t blank; bool ascii; bool offset; bool skip; -} options = { 16, 8, true, true, false }; +} options = { 16, 8, 0, true, true, false }; static void dump(FILE *file) { bool skip = false; @@ -59,6 +60,12 @@ static void dump(FILE *file) { } } + if (options.blank) { + if (offset && offset % options.blank == 0) { + printf("\n"); + } + } + if (options.offset) { printf("%08zX: ", offset); } @@ -106,11 +113,12 @@ int main(int argc, char *argv[]) { const char *path = NULL; int opt; - while (0 < (opt = getopt(argc, argv, "ac:g:rsz"))) { + while (0 < (opt = getopt(argc, argv, "ac:g:p:rsz"))) { switch (opt) { break; case 'a': options.ascii ^= true; break; case 'c': options.cols = strtoul(optarg, NULL, 0); break; case 'g': options.group = strtoul(optarg, NULL, 0); + break; case 'p': options.blank = strtoul(optarg, NULL, 0); break; case 'r': reverse = true; break; case 's': options.offset ^= true; break; case 'z': options.skip ^= true; -- cgit 1.4.1 ae969d&follow=1'>diff
path: root/irc/scooper/distinfo (unfollow)
Commit message (Expand)Author
2021-03-24Import irc/catgirl from ports svnJune McEnroe
2021-03-24Import security/libretls from ports svnJune McEnroe
2021-03-08Add bubger portJune McEnroe
2021-03-08Update catsit to 1.3June McEnroe
2021-03-08Update imbox to 1.4June McEnroe
2021-02-09Update catgirl to 1.6June McEnroe
2021-02-08Update catsit to 1.2June McEnroe
2021-02-08Update pounce to 2.3June McEnroe
2021-02-04Update cgit-causal-agency to 8e4c63cJune McEnroe
2021-01-20Update cgit-causal-agency to 8a10aa5June McEnroe
2021-01-17Update cgit-causal-agencyJune McEnroe
2021-01-17Update scooper to 1.1June McEnroe
2021-01-17Update catgirl to 1.5 (BONUS WEBISODE)June McEnroe
2021-01-15Update litterbox to 1.7June McEnroe
2021-01-15Update pounce to 2.2June McEnroe
2021-01-15Update catgirl to 1.4June McEnroe
2020-12-28Replace cgit-patched with cgit-causal-agencyJune McEnroe
2020-12-18Add notemap portJune McEnroe
2020-12-15Update libretls to 3.3.1June McEnroe
2020-12-15Update catsit to 1.1June McEnroe
2020-12-15Update pounce to 2.1p1June McEnroe
2020-12-15Add imbox portJune McEnroe
2020-11-24Update pounce to 2.1June McEnroe
2020-11-24Update libretls to 3.3.0June McEnroe
2020-11-17Update catgirl to 1.3June McEnroe
2020-11-17Update libretls to 3.2.2June McEnroe
2020-09-29Update libretls to 3.2.1June McEnroe
2020-09-10Update catgirl to 1.2June McEnroe
2020-09-09Add pounce-palaver portJune McEnroe
2020-09-09Update pounce to 2.0June McEnroe
2020-09-09Update litterbox to 1.6June McEnroe
2020-08-23Add scooper portJune McEnroe
2020-08-23Add catsit portJune McEnroe
2020-08-13Update pounce to 1.4p2June McEnroe
2020-08-11Update pounce to 1.4p1June McEnroe
2020-08-10Add litterbox portJune McEnroe
2020-08-10Add missing USES=pkgconfig to pounceJune McEnroe