annotate libcruft/misc/f77-fcn.c @ 3963:05485f532599

[project @ 2002-06-27 15:31:39 by jwe]
author jwe
date Thu, 27 Jun 2002 15:31:39 +0000
parents 9be12c29c7d5
children 6b96ce9f5743
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2544
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
1 /*
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
2
2847
8b262e771614 [project @ 1997-03-27 16:18:26 by jwe]
jwe
parents: 2544
diff changeset
3 Copyright (C) 1996, 1997 John W. Eaton
2544
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
4
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
6
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
10 later version.
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
11
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
15 for more details.
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
16
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, write to the Free
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
20
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
21 */
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
22
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
23 #ifdef HAVE_CONFIG_H
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
24 #include <config.h>
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
25 #endif
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
26
3808
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
27 #include <stdlib.h>
2544
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
28 #include <string.h>
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
29
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
30 #include "f77-fcn.h"
3808
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
31 #include "lo-error.h"
2544
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
32
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
33 void
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
34 copy_f77_context (void *from, void *to, unsigned int size)
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
35 {
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
36 memcpy (to, from, size);
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
37 }
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
38
3808
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
39 /* All the STOP statements in the Fortran routines have been replaced
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
40 with a call to XSTOPX.
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
41
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
42 XSTOPX jumps back to the entry point for the Fortran function that
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
43 called us. Then the calling function should do whatever cleanup
3809
ec80db02d436 [project @ 2001-03-28 14:03:16 by jwe]
jwe
parents: 3808
diff changeset
44 is necessary. */
3808
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
45
3950
9be12c29c7d5 [project @ 2002-05-23 03:00:00 by jwe]
jwe
parents: 3887
diff changeset
46 void
3887
7da18459c08b [project @ 2002-04-04 00:44:21 by jwe]
jwe
parents: 3809
diff changeset
47 F77_FUNC (xstopx, XSTOPX) (const char *s, long int slen)
3808
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
48 {
3809
ec80db02d436 [project @ 2001-03-28 14:03:16 by jwe]
jwe
parents: 3808
diff changeset
49 /* Skip printing message if it is just a single blank character. */
ec80db02d436 [project @ 2001-03-28 14:03:16 by jwe]
jwe
parents: 3808
diff changeset
50 if (s && slen > 0 && ! (slen == 1 && *s == ' '))
3963
05485f532599 [project @ 2002-06-27 15:31:39 by jwe]
jwe
parents: 3950
diff changeset
51 (*current_liboctave_error_handler) ("%.*s", slen, s);
3808
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
52
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
53 longjmp (f77_context, 1);
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
54 }
885b296ef83a [project @ 2001-03-27 19:12:58 by jwe]
jwe
parents: 2847
diff changeset
55
2544
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
56 /*
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
57 ;;; Local Variables: ***
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
58 ;;; mode: C++ ***
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
59 ;;; End: ***
a33bbd3fadd7 [project @ 1996-11-20 05:09:29 by jwe]
jwe
parents:
diff changeset
60 */