aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1993-12-22 19:15:16 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1993-12-22 19:15:16 -0200
commitf65ebced503d321852395e8ac8ad71d68cbb60c9 (patch)
tree2fade51fb35709d3048455f83d14ad30c05aa43f
parent72f67fa810715220c1134a345903146569417190 (diff)
downloadlua-f65ebced503d321852395e8ac8ad71d68cbb60c9.tar.gz
lua-f65ebced503d321852395e8ac8ad71d68cbb60c9.tar.bz2
lua-f65ebced503d321852395e8ac8ad71d68cbb60c9.zip
eliminacao do tipo e funcoes relacionadas com Unput
-rw-r--r--inout.c20
-rw-r--r--opcode.h8
2 files changed, 4 insertions, 24 deletions
diff --git a/inout.c b/inout.c
index 0258bc81..7587da56 100644
--- a/inout.c
+++ b/inout.c
@@ -4,7 +4,7 @@
4** facilities. 4** facilities.
5*/ 5*/
6 6
7char *rcs_inout="$Id: $"; 7char *rcs_inout="$Id: inout.c,v 1.1 1993/12/17 18:41:19 celes Exp roberto $";
8 8
9#include <stdio.h> 9#include <stdio.h>
10#include <string.h> 10#include <string.h>
@@ -48,14 +48,6 @@ static int fileinput (void)
48} 48}
49 49
50/* 50/*
51** Function to unget the next character from to input file
52*/
53static void fileunput (int c)
54{
55 ungetc (c, fp);
56}
57
58/*
59** Function to get the next character from the input string 51** Function to get the next character from the input string
60*/ 52*/
61static int stringinput (void) 53static int stringinput (void)
@@ -65,14 +57,6 @@ static int stringinput (void)
65} 57}
66 58
67/* 59/*
68** Function to unget the next character from to input string
69*/
70static void stringunput (int c)
71{
72 st--;
73}
74
75/*
76** Function to open a file to be input unit. 60** Function to open a file to be input unit.
77** Return 0 on success or 1 on error. 61** Return 0 on success or 1 on error.
78*/ 62*/
@@ -80,7 +64,6 @@ int lua_openfile (char *fn)
80{ 64{
81 lua_linenumber = 1; 65 lua_linenumber = 1;
82 lua_setinput (fileinput); 66 lua_setinput (fileinput);
83 lua_setunput (fileunput);
84 fp = fopen (fn, "r"); 67 fp = fopen (fn, "r");
85 if (fp == NULL) return 1; 68 if (fp == NULL) return 1;
86 if (lua_addfile (fn)) return 1; 69 if (lua_addfile (fn)) return 1;
@@ -107,7 +90,6 @@ int lua_openstring (char *s)
107{ 90{
108 lua_linenumber = 1; 91 lua_linenumber = 1;
109 lua_setinput (stringinput); 92 lua_setinput (stringinput);
110 lua_setunput (stringunput);
111 st = s; 93 st = s;
112 { 94 {
113 char sn[64]; 95 char sn[64];
diff --git a/opcode.h b/opcode.h
index e7d505f3..c3304a64 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1,6 +1,6 @@
1/* 1/*
2** TeCGraf - PUC-Rio 2** TeCGraf - PUC-Rio
3** $Id: $ 3** $Id: opcode.h,v 1.1 1993/12/17 18:41:19 celes Exp roberto $
4*/ 4*/
5 5
6#ifndef opcode_h 6#ifndef opcode_h
@@ -82,7 +82,6 @@ typedef enum
82 82
83typedef void (*Cfunction) (void); 83typedef void (*Cfunction) (void);
84typedef int (*Input) (void); 84typedef int (*Input) (void);
85typedef void (*Unput) (int );
86 85
87typedef union 86typedef union
88{ 87{
@@ -132,9 +131,8 @@ int lua_execute (Byte *pc);
132void lua_markstack (void); 131void lua_markstack (void);
133char *lua_strdup (char *l); 132char *lua_strdup (char *l);
134 133
135void lua_setinput (Input fn); /* from "lua.lex" module */ 134void lua_setinput (Input fn); /* from "lex.c" module */
136void lua_setunput (Unput fn); /* from "lua.lex" module */ 135char *lua_lasttext (void); /* from "lex.c" module */
137char *lua_lasttext (void); /* from "lua.lex" module */
138int lua_parse (void); /* from "lua.stx" module */ 136int lua_parse (void); /* from "lua.stx" module */
139void lua_type (void); 137void lua_type (void);
140void lua_obj2number (void); 138void lua_obj2number (void);