diff --git a/mailfmt b/mailfmt index d8b3596..586255f 100644 --- a/mailfmt +++ b/mailfmt @@ -1,10 +1,10 @@ -#!/usr/bin/env python -# mailfmt - Copyright (c) 2002, TundraWare Inc., All Rights Reserved +#!/usr/bin/env python2 +# mailfmt - Copyright (c) 2002-2022, TundraWare Inc., All Rights Reserved # Reformat mail/news to cleanup quotation characters and maintain # reasonable line widths. PROGNAME = "MAILFMT" -RCSID = "$Id: mailfmt,v 1.3 2002/10/09 19:34:16 tundra Exp $" +RCSID = "$Id: mailfmt,v 1.4 2022/04/01 19:34:16 tundra Exp $" VERSION = RCSID.split()[2] ########## @@ -34,7 +34,7 @@ from win32ui import MessageBox else: WIN32 = FALSE - + ########## # Constants & Tables @@ -105,7 +105,7 @@ content = " ".join(content.split()) return([quotetxt, content]) - + # End of 'line_quot()' @@ -175,7 +175,7 @@ usage() sys.exit(1) - + for opt, val in opts: if opt == "-a": RMVQUOT = FALSE @@ -199,7 +199,7 @@ except: dsply_error(eBADWIDTH) sys.exit(1) - + if WIDTH < 1: dsply_error(eBADWIDTH) sys.exit(1) @@ -259,7 +259,7 @@ # Walk through the current work buffer and concatenate # adjacent lines with identical quotations - + l="" i = -1 lastquot = NOQUOTEMATCH # Make sure no match on first record @@ -269,7 +269,7 @@ lastquot = tmp[0][0] content = tmp[0][1] tmp = tmp[1:] - + for entry in tmp: if entry[1] == PMARK: # Blank lines output separately buffer.append([lastquot, content]) # Output pending work @@ -288,7 +288,7 @@ # Iterate across the results producing lines of appropriate length # with correct quotation text, if any. - + tmp = [] for entry in buffer: # Figure out allowable width with quotation, if any @@ -350,4 +350,3 @@ # Send the output as user has specified output(tmp) -