#NEWLINE# def fort_subroutine_wrapper( name , ret_type , args ) : #NEWLINE# #INDENT# if ( ( name [ 0 ] in [ 'c' , 's' ] ) or ( name in [ 'zladiv' , 'zdotu' , 'zdotc' ] ) ) : #NEWLINE# #INDENT# wrapper = ( 'w' + name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# wrapper = name #NEWLINE# #UNINDENT# ( types , names ) = arg_names_and_types ( args ) #NEWLINE# argnames = ', ' . join ( names ) #NEWLINE# names = [ process_fortran_name ( n , name ) for n in names ] #NEWLINE# argdecls = '\n        ' . join ( ( '{0} {1}' . format ( fortran_types [ t ] , n ) for ( n , t ) in zip ( names , types ) ) ) #NEWLINE# return fortran_template . format ( name = name , wrapper = names , argnames = argnames , argdecls = argdecls , ret_type = fortran_types [ ret_type ] )