;ELC   
;;; Compiled
;;; in Emacs version 30.1
;;; with all optimizations.



(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\301!\210\304\305\306\"\210\304\305\307\"\207" [require org-macs cc-mode ob add-to-list org-babel-tangle-lang-exts ("C++" . "cpp") ("D" . "d")] 3)
(defvar org-babel-default-header-args:C nil)#@34 C/C++-specific header arguments.
(defconst org-babel-header-args:C '((includes . :any) (defines . :any) (main . :any) (flags . :any) (cmdline . :any) (libs . :any)) (#$ . 330))#@32 C++-specific header arguments.
(defconst org-babel-header-args:C++ (cons '(namespaces . :any) org-babel-header-args:C) (#$ . 512))#@197 Command used to compile a C source code file into an executable.
May be either a command in the path, like gcc
or an absolute path name, like /usr/local/bin/gcc
parameter may be used, like gcc -v#@2 #@199 Command used to compile a C++ source code file into an executable.
May be either a command in the path, like g++
or an absolute path name, like /usr/local/bin/g++
parameter may be used, like g++ -v#@199 Command used to compile and execute a D source code file.
May be either a command in the path, like rdmd
or an absolute path name, like /usr/local/bin/rdmd
parameter may be used, like rdmd --chatty#@99 Internal variable used to hold which type of C (e.g. C or C++ or D)
is currently being evaluated.
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313&	\210\300\314\302\303\315DD\316\306\307\310\311\312\313&	\210\300\317\302\303\320DD\321\306\307\310\311\312\313&	\207" [custom-declare-variable org-babel-C-compiler funcall function #[0 "\300\207" ["gcc"] 1 (#$ . 849)] (#$ . 649) :group org-babel :version "24.3" :type string org-babel-C++-compiler #[0 "\300\207" ["g++"] 1 (#$ . 849)] (#$ . 856) org-babel-D-compiler #[0 "\300\207" ["rdmd"] 1 (#$ . 849)] (#$ . 1060)] 10)
(defvar org-babel-c-variant nil (#$ . 1263))#@119 Execute BODY according to its header arguments PARAMS.
This function calls `org-babel-execute:C++'.

(fn BODY PARAMS)
(defalias 'org-babel-execute:cpp #[514 "\300\"\207" [org-babel-execute:C++] 5 (#$ . 1898)])#@92 Expand C++ BODY with org-babel according to its header arguments PARAMS.

(fn BODY PARAMS)
(defalias 'org-babel-expand-body:cpp #[514 "\300\"\207" [org-babel-expand-body:C++] 5 (#$ . 2115)])#@151 Execute C++ BODY with org-babel according to its header arguments PARAMS.
This function is called by `org-babel-execute-src-block'.

(fn BODY PARAMS)
(defalias 'org-babel-execute:C++ #[514 "\301\302\")\207" [org-babel-c-variant cpp org-babel-C-execute] 5 (#$ . 2314)])
(defalias 'org-babel-expand-body:C++ #[514 "\301\302\")\207" [org-babel-c-variant cpp org-babel-C-expand-C++] 5 (#$ . 2115)])#@149 Execute D BODY with org-babel according to its header arguments PARAMS.
This function is called by `org-babel-execute-src-block'.

(fn BODY PARAMS)
(defalias 'org-babel-execute:D #[514 "\301\302\")\207" [org-babel-c-variant d org-babel-C-execute] 5 (#$ . 2721)])#@90 Expand D BODY with org-babel according to its header arguments PARAMS.

(fn BODY PARAMS)
(defalias 'org-babel-expand-body:D #[514 "\301\302\")\207" [org-babel-c-variant d org-babel-C-expand-D] 5 (#$ . 2992)])#@136 Execute a C BODY according to its header arguments PARAMS.
This function is called by `org-babel-execute-src-block'.

(fn BODY PARAMS)
(defalias 'org-babel-execute:C #[514 "\301\302\")\207" [org-babel-c-variant c org-babel-C-execute] 5 (#$ . 3210)])#@75 Expand C BODY according to its header arguments PARAMS.

(fn BODY PARAMS)
(defalias 'org-babel-expand-body:C #[514 "\301\302\")\207" [org-babel-c-variant c org-babel-C-expand-C] 5 (#$ . 3468)])#@196 Execute C/C++/D BODY according to its header arguments PARAMS.
This function should only be called by `org-babel-execute:C' or
`org-babel-execute:C++' or `org-babel-execute:D'.

(fn BODY PARAMS)
(defalias 'org-babel-C-execute #[514 "\305\306\307\267\202 \310\202 \311\202 \312\202 \313\"\314\305\315	\"!\316\236A\211\203* \317P\202+ \320\321\236A\322\323<\203: \202< C\317#\324\325\236A\206L \326\313\327\330#\313\"\322\323<\203Y \202[ C\317#\331\267\202~ \332\n\n\"\202 \333\n\n\"\202 \334\n\n\"\202 \313\335\336\330\"\337\340\"\216r\211q\210c)\210r\211q\210\341\313\211\f\313\342%*\266\343\267\202\306 \344\345\346\347\267\202\266 \n\202\267 \202\267 \313\314!&\320\"\210\344\350\267\202\344 P\202\345 \345\351\f\314!%\202\345 \313\320\"\211\205\210\352!\262\353\354\f\236A\355\235?\205k\356\235\204?\357\235\204?\360\235\204?\361\235\204?\362\235\204?\363\235\204?\364\235\2049\365\235\2049\366\235\2049\367\235\203D\370\235\204D\210\202m\305\371!\335\336\330\"\337\372\"\216r\211q\210c)\210r\211q\210\341\313\211\313\342%*\266\373!\262\262\374\375\236A\376\236A\"\374\377\236A\201@ \236A\"#\207" [org-babel-c-variant org-babel-exeext org-babel-C-compiler org-babel-C++-compiler org-babel-D-compiler org-babel-temp-file "C-src-" #s(hash-table test eq purecopy t data (c 8 cpp 12 d 16)) ".c" ".cpp" ".d" nil org-babel-process-file-name "C-bin-" :cmdline " " "" :flags mapconcat identity org-babel-read :libs org-entry-get "libs" t #s(hash-table test eq purecopy t data (c 99 cpp 108 d 117)) org-babel-C-expand-C org-babel-C-expand-C++ org-babel-C-expand-D generate-new-buffer " *temp file*" make-closure #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] write-region 0 #s(hash-table test eq purecopy t data (cpp 165 c 165 d 198)) org-babel-eval format "%s -o %s %s %s %s" #s(hash-table test eq purecopy t data (c 174 cpp 178)) #s(hash-table test eq purecopy t data (cpp 205 c 205 d 213)) "%s %s %s %s" org-remove-indentation org-babel-reassemble-table :result-params "discard" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" "c-" #[0 "\301\300!\205	 \302\300!\207" [V0 buffer-name kill-buffer] 2] org-babel-import-elisp-from-file org-babel-pick-name :colname-names :colnames :rowname-names :rownames] 22 (#$ . 3671)])#@84 Expand C/C++ BODY with according to its header arguments PARAMS.

(fn BODY PARAMS)
(defalias 'org-babel-C-expand-C++ #[514 "\300\"\207" [org-babel-C-expand-C] 5 (#$ . 6047)])#@79 Expand C/C++ BODY according to its header arguments PARAMS.

(fn BODY PARAMS)#@12 

(fn INC)#@13 

(fn HEAD)
(defalias 'org-babel-C-expand-C #[514 "\300!\301\236A\302\236A\303\230?\304\305\236A\306\"\304\307\236A\306\"\304\310\236A\306\"\311\236A\312\236A;\2039 \313!\262;\203C \313!\262;\203u \306\314C\313!\211\203n \211@\204^ \262\202j \315QC\244\210\306\262\210A\202O \210\211A\262\266\205| \316P\n\205\206 \316\316QQ\262\n\317\320\317\321\316#\317\322<\203\236 \202\241 C\316#\317\323\316#\317\324\316#\317\325\316#\205\274 \326 \317\327\330\"\316#\203\322 \331!\202\324 \316\257	\316#\207" [org-babel--get-vars :colname-names :main "no" org-babel-read :includes nil :defines :namespaces :prologue :epilogue split-string t " " "\n" mapconcat identity #[257 "\2119\203\n \300!\262\301\302\"\203 \303\304\"\207\303\305\"\207" [symbol-name string-prefix-p "<" format "#include %s" "#include \"%s\""] 4 (#$ . 6312)] #[257 "\300\301\"\207" [format "#define %s"] 4 (#$ . 6312)] #[257 "\300\301\"\207" [format "using namespace %s;"] 4 (#$ . 6312)] org-babel-C-var-to-C org-babel-C-table-sizes-to-C org-babel-C-utility-header-to-C make-closure #[257 "\211@\300@@\232\204 \211\203 A\202 @A\301!\302\"\207" [V0 org-babel-C-val-to-base-type org-babel-C-header-to-C] 7 (#$ . 6328)] org-babel-C-ensure-main-wrap] 22 (#$ . 6229)])#@75 Expand D BODY according to its header arguments PARAMS.

(fn BODY PARAMS)
(defalias 'org-babel-C-expand-D #[514 "\300!\301\236A\302\236A\303\230?\304\236A\206 \305\306\307\310\311#!\211;\203& \312!\262\313\314\"\262\315\316\317\315\320\321#\315\322	\321#\315\323\n\321#\205G \324 \315\325\326\"\321#	\203] \327!\202_ \321\257\321#\207" [org-babel--get-vars :colname-names :main "no" :imports org-babel-read org-entry-get nil "imports" t split-string append ("std.stdio" "std.conv") mapconcat identity "module mmm;" #[257 "\300\301\"\207" [format "import %s;"] 4 (#$ . 6312)] "\n" org-babel-C-var-to-C org-babel-C-table-sizes-to-C org-babel-C-utility-header-to-C make-closure #[257 "\211@\300@@\232\204 \211\203 A\202 @A\301!\302\"\207" [V0 org-babel-C-val-to-base-type org-babel-C-header-to-C] 7 (#$ . 6328)] org-babel-C-ensure-main-wrap] 17 (#$ . 7634)])#@64 Wrap BODY in a "main" function call if none exists.

(fn BODY)
(defalias 'org-babel-C-ensure-main-wrap #[257 "\300\301\"\203 \207\302\303\"\207" [string-match "^[ 	]*[intvod]+[ 	\n]*main[ 	]*(.*)" format "int main() {\n%s\nreturn 0;\n}\n"] 4 (#$ . 8528)])#@156 Throw and error that sessions are not supported.
This function does nothing as C is a compiled language with no support
for sessions.

(fn SESSION PARAMS)
(defalias 'org-babel-prep-session:C #[514 "\300\301!\207" [error "C is a compiled language -- no support for sessions"] 4 (#$ . 8794)])#@161 Throw and error that sessions are not supported.
This function does nothing as C is a compiled language with no support
for sessions.

(fn SESSION BODY PARAMS)
(defalias 'org-babel-load-session:C #[771 "\300\301!\207" [error "C is a compiled language -- no support for sessions"] 5 (#$ . 9091)])#@71 Handle the FORMAT part of TYPE with the data from VAL.

(fn TYPE VAL)
(defalias 'org-babel-C-format-val #[514 "A@\211;\203 \300\301\"B\207\211!\207" ["" format] 7 (#$ . 9392)])#@192 Determine the type of VAL.
Return a list (TYPE-NAME FORMAT).  TYPE-NAME should be the name of the type.
FORMAT can be either a format string or a function which is called with VAL.

(fn VAL)
(defalias 'org-babel-C-val-to-C-type #[257 "\301!\211\302\267\202! \303\202% \304\202% \305=\203 \306\202 \307\310D\202% \311\312\"\250\203+ \207\313!\2032 \207<\203i @<\203i \211@\314\315\316\317\320\321\322\314\323\320\324\322\314\325\326A@\327BBE\330BB\331BBBE\332BB\333BBBEED\207<\204t \334!\203\223 \211@\314\335\316\336\320\337\322\314\340\326A@\341BBE\342BB\343BBBEED\207\207" [org-babel-c-variant org-babel-C-val-to-base-type #s(hash-table test eq purecopy t data (integerp 9 floatp 13 stringp 17)) ("int" "%d") ("double" "%s") d "string" "const char*" "\"%s\"" error "Unknown type %S" floatp lambda (val) cons (pcase org-babel-c-variant ((or `c `cpp) (format "[%d][%d]" (length val) (length (car val)))) (`d (format "[%d][%d]" (length (car val)) (length val)))) concat (if (eq org-babel-c-variant 'd) "[\n" "{\n") mapconcat (v) (if (eq org-babel-c-variant 'd) " [" " {") (w) format (w) (v ",") ((if (eq org-babel-c-variant 'd) "]" "}")) (val ",\n") ((if (eq org-babel-c-variant 'd) "\n]" "\n}")) vectorp (val) (format "[%d]" (length val)) (if (eq org-babel-c-variant 'd) "[" "{") (v) (v) (val ",") ((if (eq org-babel-c-variant 'd) "]" "}"))] 21 (#$ . 9580)])#@195 Determine the base type of VAL.
The type is:
- `integerp' if all base values are integers;
- `floatp' if all base values are either floating points or integers;
- `stringp' otherwise.

(fn VAL)#@10 

(fn V)
(defalias 'org-babel-C-val-to-base-type #[257 "\211\250\203 \300\207\301!\203 \301\207\211<\204 \302!\203& \303C\304\305\306\"\"\210\242\207\307\207" [integerp floatp vectorp nil mapc make-closure #[257 "\301!\211\302\267\202' \300\303\240\207\300\242\203 \300\242\304=\205( \300\305\240\207\300\242?\205( \300\304\240\207\306\207" [V0 org-babel-C-val-to-base-type #s(hash-table test eq purecopy t data (stringp 9 floatp 13 integerp 29)) stringp integerp floatp nil] 4 (#$ . 11159)] stringp] 6 (#$ . 10960)])#@63 Convert PAIR of (var . val) C variable assignment.

(fn PAIR)
(defalias 'org-babel-C-var-to-C #[257 "\211@A\2119\203 \301!\262\211G\302U\203 \303!\262\304!\211@\305\"\211@A\306\267\202? \307\310	%\207\307\311\n%\207\312\207" [org-babel-c-variant symbol-name 1 string-to-char org-babel-C-val-to-C-type org-babel-C-format-val #s(hash-table test eq purecopy t data (cpp 45 c 45 d 54)) format "%s %s%s = %s;" "%s%s %s = %s;" nil] 14 (#$ . 11691)])#@70 Create constants of table dimensions, if PAIR is a table.

(fn PAIR)
(defalias 'org-babel-C-table-sizes-to-C #[257 "\211A<\205) \211A@<\203! \300\301@AG#\302\300\303@A@G#Q\207\300\303@AG#\207" [format "const int %s_rows = %d;" "\n" "const int %s_cols = %d;"] 7 (#$ . 12160)])#@76 Generate a utility function to convert a column name into a column number.
(defalias 'org-babel-C-utility-header-to-C #[0 "\301\267\202\n \302\207\303\207\304\207" [org-babel-c-variant #s(hash-table test eq purecopy t data (cpp 6 c 6 d 8)) "\n#ifndef _STRING_H\n#include <string.h>\n#endif\nint get_column_num (int nbcols, const char** header, const char* column)\n{\n  int c;\n  for (c=0; c<nbcols; c++)\n    if (strcmp(header[c],column)==0)\n      return c;\n  return -1;\n}\n" "int get_column_num (string[] header, string column)\n{\n  foreach (c, h; header)\n    if (h==column)\n      return to!int(c);\n  return -1;\n}\n" nil] 2 (#$ . 12447)])#@126 Convert an elisp list of header table into a C or D vector
specifying a variable with the name of the table.

(fn HEAD TYPE)#@10 

(fn H)
(defalias 'org-babel-C-header-to-C #[514 "\204	 \302\303\"\210@A\304\267\202) \305\202* \306\202* 	\307\267\202) \310\202* \311\202* \312	\313\267\202N \314\315G\316\317\320#$\202O \314\321G\316\322\320#$\202O \312\323	\324\267\202q \314\325\211G\n&\202r \314\326\211\211%\202r \312Q\207" [noninteractive org-babel-c-variant message "%S" #s(hash-table test eq purecopy t data (integerp 19 floatp 23 stringp 27)) "int" "double" #s(hash-table test eq purecopy t data (cpp 33 c 33 d 37)) "const char*" "string" nil #s(hash-table test eq purecopy t data (cpp 48 c 48 d 63)) format "const char* %s_header[%d] = {%s};" mapconcat #[257 "\300\301\"\207" [format "\"%s\""] 4 (#$ . 13233)] "," "string[%d] %s_header = [%s];" #[257 "\300\301\"\207" [format "\"%s\""] 4 (#$ . 13233)] "\n" #s(hash-table test eq purecopy t data (cpp 86 c 86 d 102)) "%s %s_h (int row, const char* col) { return %s[row][get_column_num(%d,%s_header,col)]; }" "%s %s_h (size_t row, string col) { return %s[row][get_column_num(%s_header,col)]; }"] 14 (#$ . 13103)])
(provide 'ob-C)
