Rev 1913 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1913 | Rev 3235 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | TP_END; |
8 | TP_END; |
9 | con_printf("\n"); |
9 | con_printf("\n"); |
10 | return tp_None; |
10 | return tp_None; |
11 | } |
11 | } |
Line -... | Line 12... | ||
- | 12 | ||
- | 13 | #define BUF_SIZE 2048 |
|
- | 14 | tp_obj tp_raw_input(TP) { |
|
- | 15 | tp_obj prompt; |
|
- | 16 | char *buf = malloc(BUF_SIZE); |
|
- | 17 | if (tp->params.list.val->len) |
|
- | 18 | { |
|
- | 19 | prompt = TP_OBJ(); |
|
- | 20 | con_printf("%s", TP_CSTR(prompt)); |
|
- | 21 | } |
|
- | 22 | con_gets(buf, BUF_SIZE); |
|
- | 23 | return tp_string(buf); |
|
- | 24 | } |
|
12 | 25 | ||
13 | tp_obj tp_bind(TP) { |
26 | tp_obj tp_bind(TP) { |
14 | tp_obj r = TP_OBJ(); |
27 | tp_obj r = TP_OBJ(); |
15 | tp_obj self = TP_OBJ(); |
28 | tp_obj self = TP_OBJ(); |
16 | return tp_fnc_new(tp,r.fnc.ftype|2,r.fnc.val,self,r.fnc.info->globals); |
29 | return tp_fnc_new(tp,r.fnc.ftype|2,r.fnc.val,self,r.fnc.info->globals); |