|
@@ -4,6 +4,7 @@
|
|
|
|
|
|
;; Author: Eric Schulte
|
|
;; Author: Eric Schulte
|
|
;; Thierry Banel
|
|
;; Thierry Banel
|
|
|
|
+;; Maintainer: Thierry Banel
|
|
;; Keywords: literate programming, reproducible research
|
|
;; Keywords: literate programming, reproducible research
|
|
;; Homepage: https://orgmode.org
|
|
;; Homepage: https://orgmode.org
|
|
|
|
|
|
@@ -425,7 +426,12 @@ of the same value."
|
|
into a column number."
|
|
into a column number."
|
|
(pcase org-babel-c-variant
|
|
(pcase org-babel-c-variant
|
|
((or `c `cpp)
|
|
((or `c `cpp)
|
|
- "int get_column_num (int nbcols, const char** header, const char* column)
|
|
|
|
|
|
+ (concat
|
|
|
|
+ (if (eq org-babel-c-variant 'c)
|
|
|
|
+ "extern "
|
|
|
|
+ "extern \"C\" ")
|
|
|
|
+ "int strcmp (const char *, const char *);
|
|
|
|
+int get_column_num (int nbcols, const char** header, const char* column)
|
|
{
|
|
{
|
|
int c;
|
|
int c;
|
|
for (c=0; c<nbcols; c++)
|
|
for (c=0; c<nbcols; c++)
|
|
@@ -433,7 +439,7 @@ into a column number."
|
|
return c;
|
|
return c;
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
-")
|
|
|
|
|
|
+"))
|
|
(`d
|
|
(`d
|
|
"int get_column_num (string[] header, string column)
|
|
"int get_column_num (string[] header, string column)
|
|
{
|
|
{
|