aboutsummaryrefslogtreecommitdiff
path: root/inout.c
diff options
context:
space:
mode:
Diffstat (limited to 'inout.c')
-rw-r--r--inout.c20
1 files changed, 1 insertions, 19 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];