r.c File Reference

#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "awk.h"
#include "regexp.h"

Include dependency graph for r.c:

Go to the source code of this file.

Defines

#define MAXFLD   100
#define MAXFILE   10

Functions

CELLgetvar ()
char * strsave ()
char ** strcpy ()
char *** getsval ()
char **** jStrchr ()
char ***** strchr ()
double getfval ()
double atof ()
CELLmkcell ()
CELL ** mktmp ()
CELL *** execute ()
CELL **** patexec ()
FILEefopen ()
CELLGetline (NODE *p)
static get1rec (char *buf, FILE *fp)
 Getrec (char *s)
 mkfld (char *rec, char *sep, fld)
static r_mkfld (char *rec, char *sep, fld)
 mkrec (CELL *u)
CELLField (NODE *p)
CELLP1stat (NODE *p)
CELLP2stat (NODE *p)
CELLPrint0 ()
char * format (char *t, NODE *p)
FILEgetfp (char *file, type)
 closeall ()
CELLClose (char *s)
static close1 (i)
FILEepopen (char *file, char *mod)
static char * awktmp (i)
 Index (char *s, char *t)

Variables

char ** FS
char ** RS
char ** OFS
char ** ORS
char ** FILENAME
double * NF
double * NR
double * FNR
double * ARGC
SYMBOLargtab []
CELL truecell
CELL falsecell
int pateval
int infileno = 1
FILEifp
char record [BUFSIZ]
CELLfield [MAXFLD]
char * fs_str
regexpfs_pat
struct {
   char *   f_name
   FILE *   f_fp
   int   f_type
   char *   word
   int   type
   int   val
   char *   name
   CMD   code
   void(*   fn )()
   ARGT   argt
   char *   name
   char *   nm
   char   type
   char   flags
   char *   value
   const char *   name
   signed char   fat_bits
   int   tracks
   unsigned short   heads
   unsigned short   sectors
   device_t *   dev
   int   nr_partitions
   int   free_regions
   int   used_regions
   int   sectors
   int   nr_regions
   int   biosdrive
   region_t   regions [NR_REGIONS]
   int   this_month
   int   feb
   int   sept
   int   days_in_month
   int   dow_first
   int   o_file
   int   o_field
   WINDOW *   win
   char   erase
   char   kill
   char   werase
   unsigned   baudr
   int   speedcode
   u16_t   vendor
   u16_t   device
filetab [MAXFILE]


Define Documentation

#define MAXFILE   10
 

Definition at line 448 of file r.c.

Referenced by Close(), closeall(), and getfp().

#define MAXFLD   100
 

Definition at line 27 of file r.c.

Referenced by mkrec().


Function Documentation

double atof  ) 
 

static char* awktmp i   )  [static]
 

Definition at line 598 of file r.c.

References i, and sprintf().

Referenced by close1(), and getfp().

CELL* Close char *  s  ) 
 

Definition at line 523 of file r.c.

References close1(), f_name, filetab, i, MAXFILE, and strcmp.

static close1 i   )  [static]
 

Definition at line 537 of file r.c.

References awktmp(), close, dup, dup2, error, f_fp, f_name, f_type, fclose(), filetab, i, NULL, O_RDONLY, open, pclose(), R_APD, R_IN, R_OUT, R_PIN, R_POUT, result, sfree(), system(), and unlink.

Referenced by Close(), and closeall().

closeall  ) 
 

Definition at line 514 of file r.c.

References close1(), i, and MAXFILE.

Referenced by err(), error(), execute(), Jump(), main(), and onint().

FILE* efopen  ) 
 

FILE* epopen char *  file,
char *  mod
 

Definition at line 587 of file r.c.

References error, fp, NULL, and popen().

Referenced by getfp().

CELL* * * execute void   ) 
 

Definition at line 1577 of file boot.c.

CELL* Field NODE p  ) 
 

Definition at line 284 of file r.c.

References c_free(), execute(), field, FLD, getfval(), i, int(), j, mkcell(), NF, NULL, and STR.

char* format char *  t,
NODE p
 

Definition at line 377 of file r.c.

References BUFSIZ, execute(), fmt, getsval(), i, isKanji(), p, r, s, and x.

static get1rec char *  buf,
FILE fp
[static]
 

Definition at line 82 of file r.c.

References c, EOF, feof, fp, getc, isKanji(), mflg, NULL, record, RS, and s.

Referenced by Getline(), and Getrec().

FILE* getfp char *  file,
type 
 

Definition at line 456 of file r.c.

References awktmp(), close, dup, dup2, efopen(), epopen(), error, f_fp, f_name, filetab, fp, i, MAXFILE, O_CREAT, O_TEXT, O_TRUNC, O_WRONLY, open, R_APD, R_IN, R_OUT, R_PIN, R_POUT, result, S_IREAD, S_IWRITE, strcmp, system(), and type.

