#include "tweak.h"#include "types.h"

gehe zum Quellcode dieser Datei
Makrodefinitionen | |
| #define | CODE 0 |
| #define | QUOTE 1 |
Funktionen | |
| static nomask public string | output (mixed res) |
| static void | create () |
| static nomask closure | get_function (string str) |
| static nomask public int | pre_parse (mixed code) |
| nomask static varargs public mixed | prog_parse (mixed token, int func) |
| static nomask public mixed | eval (mixed code) |
| static nomask public void | add_input (string input) |
| static nomask public void | clear_input () |
| nomask varargs string | get_line () |
| static nomask private string | transform (string e) |
Variablen | |
| static private mapping | memory |
| static private string * | G_input |
| static private string * | history |
| #define CODE 0 |
Definiert in Zeile 18 der Datei microcode.c.
| #define QUOTE 1 |
Definiert in Zeile 19 der Datei microcode.c.
| static nomask public void add_input | ( | string | input | ) | [static] |
Definiert in Zeile 79 der Datei microcode.c.
Wird benutzt von lisp().
00080 { 00081 if(!stringp(input)) return; 00082 G_input += old_explode(input, "\n"); 00083 }

| static nomask public void clear_input | ( | ) | [static] |
Definiert in Zeile 86 der Datei microcode.c.
Wird benutzt von lisp().
00087 { 00088 G_input = ({}); 00089 }

| static void create | ( | ) | [static] |
| static nomask public mixed eval | ( | mixed | code | ) | [static] |
Definiert in Zeile 71 der Datei microcode.c.
00072 { 00073 mapping sym; 00074 sym = filter_indices(memory, #'symbolp); 00075 return apply(lambda(m_indices(sym), code), m_values(sym)); 00076 }
| static nomask closure get_function | ( | string | str | ) | [static] |
Definiert in Zeile 27 der Datei microcode.c.
Wird benutzt von make_symbol().
00028 { 00029 closure sym; 00030 if((sym = symbol_function(str, this_object())) || // FUNCTIONS 00031 (sym = symbol_function(str)) || 00032 (sym = symbol_variable(str))) 00033 return sym; 00034 #if defined(symbol_variable) 00035 if(str == "memory") return #'memory; 00036 #endif 00037 return 0; 00038 }

| nomask varargs string get_line | ( | ) |
| static nomask public string output | ( | mixed | res | ) | [static] |
Definiert in Zeile 121 der Datei microcode.c.
| static nomask public int pre_parse | ( | mixed | code | ) | [static] |
Definiert in Zeile 41 der Datei microcode.c.
Wird benutzt von CodeGen().
00042 { 00043 if(pointerp(code) && sizeof(code) && 00044 (closurep(code[0]) || symbolp(code[0]))) 00045 { 00046 mixed idx, tmp; 00047 if(sizeof(tmp = old_explode(sprintf("%O", code[0]), "->")) > 1) 00048 idx = tmp[1]; 00049 else idx = code[0]; 00050 // warning only the setting of bit 0 or 1 is allowed, not 0 and 1 00051 // thus 01 leads to normal quote, 10 for special, 11 not quote at all 00052 return (memory[idx, QUOTE] & (3<<2*(sizeof(code)-1)))>>2*(sizeof(code)-1); 00053 } 00054 }

| nomask static varargs public mixed prog_parse | ( | mixed | token, | |
| int | func | |||
| ) | [static] |
Definiert in Zeile 58 der Datei microcode.c.
Benutzt memory.
Wird benutzt von CodeGen().
00059 { 00060 if(symbolp(token)) 00061 if(!member(memory, token)) 00062 token = ({#'?, ({#'member, ({#'memory}), quote(token)}), 00063 ({#'[, ({#'memory}), quote(token)}), 00064 ({#'raise_error, 00065 sprintf("Symbol %O' not bound\n", token) }) }); 00066 else token = func ? token : memory[token]; 00067 return token; 00068 }

| static nomask private string transform | ( | string | e | ) | [static] |
Definiert in Zeile 106 der Datei microcode.c.
00107 { 00108 switch(e) 00109 { 00110 case "({": return "("; 00111 case "})": return ")"; 00112 case "([": return "["; 00113 case "])": return "]"; 00114 } 00115 if(strstr(e, " /* sizeof() == ") != -1) return ""; 00116 if(strstr(e, "\n") != -1) if(e[0] == ',') return " "; else return ""; 00117 return e; 00118 }
private string* G_input [static] |
Definiert in Zeile 13 der Datei microcode.c.
Wird benutzt von create().
private string* history [static] |
Definiert in Zeile 14 der Datei microcode.c.
Wird benutzt von AddHistory(), DoHistory(), initialize(), modify_command(), parsecommand(), reallocate_histbuf(), show_hist() und tmhist().
private mapping memory [static] |
Definiert in Zeile 12 der Datei microcode.c.
Wird benutzt von cmd_memory(), create(), do_cmd(), Load(), parseNext(), prog_parse(), Remove(), Save() und ShowData().
1.6.3