Sponsored Content
Full Discussion: FILE structure - stdio.h
Top Forums Programming FILE structure - stdio.h Post 302481713 by fpmurphy on Sunday 19th of December 2010 11:02:08 AM
Old 12-19-2010
Well, without seeing your code, how can we possibly advise you as to what is wrong except in general terms.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying a Directory Structure to a new structure

Hi all Is it possible to copy a structure of a directory only. e.g. I have a file with the following entries that is a result of a find :- /dir1/dir2/file.dbf /dir1/dir2/dir3/file1.dbf /dir1/file.dbf I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
Discussion started by: jhansrod
8 Replies

2. Programming

Search attributes in one structure using the values from another structure

Hello Groups I am trying to find out ways of comparing a value from a 'c' structure to a value in another 'C' structure. the 'C' structure can be a List or liked list as it contains lot many records. if we loop it in both the structures it is going to consume time. I am looking for a simple... (3 Replies)
Discussion started by: dhanamurthy
3 Replies

3. Programming

compare XML/flat file with UNIX file system structure

Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I... (6 Replies)
Discussion started by: shafi2all
6 Replies

4. Programming

Atomic Read and Write with stdio

hi guys. can we use fread and fwrite with pipes to write data more than PIPE_BUF atomically since they lock FILE object until I/O operation finish? (1 Reply)
Discussion started by: majid.merkava
1 Replies

5. Programming

stdio.h vs unistd.h I/O

Hi guys. To work with physical files, sockets, pipes, ... which library is good? stdio or unistd stdio.h functions perform buffering and rationally should be better than unistd.h routines. but i am wondering why all UNIX programming books use unistd.h routines for almost all types of I/O... (7 Replies)
Discussion started by: majid.merkava
7 Replies

6. Red Hat

Copy certain file types recursively while maintaining file structure on destination?

Hi guys, I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash. I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also... (1 Reply)
Discussion started by: rockf1bull
1 Replies

7. Programming

stdio.h not found on Solaris 11

Hi friends, I hope u r doing well. I have just installed Solaris 11, and it seems that solaris 11 doesn't come with all the packages, one has to do everything manually. I download gcc from sunfreeware.com and installed it. After setting up the path variable, I tried to compile the hello world... (4 Replies)
Discussion started by: gabam
4 Replies

8. Solaris

fatal error: stdio.h: No such file or directory

Trying to compile a C program recievin this hello.c:1:19: fatal error: stdio.h: No such file or directory gcc is installed on the system. echo $PATH /usr/bin:/usr/sbin:/usr/gcc/4.5/include/c++/4.5.2/tr1 root@Sol11swtb01:/media/NO NAME/Programming/C/Testing# cd... (2 Replies)
Discussion started by: Fingerz
2 Replies

9. Programming

Ignoring the stdio.h file in a C file

I am facing a problem in the below given code. int main() { printf("\nHello Geeks\n\n") ; return 0 ; } In the above mentioned code i left including "#include ". And if i compile and execute this piece of code, the output is printed as expected. But "#include " being the most important... (7 Replies)
Discussion started by: Raj 89
7 Replies

10. Programming

C++ : is what the meaning of #include<stdio.h>?

Hello Guys, I'm new in programing line & just started from C++ programs but i don't know the meaning of #include<stdio.h> file....Guys tell me what's the working of this file in C++ program?? I'm confused... Title changed: Please use a descriptive subject text, and not C++?? (3 Replies)
Discussion started by: ggiwebsinfo
3 Replies
__fbufsize(3C)						   Standard C Library Functions 					    __fbufsize(3C)

NAME
__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, __fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE structure SYNOPSIS
#include <stdio.h> #include <stdio_ext.h> size_t __fbufsiz(FILE *stream); int __flbf(FILE *stream); size_t __fpending(FILE *stream); void __fpurge(FILE *stream); int __freadable(FILE *stream); int __freading(FILE *stream); int __fsetlocking(FILE *stream, int type); int __fwritable(FILE *stream); int __fwriting(FILE *stream); void _flushlbf(void); DESCRIPTION
These functions provide portable access to the members of the stdio(3C) FILE structure. The __fbufsize() function returns in bytes the size of the buffer currently in use by the given stream. The __flbf() function returns non-zero if the stream is line-buffered. The __fpending function returns in bytes the amount of output pending on a stream. The __fpurge() function discards any pending buffered I/O on the stream. The __freadable() function returns non-zero if it is possible to read from a stream. The __freading() function returns non-zero if the file is open readonly, or if the last operation on the stream was a read operation such as fread(3C) or fgetc(3C). Otherwise it returns 0. The __fsetlocking() function allows the type of locking performed by stdio on a given stream to be controlled by the programmer. If type is FSETLOCKING_INTERNAL, stdio performs implicit locking around every operation on the given stream. This is the default system behavior on that stream. If type is FSETLOCKING_BYCALLER, stdio assumes that the caller is responsible for maintaining the integrity of the stream in the face of access by multiple threads. If there is only one thread accessing the stream, nothing further needs to be done. If multiple threads are accessing the stream, then the caller can use the flockfile(), funlockfile(), and ftrylockfile() functions described on the flockfile(3C) manual page to provide the appropriate locking. In both this and the case where type is FSETLOCKING_INTERNAL, __fsetlocking() returns the previous state of the stream. If type is FSETLOCKING_QUERY, __fsetlocking() returns the current state of the stream without changing it. The __fwritable() function returns non-zero if it is possible to write on a stream. The __fwriting() function returns non-zero if the file is open write-only or append-only, or if the last operation on the stream was a write operation such as fwrite(3C) or fputc(3C). Otherwise it returns 0. The _flushlbf() function flushes all line-buffered files. It is used when reading from a line-buffered file. USAGE
Although the contents of the stdio FILE structure have always been private to the stdio implementation, some applications have needed to obtain information about a stdio stream that was not accessible through a supported interface. These applications have resorted to access- ing fields of the FILE structure directly, rendering them possibly non-portable to new implementations of stdio, or more likely, preventing enhancements to stdio that would cause those applications to break. In the 64-bit environment, the FILE structure is opaque. The functions described here are provided as a means of obtaining the information that up to now has been retrieved directly from the FILE structure. Because they are based on the needs of existing applications (such as mh and emacs), they may be extended as other programs are ported. Although they may still be non-portable to other operating systems, they will be compatible from each Solaris release to the next. Interfaces that are more portable are under development. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |__fsetlocking() is Unsafe; | | |all others are MT-Safe | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
fgetc(3C), flockfile(3C), fputc(3C), fread(3C), fwrite(3C), stdio(3C), attributes(5) SunOS 5.10 5 Feb 1998 __fbufsize(3C)
All times are GMT -4. The time now is 12:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy