need tutorial on low level file i/p o/p

B

broli

i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.
 
I

Ian Collins

broli said:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.

Covers what? Ah, file IO. Please put your question in the body of your
post.

What don't you understand? fread and fwrite are pretty straightforward
functions.
 
B

broli

Covers what? Ah, file IO. Please put your question in the body of your
post.

What don't you understand? fread and fwrite are pretty straightforward
functions.


I think open and read are the commands used for low level file
operations.
 
I

Ian Collins

broli said:
Please don't quote signatures.

I think open and read are the commands used for low level file
operations.

You are confusing POSIX I/O functions with those from standard C. C
offers the 'f' family of functions which operate on FILE* streams.
POSIX functions use file descriptors.

For more information on those, consult you man pages then ask on
comp.unix.programmer.
 
S

santosh

K

Kenny McCormack

You are confusing POSIX I/O functions with those from standard C. C
offers the 'f' family of functions which operate on FILE* streams.
POSIX functions use file descriptors.

I don't think "confused" is the word.

Asking about something which is:

Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

Yes. True.
 
C

CBFalconer

broli said:
I think open and read are the commands used for low level file
operations.

No they are not. They are not in the standard C library. Some
systems may have them at a different level. Others may not.
 
R

Richard

Ian Collins said:
Covers what? Ah, file IO. Please put your question in the body of your
post.

What don't you understand? fread and fwrite are pretty straightforward
functions.

What don't you understand about low level file access? Are you trying
for Mr Pedantic CLC 2008 this year?

To the op, here is some related stuff:

http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_12.html

A good start for finding your platform specifics I dare say.

Good luck!
 
S

santosh

broli said:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.

K&R2 do cover some of these functions in chapter eight. Also see the
links I gave you elsethread.
 
O

osmium

broli said:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.

One possible hotbed of contradictions is to compare this newsgroup
commentary with K&R. K&R covers *all* the functions and does not give any
editorial content on which ones to use, which should be favored and so on.
After several years of experience with careless (or whatever) coding, some
of the functions are considered by the mavens as dangerous and unfit to
use. A little time spent following some of the threads on this subject on
this newsgroup exposes the pitfalls involved with some of the verboten
functions. Think of a monkey typing aimlessly for hours in response to a
simple, single request for "Age ?" to see a lot of these problems. Pretend
that after 50 years or so a human intervenes and presses the Enter key.
 
J

John Bode

i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.

Do you have a specific question in mind? File I/O covers a lot of
ground.
 
D

Default User

broli said:
i looked up a few on the internet but it seems there is way too much
contradictions. It doesn't seem like K & R 2 covers it either.


Incorrect. Look at chapter 8 of K&R2, UNIX system interface,
specifically:

8.2 Low Level I/O - Read and Write





Brian
 
C

CBFalconer

Default said:
Incorrect. Look at chapter 8 of K&R2, UNIX system interface,
specifically:

8.2 Low Level I/O - Read and Write

That is not part of the language. It is an indication of the
implementation. The chapter is so marked.
 
D

Default User

CBFalconer said:
That is not part of the language. It is an indication of the
implementation. The chapter is so marked.

So? The statement was, "It doesn't seem like K & R 2 covers it either."




Brian
 

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,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top