Back to index

glibc  2.9
Functions
tst-fileno.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

Go to the source code of this file.

Functions

static int check (const char *name, FILE *stream, int fd)
int main (void)

Function Documentation

static int check ( const char *  name,
FILE stream,
int  fd 
) [static]

Definition at line 24 of file tst-fileno.c.

{
  int sfd = fileno (stream);
  printf ("(fileno (%s) = %d) %c= %d\n", name, sfd,
         sfd == fd ? '=' : '!', fd);
  return sfd != fd;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( void  )

Definition at line 33 of file tst-fileno.c.

{
  return (check ("stdin", stdin, STDIN_FILENO) ||
         check ("stdout", stdout, STDOUT_FILENO) ||
         check ("stderr", stderr, STDERR_FILENO));
}

Here is the call graph for this function: