diff inst/private/generate_fun.m @ 268:61830a4f9ab9

Improve formatting
author Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
date Thu, 14 Aug 2014 12:26:55 +0200
parents 5e9b5bbdc56b
children
line wrap: on
line diff
--- a/inst/private/generate_fun.m	Tue Aug 12 15:42:50 2014 +0200
+++ b/inst/private/generate_fun.m	Thu Aug 14 12:26:55 2014 +0200
@@ -17,6 +17,7 @@
 ## -*- texinfo -*-
 ## function for internal usage only
 ## @end deftypefn
+
 function output = generate_fun (ufl_name)
 
 STRING ="\n\
@@ -27,7 +28,8 @@
 #include <fem-fenics/function.h>\n\
 #include <fem-fenics/dolfin_compat.h>\n\
 \n\
-DEFUN_DLD (@@UFL_NAME@@_Functional, args, , ""A = fem_rhs_@@UFL_NAME@@ (FUNCTIONAL SPACE, COEFF)"")\n\
+DEFUN_DLD (@@UFL_NAME@@_Functional, args, ,\
+           ""A = fem_rhs_@@UFL_NAME@@ (FUNCTIONAL SPACE, COEFF)"")\n\
 {\n\
 \n\
   int nargin = args.length ();\n\
@@ -94,7 +96,8 @@
                         = static_cast <const function&> (args(i).get_rep ());\n\
 \n\
                       std::size_t n = M.coefficient_number (fun.get_str ());\n\
-                      const SHARED_PTR <const dolfin::Function> & pfun = fun.get_pfun ();\n\
+                      const SHARED_PTR <const dolfin::Function> & pfun =\
+                        fun.get_pfun ();\n\
                       M.set_coefficient (n, pfun);\n\
                       ++nc;\n\
                     }\n\
@@ -112,9 +115,9 @@
   return retval;\n\
 }";
 
-STRING =  strrep (STRING, "@@UFL_NAME@@", ufl_name);
+STRING = strrep (STRING, "@@UFL_NAME@@", ufl_name);
 
-fid = fopen (sprintf ("%s_Functional.cc", ufl_name), 'w');
+fid = fopen (sprintf ("%s_Functional.cc", ufl_name), "w");
 if (fid >= 0)
   fputs (fid, STRING);
   output = fclose (fid);