GENERATE-BLAPACK-FILES (&OPTIONAL (BASEDIR *BASEDIR*))
Get rid of stupid parentheses around array arguments.
Fortran can't have long lines, and so will use a $ in column 7 to indicate a continued line. We'll pop off these $'s and put them together into one line, and return that extended line and the remainder.
Turns a fortran library function into a C library function. May need to be customized.
GENERATE-BINDINGS-FILE (FILENAME PACKAGE-NAME NICKNAME BINDINGS &OPTIONAL (OUTDIR *OUTDIR*))
This does the bulk of the work in getting things automagically done, and is used by generate-blas-bindings etc to automagically do the CFFI binding file.
Parses the name of the function and the names of all the arguments. Returns three values: the name, the list of arguments, and all remaining lines.
Returns a list of strings, one string per line of file.
Use of T as an argument is a proble -- in particular, there are issues with CFFI when using T as a function arg vs. the CL value.
Square the terpri!
Original def: (let* ((n (length char-list)) (s (make-string n))) (dotimes (i n) (setf (char s i) (elt char-list i))) s))
Tokenizes a line. Removes spaces and commas.
FILL-IN-TYPE (NAMES TYPE VARS ARRAY-MAPS)
LOOKUP-TYPE (TYPE-STRING-LIST &OPTIONAL (RETURN-TYPE NIL))
PARSE-BLAS-FILES (&OPTIONAL (BASEDIR *BASEDIR*))
PARSE-LAPACK-FILES (&OPTIONAL (BASEDIR *BASEDIR*))
FORTRAN-DIR-PARSING-FN (FN-NAME FORTRAN-FILES-WILDCARD-STRING)
This special variable holds the lines of the file currently being parsed. It's a kludge that makes life easy.