469,625 Members | 1,059 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Unix C programming for finding file

Hi all,
I am now working on a C program under Unix.
The requirement for the program is that:
A file name is passed to program as a parameter. The program will
Find files under a specified directory. The matched file must have the
same content with the given file. It does not matter whether the
filenames are the same.

It is easy to find file that has the same name with given file, but
may be hard to find the files that with the same content. In my
knowledge, i give two solutions:

1) Go throught the directory and its sub direcotry tree, and when
meeting a file, Use the stand C library function to open that file and
the given file, and then compare those contents in buffers to see if
they are the same.

2) Go through the directory and its sub deirectroy tree, and when
meeting a file, execute the system shell command "diff" to compare the
two files to see if they are the same in content.
The two solutions seems not very smart and they are very running
slowly. I wonder if there is any library function that can compare two
file contents just like "strcmp" to compare two string.
Or maybe there are some other smart ways to achieve it.

Thank you for suggestions.
Nov 14 '05 #1
46 2267

"dawn" <mi**@lian.com> wrote in message
news:30*************@uni-berlin.de...
Hi all,
I am now working on a C program under Unix.
The requirement for the program is that:
A file name is passed to program as a parameter. The program will
Find files under a specified directory. The matched file must have the
same content with the given file. It does not matter whether the
filenames are the same.

It is easy to find file that has the same name with given file, but
may be hard to find the files that with the same content. In my
knowledge, i give two solutions:

1) Go throught the directory and its sub direcotry tree, and when
meeting a file, Use the stand C library function to open that file and
the given file, and then compare those contents in buffers to see if
they are the same.

2) Go through the directory and its sub deirectroy tree, and when
meeting a file, execute the system shell command "diff" to compare the
two files to see if they are the same in content.
The two solutions seems not very smart and they are very running
slowly. I wonder if there is any library function that can compare two
file contents just like "strcmp" to compare two string.
Or maybe there are some other smart ways to achieve it.

Thank you for suggestions.


I'm pretty sure there isn't one.

<OT>
A few things spring to mind, though.

A) if you are going to use a shell cmd, try 'cmp' instead of diff. It
handles binary files, too *and* it's
faster.

B) if speed is important, try to improve it by doing a 'stat()' and compare
files-size. If the size is
different, the two files cannot be the same.

C) if you *must* compare actual files, use fread to read entire blocks and
do the comparison in
memory. Allocate relative large blocks and end on the first actual
difference.

</OT>
Nov 14 '05 #2
"dawn" <mi**@lian.com> wrote in message news:30*************@uni-berlin.de...
Hi all,
I am now working on a C program under Unix. [...]


There is no support for enumerating directory contents in standard C, you should
seek help on a unix newsgroup or pull the man pages for opendir(), readdir(),
closedir() and related APIs.

--
Chqrlie.
Nov 14 '05 #3
In <30*************@uni-berlin.de> dawn <mi**@lian.com> writes:
I am now working on a C program under Unix.
And you're too stupid to realise that comp.unix.programmer is the right
place for your question.
The requirement for the program is that:
A file name is passed to program as a parameter. The program will
Find files under a specified directory. The matched file must have the
same content with the given file. It does not matter whether the
filenames are the same.
Standard C provides no support for directories, which is why posting to
comp.lang.c was such a silly thing.
It is easy to find file that has the same name with given file, but
may be hard to find the files that with the same content. In my
knowledge, i give two solutions:

1) Go throught the directory and its sub direcotry tree, and when
meeting a file, Use the stand C library function to open that file and
the given file, and then compare those contents in buffers to see if
they are the same.


The Unix function ftw() does most of the job for you. You only have to
provide a function for comparing the contents of the two files and such
a function is damn fast if you do it right: compare the contents only
if the files have the same size, use fread() and memcmp() to perform the
comparison on BUFSIZ sized chunks. Note that ftw is giving you the stat
info about each directory entry, so you don't have to do anything special
in order to obtain the file size.

For extra points, lock *at least* the reference file, to be sure that its
contents is stable during the program execution. But don't ask here how!

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #4
On 24 Nov 2004 17:00:35 GMT, Da*****@cern.ch (Dan Pop) wrote:
In <30*************@uni-berlin.de> dawn <mi**@lian.com> writes:
I am now working on a C program under Unix.


And you're too stupid to realise that comp.unix.programmer is the right
place for your question.

You unbelieveably ignorant arsehole. He is writing a C program
therefore this is exactly the right place to ask his question.
Are you a yank ?

Nov 14 '05 #5
On Thu, 25 Nov 2004 21:20:55 +0000, in comp.lang.c ,
fa***************************@peace.com wrote:
On 24 Nov 2004 17:00:35 GMT, Da*****@cern.ch (Dan Pop) wrote:
In <30*************@uni-berlin.de> dawn <mi**@lian.com> writes:
I am now working on a C program under Unix.
And you're too stupid to realise that comp.unix.programmer is the right
place for your question.

You unbelieveably ignorant arsehole. He is writing a C program
therefore this is exactly the right place to ask his question.


Not if the question relates to unix features. C is not unix. Since between
you adn Dan you snipped the entire original posting, its not possible to
say now.
Are you a yank ?


