ftell64_.c File Reference

#include "f2c.h"
#include "fio.h"

Include dependency graph for ftell64_.c:

Go to the source code of this file.

Functions

static FILE * unit_chk (integer Unit, char *who)
longint ftell64_ (integer *Unit)
int fseek64_ (integer *Unit, longint *offset, integer *whence)


Function Documentation

int fseek64_ ( integer Unit,
longint *  offset,
integer whence 
)

Definition at line 34 of file ftell64_.c.

References f(), FSEEK, int, OFF_T, SEEK_CUR, SEEK_END, SEEK_SET, unit_chk(), and w.

00036 {
00037         FILE *f;
00038         int w = (int)*whence;
00039 #ifdef SEEK_SET
00040         static int wohin[3] = { SEEK_SET, SEEK_CUR, SEEK_END };
00041 #endif
00042         if (w < 0 || w > 2)
00043                 w = 0;
00044 #ifdef SEEK_SET
00045         w = wohin[w];
00046 #endif
00047         return  !(f = unit_chk(*Unit, "fseek"))
00048                 || FSEEK(f, (OFF_T)*offset, w) ? 1 : 0;
00049         }

Here is the call graph for this function:

longint ftell64_ ( integer Unit  ) 

Definition at line 23 of file ftell64_.c.

References f(), FTELL, L, and unit_chk().

00025 {
00026         FILE *f;
00027         return (f = unit_chk(*Unit, "ftell")) ? FTELL(f) : -1L;
00028         }

Here is the call graph for this function:

static FILE* unit_chk ( integer  Unit,
char *  who 
) [static]

Definition at line 11 of file ftell64_.c.

References f__fatal(), f__units, MXUNIT, and unit::ufd.

Referenced by fseek64_(), fseek_(), ftell64_(), and ftell_().

00013 {
00014         if (Unit >= MXUNIT || Unit < 0)
00015                 f__fatal(101, who);
00016         return f__units[Unit].ufd;
00017         }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Sun Mar 4 15:04:42 2007 for Scilab [trunk] by  doxygen 1.5.1