ftell_.c File Reference

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

Include dependency graph for ftell_.c:

Go to the source code of this file.

Functions

static FILE * unit_chk (integer Unit, char *who)
integer ftell_ (integer *Unit)
int fseek_ (integer *Unit, integer *offset, integer *whence)


Function Documentation

int fseek_ ( integer Unit,
integer offset,
integer whence 
)

Definition at line 34 of file ftell_.c.

References f(), int, 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, *offset, w) ? 1 : 0;
00049         }

Here is the call graph for this function:

integer ftell_ ( integer Unit  ) 

Definition at line 23 of file ftell_.c.

References f(), 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 ftell_.c.

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

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:


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