C-FAQ 19.7

J

jacob navia

This is what is there now (2006, 20 Dec)

How can I do serial (``comm'') port I/O?

It's system-dependent. Under Unix, you typically open, read, and write a
device file in /dev, and use the facilities of the terminal driver to
adjust its characteristics. (See also questions 19.1 and 19.2.) Under
MS-DOS, you can use the predefined stream stdaux, or a special file like
COM1, or some primitive BIOS interrupts, or (if you require decent
performance) any number of interrupt-driven serial I/O packages. Several
netters recommend the book C Programmer's Guide to Serial
Communications, by Joe Campbell.

---------------

I would eliminate all references to MSDOS, a system that
is obsolete since more than a decade now.

The proposed replacement text is below:

It's system-dependent. Under Unix, you typically open, read, and write a
device file in /dev, and use the facilities of the terminal driver to
adjust its characteristics. (See also questions 19.1 and 19.2.)

Under windows (Win32) you can use the primitives CreateFile, ReadFile,
and WriteFile to open a serial communications port, and read/write
to/from it. For more information see:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp
 
R

Richard Heathfield

jacob navia said:

[C FAQ 19.7]
I would eliminate all references to MSDOS, a system that
is obsolete since more than a decade now.

Nevertheless, it is still used, even by people learning C. I see no benefit
to removing the text.
The proposed replacement text is below:
Under windows (Win32) you can use the primitives CreateFile, ReadFile,
and WriteFile to open a serial communications port, and read/write
to/from it. For more information see:

It is, however, reasonable to add a reference to a Windows technique, as you
suggest.
 
M

Mark McIntyre

I would eliminate all references to MSDOS, a system that
is obsolete since more than a decade now.

Well, yes, but so has Windows 95 and there are plenty of users of
that. There are probably still plenty of DOS users.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
E

Eric Sosman

jacob said:
This is what is there now (2006, 20 Dec)
[...]
I would eliminate all references to MSDOS, a system that
is obsolete since more than a decade now.
[...]

Why bother comp.lang.c with the matter? The FAQ belongs
to Steve Summit; take your suggestions to him.
 
R

Richard Heathfield

Eric Sosman said:
jacob said:
This is what is there now (2006, 20 Dec)
[...]
I would eliminate all references to MSDOS, a system that
is obsolete since more than a decade now.
[...]

Why bother comp.lang.c with the matter? The FAQ belongs
to Steve Summit; take your suggestions to him.

Either it's the comp.lang.c FAQ list or it isn't. If it is, discussing it is
relevant here. And if it isn't, we could sure use an FAQ list.
 
J

jacob navia

Mark McIntyre a écrit :
Well, yes, but so has Windows 95 and there are plenty of users of
that. There are probably still plenty of DOS users.

There are also Mac OS7 users, VAX VMS, and many others.
Why should we reference MSDOS only?

The rationale behind my proposal is to have one reference
for Unix and another for Microsoft, as the original FAQ
had it.
 
R

Richard Heathfield

jacob navia said:
Mark McIntyre a écrit :

There are also Mac OS7 users, VAX VMS, and many others.
Why should we reference MSDOS only?

A fair point. If C experts who are familiar with those systems would care to
document how to do serial I/O, no doubt Steve Summit will be happy to
incorporate their advice in the FAQ.
 
M

Mark McIntyre

There are also Mac OS7 users, VAX VMS, and many others.
Why should we reference MSDOS only?

I guess because the FAQ is targetted at noobs who only have experience
of 'starter' systems. Many folks in less developed countries will be
using older PCs running W95 and DOS. Contrariwise I'd not describe VMS
as a beginner's OS, and MACOS7 programmers were always like hens
teeth.
The rationale behind my proposal is to have one reference
for Unix and another for Microsoft, as the original FAQ
had it.

I've no problem with adding the windows redirect.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
E

Eric Sosman

Richard said:
Eric Sosman said:
jacob said:
This is what is there now (2006, 20 Dec)
[...]
I would eliminate all references to MSDOS, a system that
is obsolete since more than a decade now.
[...]
Why bother comp.lang.c with the matter? The FAQ belongs
to Steve Summit; take your suggestions to him.

Either it's the comp.lang.c FAQ list or it isn't. If it is, discussing it is
relevant here. And if it isn't, we could sure use an FAQ list.

Discussing it, sure. We can point out errors and omissions
and overinclusions in the FAQ to our hearts' content, and maybe
even invent a sort of supplementary FAQ or counter-FAQ. (C.f.
the IFAQ.) But what we can't do is effect a change, because the
power to change the FAQ is Mr. Summit's alone. This forum is
therefore not a particularly effective means toward Mr. Navia's
stated end; if he truly wants to accomplish something he should
take his petition elsewhere. (It's possible he's trying to start
a "Write your Congressman" or "Storm the Bastille" movement, but
using pressure tactics as one's opening move suggests both a
manipulative personality and a rash demeanor. Not long ago I
learned that newsrooms refer to such orchestrated campaigns with
the term "turf," short for "AstroTurf," meaning "artificial
grass-roots.")

By the bye, the Mann Act is woefully out of date and would
be vastly improved by the following changes: ...
 
S

Spiros Bousbouras

Eric said:
Richard said:
Eric Sosman said:
jacob navia wrote:
This is what is there now (2006, 20 Dec)
[...]
I would eliminate all references to MSDOS, a system that
is obsolete since more than a decade now.
[...]
Why bother comp.lang.c with the matter? The FAQ belongs
to Steve Summit; take your suggestions to him.

Either it's the comp.lang.c FAQ list or it isn't. If it is, discussing it is
relevant here. And if it isn't, we could sure use an FAQ list.

Discussing it, sure. We can point out errors and omissions
and overinclusions in the FAQ to our hearts' content, and maybe
even invent a sort of supplementary FAQ or counter-FAQ. (C.f.
the IFAQ.) But what we can't do is effect a change, because the
power to change the FAQ is Mr. Summit's alone. This forum is
therefore not a particularly effective means toward Mr. Navia's
stated end; if he truly wants to accomplish something he should
take his petition elsewhere. (It's possible he's trying to start
a "Write your Congressman" or "Storm the Bastille" movement, but
using pressure tactics as one's opening move suggests both a
manipulative personality and a rash demeanor.

Or perhaps he wanted to get opinions before writing to Steve
Summit. Or perhaps he just assumes that Mr. Summit already
reads the group so he will read about Jacob's suggestion here.
 
C

CBFalconer

Mark said:
Well, yes, but so has Windows 95 and there are plenty of users of
that. There are probably still plenty of DOS users.

Not to mention users of FreeDOS and DRDOS.
 
C

CBFalconer

jacob said:
Mark McIntyre a écrit :

There are also Mac OS7 users, VAX VMS, and many others.
Why should we reference MSDOS only?

The rationale behind my proposal is to have one reference
for Unix and another for Microsoft, as the original FAQ
had it.

The world is considerably larger than your experience. There is
also a large clientele for various RTOSs in the embedded world, not
to mention the DOS clones (which are maintained). Those users may
well outnumber the Windoze users.
 
R

Random832

2006-12-22 said:
Discussing it, sure. We can point out errors and omissions and
overinclusions in the FAQ to our hearts' content, and maybe even
invent a sort of supplementary FAQ or counter-FAQ. (C.f. the IFAQ.)
But what we can't do is effect a change, because the power to change
the FAQ is Mr. Summit's alone. This forum is therefore not
a particularly effective means toward Mr. Navia's stated end; if he
truly wants to accomplish something he should take his petition
elsewhere. (It's possible he's trying to start a "Write your
Congressman" or "Storm the Bastille" movement, but using pressure
tactics as one's opening move suggests both a manipulative personality
and a rash demeanor.

Or maybe he honestly thinks that we should have a FAQ.

In the past I've brought this up and some people don't seem to like my
questioning Mr. Summit's position. But the simple facts are: comp.lang.c
does not have a faq controlled by its regulars. This faq, which is
apparently the sole property of Mr. Summit, is being marketed using this
newsgroup and its name.

It's not at all clear to me how this state of affairs was allowed to
come about. If he wrote it himself, why is it the comp.lang.c faq? If it
started as the clc (or nlc) faq, what happened to the rights of the
other contributers? The earliest record of the FAQ on google groups is
from 1990, and it was clearly already well-established by then.

I guess my question is: Who wrote the FAQ? If it was Mr. Summit, why did
it become "our" faq? If it was _not_ Mr. Summit, why does he have sole
control over it and the right to publish it in a book for a profit?

Another FAQ (the same faq?) is mentioned in a 1989 post as being "owned"
by Chris Torek? What happened to this FAQ? Is it the same FAQ? If so,
why does Chris Torek not now have the right to modify it?

Why don't Mark Brader, Joe Buehler, Christopher Calabrese, Stephen M.
Dunn, Tony Hansen, Guy Harris, Karl Heuer, Blair Houghton, Kirk Johnson,
Andrew Koenig, John Lauro, Christopher Lott, Rich Salz, Joshua Simons,
and Erik Talvola, get any say?

Why is it copyright 1990-2004 now but was copyright 1988-1990 in 1990?
Who is this Steve Summit guy, anyway? What ever happened to Chris Torek?

I know these are harsh questions, but I think they need answers.
Not long ago I learned that newsrooms refer to such orchestrated
campaigns with the term "turf," short for "AstroTurf," meaning
"artificial grass-roots.")

Then you've missed the distinction between astroturfing and _actual_
grassroots movements. If no-one says anything to anyone else, that is,
If no-one's there to "start a movement", we can't have a grassroots
movement. Astroturf is when the individuals involved in the campaign
_don't_ really care about the issue but are simply being paid by, say,
Microsoft, to act like they do.
 
R

Richard Bos

Mark McIntyre said:
I've no problem with adding the windows redirect.

I have no problem with adding MS Windows information, but I do think
there should not be a URL to the MS website. For starters, I have yet to
see a resource that never reorganises its website, and that would cause
link rot.

Richard
 
J

jaysome

The world is considerably larger than your experience. There is
also a large clientele for various RTOSs in the embedded world, not
to mention the DOS clones (which are maintained). Those users may
well outnumber the Windoze users.

Outnumber them in terms of what?

Surely the number of Windoze [sic] users who have access to and read
this newsgroup, let alone read the C FAQ, heavily outweigh those who
run DOS and have access to and read this newsgroup and, let alone,
read the C FAQ. I'd bet the latter group is near a proverbial "Big
Goose Egg".

I would eliminate the reference to MS-DOS in the FAQ of concern. It
adds absolutely nothing to the FAQ.

--
jay

PS:
OH and for all...Using "Windoze", "M$" or any other juvenile
phraseology when referrng to Microsoft or Windows cheapens and weakens
any argument you might have been able to make.
http://talkback.zdnet.com/5208-1009-0.html?forumID=1&threadID=8320&messageID=169319
 
R

Richard Heathfield

jaysome said:

I would eliminate the reference to MS-DOS in the FAQ of concern. It
adds absolutely nothing to the FAQ.

....unless you happen to need the information it provides. It's very short -
just a handful of bytes - so why not leave it alone? It harms nobody.
 
J

jacob navia

Spiros Bousbouras a écrit :
Eric said:
Richard said:
Eric Sosman said:


jacob navia wrote:

This is what is there now (2006, 20 Dec)
[...]
I would eliminate all references to MSDOS, a system that
is obsolete since more than a decade now.
[...]

Why bother comp.lang.c with the matter? The FAQ belongs
to Steve Summit; take your suggestions to him.

Either it's the comp.lang.c FAQ list or it isn't. If it is, discussing it is
relevant here. And if it isn't, we could sure use an FAQ list.

Discussing it, sure. We can point out errors and omissions
and overinclusions in the FAQ to our hearts' content, and maybe
even invent a sort of supplementary FAQ or counter-FAQ. (C.f.
the IFAQ.) But what we can't do is effect a change, because the
power to change the FAQ is Mr. Summit's alone. This forum is
therefore not a particularly effective means toward Mr. Navia's
stated end; if he truly wants to accomplish something he should
take his petition elsewhere. (It's possible he's trying to start
a "Write your Congressman" or "Storm the Bastille" movement, but
using pressure tactics as one's opening move suggests both a
manipulative personality and a rash demeanor.


Or perhaps he wanted to get opinions before writing to Steve
Summit. Or perhaps he just assumes that Mr. Summit already
reads the group so he will read about Jacob's suggestion here.

Before asking Mr Summit I thought it would be useful
to ask here the opinion of this group.

Why must I have always some dark motive? Can't paranoia cease for
some time?

I gather that most people do not object to adding windows references
but want to keep MSDOS, contrary to what I thought. It is important
to know that, and now that I know I will write to Mr Summit and
propose the change. (Carbon copy this group)

jacob
 
M

Mark McIntyre

Discussing it, sure. We can point out errors and omissions
and overinclusions in the FAQ to our hearts' content, and maybe
even invent a sort of supplementary FAQ or counter-FAQ. (C.f.
the IFAQ.) But what we can't do is effect a change, because the
power to change the FAQ is Mr. Summit's alone. This forum is
therefore not a particularly effective means toward Mr. Navia's
stated end;

If CLC can't effect change in the CLC FAQ, then its not the CLC FAQ
and should be renamed.

Sure, Steve has to take in the change but still, the result of
discussion here should be an extremely strong agent for change.

I therefore strongly disagree with the idea that discussing new or
changed FAQ entries is offtopic or inappropriate.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
M

Mark McIntyre

also a large clientele for various RTOSs in the embedded world, not
to mention the DOS clones (which are maintained). Those users may
well outnumber the Windoze users.

Outnumber them in terms of what?

Surely the number of Windoze [sic] users who have access to and read
this newsgroup, let alone read the C FAQ, heavily outweigh those who
run DOS

Possibly. Possibly not. However CBF was referring to users of RTOSen,
which group will massively outweigh windows in any measure. Its
interesting to note for instance that an appreciable percentage of the
regulars here programme for embedded systems, and yet we have very
little material in the FAQ germane to them.
I would eliminate the reference to MS-DOS in the FAQ of concern. It
adds absolutely nothing to the FAQ.

Nor does it detract from it. The FAQ is, lets remember, aimed at
newbies and beginners.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top