By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,513 Members | 1,616 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,513 IT Pros & Developers. It's quick & easy.

sound_C_under_linux

P: n/a
There are functions like sound(), nosound(), delay in C under linux?
with examplas if there is
thx

May 25 '07 #1
Share this Question
Share on Google+
30 Replies


P: n/a
st*********@gmail.com writes:
There are functions like sound(), nosound(), delay in C under linux?
This newsgroup is about portable C. The functions you're talking
about are not portable (otherwise you'd not need to find
equivalents to them for Linux), so you're unlikely to get a good
answer here. Instead, I'd suggest finding a Unix or
Linux-related newsgroup for asking your question, or in fact just
doing a web search.
--
Ben Pfaff
http://benpfaff.org
May 25 '07 #2

P: n/a
In article <87************@blp.benpfaff.org>, Ben Pfaff
<bl*@cs.stanford.eduwrites
>st*********@gmail.com writes:
>There are functions like sound(), nosound(), delay in C under linux?

This newsgroup is about portable C.
No it's about C nowhere does it specify portable C.
The functions you're talking
about are not portable (otherwise you'd not need to find
equivalents to them for Linux), so you're unlikely to get a good
answer here. Instead, I'd suggest finding a Unix or
Linux-related newsgroup for asking your question, or in fact just
doing a web search.
Why not tell him the answer? You seem to know about linux from you web
site
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

May 25 '07 #3

P: n/a
Chris Hills <ch***@phaedsys.orgwrites:
In article <87************@blp.benpfaff.org>, Ben Pfaff
<bl*@cs.stanford.eduwrites
>>st*********@gmail.com writes:
>>There are functions like sound(), nosound(), delay in C under linux?

This newsgroup is about portable C.

No it's about C nowhere does it specify portable C.
It's about the C programming language as defined in K&R and
various ANSI and ISO standards. We don't talk about
implementation extensions here. You've been around here for a
while, you should know that.
Why not tell him the answer? You seem to know about linux from you web
site
By and large I resist talking about off-topic stuff here, whether
it's something within my realm of knowledge or not. And I do not
know, off-hand, how to produce sound under Linux, other than
putchar('\a').
--
Ben Pfaff
http://benpfaff.org
May 25 '07 #4

P: n/a
In article <wy**************@phaedsys.demon.co.uk>,
Chris Hills <ch***@phaedsys.demon.co.ukwrote:
>In article <87************@blp.benpfaff.org>, Ben Pfaff
<bl*@cs.stanford.eduwrites
>>st*********@gmail.com writes:
>>There are functions like sound(), nosound(), delay in C under linux?

This newsgroup is about portable C.

No it's about C nowhere does it specify portable C.
How very sensible of you.

It would be nice if someone would put together a cast list (like a
program card that you get when you go to a play). It would divide the
posters here into 3 groups, as shown below:

"regulars" sensible people unknown (*)

I thought you were in group 1, but your recent post suggests you may
belong in group 2. If so, welcome aboard!

(*) Not sufficicent number of posts to be able to tell (i.e., the one-offers)

May 25 '07 #5

P: n/a
st*********@gmail.com wrote:
>
There are functions like sound(), nosound(), delay in C under
linux? with examplas if there is
There are no such functions in standard C, which is what this group
is about.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com

May 25 '07 #6

P: n/a
Chris Hills said:
In article <87************@blp.benpfaff.org>, Ben Pfaff
<bl*@cs.stanford.eduwrites
>>st*********@gmail.com writes:
>>There are functions like sound(), nosound(), delay in C under linux?

This newsgroup is about portable C.

No it's about C
Right.
nowhere does it specify portable C.
Right again. But nowhere, either, does it specify *non*-portable C. It
does, however, specify C. In the absence of any more authoritative
definition, it is not unreasonable to use any of the definitions
supplied by the International Organization for Standardization and the
International Electrotechnical Commission (i.e. ISO/IEC 9899), or of
course the definition supplied by the creator of the language.

So that's what we do.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 25 '07 #7

P: n/a
"Ben Pfaff" <bl*@cs.stanford.eduha scritto nel messaggio
news:87************@blp.benpfaff.org...
By and large I resist talking about off-topic stuff here, whether
it's something within my realm of knowledge or not. And I do not
know, off-hand, how to produce sound under Linux, other than
putchar('\a').
With my Ubuntu 6.10 it doesn't work.

