comparison src/save_func.cc @ 268:61830a4f9ab9

Improve formatting
author Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
date Thu, 14 Aug 2014 12:26:55 +0200
parents 598c5e9e0a9e
children
comparison
equal deleted inserted replaced
267:53039ac90368 268:61830a4f9ab9
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12 details. 12 details.
13 13
14 You should have received a copy of the GNU General Public License along with 14 You should have received a copy of the GNU General Public License along with
15 this program; if not, see <http://www.gnu.org/licenses/>. 15 this program; if not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17
17 #include "function.h" 18 #include "function.h"
18 #include "dolfin_compat.h" 19 #include "dolfin_compat.h"
19 20
20 DEFUN_DLD (save, args, , "-*- texinfo -*-\n\ 21 DEFUN_DLD (save, args, , "-*- texinfo -*-\n\
21 @deftypefn {Function File} \ 22 @deftypefn {Function File} \
31 @end deftypefn") 32 @end deftypefn")
32 { 33 {
33 34
34 int nargin = args.length (); 35 int nargin = args.length ();
35 octave_value retval; 36 octave_value retval;
36 37
37 if (nargin < 2 || nargin > 2) 38 if (nargin < 2 || nargin > 2)
38 print_usage (); 39 { print_usage (); }
39 else 40 else
40 { 41 {
41 if (! function_type_loaded) 42 if (! function_type_loaded)
42 { 43 {
43 function::register_type (); 44 function::register_type ();
45 mlock (); 46 mlock ();
46 } 47 }
47 if (args(0).type_id () == function::static_type_id ()) 48 if (args(0).type_id () == function::static_type_id ())
48 { 49 {
49 const function & uo = 50 const function & uo =
50 static_cast<const function&> (args(0).get_rep ()); 51 static_cast<const function &> (args(0).get_rep ());
51 std::string str = args(1).string_value (); 52 std::string str = args(1).string_value ();
52 53
53 if (!error_state) 54 if (!error_state)
54 { 55 {
55 const SHARED_PTR <const dolfin::Function> 56 const SHARED_PTR <const dolfin::Function>