annotate src/mkbuiltins @ 14138:72c96de7a403 stable

maint: update copyright notices for 2012
author John W. Eaton <jwe@octave.org>
date Mon, 02 Jan 2012 14:25:41 -0500
parents fd0a3ac60b0e
children ea6997657614
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6218
c1b66b74937d [project @ 2006-12-27 17:43:50 by jwe]
jwe
parents: 5796
diff changeset
1 #! /bin/sh
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
2 #
14138
72c96de7a403 maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
3 # Copyright (C) 1996-2012 John W. Eaton
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
4 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
5 # This file is part of Octave.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
6 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
7 # Octave is free software; you can redistribute it and/or modify it
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
8 # under the terms of the GNU General Public License as published by the
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
9 # Free Software Foundation; either version 3 of the License, or (at
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
10 # your option) any later version.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
11 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
12 # Octave is distributed in the hope that it will be useful, but WITHOUT
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
15 # for more details.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
16 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
17 # You should have received a copy of the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
18 # along with Octave; see the file COPYING. If not, see
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
19 # <http://www.gnu.org/licenses/>.
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
20
9906
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
21 if test $# -eq 0; then
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
22 echo "usage: mkbuiltins f1 f2 ..." 1>&2
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
23 exit 1
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
24 fi
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
25
4299
02fcb550f20c [project @ 2003-01-16 20:15:14 by jwe]
jwe
parents: 4234
diff changeset
26 SED=${SED:-'sed'}
02fcb550f20c [project @ 2003-01-16 20:15:14 by jwe]
jwe
parents: 4234
diff changeset
27
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
28 cat << \EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
29 // DO NOT EDIT! Generated automatically by mkbuiltins.
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
30
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
31 #ifdef HAVE_CONFIG_H
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
32 #include "config.h"
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
33 #endif
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
34
2968
e330cb788508 [project @ 1997-05-15 17:40:29 by jwe]
jwe
parents: 2910
diff changeset
35 #include "defun.h"
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
36 #include "oct-obj.h"
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
37 #include "variables.h"
7210
818b1417bce9 [project @ 2007-11-28 16:43:13 by jwe]
jwe
parents: 7019
diff changeset
38 #include "builtins.h"
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
39
3399
e665633c76af [project @ 1999-12-22 22:11:50 by jwe]
jwe
parents: 3364
diff changeset
40 #if defined (quad)
e665633c76af [project @ 1999-12-22 22:11:50 by jwe]
jwe
parents: 3364
diff changeset
41 #undef quad
e665633c76af [project @ 1999-12-22 22:11:50 by jwe]
jwe
parents: 3364
diff changeset
42 #endif
e665633c76af [project @ 1999-12-22 22:11:50 by jwe]
jwe
parents: 3364
diff changeset
43
4128
919b2f6573ee [project @ 2002-10-25 20:36:14 by jwe]
jwe
parents: 4110
diff changeset
44 #if defined (ENABLE_DYNAMIC_LINKING)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
45
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
46 #define XDEFUN_DLD_INTERNAL(name, args_name, nargout_name, doc)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
47
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
48 #define XDEFUNX_DLD_INTERNAL(name, fname, args_name, nargout_name, doc)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
49
3364
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3321
diff changeset
50 #else
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
51
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
52 #define XDEFUN_DLD_INTERNAL(name, args_name, nargout_name, doc) \
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
53 XDEFUN_INTERNAL(name, args_name, nargout_name, doc)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
54
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
55 #define XDEFUNX_DLD_INTERNAL(name, fname, args_name, nargout_name, doc) \
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
56 XDEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
57
3364
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3321
diff changeset
58 #endif
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3321
diff changeset
59
9014
71fca0fc2436 save source file names for functions as comments in .texi files
John W. Eaton <jwe@octave.org>
parents: 8920
diff changeset
60 #define XDEFUN_FILE_NAME(name)
71fca0fc2436 save source file names for functions as comments in .texi files
John W. Eaton <jwe@octave.org>
parents: 8920
diff changeset
61
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
62 #define XDEFUN_INTERNAL(name, args_name, nargout_name, doc) \
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
63 extern DECLARE_FUN (name, args_name, nargout_name); \
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
64 install_builtin_function (F ## name, #name, doc); \
4234
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4128
diff changeset
65
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
66 #define XDEFCONSTFUN_INTERNAL(name, args_name, nargout_name, doc) \
4234
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4128
diff changeset
67 extern DECLARE_FUN (name, args_name, nargout_name); \
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
68 install_builtin_function (F ## name, #name, doc, false); \
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
69
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
70 #define XDEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc) \
3744
b0588fc1f3ca [project @ 2000-11-30 00:27:00 by jwe]
jwe
parents: 3399
diff changeset
71 extern DECLARE_FUNX (fname, args_name, nargout_name); \
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
72 install_builtin_function (fname, name, doc); \
3744
b0588fc1f3ca [project @ 2000-11-30 00:27:00 by jwe]
jwe
parents: 3399
diff changeset
73
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
74 #define XDEFALIAS_INTERNAL(alias, name) \
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
75 alias_builtin (#alias, #name);
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
76
3321
6923abb04e16 [project @ 1999-10-26 18:15:30 by jwe]
jwe
parents: 3295
diff changeset
77 #define XDEFCONST_INTERNAL(name, defn, doc)
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
78
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
79 EOF
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
80
9906
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
81 for arg
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
82 do
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
83 fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
84 echo "static void"
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
85 echo "install_${fcn}_fcns (void)"
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
86 echo "{"
9906
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
87 cat "$arg"
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
88 echo "}"
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
89 echo ""
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
90 done
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
91
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
92 cat << \EOF
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
93
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7210
diff changeset
94 void
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7210
diff changeset
95 install_builtins (void)
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
96 {
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
97 EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
98
9906
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
99 for arg
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
100 do
8d20fb66a0dc more automake fixes
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
101 fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
102 echo " install_${fcn}_fcns ();"
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
103 done
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
104
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
105 cat << \EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
106 }
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
107
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
108 EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
109
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
110 exit 0