eliminacao do tipo e funcoes relacionadas com Unput

This commit is contained in:
Roberto Ierusalimschy 1993-12-22 19:15:16 -02:00
parent 72f67fa810
commit f65ebced50
2 changed files with 4 additions and 24 deletions

20
inout.c
View File

@ -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>
@ -47,14 +47,6 @@ static int fileinput (void)
return (c == EOF ? 0 : c);
}
/*
** 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
*/
@ -64,14 +56,6 @@ static int stringinput (void)
return (*(st-1));
}
/*
** 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];

View File

@ -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);