Dan is swiss or german, and one of the serious experts round here, if
lacking in much social grace.

But don't let that stop you ranting mindlessly.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
Nov 14 '05 #6
fa***************************@peace.com wrote:
On 24 Nov 2004 17:00:35 GMT, Da*****@cern.ch (Dan Pop) wrote:
In <30*************@uni-berlin.de> dawn <mi**@lian.com> writes:
I am now working on a C program under Unix.


And you're too stupid to realise that comp.unix.programmer is the right
place for your question.

You unbelieveably ignorant arsehole.


And what are you just proving to be? Let's see...
He is writing a C program
therefore this is exactly the right place to ask his question.
No, he isn't right here. Would you do the absolute minimum of reading
a few posts in the group before jumping in you would know very well
that discussions about platform specific extensions to C is off-topic
here. So far about your claim about Dan's "ignorance". Looks a lot
more like it's the other way round. And Dan even went so far to
provide lots of useful information for the OP, which you didn't.
Are you a yank ?


Well, that kind of thing obviously shows that rather you are the
'asshole' here. Or a dimwit. Pick what you prefer. Case closed.
--
\ Jens Thoms Toerring ___ Je***********@physik.fu-berlin.de
\__________________________ http://www.toerring.de
Nov 14 '05 #7
Mark McIntyre <ma**********@spamcop.net> wrote:
On Thu, 25 Nov 2004 21:20:55 +0000, in comp.lang.c ,
fa***************************@peace.com wrote:
Are you a yank ?


Dan is swiss or german,


Rumanian, surely?

Richard
Nov 14 '05 #8
Richard Bos wrote:
Mark McIntyre <ma**********@spamcop.net> wrote:

On Thu, 25 Nov 2004 21:20:55 +0000, in comp.lang.c ,
fa***************************@peace.com wrote:

Are you a yank ?


Dan is swiss or german,


Rumanian, surely?


Awgh, are you guys regulars? Do I know you?
Apart from the uselessness of this information: Have a
look at threads with Dan sniping at Joona I Palaste... ;-)
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Nov 14 '05 #9
In <41****************@news.individual.net> rl*@hoekstra-uitgeverij.nl (Richard Bos) writes:
Mark McIntyre <ma**********@spamcop.net> wrote:
On Thu, 25 Nov 2004 21:20:55 +0000, in comp.lang.c ,
fa***************************@peace.com wrote:
>Are you a yank ?


Dan is swiss or german,


Rumanian, surely?


According to Mark's logic, I must be Swiss or German because I am known
to have a Swiss email address and a German email address. Now, where does
this Romanian nonsense come from? ;-)

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #10
Richard Bos wrote:
Mark McIntyre <ma**********@spamcop.net> wrote:

On Thu, 25 Nov 2004 21:20:55 +0000, in comp.lang.c ,
fa***************************@peace.com wrote:

Are you a yank ?


Dan is swiss or german,

Rumanian, surely?

Richard


Romanian.

Today's French and English texts refer to Romania while older German
seems to like Rumania. What's the difference?

How does Dan spell it?
--
Joe Wright mailto:jo********@comcast.net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Nov 14 '05 #11
In <S8********************@comcast.com> Joe Wright <jo********@comcast.net> writes:
Richard Bos wrote:

Rumanian, surely?

Richard
Romanian.

Today's French and English texts refer to Romania while older German
seems to like Rumania. What's the difference?


"Rumania" and "Roumania" are a obsolete English spellings. "Romania"
is the current official English spelling. The French use "Roumanie"
and the Germans "Rumaenien" ("Rumänien" for people using Latin-1
fonts). The international abbreviation is RO, BTW.
How does Dan spell it?


When using a Latin-1 or Latin-2 font and writing in my native language:
"Romānia".

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #12
In article <co**********@sunnews.cern.ch>, Dan Pop <Da*****@cern.ch> wrote:
"Rumania" and "Roumania" are a obsolete English spellings. "Romania"
is the current official English spelling.


I wasn't aware that we had official spellings in English.

Do you mean it's the one that the Romanian government wants us to use?

-- Richard
Nov 14 '05 #13

"Richard Tobin" <ri*****@cogsci.ed.ac.uk> wrote in message
news:co***********@pc-news.cogsci.ed.ac.uk...
I wasn't aware that we had official spellings in English.


We do. In fact, there have been entire books -- called "dictionaries" -- on
the subject.
Nov 14 '05 #14
In article <p0********************@news20.bellglobal.com>,
Craig Barkhouse <ca******@student.cs.uwaterloo.ca> wrote:
I wasn't aware that we had official spellings in English.
We do. In fact, there have been entire books -- called "dictionaries" -- on
the subject.


How strange. I was not aware that they had an "official" status at all.

-- Richard
Nov 14 '05 #15
On Fri, 26 Nov 2004 07:41:50 GMT, in comp.lang.c ,
rl*@hoekstra-uitgeverij.nl (Richard Bos) wrote:
Mark McIntyre <ma**********@spamcop.net> wrote:
On Thu, 25 Nov 2004 21:20:55 +0000, in comp.lang.c ,
fa***************************@peace.com wrote:
>Are you a yank ?


Dan is swiss or german,


Rumanian, surely?


same difference.

gd&rvf
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
Nov 14 '05 #16
Richard Tobin wrote:
In article <p0********************@news20.bellglobal.com>,
Craig Barkhouse <ca******@student.cs.uwaterloo.ca> wrote:

I wasn't aware that we had official spellings in English.


We do. In fact, there have been entire books -- called "dictionaries" -- on
the subject.

How strange. I was not aware that they had an "official" status at all.

-- Richard


It's the Queen's English isn't it? How 'official' do you want it?
But seriously, it doesn't matter how the British, the French, the
Russians or anybody else spells it. How is it spelled in Bucharest?

--
Joe Wright mailto:jo********@comcast.net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Nov 14 '05 #17
On Fri, 26 Nov 2004 21:21:10 -0500, in comp.lang.c , Joe Wright
<jo********@comcast.net> wrote:
Richard Tobin wrote:
In article <p0********************@news20.bellglobal.com>,
Craig Barkhouse <ca******@student.cs.uwaterloo.ca> wrote:
I wasn't aware that we had official spellings in English.

We do. In fact, there have been entire books -- called "dictionaries" -- on
the subject.


How strange. I was not aware that they had an "official" status at all.


It's the Queen's English isn't it? How 'official' do you want it?


Exactly. There's no "legal" spelling of most words, but there is an
official one - for english English, the OED's spelling is as official as it
gets, and its the one you;ll get taught in school. US English probably has
several different competing standards, as seems to be commonplace in other
walks of life there.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
Nov 14 '05 #18
Dan Pop <Da*****@cern.ch> scribbled the following:
In <S8********************@comcast.com> Joe Wright <jo********@comcast.net> writes:
How does Dan spell it?
When using a Latin-1 or Latin-2 font and writing in my native language:
"Romānia".


Interesting, how is that pronounced?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Normal is what everyone else is, and you're not."
- Dr. Tolian Soran
Nov 14 '05 #19
Joona I Palaste wrote:
Dan Pop <Da*****@cern.ch> scribbled the following:
In <S8********************@comcast.com> Joe Wright <jo********@comcast.net> writes:
How does Dan spell it?


When using a Latin-1 or Latin-2 font and writing in my native language:
"Romānia".

Interesting, how is that pronounced?


Like its spelled. The circumflex over the ā flattens the a sound
some. We (English speaking) might be otherwise say ro.MAIN.ya rather
than the desired ro.MAHN.ya. That's just a quess of course.

Dan?
--
Joe Wright mailto:jo********@comcast.net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Nov 14 '05 #20
On Sat, 27 Nov 2004 19:26:20 -0500, in comp.lang.c , Joe Wright
<jo********@comcast.net> wrote:

Like its spelled. The circumflex over the ā flattens the a sound
some. We (English speaking) might be otherwise say ro.MAIN.ya rather
than the desired ro.MAHN.ya. That's just a quess of course.


And in England its commonly pronounced "roo-may-knee-ah".

Of course, its quite irrelevant. English pronounciations of most European
towns bear no relation to how the locals say it. Consider Munich and
Moscow.

Actually this is one of my pet hates. Just because the locals now call it
Beijing or Mumbai, is that a reason to stop calling it Peking or Bombay in
English? We don't expect the French to stop using Londres.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
Nov 14 '05 #21
In article <2v********************************@4ax.com>,
Mark McIntyre <ma**********@spamcop.net> wrote:
Exactly. There's no "legal" spelling of most words, but there is an
official one - for english English, the OED's spelling is as official as it
gets, and its the one you;ll get taught in school.


I think you draw the line in the wrong place here. There isn't a
legal spelling, and there isn't an official one. There's just a
generally accepted one. The editors of the OED - like those of most
English dictionaries - aim to be "descriptive rather than
prescriptive", and if the OED is authoritative it is because of its
scope and and scholarship, not because of any "official" status.

In any case, I decline to surrender my right to spell as I choose to
any bureaucrat, and certainly not the government of a foreign country.
Just as the French are welcome to refer to the city I live in as
Edimbourg, rather than Embra like the natives.

-- Richard
Nov 14 '05 #22
On 28 Nov 2004 02:18:45 GMT, in comp.lang.c , ri*****@cogsci.ed.ac.uk
(Richard Tobin) wrote:
I think you draw the line in the wrong place here. There isn't a
legal spelling, and there isn't an official one. There's just a
generally accepted one.
Sure, but its generally accepted in a highly prescriptive sense. Anyone
over the age of 10 spelling horse without the terminal e is likely to be
laughed at, have their CV discarded out of hand, etc.
In any case, I decline to surrender my right to spell as I choose to
any bureaucrat, and certainly not the government of a foreign country.
Just as the French are welcome to refer to the city I live in as
Edimbourg, rather than Embra like the natives.


Hmm, I thought they pronounced it "aydinborow" on account of them all being
too posh for their nickers....

