[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestion for CYGWIN port of sed

From: Ariel Brosh
Subject: Suggestion for CYGWIN port of sed
Date: Thu, 5 Oct 2000 19:54:23 +0200

I apologize if this message arrives the wrong address, please help me
reroute it to the right place.

I found it important to adjust the inchar function in compile.c in sed to
the following:

static int
  int ch = EOF;

  if (prog.cur)
      if (prog.cur < prog.end)
        ch = *prog.cur++;
  else if (prog.file)
      if (!feof(prog.file))
        ch = getc(prog.file);
  if (ch == '\n')
#ifdef _WIN32
  if (ch == '\r') return inchar();
  return ch;

The lines I added can be noticed clearly:
|#ifdef _WIN32
  if (ch == '\r') return inchar();

After making these changes, I could easily use configure scripts created by
autoconf on cygwin platform. Prior to it sed could not execute the scripts
to create the work files.
(Due to a trivial NL/CRLF problem)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]