From 019a42f199494c86b0aeea59caf9421d96a2c009 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 17 Aug 2004 16:10:48 -0400 Subject: fixes --- textual.cc | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'textual.cc') diff --git a/textual.cc b/textual.cc index 15aa33e0..88a1720a 100644 --- a/textual.cc +++ b/textual.cc @@ -4,6 +4,7 @@ #include "error.h" #include "option.h" #include "timing.h" +#include "util.h" #include #include @@ -17,32 +18,15 @@ namespace ledger { #define MAX_LINE 1024 -std::string path; -unsigned int linenum; +std::string path; +unsigned int linenum; #ifdef TIMELOG_SUPPORT -static std::time_t time_in; -static account_t * last_account; -static std::string last_desc; +static std::time_t time_in; +static account_t * last_account; +static std::string last_desc; #endif -inline char * skip_ws(char * ptr) -{ - while (*ptr == ' ' || *ptr == '\t' || *ptr == '\n') - ptr++; - return ptr; -} - -inline char peek_next_nonws(std::istream& in) -{ - char c = in.peek(); - while (! in.eof() && std::isspace(c) && c != '\n') { - in.get(c); - c = in.peek(); - } - return c; -} - inline char * next_element(char * buf, bool variable = false) { for (char * p = buf; *p; p++) { -- cgit v1.2.3