const ACTION: KBD_GETC is action "KBD_GETC";
const ACTION: KBD_GETS is action "KBD_GETS";
const ACTION: KBD_INPUT_READY is action "KBD_INPUT_READY";
const ACTION: KBD_LINE_READ is action "KBD_LINE_READ";
const ACTION: KBD_RAW_GETC is action "KBD_RAW_GETC";
const ACTION: KBD_WORD_READ is action "KBD_WORD_READ";
const proc: kbd_prototypes (inout file: c_prog) is func
begin
declareExtern(c_prog, "charType kbdGetc (void);");
declareExtern(c_prog, "striType kbdGets (intType);");
declareExtern(c_prog, "boolType kbdInputReady (void);");
declareExtern(c_prog, "striType kbdLineRead (charType *);");
declareExtern(c_prog, "charType kbdRawGetc (void);");
declareExtern(c_prog, "striType kbdWordRead (charType *);");
end func;
const proc: process (KBD_GETC, in reference: function,
in ref_list: params, inout expr_type: c_expr) is func
begin
c_expr.expr &:= "kbdGetc()";
end func;
const proc: process (KBD_GETS, in reference: function,
in ref_list: params, inout expr_type: c_expr) is func
begin
prepare_stri_result(c_expr);
c_expr.result_expr := "kbdGets(";
getStdParamToResultExpr(params[2], c_expr);
c_expr.result_expr &:= ")";
end func;
const proc: process (KBD_INPUT_READY, in reference: function,
in ref_list: params, inout expr_type: c_expr) is func
begin
c_expr.expr &:= "kbdInputReady()";
end func;
const proc: process (KBD_LINE_READ, in reference: function,
in ref_list: params, inout expr_type: c_expr) is func
begin
prepare_stri_result(c_expr);
c_expr.result_expr := "kbdLineRead(&(";
getStdParamToResultExpr(params[2], c_expr);
c_expr.result_expr &:= "))";
end func;
const proc: process (KBD_RAW_GETC, in reference: function,
in ref_list: params, inout expr_type: c_expr) is func
begin
c_expr.expr &:= "kbdRawGetc()";
end func;
const proc: process (KBD_WORD_READ, in reference: function,
in ref_list: params, inout expr_type: c_expr) is func
begin
prepare_stri_result(c_expr);
c_expr.result_expr := "kbdWordRead(&(";
getStdParamToResultExpr(params[2], c_expr);
c_expr.result_expr &:= "))";
end func;