mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
commit | author | age
76bbd0 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (byte-code "\300\301!\210\300\302!\210\303\304\305\"\210\303\304\306\"\207" [require cc-mode ob add-to-list org-babel-tangle-lang-exts ("C++" . "cpp") ("D" . "d")] 3)
16 (defvar org-babel-default-header-args:C nil)
17 #@34 C/C++-specific header arguments.
18 (defconst org-babel-header-args:C '((includes . :any) (defines . :any) (main . :any) (flags . :any) (cmdline . :any) (libs . :any)) (#$ . 620))
19 #@32 C++-specific header arguments.
20 (defconst org-babel-header-args:C++ (append '((namespaces . :any)) org-babel-header-args:C) (#$ . 803))
21 (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" [#1="gcc"] 1 #1#] "Command used to compile a C source code file into an executable.\nMay be either a command in the path, like gcc\nor an absolute path name, like /usr/local/bin/gcc\nparameter may be used, like gcc -v" :group org-babel :version "24.3" :type string org-babel-C++-compiler #[0 "\300\207" [#2="g++"] 1 #2#] "Command used to compile a C++ source code file into an executable.\nMay be either a command in the path, like g++\nor an absolute path name, like /usr/local/bin/g++\nparameter may be used, like g++ -v" org-babel-D-compiler #[0 "\300\207" [#3="rdmd"] 1 #3#] "Command used to compile and execute a D source code file.\nMay be either a command in the path, like rdmd\nor an absolute path name, like /usr/local/bin/rdmd\nparameter may be used, like rdmd --chatty"] 10)
22 #@99 Internal variable used to hold which type of C (e.g. C or C++ or D)
23 is currently being evaluated.
24 (defvar org-babel-c-variant nil (#$ . 1991))
25 #@98 Execute BODY according to PARAMS.
26 This function calls `org-babel-execute:C++'.
27
28 (fn BODY PARAMS)
29 (defalias 'org-babel-execute:cpp #[514 "\300\"\207" [org-babel-execute:C++] 5 (#$ . 2140)])
30 #@96 Expand a block of C++ code with org-babel according to its
31 header arguments.
32
33 (fn BODY PARAMS)
34 (defalias 'org-babel-expand-body:cpp #[514 "\300\"\207" [org-babel-expand-body:C++] 5 (#$ . 2337)])
35 #@121 Execute a block of C++ code with org-babel.
36 This function is called by `org-babel-execute-src-block'.
37
38 (fn BODY PARAMS)
39 (defalias 'org-babel-execute:C++ #[514 "\301\302\")\207" [org-babel-c-variant cpp org-babel-C-execute] 5 (#$ . 2541)])
40 #@96 Expand a block of C++ code with org-babel according to its
41 header arguments.
42
43 (fn BODY PARAMS)
44 (defalias 'org-babel-expand-body:C++ #[514 "\301\302\")\207" [org-babel-c-variant cpp org-babel-C-expand-C++] 5 (#$ . 2789)])
45 #@119 Execute a block of D code with org-babel.
46 This function is called by `org-babel-execute-src-block'.
47
48 (fn BODY PARAMS)
49 (defalias 'org-babel-execute:D #[514 "\301\302\")\207" [org-babel-c-variant d org-babel-C-execute] 5 (#$ . 3020)])
50 #@94 Expand a block of D code with org-babel according to its
51 header arguments.
52
53 (fn BODY PARAMS)
54 (defalias 'org-babel-expand-body:D #[514 "\301\302\")\207" [org-babel-c-variant d org-babel-C-expand-D] 5 (#$ . 3262)])
55 #@119 Execute a block of C code with org-babel.
56 This function is called by `org-babel-execute-src-block'.
57
58 (fn BODY PARAMS)
59 (defalias 'org-babel-execute:C #[514 "\301\302\")\207" [org-babel-c-variant c org-babel-C-execute] 5 (#$ . 3485)])
60 #@94 Expand a block of C code with org-babel according to its
61 header arguments.
62
63 (fn BODY PARAMS)
64 (defalias 'org-babel-expand-body:C #[514 "\301\302\")\207" [org-babel-c-variant c org-babel-C-expand-C] 5 (#$ . 3727)])
65 #@133 This function should only be called by `org-babel-execute:C'
66 or `org-babel-execute:C++' or `org-babel-execute:D'.
67
68 (fn BODY PARAMS)
69 (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*\317P\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\337!!\340\341\342\343\344!\345\"\346$\216r\211q\210c\210)r\211q\210\347\313\211\313\341%\210*\266\350>\203\323\351\352\353\354\267\202\300\n\202\301 \202\301\313 \314!&\320\"\210\202\325\210\351\355>\203\344P\202\372\356=\203\371\352\357\f\314! %\202\372\313\320\"\211\205\273\360\361!!\262\362\363\f\236A\364\235?\205\224\365\235\204V\366\235\204V\367\235\204V\370\235\204V\371\235\204V\372\235\204V\373\235\204P\374\235\204P\375\235\204P\376\235\203]\377\235\204]\324\330\"\202\224\305\201@!\211\335\336\337!!\340\341\342\343\344!\201A\"\346$\216r\211q\210c\210)r\211q\210\347\313\211\313\341%\210*\266\201B!\262\262\201C\201D\236A\201E\236A\"\201C\201F\236A\201G\236A\"#\262\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 size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 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 size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (c 99 cpp 108 d 117)) org-babel-C-expand-C org-babel-C-expand-C++ org-babel-C-expand-D get-buffer-create generate-new-buffer-name " *temp file*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 write-region (cpp c) org-babel-eval format "%s -o %s %s %s %s" #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (c 184 cpp 188)) (cpp c) d "%s %s %s %s" org-trim org-remove-indentation org-babel-reassemble-table :result-params "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" "c-" [buffer-name kill-buffer] org-babel-import-elisp-from-file org-babel-pick-name :colname-names :colnames :rowname-names :rownames] 23 (#$ . 3950)])
70 #@101 Expand a block of C or C++ code with org-babel according to
71 its header arguments.
72
73 (fn BODY PARAMS)
74 (defalias 'org-babel-C-expand-C++ #[514 "\300\"\207" [org-babel-C-expand-C] 5 (#$ . 6416)])
75 #@101 Expand a block of C or C++ code with org-babel according to
76 its header arguments.
77
78 (fn BODY PARAMS)
79 (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\";\203/\311!\262\211;\2039\311!\262;\203m\306\312C\311!\211\203f\211@\204T\211\262\202_\313QC\244\210\306\262A\266\202\202D\210\211A\262\266\314\315\314\316\317#\314\320<\203\202\202\205C\317#\314\321\317#\314\322\f\317#\314\323 \317# \205\240\324 \314\325\317#\f\203\262\326!\202\264\317\257    \317#\207" [org-babel--get-vars :colname-names :main "no" org-babel-read :includes nil :defines :namespaces split-string t " " mapconcat identity #[257 "\300\301\"\207" [format "#include %s"] 4 "\n\n(fn INC)"] "\n" #[257 "\300\301\"\207" [format "#define %s"] 4 "\n\n(fn INC)"] #[257 "\300\301\"\207" [format "using namespace %s;"] 4 "\n\n(fn INC)"] org-babel-C-var-to-C org-babel-C-table-sizes-to-C org-babel-C-utility-header-to-C org-babel-C-header-to-C org-babel-C-ensure-main-wrap] 20 (#$ . 6617)])
80 #@94 Expand a block of D code with org-babel according to
81 its header arguments.
82
83 (fn BODY PARAMS)
84 (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 \321#    \203Y\326!\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 "\n\n(fn INC)"] "\n" org-babel-C-var-to-C org-babel-C-table-sizes-to-C org-babel-C-utility-header-to-C org-babel-C-header-to-C org-babel-C-ensure-main-wrap] 17 (#$ . 7705)])
85 #@64 Wrap BODY in a "main" function call if none exists.
86
87 (fn BODY)
88 (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 (#$ . 8483)])
89 #@106 This function does nothing as C is a compiled language with no
90 support for sessions
91
92 (fn SESSION PARAMS)
93 (defalias 'org-babel-prep-session:C #[514 "\300\301!\207" [error "C is a compiled language -- no support for sessions"] 4 (#$ . 8750)])
94 #@111 This function does nothing as C is a compiled language with no
95 support for sessions
96
97 (fn SESSION BODY PARAMS)
98 (defalias 'org-babel-load-session:C #[771 "\300\301!\207" [error "C is a compiled language -- no support for sessions"] 5 (#$ . 8998)])
99 #@71 Handle the FORMAT part of TYPE with the data from VAL.
100
101 (fn TYPE VAL)
102 (defalias 'org-babel-C-format-val #[514 "A@\211;\203\300\301\"B\202\211!\207" ["" format] 7 (#$ . 9250)])
103 #@192 Determine the type of VAL.
104 Return a list (TYPE-NAME FORMAT).  TYPE-NAME should be the name of the type.
105 FORMAT can be either a format string or a function which is called with VAL.
106
107 (fn VAL)
108 (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.\211\202\236\313!\2038\211\202\236<\203q@<\203q\211@\314\315\316\317\320\321\322\314\323\320\324\322\314\325\326A@\327BBE\330BB\331BBBE\332BB\333BBBEED\202\236<\204|\334!\203\235\211@\314\335\316\336\320\337\322\314\340\326 A@\341BBE\342BB\343BBBEED\202\236\211\207" [org-babel-c-variant org-babel-C-val-to-base-type #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (integerp 9 floatp 13 stringp 17)) ("int" "%d") ("double" "%f") d "string" "const char*" "\"%s\"" error "unknown type %S" floatp lambda (val) cons (format "[%d][%d]" (length val) (length (car 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 (#$ . 9441)])
109 #@186 Determine the base type of VAL which may be
110 `integerp' if all base values are integers
111 `floatp' if all base values are either floating points or integers
112 `stringp' otherwise.
113
114 (fn VAL)
115 (defalias 'org-babel-C-val-to-base-type #[257 "\211\250\203\300\207\301!\203\301\207\211<\204\302!\2030\303C\304\305\306\307\310\311!\312\"\313\314%\"\210\211\242\207\315\207" [integerp floatp vectorp nil mapc make-byte-code 257 "\301!\211\302\267\202-\300\303\240\202.\300\242\203\300\242\304=\205.\300\305\240\202.\300\242?\205.\300\304\240\202.\306\207" vconcat vector [org-babel-C-val-to-base-type #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (stringp 9 floatp 15 integerp 33)) stringp integerp floatp nil] 4 "\n\n(fn V)" stringp] 9 (#$ . 10801)])
116 #@93 Convert an elisp val into a string of C code specifying a var
117 of the same value.
118
119 (fn PAIR)
120 (defalias 'org-babel-C-var-to-C #[257 "\211@A\2119\203\300!\262\211G\301U\203\302!\262\303!\211@\304\"\211@A\305\306    %\266\205\207" [symbol-name 1 string-to-char org-babel-C-val-to-C-type org-babel-C-format-val format "%s %s%s = %s;"] 14 (#$ . 11605)])
121 #@70 Create constants of table dimensions, if PAIR is a table.
122
123 (fn PAIR)
124 (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 (#$ . 11973)])
125 #@76 Generate a utility function to convert a column name
126 into a column number.
127 (defalias 'org-babel-C-utility-header-to-C #[0 "\301>\203\302\207\303=\203\304\207\305\207" [org-babel-c-variant (cpp c) "int 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" d "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 (#$ . 12261)])
128 #@121 Convert an elisp list of header table into a C or D vector
129 specifying a variable with the name of the table.
130
131 (fn HEAD)
132 (defalias 'org-babel-C-header-to-C #[257 "\211@A\301\302>\203\303\202\304=\203\305\202\306G\307\310\311#$\312\313>\2038\301\314\211G%\202H\304=\203G\301\315\211\211$\202H\306Q\207" [org-babel-c-variant format (cpp c) "const char* %s_header[%d] = {%s};" d "string %s_header[%d] = [%s];" nil mapconcat #[257 "\300\301\"\207" [format "%S"] 4 "\n\n(fn H)"] "," "\n" (cpp c) "const char* %s_h (int row, const char* col) { return %s[row][get_column_num(%d,%s_header,col)]; }" "string %s_h (size_t row, string col) { return %s[row][get_column_num(%s_header,col)]; }"] 11 (#$ . 12831)])
133 (provide 'ob-C)