Changeset: 1f5f01f8bdfd for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f5f01f8bdfd Modified Files: clients/ChangeLog clients/src/mapiclient/mclient.c Branch: default Log Message:
Strip any trailing whitespace with the \d command diffs (36 lines): diff -r e1233e6364c5 -r 1f5f01f8bdfd clients/ChangeLog --- a/clients/ChangeLog Fri Nov 19 12:42:33 2010 +0100 +++ b/clients/ChangeLog Fri Nov 19 13:58:27 2010 +0100 @@ -1,3 +1,6 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Fri Nov 19 2010 Fabian Groffen <[email protected]> +- Strip any trailing whitespace with the \d command + diff -r e1233e6364c5 -r 1f5f01f8bdfd clients/src/mapiclient/mclient.c --- a/clients/src/mapiclient/mclient.c Fri Nov 19 12:42:33 2010 +0100 +++ b/clients/src/mapiclient/mclient.c Fri Nov 19 13:58:27 2010 +0100 @@ -1765,7 +1765,7 @@ static int doFileByLines(Mapi mid, FILE *fp, const char *prompt) { - char *line = NULL; + char *line = NULL, *p = NULL; char *oldbuf = NULL, *buf = NULL; size_t length; MapiHdl hdl = mapi_get_active(mid); @@ -1966,6 +1966,13 @@ } for (line += 2; *line && isascii((int) *line) && isspace((int) *line); line++) ; + /* find the end ... */ + for (p = line; *p; p++) + ; + /* ... and strip trailing whitespace */ + for (p-- ; p >= line && isascii((int) *p) && isspace((int) *p); p--) + *p = '\0'; + if (*line) { #ifdef HAVE_POPEN stream *saveFD, *saveFD_raw; _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
