comparison lwasm/pass1.c @ 332:67224d8d1024

Basic input layer works
author lost
date Tue, 02 Mar 2010 00:10:32 +0000
parents
children 04c80c51b16a
comparison
equal deleted inserted replaced
331:ed3553296580 332:67224d8d1024
1 /*
2 pass1.c
3
4 Copyright © 2010 William Astle
5
6 This file is part of LWTOOLS.
7
8 LWTOOLS is free software: you can redistribute it and/or modify it under the
9 terms of the GNU General Public License as published by the Free Software
10 Foundation, either version 3 of the License, or (at your option) any later
11 version.
12
13 This program is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 more details.
17
18 You should have received a copy of the GNU General Public License along with
19 this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #include <config.h>
23
24 #include <stdio.h>
25
26 #include <lw_alloc.h>
27
28 #include "lwasm.h"
29 #include "input.h"
30
31 void do_pass1(asmstate_t *as)
32 {
33 char *line;
34
35 for (;;)
36 {
37 line = input_readline(as);
38 if (!line)
39 break;
40 printf("%s\n", line);
41 lw_free(line);
42 }
43 }