(BTW, on lcc-win32, putchar('\f') displays a female (Venus) symbol
at the active position and then advance the active position to the
next position on the current line, which I can't see how can
qualify as "[m]ov[ing] the active position to the initial position
at the start of the next logical page".
gcc with Ubuntu 6.10 just behaves exactly as with '\n', which is
much better, considering that the Standard doesn't define "page"
which could be then taken to be synonim with "line".

Is it possible that the portable way to clear the screen doesn't
work with either of the systems I use?)
May 25 '07 #8

P: n/a
In article <f3**********@tdi.cu.mi.it>, Army1987 <pl********@for.itwrote:
>Is it possible that the portable way to clear the screen doesn't
work with either of the systems I use?)
There is no fully portable way to clear the screen.
For example it would be difficult to "clear the screen" on
an ASR33 teletype with a continuous paper roll.
--
Okay, buzzwords only. Two syllables, tops. -- Laurie Anderson
May 25 '07 #9

P: n/a
Chris Hills wrote:
Ben Pfaff <bl*@cs.stanford.eduwrites
.... snip ...
>
>The functions you're talking about are not portable (otherwise
you'd not need to find equivalents to them for Linux), so you're
unlikely to get a good answer here. Instead, I'd suggest finding
a Unix or Linux-related newsgroup for asking your question, or in
fact just doing a web search.

Why not tell him the answer? You seem to know about linux from you
web site
Because it's off-topic. Instead he made suggestions as to where to
look. Which will have greater lasting effect.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 25 '07 #10

P: n/a

"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.caha scritto nel messaggio
news:f3**********@canopus.cc.umanitoba.ca...
In article <f3**********@tdi.cu.mi.it>, Army1987 <pl********@for.it>
wrote:
>>Is it possible that the portable way to clear the screen doesn't
work with either of the systems I use?)

There is no fully portable way to clear the screen.
For example it would be difficult to "clear the screen" on
an ASR33 teletype with a continuous paper roll.
Right. But on a terminal window, one would expect "the start of the
next logical page" to be something more than just the beginning of
a new line.
May 25 '07 #11

P: n/a
In article <f3**********@tdi.cu.mi.it>, Army1987 <pl********@for.itwrote:
>
"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.caha scritto nel messaggio
news:f3**********@canopus.cc.umanitoba.ca...
>In article <f3**********@tdi.cu.mi.it>, Army1987 <pl********@for.it>
wrote:
>>>Is it possible that the portable way to clear the screen doesn't
work with either of the systems I use?)

There is no fully portable way to clear the screen.
For example it would be difficult to "clear the screen" on
an ASR33 teletype with a continuous paper roll.
>Right. But on a terminal window, one would expect "the start of the
next logical page" to be something more than just the beginning of
a new line.
If you are only concerned about your systems and not clearing screens
in general, then you are concerned about a system-specific matter
and need to inquire about it in newsgroups that deal with your
systems.
--
"It is important to remember that when it comes to law, computers
never make copies, only human beings make copies. Computers are given
commands, not permission. Only people can be given permission."
-- Brad Templeton
May 25 '07 #12

P: n/a

"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.caha scritto nel messaggio
news:f3**********@canopus.cc.umanitoba.ca...
In article <f3**********@tdi.cu.mi.it>, Army1987 <pl********@for.it>
wrote:
>>
"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.caha scritto nel messaggio
news:f3**********@canopus.cc.umanitoba.ca...
>>In article <f3**********@tdi.cu.mi.it>, Army1987 <pl********@for.it>
wrote:
>>>>Is it possible that the portable way to clear the screen doesn't
work with either of the systems I use?)

There is no fully portable way to clear the screen.
For example it would be difficult to "clear the screen" on
an ASR33 teletype with a continuous paper roll.
>>Right. But on a terminal window, one would expect "the start of the
next logical page" to be something more than just the beginning of
a new line.

