Sponsored Content
Top Forums Programming K&R - FILE structure - can't access members Post 302490604 by fpmurphy on Tuesday 25th of January 2011 08:55:31 AM
Old 01-25-2011
In GNU/Linux the definition is in the libio.h header. As Corona688 said, it is not a portable documented structure.
This User Gave Thanks to fpmurphy For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

FTP access & control question

Folks; I need some help with these: 1. understanding how to control access rights and manage visibility using FTP in Solaris, in other words, I need to use FTP in Solaris to be able to give some users access to add/modify data to/from the UNIX server. 2. How can i control the space allowed for... (2 Replies)
Discussion started by: Katkota
2 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. Shell Programming and Scripting

Move files & folder structure

Hey, this might be a really basic question, but I'm new to Unix scripting. I'm trying to find a command to replicate a file structure from one location to another & move the actual files contained in the base directories, i.e. I have this structure - home/temp/test/dir1/ ... (3 Replies)
Discussion started by: SOCLA_CELT
3 Replies

4. Linux

password hardening & FTP access

I am dealing with an FTP server and I have implemented password hardening on the server. The thing is that, it applies to SSH connection. I forcefully expired password of a user so that he can change password at next login. But the user logged in to the server through FTP and he wasn't asked to... (4 Replies)
Discussion started by: parth_buch
4 Replies

5. Shell Programming and Scripting

directory structure & file permisson comparison

Hi - I want to compare permissions of the directory structure and files beneath it with permissions one week back on same directory structure and files beneath it. if any changes to permissions of any file or directory permissions send an email. I am not sure how to list the permissions of all... (1 Reply)
Discussion started by: oraclermanpt
1 Replies

6. AIX

Switch Port Becoming Private & restricting access

Hello folks, I have an AIX server that is connected to a storage array via a Brocade switch using 4 ports from either side. The zoning is done such that there are 4 paths visible from the server to the storage. My work involves frequent disabling or enabling the switch ports that are... (1 Reply)
Discussion started by: nkiran
1 Replies

7. Shell Programming and Scripting

Concatenating contents of a file with members in a directory

Hi, I have a unix file with the below structure - CustId1 CustName1 CustPhn1 /u/home/xmldata/A000001 CustId2 CustName2 CustPhn2 /u/home/xmldata/A000002 CustId3 CustName3 CustPhn3 /u/home/xmldata/A000003 Then I have another unix directory /u/home/xmldata This directory has... (3 Replies)
Discussion started by: Simanto
3 Replies

8. Solaris

Restricting commands & access

Dear all, I am administering a DC environment of over 100+ Solaris servers used by various teams including Databases. Every user created on the node belonging to databases is assigned group staff(10) . I want that all users belonging to staff should NOT be able to execute certain system... (6 Replies)
Discussion started by: Junaid Subhani
6 Replies

9. UNIX for Dummies Questions & Answers

New to Forum & Sun Surefire V210 Access

Purchased a Sun Surefire V210 Server off eBay. Unable to Access the Terminal Mode via the Terminal MGT. Using Windows 7 home, and downloaded the ConEmu. The ConEmu brings up a Command line on the PC, and that's it. Being new to all this, I was expecting a Login prompt to pop up. Read the... (22 Replies)
Discussion started by: screenprintr
22 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.11 5 Feb 1998 __fbufsize(3C)
All times are GMT -4. The time now is 02:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy