mirror of
https://github.com/lua/lua
synced 2024-11-21 20:31:22 +03:00
eliminacao do tipo e funcoes relacionadas com Unput
This commit is contained in:
parent
72f67fa810
commit
f65ebced50
20
inout.c
20
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>
|
||||
@ -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];
|
||||
|
8
opcode.h
8
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);
|
||||
|
Loading…
Reference in New Issue
Block a user