Mercurial > octave
annotate libinterp/corefcn/mk-errno-list.sh @ 31241:5ea5fe592a9a
Don't delete labels when reordering of axes children (bug #63117)
* graphics.in.h (children_property::do_set): Avoid using a temporary variable
for new children list. Rephrase error message to be more accurate.
Always return true for clarity.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Tue, 27 Sep 2022 23:30:54 +0200 |
parents | 796f54d4ddbf |
children | 597f3ee61a48 |
rev | line source |
---|---|
5494 | 1 #! /bin/sh |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
2 |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
3 ######################################################################## |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
4 ## |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
5 ## Copyright (C) 2005-2022 The Octave Project Developers |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
6 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
7 ## See the file COPYRIGHT.md in the top-level directory of this |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
8 ## distribution or <https://octave.org/copyright/>. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
9 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
10 ## This file is part of Octave. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
11 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
12 ## Octave is free software: you can redistribute it and/or modify it |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
13 ## under the terms of the GNU General Public License as published by |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
14 ## the Free Software Foundation, either version 3 of the License, or |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
15 ## (at your option) any later version. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
16 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
17 ## Octave is distributed in the hope that it will be useful, but |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
18 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
19 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
20 ## GNU General Public License for more details. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
21 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
22 ## You should have received a copy of the GNU General Public License |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
23 ## along with Octave; see the file COPYING. If not, see |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
24 ## <https://www.gnu.org/licenses/>. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
25 ## |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
26 ######################################################################## |
5494 | 27 |
28 if [ $# -ne 2 ]; then | |
23722
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
29 echo "usage: get-errno-list [--perl PERL|--python PYTHON|--sed SED]" 1>&2 |
5494 | 30 exit 1 |
31 fi | |
32 | |
33 if [ $1 = "--perl" ]; then | |
21277
1bca6c72d2b1
maint: Use consistent coding style for build helper shell scripts
Mike Miller <mtmiller@octave.org>
parents:
19697
diff
changeset
|
34 PERL="$2" |
23419
75a4b9a34999
Ensure generated source files are deterministic and reproducible
Mike Miller <mtmiller@octave.org>
parents:
23220
diff
changeset
|
35 $PERL -e 'foreach $key (sort (keys (%!))) { |
23798
771310737137
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23722
diff
changeset
|
36 $x .= "#if defined ($key)\n { \"$key\", $key },\n#endif\n"; |
5494 | 37 } |
38 while (<>) { | |
23722
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
39 s/^ *\@SYSDEP_ERRNO_LIST\@/$x/; |
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
40 s/\@NO_EDIT_WARNING\@/DO NOT EDIT! Generated automatically from oct-errno.in.cc by mk-errno-list.sh/; |
5494 | 41 print; |
42 }' | |
43 | |
44 elif [ $1 = "--python" ]; then | |
21277
1bca6c72d2b1
maint: Use consistent coding style for build helper shell scripts
Mike Miller <mtmiller@octave.org>
parents:
19697
diff
changeset
|
45 PYTHON="$2" |
5494 | 46 $PYTHON -c ' |
47 from errno import errorcode | |
23419
75a4b9a34999
Ensure generated source files are deterministic and reproducible
Mike Miller <mtmiller@octave.org>
parents:
23220
diff
changeset
|
48 from sys import stdin, stdout |
5494 | 49 |
23798
771310737137
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23722
diff
changeset
|
50 t = "#if defined (%s)\n { \"%s\", %s },\n#endif\n" |
5494 | 51 errstr = "" |
23419
75a4b9a34999
Ensure generated source files are deterministic and reproducible
Mike Miller <mtmiller@octave.org>
parents:
23220
diff
changeset
|
52 for v in sorted (errorcode.values ()): |
75a4b9a34999
Ensure generated source files are deterministic and reproducible
Mike Miller <mtmiller@octave.org>
parents:
23220
diff
changeset
|
53 errstr += t % tuple (3 * [v]) |
5494 | 54 |
23722
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
55 noedit = "DO NOT EDIT! Generated automatically from oct-errno.in.cc by mk-errno-list.sh" |
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
56 |
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
57 repls = ("@SYSDEP_ERRNO_LIST@", errstr), ("@NO_EDIT_WARNING@", noedit) |
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
58 |
5494 | 59 for l in stdin: |
23722
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
60 stdout.write (reduce (lambda a, kv: a.replace (*kv), repls, l)) |
5494 | 61 ' |
23722
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
62 elif [ $1 = "--sed" ]; then |
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
63 SED="$2" |
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
64 $SED -e '/@SYSDEP_ERRNO_LIST@/D' \ |
ab9e51f41a29
substitute no-edit warning in oct-errno.in.cc
John W. Eaton <jwe@octave.org>
parents:
23709
diff
changeset
|
65 -e 's/@NO_EDIT_WARNING@/DO NOT EDIT! Generated automatically from oct-errno.in.cc by mk-errno-list.sh/' |
5494 | 66 fi |
67 | |
68 exit $? |