From 8511f4ae900f48999617bc8384e9c327673e2196 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 20 Oct 1999 20:17:18 +0000 Subject: First backend! Text output now pretty much works. [originally from svn r240] --- input.c | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index c5d0b5c..d5c4685 100644 --- a/input.c +++ b/input.c @@ -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; -- cgit v1.1