diff options
| author | Simon Tatham <anakin@pobox.com> | 1999-10-20 20:17:18 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 1999-10-20 20:17:18 +0000 |
| commit | 8511f4ae900f48999617bc8384e9c327673e2196 (patch) | |
| tree | d24d0a7d8cc217bf6d864157c3b08e05ed59868f /input.c | |
| parent | e44f985bd4f796d4c4b11eb3555436dbaa2d163b (diff) | |
| download | halibut-8511f4ae900f48999617bc8384e9c327673e2196.zip halibut-8511f4ae900f48999617bc8384e9c327673e2196.tar.gz halibut-8511f4ae900f48999617bc8384e9c327673e2196.tar.bz2 halibut-8511f4ae900f48999617bc8384e9c327673e2196.tar.xz | |
First backend! Text output now pretty much works.
[originally from svn r240]
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 30 |
1 files changed, 0 insertions, 30 deletions
@@ -76,36 +76,6 @@ static int get(input *in) { } /* - * Small routines to amalgamate a string from an input source. - */ -typedef struct tagRdstring rdstring; -struct tagRdstring { - int pos, size; - wchar_t *text; -}; -static void rdadd(rdstring *rs, wchar_t c) { - if (rs->pos >= rs->size-1) { - rs->size = rs->pos + 128; - rs->text = resize(rs->text, rs->size); - } - rs->text[rs->pos++] = c; - rs->text[rs->pos] = 0; -} -static void rdadds(rdstring *rs, wchar_t *p) { - int len = ustrlen(p); - if (rs->pos >= rs->size - len) { - rs->size = rs->pos + len + 128; - rs->text = resize(rs->text, rs->size); - } - ustrcpy(rs->text + rs->pos, p); - rs->pos += len; -} -static wchar_t *rdtrim(rdstring *rs) { - rs->text = resize(rs->text, rs->pos + 1); - return rs->text; -} - -/* * Lexical analysis of source files. */ typedef struct token_Tag token; |