Could I open a file from another machine on the network?

L

Lew Pitcher

Derk Gwen wrote:
[snip]
What is outside the C standard is how the string in the fopen is used to
identify the data source, and what steps are necessary to make the source
available. There's no particular reason why a standard C library could not
(or could) accept something like "ftp://saturn/development/quark.tcl".

<supplementary>
FWIW, the IBM C-Set compiler accepts filename strings in the form of
"A.B.C.D" for access to the file named A.B.C.D
and
"DD:DDNAME" for access to the JCL DD named DDNAME, which will contain an
indirection to the /real/ name of the file (//DDNAME DD DSN=A.B.C.D )

The C standard doesn't define /how/ the filesystems are to interpret the name
given to fopen(), and a filename that's legal on one system may be completely
illegal on another.
</supplementary>

--
Lew Pitcher

Master Codewright and JOAT-in-training
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
 
J

J. J. Farrell

Mark A. Odell said:
No, they do not use *ISO C*, the topic of this newsgroup, to do it! They
must use non-standard, off-topic, not part of C, extensions!

No reason why they should need to use extensions as such. They would
need to depend on implementation-defined functionality.
Yes, there is. The fact that ISO C does not support ftp "opens".

It neither supports them nor doesn't support them, just the same as
for files on the local machine.

You can write a program to access remote files in Standard C as Derk
has shown. What you can't do in Standard C is know or control whether
or not the file is remote. You have to rely on implementation-defined
behaviour of the Standard C library, which may or may not implement
that functionality and may do so in different ways on different
environments.

You cannot write a 'strictly conforming program' in Standard C to
access a file on another machine. You can write a 'conforming
program' in Standard C without any extensions to access a file on
another machine; it would be non-portable and would require that the
implementation of the Standard C library provided the functionality.
 
M

Mark McIntyre

To my knowledge file names of the classic 8+3 form can be used on
most systems.

that assumption might well bite you on the *ss on either VMS or MVS.
Or MacOs. :)
 
A

Alexander Bartolich

begin followup to Mark McIntyre:
On 24 Dec 2003 15:06:41 GMT, in comp.lang.c , Alexander Bartolich
<[email protected]> wrote:

Did you ever wonder why "attribution line" is singular?
that assumption might well bite you on the *ss on either VMS or MVS.
Or MacOs. :)

Is there any special reason why you did not see my example of VMS vs.
UNIX, directly following the two lines you quoted from my posting?

Anyway, a file name like "hello.txt" does work on MacOS.
 
D

Dik T. Winter

> On 24 Dec 2003 15:06:41 GMT, in comp.lang.c , Alexander Bartolich

>
> that assumption might well bite you on the *ss on either VMS or MVS.
> Or MacOs. :)

Urm. MacOs allows 8+3 filenames. Unless one of the characters is a
colon. In Classic MacOs filenames are 31 characters, and you can
chose what you want except the colon.

BTW, in Unix filenames are a number of characters, and you can chose
what you want except the slash. The number of characters allowed
varies with the Unix version you use. (From 14 in Unix V5 to 1024
in some later versions.)

Moreover, the "extension" has *no* inherent meaning in either MacOs
or Unix. It is only some programs that require a specific "extension".
 
M

Mark McIntyre

On 25 Dec 2003 00:29:03 GMT, in comp.lang.c , Alexander Bartolich

(I wrote)
Is there any special reason why you did not see my example of VMS vs.
UNIX, directly following the two lines you quoted from my posting?

Its more that I ignored it as it was incorrect. Plus lets remember I'm
agreeing with you.
Anyway, a file name like "hello.txt" does work on MacOS.

For some definition of "work". Its also true that "hello.txt;45" works
on MacOs, Unix and VMS, but it has rather different effects on the
three.
 
M

Mark McIntyre

Urm. MacOs allows 8+3 filenames. (snip)
Moreover, the "extension" has *no* inherent meaning in either MacOs
or Unix. It is only some programs that require a specific "extension".

thats my point.
 
M

Mark McIntyre


most excellent that you found a dictionary definition. I was however
commenting on the fact that I've never heard anyone call it a singilar
attribution line before, and that you persist in posting bad english,
despite having enough grasp of the language to write the below.
In my wildest dreams I cannot imagine coming on par with
your apparent mastership on this line of thinking, Sir.

But given the neighborhood I consider it a noble choice.
Surrounded by balls, in direct opposition to an asshole.

Thats a big swinging d*ck, which you certainly aint.
 

Ask a Question

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

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

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top