ob-c: no longer ignores the :results vector header argument

* lisp/ob-C.el (org-babel-C-execute): no longer ignores the :results vector
  header argument
This commit is contained in:
Eric Schulte 2010-07-14 23:10:33 -07:00
parent 2ec171cc77
commit 2cd33b94d9
1 changed files with 13 additions and 9 deletions

View File

@ -105,16 +105,20 @@ or `org-babel-execute:c++'."
(mapconcat 'identity
(if (listp flags) flags (list flags)) " ")
tmp-src-file) ""))))
(org-babel-reassemble-table
(org-babel-read
(org-babel-trim
((lambda (results)
(org-babel-reassemble-table
(if (member "vector" (nth 2 processed-params))
(let ((tmp-file (make-temp-file "ob-c")))
(with-temp-file tmp-file (insert results))
(org-babel-import-elisp-from-file tmp-file))
(org-babel-read results))
(org-babel-pick-name
(nth 4 processed-params) (cdr (assoc :colnames params)))
(org-babel-pick-name
(nth 5 processed-params) (cdr (assoc :rownames params)))))
(org-babel-trim
(org-babel-eval
(concat tmp-bin-file (if cmdline (concat " " cmdline) "")) "")))
(org-babel-pick-name
(nth 4 processed-params) (cdr (assoc :colnames params)))
(org-babel-pick-name
(nth 5 processed-params) (cdr (assoc :rownames params))))))
(concat tmp-bin-file (if cmdline (concat " " cmdline) "")) "")))))
(defun org-babel-C-expand (body params &optional processed-params)
"Expand a block of C or C++ code with org-babel according to