On Thu, Oct 30, 2003 at 08:24:13PM +0100, Jeroen T. Vermeulen wrote:
> 
> Then the whole loop could become something like this:

Okay, that code wasn't entirely correct but it gets the idea across.  In
C++ terms, what I arrived at was:

  string result;
  for (int i=0; i<F.size(); ++i)
  {
    unsigned char c = p[i];
    if (c == '\\')
    {
      c = p[++i];
      if (isdigit(c) && isdigit(p[i+1]) && isdigit(p[i+2]))
      {
        c = (VAL(p[c])<<9) | (VAL(p[i+1])<<3) | VAL(p[i+2]);
        i += 2;
      }
    }
    result += char(c);
  }


Simple, no?


Jeroen


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to