Mark (I'm from Inverness actually) McI

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
Nov 14 '05 #23
Joe Wright <jo********@comcast.net> scribbled the following:
Joona I Palaste wrote:
Dan Pop <Da*****@cern.ch> scribbled the following:
In <S8********************@comcast.com> Joe Wright <jo********@comcast.net> writes:
How does Dan spell it?
When using a Latin-1 or Latin-2 font and writing in my native language:
"Romānia".


Interesting, how is that pronounced?

Like its spelled. The circumflex over the ā flattens the a sound
some. We (English speaking) might be otherwise say ro.MAIN.ya rather
than the desired ro.MAHN.ya. That's just a quess of course. Dan?


I'll have to wait for Dan's answer. I'm interested in how Romanians
pronounce it, not in how anyone else pronounces it.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"'So called' means: 'There is a long explanation for this, but I have no
time to explain it here.'"
- JIPsoft
Nov 14 '05 #24
On Sun, 28 Nov 2004 01:34:25 +0000, Mark McIntyre
<ma**********@spamcop.net> wrote:
Actually this is one of my pet hates. Just because the locals now call it
Beijing or Mumbai, is that a reason to stop calling it Peking or Bombay in
English? We don't expect the French to stop using Londres.


I use whichever I remember. I will, for instance, use Muenchen instead
of Munich because I lived near there for a time, but I'll say Pa-riss
instead of Par-ee since I haven't been there and don't know anyone who
pronounces it in the French way.

I think it's a lot to do with g11n of reporting. Half a century ago we
didn't have much direct communication with other countries, so it didn't
matter that we were saying "Bombay" and the locals were saying "Mumbai"
because the vast majority of both populations had no idea that the other
called it anything different. These days we get TV and radio reports
from the area and the reporters tend to use the local names (especially
in interviews with locals).

(No one with any sense expects the French to change from their own
idiosyncratic uses of language anyway. Most other countries are content
to call our capital 'London'. Did anyone apart from the French ever
translate computer language keywords into the local version? I remember
"French Algol" -- 'commence' and 'quand' instead of 'begin' and 'if'...)

Chris C
Nov 14 '05 #25
Mark McIntyre <ma**********@spamcop.net> wrote:
On Fri, 26 Nov 2004 21:21:10 -0500, in comp.lang.c , Joe Wright
<jo********@comcast.net> wrote:
It's the Queen's English isn't it? How 'official' do you want it?


Exactly. There's no "legal" spelling of most words, but there is an
official one - for english English, the OED's spelling is as official as it
gets, and its the one you;ll get taught in school.


Except, of course, that the OED advocates (and quotes a largely bogus
argument for) the use of words ending in "-ize" where most other
Anglophones except those following that fool Webster's lead use "-ise".
Otherwise, yes.

Richard
Nov 14 '05 #26
On Mon, 29 Nov 2004 15:08:42 GMT, Richard Bos
<rl*@hoekstra-uitgeverij.nl> wrote:
Except, of course, that the OED advocates (and quotes a largely bogus
argument for) the use of words ending in "-ize" where most other
Anglophones except those following that fool Webster's lead use "-ise".


The OED also promotes the ridiculous 'connexion' over 'connection' (by
a very dubious analogy with 'crucifixion').

Interestingly, I use 'ize' in 'stringize' (possibly because it's an
invented word first encountered in the American C specification) but
'ise' almost everywhere else.

Chris C
Nov 14 '05 #27
On Mon, 29 Nov 2004 19:17:00 +0000, Chris Croughton said to the parser:
The OED also promotes the ridiculous 'connexion' over 'connection' (by a
very dubious analogy with 'crucifixion').


The only reason crucifixion is still used is because crucifiction looks
really bad to believers.
Michael
Nov 14 '05 #28
"Chris Croughton" <ch***@keristor.net> wrote in message
news:sl******************@ccserver.keris.net...
The OED also promotes the ridiculous 'connexion' over 'connection' (by
a very dubious analogy with 'crucifixion').


Unless he or she is confused with French, where the correct spelling is
connexion.
If you meet some Parisians, ask them about the difference between miction and
mixtion ;-)

--
Chqrlie.
Nov 14 '05 #29
On Mon, 29 Nov 2004 15:06:55 -0600, Michael Coyne
<co*****@mtsDOT.net> wrote:
On Mon, 29 Nov 2004 19:17:00 +0000, Chris Croughton said to the parser:
The OED also promotes the ridiculous 'connexion' over 'connection' (by a
very dubious analogy with 'crucifixion').


The only reason crucifixion is still used is because crucifiction looks
really bad to believers.


<g> It does rather. Crucifix is a valid word, however, so crucifixion
("the act of nailing to a crucifix") makes some sense. "Connex" is not
a valid word (except to UK train companies), and I haven't heard anyone
actually say "connexion", even those who spell it that way seem to
pronounce it as "connec-shun".

