comparison examples/fortdemo.cc @ 12254:23385f2c90b7 release-3-4-x

whitespace fixes
author John W. Eaton <jwe@octave.org>
date Wed, 26 Jan 2011 23:49:42 -0500
parents 6cb30a539481
children 460a3c6d8bf1
comparison
equal deleted inserted replaced
12253:1f14586af94c 12254:23385f2c90b7
1 #include <octave/oct.h> 1 #include <octave/oct.h>
2 #include <octave/f77-fcn.h> 2 #include <octave/f77-fcn.h>
3 3
4 extern "C" 4 extern "C"
5 { 5 {
6 F77_RET_T 6 F77_RET_T
7 F77_FUNC (fortsub, FORTSUB) 7 F77_FUNC (fortsub, FORTSUB)
8 (const int&, double*, F77_CHAR_ARG_DECL 8 (const int&, double*, F77_CHAR_ARG_DECL
9 F77_CHAR_ARG_LEN_DECL); 9 F77_CHAR_ARG_LEN_DECL);
10 } 10 }
11 11
12 DEFUN_DLD (fortdemo , args , , "Fortran Demo.") 12 DEFUN_DLD (fortdemo , args , , "Fortran Demo.")
13 { 13 {
14 octave_value_list retval; 14 octave_value_list retval;
15 int nargin = args.length(); 15 int nargin = args.length();
16 if (nargin != 1) 16 if (nargin != 1)
17 print_usage (); 17 print_usage ();
18 else 18 else
19 { 19 {
22 { 22 {
23 double *av = a.fortran_vec (); 23 double *av = a.fortran_vec ();
24 octave_idx_type na = a.nelem (); 24 octave_idx_type na = a.nelem ();
25 OCTAVE_LOCAL_BUFFER (char, ctmp, 128); 25 OCTAVE_LOCAL_BUFFER (char, ctmp, 128);
26 26
27 F77_XFCN (fortsub, FORTSUB, (na, av, ctmp 27 F77_XFCN (fortsub, FORTSUB, (na, av, ctmp
28 F77_CHAR_ARG_LEN (128))); 28 F77_CHAR_ARG_LEN (128)));
29 29
30 retval(1) = std::string (ctmp); 30 retval(1) = std::string (ctmp);
31 retval(0) = a; 31 retval(0) = a;
32 } 32 }