Mercurial > octave
changeset 26868:23894ad6f7d1
edit.m: wrap license header text and delete trailing spaces in new files
* edit.m: Wrap GPL and BSD license headers according to upstream text. Delete
trailing spaces in comment blocks for new files.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 07 Mar 2019 15:11:17 -0800 |
parents | 7506884fc158 |
children | 992f55ef87f5 |
files | scripts/miscellaneous/edit.m |
diffstat | 1 files changed, 13 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/edit.m Sat Mar 09 20:30:24 2019 +0100 +++ b/scripts/miscellaneous/edit.m Thu Mar 07 15:11:17 2019 -0800 @@ -409,33 +409,31 @@ switch (uclicense) case "GPL" head = cstrcat (copyright, "\n\n", "\ -This program is free software: you can redistribute it and/or modify it\n\ -under the terms of the GNU General Public License as published by\n\ +This program is free software: you can redistribute it and/or modify\n\ +it under the terms of the GNU General Public License as published by\n\ the Free Software Foundation, either version 3 of the License, or\n\ (at your option) any later version.\n\ \n\ -This program is distributed in the hope that it will be useful, but\n\ -WITHOUT ANY WARRANTY; without even the implied warranty of\n\ +This program is distributed in the hope that it will be useful,\n\ +but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ GNU General Public License for more details.\n\ \n\ You should have received a copy of the GNU General Public License\n\ -along with this program. If not, see\n\ -<https://www.gnu.org/licenses/>.\ +along with this program. If not, see <https://www.gnu.org/licenses/>.\ "); tail = [author, "\n", revs]; case "BSD" head = cstrcat (copyright, "\n\n", "\ -This program is free software; redistribution and use in source and\n\ +This program is free software: redistribution and use in source and\n\ binary forms, with or without modification, are permitted provided that\n\ the following conditions are met:\n\ -\n\ - 1.Redistributions of source code must retain the above copyright\n\ - notice, this list of conditions and the following disclaimer.\n\ - 2.Redistributions in binary form must reproduce the above copyright\n\ - notice, this list of conditions and the following disclaimer in the\n\ - documentation and/or other materials provided with the distribution.\n\ +1. Redistributions of source code must retain the above copyright\n\ + notice, this list of conditions and the following disclaimer.\n\ +2. Redistributions in binary form must reproduce the above copyright\n\ + notice, this list of conditions and the following disclaimer in the\n\ + documentation and/or other materials provided with the distribution.\n\ \n\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n\ @@ -504,12 +502,13 @@ "## " strrep(tail, "\n", "\n## ") "\n\n"]; else comment = ["## " strrep(head,"\n","\n## ") "\n\n" ... - "## -*- texinfo -*- \n## @deftypefn {} " ... + "## -*- texinfo -*-\n## @deftypefn {} " ... "{@var{retval} =} " basename ... " (@var{input1}, @var{input2})\n##\n" ... "## @seealso{}\n## @end deftypefn\n\n" ... "## " strrep(tail, "\n", "\n## ") "\n\n"]; endif + comment = strrep (comment, " \n", "\n"); text = [comment, body]; endswitch