(I'll remember 'crucifiction' for certain flamewars...)

Chris C
Nov 14 '05 #30
"Chris Croughton" <ch***@keristor.net> wrote in message
news:sl******************@ccserver.keris.net...
On Mon, 29 Nov 2004 15:06:55 -0600, Michael Coyne
<co*****@mtsDOT.net> wrote:
On Mon, 29 Nov 2004 19:17:00 +0000, Chris Croughton said to the parser:
The OED also promotes the ridiculous 'connexion' over 'connection' (by a
very dubious analogy with 'crucifixion').
The only reason crucifixion is still used is because crucifiction looks
really bad to believers.


<g> It does rather. Crucifix is a valid word, however, so crucifixion
("the act of nailing to a crucifix") makes some sense.


Crucifixion is the act of attaching to a cross, not necessarily with nails. From
XVI century French, itself derived from latin : crucifixio / cruci figere.
Crucifix is a religious artefact. comes from French as well (XII century), from
Latin crucifixus.
"Connex" is not a valid word (except to UK train companies),
In English maybe not, however it is a French word (connexe) used in higher
mathematics.
and I haven't heard anyone actually say "connexion", even those who spell it that way seem to pronounce it as "connec-shun".
Again, ever heard of the French connection ? They spell it connexion.
(I'll remember 'crucifiction' for certain flamewars...)


Right: whether it is fiction or not is a matter of belief.

--
Chqrlie.

Nov 14 '05 #31
on 11/26/2004 5:41 AM Je***********@physik.fu-berlin.de Wrote:
fa***************************@peace.com wrote:
On 24 Nov 2004 17:00:35 GMT, Da*****@cern.ch (Dan Pop) wrote:


In <30*************@uni-berlin.de> dawn <mi**@lian.com> writes:
I am now working on a C program under Unix.

And you're too stupid to realise that comp.unix.programmer is the right
place for your question.


You unbelieveably ignorant arsehole.

And what are you just proving to be? Let's see...

He is writing a C program
therefore this is exactly the right place to ask his question.

No, he isn't right here. Would you do the absolute minimum of reading
a few posts in the group before jumping in you would know very well
that discussions about platform specific extensions to C is off-topic
here. So far about your claim about Dan's "ignorance". Looks a lot
more like it's the other way round. And Dan even went so far to
provide lots of useful information for the OP, which you didn't.

Are you a yank ?

Well, that kind of thing obviously shows that rather you are the
'asshole' here. Or a dimwit. Pick what you prefer. Case closed.

It started out with Dan giving a 'proper Unix is not C answer'.
But the subsequent thread(s) is anything but C.
Just because its between c.l.c regulars, would it be on-topic here?
Just some food for thought.

--
Not hoping to start a flame war ;-)
Nov 14 '05 #32
on 11/30/2004 6:34 AM Charlie Gordon Wrote:
"Chris Croughton" <ch***@keristor.net> wrote in message
news:sl******************@ccserver.keris.net...

The OED also promotes the ridiculous 'connexion' over 'connection' (by
a very dubious analogy with 'crucifixion').

Unless he or she is confused with French, where the correct spelling is
connexion.
If you meet some Parisians, ask them about the difference between miction and
mixtion ;-)

--
Chqrlie.

It started out with Dan giving a 'proper Unix is not C answer'.
But the subsequent thread(s) is anything but C.
Just because its between c.l.c regulars, would it be on-topic here?
Just some food for thought.

--
Not hoping to start a flame war ;-)
Nov 14 '05 #33
In <co***********@pc-news.cogsci.ed.ac.uk> ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
In article <co**********@sunnews.cern.ch>, Dan Pop <Da*****@cern.ch> wrote:
"Rumania" and "Roumania" are a obsolete English spellings. "Romania"
is the current official English spelling.
I wasn't aware that we had official spellings in English.


You have, when it comes to country names, despite your ignorance.

English country names and code elements

This list states the country names (official short names in English)
========^^^^^^^^^^^^^^^^^^^^^^^
in alphabetical order as given in ISO 3166-1 and the corresponding
ISO 3166-1-alpha-2 code elements.
Do you mean it's the one that the Romanian government wants us to use?


I mean it's the one standardised by ISO 3166
http://www.iso.org/iso/en/prods-serv.../list-en1.html
and the one used in any official context. Is that official enough for
you?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #34
In article <co***********@sunnews.cern.ch>, Dan Pop <Da*****@cern.ch> wrote:
Is that official enough for you?


Not really. ISO standards may be "official" for some purposes, but
any other organization could have its own equally offical spellings.
For example, the BBC and the Foreign Office very likely have their own
official spellings (and pronunciations). So it might make sense to
refer to the "official ISO English spelling" but not "the official
English spelling".

There is no organization with the authority to determine the English
language.

-- Richard
Nov 14 '05 #35
In <co**********@oravannahka.helsinki.fi> Joona I Palaste <pa*****@cc.helsinki.fi> writes:
Dan Pop <Da*****@cern.ch> scribbled the following:
In <S8********************@comcast.com> Joe Wright <jo********@comcast.net> writes:
How does Dan spell it?

When using a Latin-1 or Latin-2 font and writing in my native language:
"Romānia".


Interesting, how is that pronounced?


As the dotless 'i' used by the Turkish, or as the 'bl' letter of the
Cyrillic alphabet. Sorry, it has no English phonetical equivalent and
it cannot be even easily described.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #36
In <UX*************@news.oracle.com> Shanmuhanathan T <sh******@mailinator.com> writes:
It started out with Dan giving a 'proper Unix is not C answer'.
But the subsequent thread(s) is anything but C.
Just because its between c.l.c regulars, would it be on-topic here?
Just some food for thought.


No food for thought: because the subject line is so obviously off topic,
there was no point in adding an [OT] tag when the discussion deviated.

Whoever read a thread with this subject line hoping to find some topical
contents got exactly what he deserved.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #37
In <co***********@pc-news.cogsci.ed.ac.uk> ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
In article <co***********@sunnews.cern.ch>, Dan Pop <Da*****@cern.ch> wrote:
Is that official enough for you?
Not really. ISO standards may be "official" for some purposes, but
any other organization could have its own equally offical spellings.


Many things could happen in theory, but in practice few organisations
are foolish enough to ignore ISO standards addressing the same issue,
for *no* redeeming benefits.
For example, the BBC and the Foreign Office very likely have their own
official spellings (and pronunciations).
Please post some *concrete* examples where their official spellings differ
from the ISO standard.
So it might make sense to
refer to the "official ISO English spelling" but not "the official
English spelling".
I don't think so, unless you provide some concrete examples. The very
purpose of the ISO standard is to provide guidance to other organisations
dealing with country names, in order to avoid confusion and
inconsistencies. I have never seen any alternate spelling of "Romania"
(and there are a couple of common ones in English) used in *any* official
context for the last 25 years or so.
There is no organization with the authority to determine the English
language.


Then, on what basis are considered spellings like "recieve", "seperate"
or "tomarrow" incorrect? Who's maintaining the list of irregular verbs
and who's giving that organisation the authority to do so? Ditto for the
proper syntax of the English language.

But, anyway, the English language at large is not the issue here.
We're discussing a very specific issue.

In many other countries, the organisation with such an authority is
the National Academy of Science and Letters. Having a reference
dictionary helps a lot when dealing with such issues.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #38
In article <co**********@sunnews.cern.ch>, Dan Pop <Da*****@cern.ch> wrote:
For example, the BBC and the Foreign Office very likely have their own
official spellings (and pronunciations).
Please post some *concrete* examples where their official spellings differ
from the ISO standard.


Nothing I have said depends on their standards being different from
ISO's. The point is that ISO is just one of many organizations that
standardize spellings for various purposes. Any organization can
proclaim something "official" within its own remit; the fact that ISO
and the BBC agree (if true) merely suggests that they have made the
right decision, not that it is "official" without qualification.
I don't think so, unless you provide some concrete examples. The very
purpose of the ISO standard is to provide guidance to other organisations
dealing with country names, in order to avoid confusion and
inconsistencies.
Exactly so. They provide standards for purposes where consistency is
essential, such as interoperability of computer software. The English
language on the other hand is full of ambiguities and inconsistencies,
and ISO cannot standardize it, nor does it need standardizing.
There is no organization with the authority to determine the English
language.


Then, on what basis are considered spellings like "recieve", "seperate"
or "tomarrow" incorrect?


Usage. Correct English is determined by the usage of English
speakers. As a native English speaker, I admit no other authority on
the matter.
Who's maintaining the list of irregular verbs
and who's giving that organisation the authority to do so?
No-one of course. But I don't understand what you are intending me to
conclude from that.
But, anyway, the English language at large is not the issue here.
We're discussing a very specific issue.
Well, perhaps you better define it. If you restricted it to "country
names in ISO conformant systems" then obviously you would be right.
But you referred to "the official English spellings" which is a rather
wider claim.
In many other countries, the organisation with such an authority is
the National Academy of Science and Letters.


And one of the reasons to be proud of being an English speaker is that
we have no such authorities. Of course, a government that wants to
introduce identity cards might well decide to try and standardize
English too.

-- Richard
Nov 14 '05 #39
In <co***********@pc-news.cogsci.ed.ac.uk> ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
In article <co**********@sunnews.cern.ch>, Dan Pop <Da*****@cern.ch> wrote:
For example, the BBC and the Foreign Office very likely have their own
official spellings (and pronunciations).
Please post some *concrete* examples where their official spellings differ
from the ISO standard.


Nothing I have said depends on their standards being different from
ISO's. The point is that ISO is just one of many organizations that
standardize spellings for various purposes. Any organization can
proclaim something "official" within its own remit; the fact that ISO
and the BBC agree (if true) merely suggests that they have made the
right decision, not that it is "official" without qualification.


If BSI adopted the respective ISO standard, it is "official" without
qualification. What works for the ISO standard defining the C programming
language works for any other ISO standard.
I don't think so, unless you provide some concrete examples. The very
purpose of the ISO standard is to provide guidance to other organisations
dealing with country names, in order to avoid confusion and
inconsistencies.


Exactly so. They provide standards for purposes where consistency is
essential, such as interoperability of computer software. The English
language on the other hand is full of ambiguities and inconsistencies,
and ISO cannot standardize it, nor does it need standardizing.


You're invoking a read herring: I've made NO claims about the English
language at large, have I?
There is no organization with the authority to determine the English
language.


Then, on what basis are considered spellings like "recieve", "seperate"
or "tomarrow" incorrect?


Usage. Correct English is determined by the usage of English
speakers. As a native English speaker, I admit no other authority on
the matter.


