delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/28/00:53:25

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Thu, 28 Jun 2001 00:52:27 -0400
MIME-Version: 1.0
Subject: Re: v2loadimage and proxy
Message-ID: <3B3A7FCB.18643.5A26CA@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

I forgot that quotes can be escaped. get_arg changed to conform:
> + static
> + const char * get_arg(const char *ptr, const char **beg, const char **end)
{
  unsigned char quoted;
  char beg_ch;

  while (*ptr && isspace(*ptr))
    ++ptr;

  *beg = ptr;
  beg_ch = *ptr;
  quoted = is_quote(*ptr);
  if (quoted)
    ++ptr;

  while (*ptr)
  {
    if ((!quoted && isspace(*ptr)) || (quoted && *ptr == beg_ch))
      break;
    if (*ptr == '\\' && is_quote(ptr[1]))
      ++ptr;
    ++ptr;
  }

  *end = ptr;
  return ptr;
}



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019