--- boxes-1.0.1.orig/src/boxes.c +++ boxes-1.0.1/src/boxes.c @@ -291,6 +291,7 @@ fprintf (st, " -i mode indentation mode [default: box]\n"); fprintf (st, " -k bool kill leading/trailing blank lines on removal or not\n"); fprintf (st, " -l list available box designs w/ samples\n"); + fprintf (st, " -m mend box, i. e. remove it and redraw it afterwards" ); fprintf (st, " -p fmt padding [default: none]\n"); fprintf (st, " -r remove box from input\n"); fprintf (st, " -s wxh specify box size (width w and/or height h)\n"); @@ -522,7 +523,7 @@ * Parse Command Line */ do { - oc = getopt (argc, argv, "a:d:f:hi:k:lp:rs:t:v"); + oc = getopt (argc, argv, "a:d:f:hi:k:lmp:rs:t:v"); switch (oc) { @@ -683,6 +684,13 @@ opt.l = 1; break; + case 'm': + /* + * remove and redraw + */ + opt.r = 2; + break; + case 'p': /* * Padding. format is ([ahvtrbl]n)+ @@ -1564,10 +1572,11 @@ rc = apply_substitutions (1); if (rc) exit (EXIT_FAILURE); - output_input(); + if( 1 == opt.r ) + output_input(); } - else { + if( !opt.r || 2 == opt.r ) { /* * Generate box */