Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

C Programming Language

sound_C_under_linux


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

strycnin@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
In article <878xbcnakg.@blp.benpfaff.org>, Ben Pfaff
<b@cs.stanford.edu> writes

>strycnin@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     /\/\/\/\/
/\/\/ c@phaedsys.org      www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Chris Hills <c@phaedsys.org> writes:
> In article <878xbcnakg.@blp.benpfaff.org>, Ben Pfaff
> <b@cs.stanford.edu> writes
>>strycnin@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
In article <wyE2gkScJxVGF@phaedsys.demon.co.uk>,
Chris Hills  <c@phaedsys.demon.co.uk> wrote:

>In article <878xbcnakg.@blp.benpfaff.org>, Ben Pfaff
><b@cs.stanford.edu> writes
>>strycnin@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)

strycnin@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

Chris Hills said:

> In article <878xbcnakg.@blp.benpfaff.org>, Ben Pfaff
> <b@cs.stanford.edu> writes
>>strycnin@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.

"Ben Pfaff" <b@cs.stanford.edu> ha scritto nel messaggio
news:87zm3sltm4.fsf@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?)

In article <f37crp$jf@tdi.cu.mi.it>, Army1987 <please.@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.
--
   Okay, buzzwords only. Two syllables, tops.  -- Laurie Anderson

Chris Hills wrote:
> Ben Pfaff <b@cs.stanford.edu> writes

... 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

"Walter Roberson" <rober@ibd.nrc-cnrc.gc.ca> ha scritto nel messaggio
news:f37e9j$gg1$1@canopus.cc.umanitoba.ca...

> In article <f37crp$jf@tdi.cu.mi.it>, Army1987 <please.@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.

In article <f37em1$lc@tdi.cu.mi.it>, Army1987 <please.@for.it> wrote:

>"Walter Roberson" <rober@ibd.nrc-cnrc.gc.ca> ha scritto nel messaggio
>news:f37e9j$gg1$1@canopus.cc.umanitoba.ca...
>> In article <f37crp$jf@tdi.cu.mi.it>, Army1987 <please.@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

"Walter Roberson" <rober@ibd.nrc-cnrc.gc.ca> ha scritto nel messaggio
news:f37fm1$ide$1@canopus.cc.umanitoba.ca...

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"...) :-)

Army1987 wrote:
> "Ben Pfaff" <b@cs.stanford.edu> ha 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

Army1987 wrote:
> "Walter Roberson" <rober@ibd.nrc-cnrc.gc.ca> ha scritto
>> Army1987 <please.@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.

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

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

Walter Roberson said:

> In article <f37crp$jf@tdi.cu.mi.it>, Army1987 <please.@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.

"CBFalconer" <cbfalco@yahoo.com> ha scritto nel messaggio
news:46574C20.42779AB8@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>
On Fri, 25 May 2007 23:13:34 +0200, in comp.lang.c , "Army1987"

<please.@for.it> wrote:

>"CBFalconer" <cbfalco@yahoo.com> ha scritto nel messaggio
>news:46574C20.42779AB8@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

CBFalconer <cbfalco@yahoo.com> writes:
> 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) k@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"

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

In article <87zm3sltm4.@blp.benpfaff.org>, Ben Pfaff
<b@cs.stanford.edu> writes

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     /\/\/\/\/
/\/\/ c@phaedsys.org      www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

In article <7vCdncA_erzprcrbnZ2dnUVZ8qydn@bt.com>, Richard Heathfield
<r@see.sig.invalid> writes

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     /\/\/\/\/
/\/\/ c@phaedsys.org      www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

In article <46573686.E0810@yahoo.com>, CBFalconer
<cbfalco@yahoo.com> writes
>Chris Hills wrote:
>> Ben Pfaff <b@cs.stanford.edu> writes

>... 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     /\/\/\/\/
/\/\/ c@phaedsys.org      www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

On Sat, 26 May 2007 13:06:16 +0100, Chris Hills wrote:
>In article <46573686.E0810@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

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc