Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.embedded > #659

Re: When 0x0d become 0x0a

From Les Cargill <lcargill99@comcast.com>
Newsgroups comp.os.linux.embedded
Subject Re: When 0x0d become 0x0a
Date 2014-04-12 16:36 -0500
Organization A noiseless patient Spider
Message-ID <licbbb$vjm$1@dont-email.me> (permalink)
References <ldjodp$m47$1@dont-email.me> <ldk4ni$hi3$1@reader1.panix.com> <ldmm5q$2gq$1@dont-email.me> <ldmqij$qeb$1@reader1.panix.com>

Show all headers | View raw


Grant Edwards wrote:
> On 2014-02-15, Les Cargill <lcargill99@comcast.com> wrote:
>
>> I said this because there is a bit you can OR into the last argument
>> to open() that causes the LF/CR translation to stop. I can't use
>> that.
>
> Huh?  Can you point to code or documentation for that?
>

http://gd.tuwien.ac.at/languages/c/programming-bbrown/c_075.htm

This may be a local heresy specific to the system I am using. To
be sure, this system's the first one I'd seen that does
this.

my habit is to use fopen() as a default ( because it seems more 
multiplatform than open() and I have to mix Windows
and Linux a lot ) , so I probably have many less miles on open() than 
you do.

The stack I am using may merge _fmode semantics in with open().
Seems kinda Windows-ish, though.

http://stackoverflow.com/questions/2266992/no-o-binary-and-o-text-flags-in-linux


> I've been using serial ports on Linux for 20 years, I've written
> multiple tty and serial drivers for Linux, and I've spent a lot of
> time in general wandering around the the Linux serial subsystem.  I've
> never heard of such a thing before.  It's also not mentioned in the
> open() man page.

You are absolutely correct. I'll try to report back later.

> The last parameter to open() controls a newly created
> file's mode bits (read/write/execute for user/group/other). That
> argument is ignored (and need not even be passed) when opening a file
> or device that already exists (as you are when opening a serial port).
>

-- 
Les Cargill

Back to comp.os.linux.embedded | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

When 0x0d become 0x0a Les Cargill <lcargill99@comcast.com> - 2014-02-13 18:39 -0600
  Re: When 0x0d become 0x0a Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2014-02-13 20:49 -0500
    Re: When 0x0d become 0x0a Les Cargill <lcargill99@comcast.com> - 2014-02-14 00:27 -0600
  Re: When 0x0d become 0x0a Grant Edwards <invalid@invalid.invalid> - 2014-02-14 04:06 +0000
    Re: When 0x0d become 0x0a Les Cargill <lcargill99@comcast.com> - 2014-02-14 21:19 -0600
      Re: When 0x0d become 0x0a Grant Edwards <invalid@invalid.invalid> - 2014-02-15 04:31 +0000
        Re: When 0x0d become 0x0a Przemek Klosowski <przemek@tux.dot.org> - 2014-04-11 00:57 +0000
          Re: When 0x0d become 0x0a Les Cargill <lcargill99@comcast.com> - 2014-04-12 16:40 -0500
        Re: When 0x0d become 0x0a Les Cargill <lcargill99@comcast.com> - 2014-04-12 16:36 -0500
          Re: When 0x0d become 0x0a Grant Edwards <invalid@invalid.invalid> - 2014-04-14 16:46 +0000
            Re: When 0x0d become 0x0a Les Cargill <lcargill99@comcast.com> - 2014-04-14 12:48 -0500
              Re: When 0x0d become 0x0a Grant Edwards <invalid@invalid.invalid> - 2014-04-14 18:56 +0000
                Re: When 0x0d become 0x0a Les Cargill <lcargill99@comcast.com> - 2014-04-14 20:16 -0500
                Re: When 0x0d become 0x0a Grant Edwards <invalid@invalid.invalid> - 2014-04-15 15:15 +0000
  Re: When 0x0d become 0x0a David <no@spam.please> - 2014-02-14 13:13 +0000

csiph-web