commit f65ebced503d321852395e8ac8ad71d68cbb60c9
parent 72f67fa810715220c1134a345903146569417190
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 22 Dec 1993 19:14:58 -0200
eliminacao do tipo e funcoes relacionadas com Unput
Diffstat:
2 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/inout.c b/inout.c
@@ -4,7 +4,7 @@
** facilities.
*/
-char *rcs_inout="$Id: $";
+char *rcs_inout="$Id: inout.c,v 1.1 1993/12/17 18:41:19 celes Exp roberto $";
#include <stdio.h>
#include <string.h>
@@ -48,14 +48,6 @@ static int fileinput (void)
}
/*
-** Function to unget the next character from to input file
-*/
-static void fileunput (int c)
-{
- ungetc (c, fp);
-}
-
-/*
** Function to get the next character from the input string
*/
static int stringinput (void)
@@ -65,14 +57,6 @@ static int stringinput (void)
}
/*
-** Function to unget the next character from to input string
-*/
-static void stringunput (int c)
-{
- st--;
-}
-
-/*
** Function to open a file to be input unit.
** Return 0 on success or 1 on error.
*/
@@ -80,7 +64,6 @@ int lua_openfile (char *fn)
{
lua_linenumber = 1;
lua_setinput (fileinput);
- lua_setunput (fileunput);
fp = fopen (fn, "r");
if (fp == NULL) return 1;
if (lua_addfile (fn)) return 1;
@@ -107,7 +90,6 @@ int lua_openstring (char *s)
{
lua_linenumber = 1;
lua_setinput (stringinput);
- lua_setunput (stringunput);
st = s;
{
char sn[64];
diff --git a/opcode.h b/opcode.h
@@ -1,6 +1,6 @@
/*
** TeCGraf - PUC-Rio
-** $Id: $
+** $Id: opcode.h,v 1.1 1993/12/17 18:41:19 celes Exp roberto $
*/
#ifndef opcode_h
@@ -82,7 +82,6 @@ typedef enum
typedef void (*Cfunction) (void);
typedef int (*Input) (void);
-typedef void (*Unput) (int );
typedef union
{
@@ -132,9 +131,8 @@ int lua_execute (Byte *pc);
void lua_markstack (void);
char *lua_strdup (char *l);
-void lua_setinput (Input fn); /* from "lua.lex" module */
-void lua_setunput (Unput fn); /* from "lua.lex" module */
-char *lua_lasttext (void); /* from "lua.lex" module */
+void lua_setinput (Input fn); /* from "lex.c" module */
+char *lua_lasttext (void); /* from "lex.c" module */
int lua_parse (void); /* from "lua.stx" module */
void lua_type (void);
void lua_obj2number (void);