Mercurial > octave-nkf
annotate libinterp/mk-errno-list @ 18479:85d31344fb23 stable rc-3-8-1-2
3.8.1 release candidate 2
* configure.ac (OCTAVE_VERSION): Bump to 3.8.1-rc2.
(OCTAVE_MINOR_VERSION): Bump to 1-rc2.
(OCTAVE_RELEASE_DATE): Set to 2014-02-14.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 17 Feb 2014 02:20:39 -0500 |
parents | d63878346099 |
children | 446c46af4b42 |
rev | line source |
---|---|
5494 | 1 #! /bin/sh |
7019 | 2 # |
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
3 # Copyright (C) 2005-2013 John W. Eaton |
7019 | 4 # |
5 # This file is part of Octave. | |
6 # | |
7 # Octave is free software; you can redistribute it and/or modify it | |
8 # under the terms of the GNU General Public License as published by the | |
9 # Free Software Foundation; either version 3 of the License, or (at | |
10 # your option) any later version. | |
11 # | |
12 # Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 # for more details. | |
16 # | |
17 # You should have received a copy of the GNU General Public License | |
18 # along with Octave; see the file COPYING. If not, see | |
19 # <http://www.gnu.org/licenses/>. | |
5494 | 20 |
21 if [ $# -ne 2 ]; then | |
22 echo "usage: get-errno-list [--perl PERL|--python PYTHON]" 1>&2 | |
23 exit 1 | |
24 fi | |
25 | |
26 if [ $1 = "--perl" ]; then | |
27 PERL="$2"; | |
28 $PERL -e 'foreach $key (keys(%!)) { | |
29 $x .= "#if defined ($key)\n { \"$key\", $key, },\n#endif\n"; | |
30 } | |
31 while (<>) { | |
32 s/^ *\@SYSDEP_ERRNO_LIST\@/$ x/; | |
33 print; | |
34 }' | |
35 | |
36 elif [ $1 = "--python" ]; then | |
37 PYTHON="$2"; | |
38 $PYTHON -c ' | |
39 from errno import errorcode | |
40 from sys import stdin | |
41 | |
42 t = "#if defined (%s)\n { \"%s\", %s, },\n#endif\n" | |
43 errstr = "" | |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
44 for k in errorcode.keys (): |
5494 | 45 errstr += t % tuple(3*[errorcode[k]]) |
46 | |
47 for l in stdin: | |
48 print l.replace("@SYSDEP_ERRNO_LIST@", errstr), | |
49 ' | |
50 fi | |
51 | |
52 exit $? |