File: readlin.c

package info (click to toggle)
rscheme 0.7.2-1.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 10,672 kB
  • ctags: 12,430
  • sloc: lisp: 37,104; ansic: 29,763; cpp: 2,630; sh: 1,677; makefile: 568; yacc: 202; lex: 175; perl: 33
file content (173 lines) | stat: -rw-r--r-- 4,366 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/**********************************************
THIS FILE WAS AUTOMATICALLY GENERATED, AND MAY
BE AUTOMATICALLY RE-GENERATED WHEN THE COMPILER
OR SOURCE CHANGES.  DO NOT MODIFY THIS FILE BY HAND!
RScheme Build (v0.7.2, 97.12.21)
**********************************************/

/******************************** Preamble ********************************/

#define _MODULE_EDITINP
#define _SCM_READLIN
#define _C_READLIN
#include "editinp_.h"
#include <rscheme/vinsns.h>
extern struct module_descr module_editinp;
extern struct part_descr editinp_part_readlin;
static char sccsid[] = "@(#)editinp modules/editinp/readlin.scm[46085120] (RS v0.7.2, 97.12.21)";

/************************** Function Definitions **************************/


/*********************** Raw glue `input-isa-tty?' ***********************/

static char rsfn_input_isa_tty_name[] = "input-isa-tty?";
#define FUNCTION rsfn_input_isa_tty_name

PROLOGUE(input_isa_tty)

BEGIN_FWD(input_isa_tty)
  FWD_MONOTONE(input_isa_tty_0)
END_FWD(input_isa_tty)

#define FPLACE_CODE (1000+0)
MONOTONE(input_isa_tty_0)
{
    REG0 = rb_to_bo(rdln_isa_tty());
    RETURN1();
}
#undef FPLACE_CODE

EPILOGUE(input_isa_tty)

BEGIN_BACK(input_isa_tty)
  BACK_MONOTONE(input_isa_tty_0)
END_BACK(input_isa_tty)

static struct function_descr input_isa_tty_descr = {
	&editinp_part_readlin,
	JUMP_TABLE( input_isa_tty ),
	rsfn_input_isa_tty_name };
#undef FUNCTION


/********************** Raw glue `readline-enabled?' **********************/

static char rsfn_readline_enabled_name[] = "readline-enabled?";
#define FUNCTION rsfn_readline_enabled_name

PROLOGUE(readline_enabled)

BEGIN_FWD(readline_enabled)
  FWD_MONOTONE(readline_enabled_0)
END_FWD(readline_enabled)

#define FPLACE_CODE (1000+0)
MONOTONE(readline_enabled_0)
{
    REG0 = rb_to_bo(rdln_enabled());
    RETURN1();
}
#undef FPLACE_CODE

EPILOGUE(readline_enabled)

BEGIN_BACK(readline_enabled)
  BACK_MONOTONE(readline_enabled_0)
END_BACK(readline_enabled)

static struct function_descr readline_enabled_descr = {
	&editinp_part_readlin,
	JUMP_TABLE( readline_enabled ),
	rsfn_readline_enabled_name };
#undef FUNCTION


/******************* Raw glue `readline-add-to-history' *******************/
#define str REG0

static char rsfn_readline_add_to_history_name[] = "readline-add-to-history";
#define FUNCTION rsfn_readline_add_to_history_name

PROLOGUE(readline_add_to_history)

BEGIN_FWD(readline_add_to_history)
  FWD_MONOTONE(readline_add_to_history_0)
END_FWD(readline_add_to_history)

#define FPLACE_CODE (1000+0)
MONOTONE(readline_add_to_history_0)
{
    rdln_add_history( str );
    RETURN0();
}
#undef FPLACE_CODE

EPILOGUE(readline_add_to_history)

BEGIN_BACK(readline_add_to_history)
  BACK_MONOTONE(readline_add_to_history_0)
END_BACK(readline_add_to_history)

static struct function_descr readline_add_to_history_descr = {
	&editinp_part_readlin,
	JUMP_TABLE( readline_add_to_history ),
	rsfn_readline_add_to_history_name };
#undef FUNCTION

#undef str

/********************* Raw glue `readline-read-line' *********************/
#define completions REG0
#define prompt REG1

static char rsfn_readline_read_line_name[] = "readline-read-line";
#define FUNCTION rsfn_readline_read_line_name

PROLOGUE(readline_read_line)

BEGIN_FWD(readline_read_line)
  FWD_MONOTONE(readline_read_line_0)
END_FWD(readline_read_line)

#define FPLACE_CODE (1000+0)
MONOTONE(readline_read_line_0)
{
    REG0 = read_console_line( completions, string_text(prompt) );
    RETURN1();
}
#undef FPLACE_CODE

EPILOGUE(readline_read_line)

BEGIN_BACK(readline_read_line)
  BACK_MONOTONE(readline_read_line_0)
END_BACK(readline_read_line)

static struct function_descr readline_read_line_descr = {
	&editinp_part_readlin,
	JUMP_TABLE( readline_read_line ),
	rsfn_readline_read_line_name };
#undef FUNCTION

#undef completions
#undef prompt
/******************************* Postamble *******************************/
/**************************** Part Link Table ****************************/


static struct function_descr *(part_readlin_tab[]) = {
    &input_isa_tty_descr,
    &readline_enabled_descr,
    &readline_add_to_history_descr,
    &readline_read_line_descr,
    NULL };
struct part_descr editinp_part_readlin = {
    46085120,
    &module_editinp,
    part_readlin_tab,
    "readlin",
    0 };
#undef _MODULE_EDITINP
#undef _SCM_READLIN
#undef _C_READLIN