If you are only concerned about your systems and not clearing screens
in general, then you are concerned about a system-specific matter
and need to inquire about it in newsgroups that deal with your
systems.
That was a rhetorical question. I was simplily noting that the
Standard specifies for '\f' something which sounds very like "if
the stream you're writing to is a terminal window or screen, clear
it", but gcc does something different (but it has the right to do
that, since the Standard never defines "page"), and lcc-win32 does
something wrong (unless "logical page" is taken to mean "a portion
of output delimited by female (Venus) symbols"...) :-)
May 25 '07 #13

P: n/a
Army1987 wrote:
"Ben Pfaff" <bl*@cs.stanford.eduha scritto nel messaggio
>By and large I resist talking about off-topic stuff here, whether
it's something within my realm of knowledge or not. And I do not
know, off-hand, how to produce sound under Linux, other than
putchar('\a').

With my Ubuntu 6.10 it doesn't work.
Hmm. Will have to test that on 6.06.
.....
After a fight with VIM, it works fine on 6.06.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 25 '07 #14

P: n/a
Army1987 wrote:
"Walter Roberson" <ro******@ibd.nrc-cnrc.gc.caha scritto
>Army1987 <pl********@for.itwrote:
>>Is it possible that the portable way to clear the screen doesn't
work with either of the systems I use?)

There is no fully portable way to clear the screen.
For example it would be difficult to "clear the screen" on
an ASR33 teletype with a continuous paper roll.

Right. But on a terminal window, one would expect "the start of the
next logical page" to be something more than just the beginning of
a new line.
Why? Who defined the line count representable? Did you ever see a
one line terminal?

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 25 '07 #15

P: n/a
Army1987 wrote:
>
.... snip ...
>
That was a rhetorical question. I was simplily noting that the
Standard specifies for '\f' something which sounds very like "if
the stream you're writing to is a terminal window or screen, clear
it", but gcc does something different (but it has the right to do
that, since the Standard never defines "page"), and lcc-win32 does
something wrong (unless "logical page" is taken to mean "a portion
of output delimited by female (Venus) symbols"...) :-)
No, gcc (and any legal compiler) simply arranges to output the '\f'
character. What the system does with it is up to the system.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net
--
Posted via a free Usenet account from http://www.teranews.com

May 25 '07 #16

P: n/a
Walter Roberson said:
In article <f3**********@tdi.cu.mi.it>, Army1987 <pl********@for.it>
wrote:
>>Is it possible that the portable way to clear the screen doesn't
work with either of the systems I use?)

There is no fully portable way to clear the screen.
For example it would be difficult to "clear the screen" on
an ASR33 teletype with a continuous paper roll.
Nah, it's easy - just replace the roll. I used to have to do that a
/lot/. (I eventually worked out, however, that printing a program
listing for the purposes of debugging was not a substitute for careful
thought, and the trees started to breathe more easily...)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 25 '07 #17

P: n/a

"CBFalconer" <cb********@yahoo.comha scritto nel messaggio
news:46***************@yahoo.com...
Army1987 wrote:
>>
... snip ...
>>
That was a rhetorical question. I was simplily noting that the
Standard specifies for '\f' something which sounds very like "if
the stream you're writing to is a terminal window or screen, clear
it", but gcc does something different (but it has the right to do
that, since the Standard never defines "page"), and lcc-win32 does
something wrong (unless "logical page" is taken to mean "a portion
of output delimited by female (Venus) symbols"...) :-)

No, gcc (and any legal compiler) simply arranges to output the '\f'
character. What the system does with it is up to the system.
<ot>
Do you mean that if a program compiled with lcc-win32 from
#include <stdio.h>
int main(void)
{
puts("AAAA\fAAA!");
return 0;
}
when executed displays AAAA?AAA!, then it is a problem of Windows, not of
lcc-win32?
</ot>
May 25 '07 #18

P: n/a
On Fri, 25 May 2007 23:13:34 +0200, in comp.lang.c , "Army1987"
<pl********@for.itwrote:
>
"CBFalconer" <cb********@yahoo.comha scritto nel messaggio
news:46***************@yahoo.com...
>Army1987 wrote:
>>>
No, gcc (and any legal compiler) simply arranges to output the '\f'
character. What the system does with it is up to the system.
puts("AAAA\fAAA!");
?
>when executed displays AAAA?AAA!, then it is a problem of Windows, not of
lcc-win32?
Absolutely. Were you to insert this into a Windows application, it
woudl do zip. If you did it in a dumb terminal window, you'd get a
cute squiggle where the \f is. If you did it in a text-type control,
youd get a question-mark or whatever smileyface your current charset
has at position seven.
--
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
May 25 '07 #19

P: n/a
CBFalconer <cb********@yahoo.comwrites:
Army1987 wrote:
>>
... snip ...
>>
That was a rhetorical question. I was simplily noting that the
Standard specifies for '\f' something which sounds very like "if
the stream you're writing to is a terminal window or screen, clear
it", but gcc does something different (but it has the right to do
that, since the Standard never defines "page"), and lcc-win32 does
something wrong (unless "logical page" is taken to mean "a portion
of output delimited by female (Venus) symbols"...) :-)

No, gcc (and any legal compiler) simply arranges to output the '\f'
character. What the system does with it is up to the system.
Right, but the C standard specifically says (C99 5.2.2p2,
"Character display semantics"):

Alphabetic escape sequences representing nongraphic characters in
the execution character set are intended to produce actions on
display devices as follows:

[...]

\f (form feed) Moves the active position to the initial position
at the start of the next logical page.

In my opinion, this is over-specified, particularly since the formfeed
character doesn't behave that way on many modern display devices (that
may have been different when this was originally written). But the
phrase "are intended to" probably gives enough breathing room to allow
conforming implementations to behave reasonably.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
May 25 '07 #20

