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];