There are plenty of native English speakers using the incorrect spellings.
How about *their* usage? How can you convince them that they are wrong,
as long as they are as native English speakers as yourself?
Who's maintaining the list of irregular verbs
and who's giving that organisation the authority to do so?


No-one of course. But I don't understand what you are intending me to
conclude from that.


That, if one native English speaker uses the incorrect form of an
irregular verb, you have no basis to correct him: his usage is as good as
yours, in the absence of a higher regulatory authority.
But, anyway, the English language at large is not the issue here.
We're discussing a very specific issue.


Well, perhaps you better define it. If you restricted it to "country
names in ISO conformant systems" then obviously you would be right.
But you referred to "the official English spellings" which is a rather
wider claim.


On the contrary, I've made an extremely specific claim:

"Romania" is the current official English spelling.

If you still don't get it, my claim is that there is ONE English word
having an official spelling (out of the three spellings in use).
If you can refute it, please do. If not, what is the relevance of
your point to my claim?
In many other countries, the organisation with such an authority is
the National Academy of Science and Letters.


And one of the reasons to be proud of being an English speaker is that
we have no such authorities.


Without such authorities there is no proper definition of the English
language, which basically means that anyone is free to bastardise it in
any way he sees fit without being technically wrong.
Of course, a government that wants to
introduce identity cards might well decide to try and standardize
English too.


Just because you're living on an island doesn't mean that it's a smart
idea to ignore the progress made by the rest of the world. If practically
all civilised countries adopted id documents, there must be a good
reason for that.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #40

"Dan Pop" <Da*****@cern.ch> wrote in message
news:co**********@sunnews.cern.ch...
In <co***********@pc-news.cogsci.ed.ac.uk> ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:

<snip>
Without such authorities there is no proper definition of the English
language, which basically means that anyone is free to bastardise it in
any way he sees fit without being technically wrong.


Which is pretty much how the English language (and any other) came to be.
Long before there were any officials to call it technically wrong.
Nov 14 '05 #41
Ok, last try, then I give up.

In article <co**********@sunnews.cern.ch>, Dan Pop <Da*****@cern.ch> wrote:
If BSI adopted the respective ISO standard, it is "official" without
qualification.
Official for those things that the BSI standard applies to. Not
everything is standardised.
You're invoking a read herring: I've made NO claims about the English
language at large, have I?
See below.
There are plenty of native English speakers using the incorrect spellings.
How about *their* usage? How can you convince them that they are wrong,
as long as they are as native English speakers as yourself?
Perhaps I could persuade them that they had misremembered it, by
showing them numerous examples of the usual spelling. Or perhaps
I wouldn't be able to convince them.
That, if one native English speaker uses the incorrect form of an
irregular verb, you have no basis to correct him: his usage is as good as
yours, in the absence of a higher regulatory authority.
You might as well say that there is no basis to say that someone with
measles is ill, in the absence of a higher authority to define
wellness. What is English can be determined by observation of English
speakers. (Not, of course, by observation of any one English
speaker.)
Well, perhaps you better define it. If you restricted it to "country
names in ISO conformant systems" then obviously you would be right.
But you referred to "the official English spellings" which is a rather
wider claim.


On the contrary, I've made an extremely specific claim:

"Romania" is the current official English spelling.


The widening I referred to was from "English in ISO conformant
systems" to "English", not from one word to the whole language.
Without such authorities there is no proper definition of the English
language
Bingo! There is indeed no proper definition of English, just what we
observe, and this is only a problem worth solving for certain specific
areas, such as interoperability of coputer programs.
which basically means that anyone is free to bastardise it in
any way he sees fit without being technically wrong.


Good heavens. How could we possibly stand for that?

-- Richard
Nov 14 '05 #42

In article <co***********@pc-news.cogsci.ed.ac.uk>, ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
In article <co**********@sunnews.cern.ch>, Dan Pop <Da*****@cern.ch> wrote:
Then, on what basis are considered spellings like "recieve", "seperate"
or "tomarrow" incorrect?
Usage. Correct English is determined by the usage of English
speakers.


Or more precisely, by the dominant usage in the language-use context.
Usage varies, of course. Some forms predominate, due to various
factors such as popularity, use by the politically powerful classes,
presence in various media, and so forth. But they predominate only
in specific contexts; in others, regional or other variations may be
more influential in determining what a given speaker or author and
audience will consider "correct".

Of course, many usages get codified, and many users like to point to
such codices as authorities, but they're no more authoritative than
users grant. They have no special status.
As a native English speaker, I admit no other authority on the matter.


A reasonable position, and the right one in my view, though of course
any English speaker can choose to defer to some language "authority".
What they can't do is demonstrate that it applies, or should apply,
to all English speakers.
Who's maintaining the list of irregular verbs
and who's giving that organisation the authority to do so?


No-one of course.


Well, there are certainly people who maintain such lists, such as
the authors of English grammar and usage primers. Whatever authority
they have comes solely from the decisions made to publish and purchase
those books.

That said, I imagine I'd consider ISO 3166 a standard for English
spelling of country names, though I'd want to read it first before I
committed to that position. And clearly it is "official" in a useful
sense. However, I wouldn't call it an "official English standard";
I'd call it an "official standard for spellings (of country names) in
English". That may seem like a fine distinction, but I think it's
significant, as it implies that its office pertains to certain
spellings rather than to English per se.

