Mercurial > hg > octave-nkf
changeset 18437:4b32677b6229 stable
Rename Fortran example files from 'fort' prefix to 'fortran' prefix.
* examples/fortrandemo.cc, examples/fortransub.f: Renamed files.
* examples/fortdemo.cc, examples/fortsub.f: Deleted files.
* examples/Makefile.am, doc/interpreter/Makefile.am: Change build
system to use new file names.
* doc/interpreter/external.txi: Change documentation to reflect new names.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 24 Jan 2014 09:32:55 -0800 |
parents | 877b82d73ed9 |
children | 7994d3ce6e8e |
files | doc/interpreter/Makefile.am doc/interpreter/external.txi examples/Makefile.am examples/fortdemo.cc examples/fortrandemo.cc examples/fortransub.f examples/fortsub.f |
diffstat | 5 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/Makefile.am +++ b/doc/interpreter/Makefile.am @@ -59,8 +59,8 @@ $(top_srcdir)/examples/addtwomatrices.cc \ $(top_srcdir)/examples/celldemo.cc \ $(top_srcdir)/examples/embedded.cc \ - $(top_srcdir)/examples/fortdemo.cc \ - $(top_srcdir)/examples/fortsub.f \ + $(top_srcdir)/examples/fortrandemo.cc \ + $(top_srcdir)/examples/fortransub.f \ $(top_srcdir)/examples/funcdemo.cc \ $(top_srcdir)/examples/globaldemo.cc \ $(top_srcdir)/examples/helloworld.cc \
--- a/doc/interpreter/external.txi +++ b/doc/interpreter/external.txi @@ -1037,14 +1037,14 @@ given in the following example, where the C++ wrapper is @example -@EXAMPLEFILE(fortdemo.cc) +@EXAMPLEFILE(fortrandemo.cc) @end example @noindent and the Fortran function is @example -@EXAMPLEFILE(fortsub.f) +@EXAMPLEFILE(fortransub.f) @end example This example demonstrates most of the features needed to link to an @@ -1054,13 +1054,13 @@ @example @group -mkoctfile fortdemo.cc fortsub.f -[b, s] = fortdemo (1:3) +mkoctfile fortrandemo.cc fortransub.f +[b, s] = fortrandemo (1:3) @result{} b = 1.00000 0.50000 0.33333 s = There are 3 values in the input vector -[b, s] = fortdemo (0:3) -error: fortdemo: fortsub: divide by zero +[b, s] = fortrandemo (0:3) +error: fortrandemo: fortransub: divide by zero @end group @end example
--- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -34,8 +34,8 @@ addtwomatrices.cc \ celldemo.cc \ embedded.cc \ - fortdemo.cc \ - fortsub.f \ + fortrandemo.cc \ + fortransub.f \ funcdemo.cc \ globaldemo.cc \ helloworld.cc \
rename from examples/fortdemo.cc rename to examples/fortrandemo.cc --- a/examples/fortdemo.cc +++ b/examples/fortrandemo.cc @@ -4,11 +4,11 @@ extern "C" { F77_RET_T - F77_FUNC (fortsub, FORTSUB) + F77_FUNC (fortransub, FORTSUB) (const int&, double*, F77_CHAR_ARG_DECL F77_CHAR_ARG_LEN_DECL); } -DEFUN_DLD (fortdemo, args, , "Fortran Demo") +DEFUN_DLD (fortrandemo, args, , "Fortran Demo") { octave_value_list retval; int nargin = args.length (); @@ -24,7 +24,7 @@ octave_idx_type na = a.numel (); OCTAVE_LOCAL_BUFFER (char, ctmp, 128); - F77_XFCN (fortsub, FORTSUB, + F77_XFCN (fortransub, FORTSUB, (na, av, ctmp F77_CHAR_ARG_LEN (128))); retval(1) = std::string (ctmp);
rename from examples/fortsub.f rename to examples/fortransub.f --- a/examples/fortsub.f +++ b/examples/fortransub.f @@ -1,11 +1,11 @@ - subroutine fortsub (n, a, s) + subroutine fortransub (n, a, s) implicit none character*(*) s real*8 a(*) integer*4 i, n, ioerr do i = 1, n if (a(i) .eq. 0d0) then - call xstopx ('fortsub: divide by zero') + call xstopx ('fortransub: divide by zero') else a(i) = 1d0 / a(i) endif @@ -14,7 +14,7 @@ $ 'There are ', n, $ ' values in the input vector', char(0) if (ioerr .ne. 0) then - call xstopx ('fortsub: error writing string') + call xstopx ('fortransub: error writing string') endif return end