P: n/a
Army1987 wrote:
"CBFalconer" <cb********@yahoo.comha scritto nel messaggio
>Army1987 wrote:
>>>
... snip ...
>>>
That was a rhetorical question. I was simplily noting that the
Standard specifies for '\f' something which sounds very like "if
the stream you're writing to is a terminal window or screen, clear
it", but gcc does something different (but it has the right to do
that, since the Standard never defines "page"), and lcc-win32 does
something wrong (unless "logical page" is taken to mean "a portion
of output delimited by female (Venus) symbols"...) :-)

No, gcc (and any legal compiler) simply arranges to output the '\f'
character. What the system does with it is up to the system.

Do you mean that if a program compiled with lcc-win32 from
#include <stdio.h>
int main(void) {
puts("AAAA\fAAA!");
return 0;
}
when executed displays AAAA?AAA!, then it is a problem of Windows,
not of lcc-win32?
Assuming lcc-win32 is accurate, yes. It is not a problem, it is an
interpretation, which should be described somewhere.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 26 '07 #21

P: n/a
In article <87************@blp.benpfaff.org>, Ben Pfaff
<bl*@cs.stanford.eduwrites
>Chris Hills <ch***@phaedsys.orgwrites:
>In article <87************@blp.benpfaff.org>, Ben Pfaff
<bl*@cs.stanford.eduwrites
>>>st*********@gmail.com writes:

There are functions like sound(), nosound(), delay in C under linux?

This newsgroup is about portable C.

No it's about C nowhere does it specify portable C.

It's about the C programming language as defined in K&R and
various ANSI and ISO standards. We don't talk about
implementation extensions here. You've been around here for a
while, you should know that.
I have been around here a LONG time... most of my 17 years on the
Internet. I am also on several ISO and other standards bodies.
Including the C panel.

What I DO KNOW is that you are WRONG. There are a few over zealous net
nannies who incorrectly claim that is the purpose of the group. There
are another (larger) but less vocal group who disagree. We discussed
this a few years ago and as many wanted the remit much wider as those
who wanted it restricted as you do.

Most of the noise on clc is the net nannies tut tuting every time some
one posts what they think is OT. There would be a LOT less noise if you
gave the answer and directed to a more suitable news group instead of
(incorrectly) ranting about the purpose of this group.
>Why not tell him the answer? You seem to know about linux from you web
site

By and large I resist talking about off-topic stuff here, whether
it's something within my realm of knowledge or not. And I do not
know, off-hand, how to produce sound under Linux, other than
putchar('\a').
Then say so.
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

May 26 '07 #22

P: n/a
In article <7v******************************@bt.com>, Richard Heathfield
<rj*@see.sig.invalidwrites
>Chris Hills said:
>In article <87************@blp.benpfaff.org>, Ben Pfaff
<bl*@cs.stanford.eduwrites
>>>st*********@gmail.com writes:

There are functions like sound(), nosound(), delay in C under linux?

This newsgroup is about portable C.

No it's about C

Right.
>nowhere does it specify portable C.

Right again. But nowhere, either, does it specify *non*-portable C. It
does, however, specify C. In the absence of any more authoritative
definition, it is not unreasonable to use any of the definitions
supplied by the International Organization for Standardization and the
International Electrotechnical Commission (i.e. ISO/IEC 9899), or of
course the definition supplied by the creator of the language.

So that's what we do.
Your choice its what you do ... as a member of the ISO 9899 panel I
think you are wrong.

There is more noise in this NG caused by people tut tuting about OT
posts than anything else.

Just answer the question and point to more suitable NG;s that would stop
a lot of the noise.

Giving your personal view of what you think this NG is about as the
Official view is wrong. There is no formal charter or official line and
there are as many think one way as the other. This is why so much noise
is generated every tine some one say "OT".
Ps Richard, if you make it to ESS this year come and have a coffee and
doughnut on the stand to show there are no hard feeling on this ..

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

May 26 '07 #23

P: n/a
In article <46***************@yahoo.com>, CBFalconer
<cb********@yahoo.comwrites
>Chris Hills wrote:
>Ben Pfaff <bl*@cs.stanford.eduwrites
... snip ...
>>
>>The functions you're talking about are not portable (otherwise
you'd not need to find equivalents to them for Linux), so you're
unlikely to get a good answer here. Instead, I'd suggest finding
a Unix or Linux-related newsgroup for asking your question, or in
fact just doing a web search.

Why not tell him the answer? You seem to know about linux from you
web site

Because it's off-topic.
No its not
>Instead he made suggestions as to where to
look. Which will have greater lasting effect.
True
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

May 26 '07 #24

P: n/a
On Sat, 26 May 2007 13:06:16 +0100, Chris Hills wrote:
>In article <46***************@yahoo.com>, CBFalconer writes
>>Because it's off-topic.
No its not
I don't understand the whole discussion. It's possible to write 'sound
C under linux', even ISO C.
--
Roland Pibinger
"The best software is simple, elegant, and full of drama" - Grady Booch
May 26 '07 #25

P: n/a
Chris Hills wrote:
>
.... snip ...
>
Most of the noise on clc is the net nannies tut tuting every time
some one posts what they think is OT. There would be a LOT less
noise if you gave the answer and directed to a more suitable news
group instead of (incorrectly) ranting about the purpose of this
group.
By and large the off-topic messages consist of just the information
that the subject is off-topic, why, and redirection of some
(possibly infinitesimal) form. The answer is not really feasible,
since it IS off-topic and quite likely unknown.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

May 26 '07 #26

P: n/a
[Chris, you have to read *all* the way to the bottom, okay?]

Chris Hills said:

<snip>
Your choice its what you do ... as a member of the ISO 9899 panel I
think you are wrong.
This is a fallacious appeal to inappropriate authority. Your membership
of the ISO 9899 panel is irrelevant to the topicality or otherwise of
non-C subjects in comp.lang.c.
There is more noise in this NG caused by people tut tuting about OT
posts than anything else.
Not from me, there ain't.
Just answer the question and point to more suitable NG;s that would
stop a lot of the noise.
I see no point in giving an answer to non-C questions here, as I cannot
be sure that my answers will receive adequate peer review. And I *do*
point to more suitable newsgroups - despite your recent resistance to
my so doing.
Giving your personal view of what you think this NG is about as the
Official view is wrong.
There is no such thing as an official view in comp.lang.c, because
comp.lang.c has no office and no officers. Therefore your claim that I
have presented my personal view as "official" is clearly wrong.
There is no formal charter or official line
True enough. Common sense, however, remains. In places.

and there are as many think one way as the other.
The probability of that being true is microscopic.
This is why so much
noise is generated every tine some one say "OT".
I rarely bother to point out non-topicality. Sometimes, sure, but not
often. There are already enough people doing that. I prefer to answer
topical questions. But in debates such as this one, I feel it's worth
making my view known, and my view is that this newsgroup's usefulness
and the expertise to be found in the community of its regular
contributors will be destroyed if the topicality of the group is
widened to include platform-specific stuff. This has already happened
to comp.lang.c++, remember - and it took years to fix.

Ps Richard, if you make it to ESS this year come and have a coffee and
doughnut on the stand to show there are no hard feeling on this ..
Well, Chris, here we are at the bottom, and certainly there are no hard
feelings on this side. I am one of those old-fashioned types who think
it possible to disagree with someone without considering them to be
malicious, incompetent, or even both. Besides, anyone who can spell
"doughnut" correctly can't be all bad.

But what on earth is ESS? Google gave me 20 million hits, which is nice
to know but completely useless, of course.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
May 26 '07 #27

P: n/a
Chris Hills wrote:

What I DO KNOW is that you are WRONG. There are a few over zealous
net nannies who incorrectly claim that is the purpose of the group.
There are another (larger) but less vocal group who disagree. We
discussed this a few years ago and as many wanted the remit much
wider as those who wanted it restricted as you do.
You're flat wrong. Ask our colleagues over in comp.lang.c++, where they
had policy like you describe. Things went to hell. They had to wrest
control back using virtually identical critera to that of clc.

Besides, it's more than a few people here, it's the vast majority of
regular contributors.


Brian
May 26 '07 #28

P: n/a
Chris Hills <ch***@phaedsys.orgwrites:
[...]
Most of the noise on clc is the net nannies tut tuting every time some
one posts what they think is OT. There would be a LOT less noise if
you gave the answer and directed to a more suitable news group instead
of (incorrectly) ranting about the purpose of this group.
It's far better to redirect the poster to a more suitable newsgroup
and let the question be answered there, where the answer is likely to
be more reliable and it can be vetted by experts.

Off-topic answers, even if nobody complained about them being
off-topic, tend to trigger lengthy off-topic discussions.

I'm here to discuss C. If I want to discuss Unix-specific
programming, for example, I'll go to comp.unix.programmer.

If you want to expand the topicality guidelines of this newgroup
beyond the current consensus of most of the regulars, please indicate
what *you* think should be considered topical here. POSIX? C++? C#?
General algorithms? Java? MS Windows? Job offers? Conference
announcements? MAKE MONEY FAST?

Where *specifically* do you think the line should be drawn? Or, if
you don't think there should be a line, are you willing to accept any
arbitrary discussions here without complaint? If someone has a
question that pertains to ISO standard C, shouldn't he have a place to
ask it?

Newsgroups have drowned in off-topic postings before; it happened to
comp.lang.c++ some years ago, and it barely managed to recover.

If you have a proposal that would keep this newsgroup more useful than
an all-purpose misc.misc, I'm more than willing to hear it.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
May 26 '07 #29

P: n/a
x-no-archive: yes
st*********@gmail.com wrote:
There are functions like sound(), nosound(), delay in C under linux?
with examplas if there is
thx
You might be interested in http://sourceforge.net/projects/nsound .
or this http://www.4front-tech.com/pguide/audio.html .
Amusingly, that first link will further inflame the Aspberger victims on
this ng since it is a C++ link. ha ha ha ha.
May 30 '07 #30

P: n/a

"Richard Heathfield" <rj*@see.sig.invalidha scritto nel messaggio
news:7v******************************@bt.com...
Right again. But nowhere, either, does it specify *non*-portable C. It
does, however, specify C. In the absence of any more authoritative
definition, it is not unreasonable to use any of the definitions
supplied by the International Organization for Standardization and the
International Electrotechnical Commission (i.e. ISO/IEC 9899), or of
course the definition supplied by the creator of the language.

So that's what we do.
Yes. Note that "portable" and "standard" aren't synonimous.

/* EXAMPLE 1 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
size_t Length;
char Text[1];
} chummy;
int main(void)
{
char *pinky = "Gee Brain, what do you want to do tonight?\n";
char *brain = "The same thing we do every night, Pinky - "
"Try to take over the world!";
size_t len = strlen(pinky) + strlen(brain);
chummy *tagline = malloc(sizeof(chummy) + len);
#ifdef __DS9K
free(stdout); /* Try guessing... */
#endif
if (tagline == NULL) {
perror("Cannot allocate memory");
exit(EXIT_FAILURE);
}
tagline->Length = len;
strcpy(tagline->Text, pinky);
strcat(tagline->Text, brain);
puts(tagline->Text);
return 0;
}

/*EXAMPLE 2*/
#include <stdio.h>
#include <assert.h>
int main(void)
{
FILE *rndstream = fopen("/dev/random", "rb");
int i;
int ch;
assert(rndstream && "Get a better OS");
puts("Generated password is:");
for (i=0; i<20; i++) {
ch = getc(rndstream);
if (ch >= 32 && ch < 127)
putchar(ch);
}
putchar('\n');
return 0;
}

Which is the one you would be more surprised if it didn't work on
some implementation?

Also:
The foreword of C99 says
"This second edition cancels and replaces the first edition, ISO/IEC
9899:1990[...]."
So, as of 2007, VLAs are standard, whereas implicit function declarations
aren't. But which are more portable.
Jun 2 '07 #31

This discussion thread is closed

Replies have been disabled for this discussion.