--
Michael Wojcik mi************@microfocus.com

I would never understand our engineer. But is there anything in this world
that *isn't* made out of words? -- Tawada Yoko (trans. Margaret Mitsutani)
Nov 14 '05 #43
In <41***********************@dreader13.news.xs4all.n l> "dandelion" <da*******@meadow.net> writes:

"Dan Pop" <Da*****@cern.ch> wrote in message
news:co**********@sunnews.cern.ch...
In <co***********@pc-news.cogsci.ed.ac.uk> ri*****@cogsci.ed.ac.uk

(Richard Tobin) writes:

<snip>
Without such authorities there is no proper definition of the English
language, which basically means that anyone is free to bastardise it in
any way he sees fit without being technically wrong.


Which is pretty much how the English language (and any other) came to be.
Long before there were any officials to call it technically wrong.


This is also true for everything that eventually got standardised.
Anything wrong with having standards?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #44
In <co**********@pc-news.cogsci.ed.ac.uk> ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
Ok, last try, then I give up.

In article <co**********@sunnews.cern.ch>, Dan Pop <Da*****@cern.ch> wrote:
If BSI adopted the respective ISO standard, it is "official" without
qualification.
Official for those things that the BSI standard applies to. Not
everything is standardised.


Country names are standardised, so the official English spelling is
"Romania", which is the starting point of this discussion.
There are plenty of native English speakers using the incorrect spellings.
How about *their* usage? How can you convince them that they are wrong,
as long as they are as native English speakers as yourself?


Perhaps I could persuade them that they had misremembered it, by
showing them numerous examples of the usual spelling. Or perhaps
I wouldn't be able to convince them.


That's why a language authority is a good thing. Languages having such
an authority don't have three different spellings for "Romania" :-)
That, if one native English speaker uses the incorrect form of an
irregular verb, you have no basis to correct him: his usage is as good as
yours, in the absence of a higher regulatory authority.


You might as well say that there is no basis to say that someone with
measles is ill, in the absence of a higher authority to define
wellness.


As long as there is a higher authority to define measles as an illness,
you don't need anything more.
What is English can be determined by observation of English
speakers. (Not, of course, by observation of any one English
speaker.)
The result of such an observation is a complete mess. If you don't
believe me, go and rent a copy of "My Fair Lady" :-)

Non-authoritative as they are, dictionaries are still the only reliable
source of information about what is English. Which is why it is downright
stupid not to have an authoritative dictionary of the English language.
Well, perhaps you better define it. If you restricted it to "country
names in ISO conformant systems" then obviously you would be right.
But you referred to "the official English spellings" which is a rather
wider claim.


On the contrary, I've made an extremely specific claim:

"Romania" is the current official English spelling.


The widening I referred to was from "English in ISO conformant
systems" to "English", not from one word to the whole language.


"English in ISO conformant systems" doesn't make much sense to me.
You have English in an official context and colloquial English.
In the former, there is only one spelling for Romania, in the latter there
are three. Feel free to prove me wrong.
Without such authorities there is no proper definition of the English
language


Bingo! There is indeed no proper definition of English, just what we
observe,


Then why do people buy and use dictionaries? Why do they bother inquiring
about the spelling of one word or another?
and this is only a problem worth solving for certain specific
areas, such as interoperability of coputer programs.


It is a problem anywhere precise communication is important.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #45

In article <co**********@sunnews.cern.ch>, Da*****@cern.ch (Dan Pop) writes:

Without such authorities there is no proper definition of the English
language, which basically means that anyone is free to bastardise it in
any way he sees fit without being technically wrong.


And indeed that is precisely the situation, and has been for the
entire time the English language has existed. So what?

--
Michael Wojcik mi************@microfocus.com
Nov 14 '05 #46
In <cp*********@news3.newsguy.com> mw*****@newsguy.com (Michael Wojcik) writes:

In article <co**********@sunnews.cern.ch>, Da*****@cern.ch (Dan Pop) writes:

Without such authorities there is no proper definition of the English
language, which basically means that anyone is free to bastardise it in
any way he sees fit without being technically wrong.


And indeed that is precisely the situation, and has been for the
entire time the English language has existed. So what?


So the poor usage of (especially written) English among its native
speakers. If their usage is as good as anyone else's, in the absence of
any authoritative reference, why should they bother to improve it?

So the confusion among the people trying to learn English as a foreign
language and being exposed to multiple spellings of the same word, some
accepted by the dictionaries, some not, but none of them incorrect in the
absence of an authoritative reference.

So the proliferation of multiple spellings for the same word, which
is hardly a good thing. So the creation of unneeded words, like
"irregardless".

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Currently looking for a job in the European Union
Nov 14 '05 #47

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

270 posts views Thread by Jatinder | last post: by
5 posts views Thread by jrefactors | last post: by
48 posts views Thread by Daniel Rudy | last post: by
6 posts views Thread by Joseph | last post: by
7 posts views Thread by programming | last post: by
2 posts views Thread by frikk | last post: by
21 posts views Thread by Tom Gur | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.