double getfval  ) 
 

CELL* Getline NODE p  ) 
 

Definition at line 54 of file r.c.

References BUFSIZ, c_free(), execute(), fp, get1rec(), getfp(), Getrec(), getsval(), i, mktmp(), NULL, NUM, s, and setsval().

Getrec char *  s  ) 
 

Definition at line 127 of file r.c.

References ARGC, argtab, efopen(), fclose(), FILENAME, FNR, get1rec(), getsval(), getvar(), ifp, infileno, NULL, setvar(), sprintf(), stdin, strchr, and strcmp.

Referenced by Getline().

char* * * getsval  ) 
 

CELL* getvar  ) 
 

Referenced by Array(), dofor(), dofuncn(), dousrfun(), exec_one(), expr10(), expr4(), Getrec(), and Split().

Index char *  s,
char *  t
 

Definition at line 606 of file r.c.

References i, and isKanji().

Referenced by Strfun().

char* * * * jStrchr  ) 
 

CELL* mkcell  ) 
 

mkfld char *  rec,
char *  sep,
fld 
 

Definition at line 175 of file r.c.

References BUFSIZ, fld, i, j, n, NF, NULL, r_mkfld(), s, sfree(), skip, strlen(), and t.

Referenced by Subst().

mkrec CELL u  ) 
 

Definition at line 258 of file r.c.

References error, field, i, j, MAXFLD, NF, s, and t.

Referenced by setfval(), and setsval().

CELL* * mktmp  ) 
 

CELL* P1stat NODE p  ) 
 

Definition at line 302 of file r.c.

References c_free(), execute(), getfval(), pateval, truecell, and x.

CELL* P2stat NODE p  ) 
 

Definition at line 320 of file r.c.

References c_free(), execute(), getfval(), pateval, truecell, and x.

CELL* * * * patexec  ) 
 

CELL* Print0  ) 
 

Definition at line 357 of file r.c.

References fprintf(), ORS, record, stdout, and truecell.

static r_mkfld char *  rec,
char *  sep,
fld 
[static]
 

Definition at line 221 of file r.c.

References BUFSIZ, fld, FS, fs_pat, fs_str, i, mkpat(), n, NF, NULL, r_length, r_start, s, sfree(), strcmp, strsave(), and t.

Referenced by mkfld().

char* * * * * strchr  ) 
 

char* * strcpy  ) 
 

char* strsave  ) 
 


Variable Documentation

double* ARGC
 

Definition at line 46 of file v.c.

Referenced by Getrec(), and initarg().

SYMBOL* argtab[]
 

Definition at line 38 of file v.c.

Referenced by Getrec(), and initarg().

FILE* f_fp
 

Definition at line 451 of file r.c.

Referenced by close1(), f_cleanup(), f_do_open(), f_prepare(), f_transfer(), fdc_transfer(), getfp(), read_id(), recalibrate(), seek(), start_motor(), and test_read().

char* f_name
 

Definition at line 450 of file r.c.

Referenced by Close(), close1(), fdc_transfer(), getfp(), hack_file(), and u_r_file().

int f_type
 

Definition at line 452 of file r.c.

Referenced by close1().

CELL falsecell
 

Definition at line 44 of file e.c.

CELL* field[MAXFLD]
 

Definition at line 48 of file r.c.

char ** FILENAME
 

Definition at line 43 of file v.c.

struct { ... } filetab[MAXFILE]
 

Referenced by Close(), close1(), and getfp().

double* FNR
 

Definition at line 46 of file v.c.

Referenced by Getrec(), and init().

char** FS
 

Definition at line 43 of file v.c.

regexp* fs_pat
 

Definition at line 51 of file r.c.

Referenced by r_mkfld().

char* fs_str
 

Definition at line 50 of file r.c.

Referenced by r_mkfld().

FILE* ifp
 

Definition at line 46 of file r.c.

Referenced by dosrch(), Getrec(), grep(), and plan_b().

int infileno = 1
 

Definition at line 45 of file r.c.

Referenced by Getrec().

double* NF
 

Definition at line 45 of file v.c.

double * NR
 

Definition at line 45 of file v.c.

Referenced by error(), Error(), Expand(), init(), Macro(), and nr_tm().

char ** OFS
 

Definition at line 43 of file v.c.

char ** ORS
 

Definition at line 43 of file v.c.

int pateval
 

Definition at line 52 of file e.c.

Referenced by Cond(), execute(), P1stat(), and P2stat().

char record[BUFSIZ]
 

Definition at line 47 of file r.c.

char ** RS
 

Definition at line 43 of file v.c.

CELL truecell
 

Definition at line 43 of file e.c.


Generated on Fri Apr 14 22:59:18 2006 for minix by  doxygen 1.4.6