Sponsored Content
Top Forums Programming C fdopen with and without -ansi Post 303024716 by jim mcnamara on Monday 15th of October 2018 07:46:08 PM
Old 10-15-2018
He meant fdopen. I think
 

10 More Discussions You Might Find Interesting

1. Programming

K&R vs. ANSI

To anyone that can answer this: Are the differences great between the ANSI and K&R standard? What are some of the major differences between them?? -REM (1 Reply)
Discussion started by: REM
1 Replies

2. Programming

Ansi C

Dear All, I have to develope some C functions in Unix for a Magic program. The original MSE code which compiles the attached C program uses a +z option, but the cc compiler don't know this. The complete command in the compiler script is 'cc -c -Aa +z myfile.c'. The warning message is 'The -z... (4 Replies)
Discussion started by: Frankie
4 Replies

3. Programming

ANSI C vs POSIX

can somebody explain about the ANSI C vs POSIX. say i was using open and fopen, i know that open is POSIX, and fopen is ANSI C. i read that that POSIX is a system call and ANSI C is like a standard library function. wouldn't the fopen function has to call on open function anyway to open any kind... (2 Replies)
Discussion started by: bb00y
2 Replies

4. Programming

difference between fdopen() and freopen()

hi , I came acroos two functions fdopen() and freopen(). what is the difference between these two functions and where can they be used. Is it that fdopen() is used to write freopen(). Advance Thanks for your co-operation. :) (1 Reply)
Discussion started by: kinnaree
1 Replies

5. HP-UX

ANSI / C Compiler for HP-UX 11.11

Good Day I downloaded Server Evaluation copy of C/ANSI compiler, but when I try to compile a file with it, it gives me following error - (for HP-UX 11.11 v1 PA-RISC) Internal Error: Codeword file /opt/ansic/newconfig/ansic.cwd missing or empty. Detailed Errors are as follows Internal... (3 Replies)
Discussion started by: shawnbishop
3 Replies

6. Programming

hint on ansi c

I am a student. And need help on following program. I want to make a c program. I have to scan a sentence and I have to interchange a word from that sentence. Example: Scan the sentence is " Drilling machine and Milling machine " . Replace the word "machine" by "operation". And output should... (2 Replies)
Discussion started by: dhaval chevli
2 Replies

7. Shell Programming and Scripting

Convert file from Unix - ANSI to PC - ANSI

Hi, I am creating a file in Unix using a shell script. The file is getting created in the Unix - ANSI format. My requirement is to convert it to the PC - ANSI format. Can anyone tell me how to do this? Thanks, Sunil (0 Replies)
Discussion started by: ssmallya
0 Replies

8. HP-UX

Unix_ANSI to PC-ANSI

I want to convert a file from Unix-ANSI to PC-ANSI format. How can i achieve that? (0 Replies)
Discussion started by: ssmallya
0 Replies

9. HP-UX

HP-UX ansi c precompiler

Hi, How can i find which ansi c precompiler are installed on my hp-ux b11.23 itanuim machine ? Thanks (3 Replies)
Discussion started by: yoavbe
3 Replies

10. Programming

why the implementatoin of Bakery algorithm in ANSI C does not work in ANSI C

I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry? Only print out: Thread ID: 0 START! Thread ID: 0 END! Thread ID: 0 START!... (2 Replies)
Discussion started by: sehang
2 Replies
explain_fdopen(3)					     Library Functions Manual						 explain_fdopen(3)

NAME
explain_fdopen - explain fdopen(3) errors SYNOPSIS
#include <libexplain/fdopen.h> const char *explain_fdopen(int fildes, const char *flags); const char *explain_errno_fdopen(int errnum, int fildes, const char *flags); void explain_message_fdopen(char *message, int message_size, int fildes, const char *flags); void explain_message_errno_fdopen(char *message, int message_size, int errnum, int fildes, const char *flags); DESCRIPTION
These functions may be used to obtain explanations for errors returned by the fdopen(3) system call. explain_fdopen const char *explain_fdopen(int fildes, const char *flags); The explain_fdopen function is used to obtain an explanation of an error returned by the fdopen(3) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: FILE *fp = fdopen(fildes, flags); if (!fp) { fprintf(stderr, "%s ", explain_fdopen(fildes, flags)); exit(EXIT_FAILURE); } The above code example is available pre-packaged as the explain_fdopen_or_die(3) function. fildes The original fildes, exactly as passed to the fdopen(3) system call. flags The original flags, exactly as passed to the fdopen(3) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_errno_fdopen const char *explain_errno_fdopen(int errnum, int fildes, const char *flags); The explain_errno_fdopen function is used to obtain an explanation of an error returned by the fdopen(3) system call. The least the mes- sage will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: FILE *fp = fdopen(fildes, flags); if (!fp) { int err = errno; fprintf(stderr, "%s ", explain_errno_fdopen(err, fildes, flags)); exit(EXIT_FAILURE); } The above code example is available pre-packaged as the explain_fdopen_or_die(3) function. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. fildes The original fildes, exactly as passed to the fdopen(3) system call. flags The original flags, exactly as passed to the fdopen(3) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_message_fdopen void explain_message_fdopen(char *message, int message_size, int fildes, const char *flags); The explain_message_fdopen function may be used to obtain an explanation of an error returned by the fdopen(3) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: FILE *fp = fdopen(fildes, flags); if (!fp) { char message[3000]; explain_message_fdopen(message, sizeof(message), fildes, flags); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } The above code example is available pre-packaged as the explain_fdopen_or_die(3) function. message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. fildes The original fildes, exactly as passed to the fdopen(3) system call. flags The original flags, exactly as passed to the fdopen(3) system call. explain_message_errno_fdopen void explain_message_errno_fdopen(char *message, int message_size, int errnum, int fildes, const char *flags); The explain_message_errno_fdopen function may be used to obtain an explanation of an error returned by the fdopen(3) system call. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: FILE *fp = fdopen(fildes, flags); if (!fp) { int err = errno; char message[3000]; explain_message_errno_fdopen(message, sizeof(message), err, fildes, flags); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } The above code example is available pre-packaged as the explain_fdopen_or_die(3) function. message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. fildes The original fildes, exactly as passed to the fdopen(3) system call. flags The original flags, exactly as passed to the fdopen(3) system call. SEE ALSO
fdopen(3) stream open functions explain_fdopen_or_die(3) stream open functions and report errors COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_fdopen(3)
All times are GMT -4. The time now is 04:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy