join.c File Reference

#include <string.h>
#include <stdio.h>

Include dependency graph for join.c:

Go to the source code of this file.

Defines

#define MAXFLD   200
#define F1   1
#define F2   2
#define SEP   (sep ? sep : ' ')

Functions

 _PROTOTYPE (void main,(int argc, char **argv))
 _PROTOTYPE (void error,(char *s, char *t))
 _PROTOTYPE (void usage,(void))
 _PROTOTYPE (void output,(int flag))
 _PROTOTYPE (void outfld,(int file))
 _PROTOTYPE (int compare,(void))
 _PROTOTYPE (int get2,(int back))
 _PROTOTYPE (int getrec,(int file))
 _PROTOTYPE (int atoi,(char *str))
 _PROTOTYPE (int exit,(int val))
 _PROTOTYPE (FILE *efopen,(char *file, char *mode))
 _PROTOTYPE (void(*outfun),(int file))
void main (int argc, char **argv)
void usage ()
int compare ()
void match ()
void f1_only ()
void f2_only ()
void output (f)
void outfld (file)
void outputf (f)
int get1 ()
int get2 (back)
int getrec (file)
int split (file)
FILEefopen (char *file, char *mode)
void error (char *s, char *t)

Variables

FILEfp [2]
long head
char buf [2][BUFSIZ]
char * fld [2][MAXFLD]
int nfld [2]
int kpos [2]
char oldkey [BUFSIZ]
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
olist [MAXFLD]
int nout
int aflag
int vflag
char * es
char sep
char * cmd


Define Documentation

#define F1   1
 

Definition at line 33 of file join.c.

Referenced by f1_only(), func_key(), key_name(), main(), match(), and output().

#define F2   2
 

Definition at line 34 of file join.c.

Referenced by f2_only(), main(), match(), and output().

#define MAXFLD   200
 

Definition at line 12 of file join.c.

#define SEP   (sep ? sep : ' ')
 

Definition at line 35 of file join.c.


Function Documentation

_PROTOTYPE void *  outfun,
(int file
 

_PROTOTYPE FILE efopen,
(char *file, char *mode
 

_PROTOTYPE int  exit,
(int val
 

_PROTOTYPE int  atoi,
(char *str
 

_PROTOTYPE int  getrec,
(int file
 

_PROTOTYPE int  get2,
(int back) 
 

_PROTOTYPE int  compare,
(void) 
 

_PROTOTYPE void  outfld,
(int file
 

_PROTOTYPE void  output,
(int flag
 

_PROTOTYPE void  usage,
(void) 
 

_PROTOTYPE void  error,
(char *s, char *t
 

_PROTOTYPE void  main,
(int argc, char **argv) 
 

int compare  ) 
 

Definition at line 181 of file join.c.

References error, r, and strcmp.

FILE* efopen char *  file,
char *  mode
 

Definition at line 342 of file join.c.

References error, fopen(), and fp.

void error char *  s,
char *  t
 

Definition at line 352 of file join.c.

References exit(), fprintf(), and stderr.

void f1_only  ) 
 

Definition at line 218 of file join.c.

References F1, and get1().

Referenced by main().

void f2_only  ) 
 

Definition at line 224 of file join.c.

References F2, fp, ftell(), and get2.

Referenced by main().

int get1  ) 
 

Definition at line 275 of file join.c.

References BUFSIZ, error, fld, getrec(), kpos, oldkey, r, strcmp, and strcpy().

Referenced by f1_only(), main(), and match().

int get2 back   ) 
 

Definition at line 293 of file join.c.

References BUFSIZ, error, fld, getrec(), kpos, r, strcmp, and strcpy().

int getrec file   ) 
 

Definition at line 308 of file join.c.

References BUFSIZ, error, fgets(), file, fp, and split.

Referenced by get1(), and get2().

void main int  argc,
char **  argv
 

Definition at line 61 of file join.c.

References atoi, c, compare, efopen(), exit(), F1, f1_only(), F2, f2_only(), fflush(), fp, get1(), get2, i, j, match, olist, s, sscanf(), stdin, stdout, strchr, strcmp, and usage.

void match  ) 
 

Definition at line 200 of file join.c.

void outfld file   ) 
 

Definition at line 242 of file join.c.

References fputc(), fputs(), i, k, n, SEP, and stdout.

Referenced by output().

void output f   ) 
 

Definition at line 231 of file join.c.

References F1, F2, fputc(), fputs(), outfld(), and stdout.

void outputf f   ) 
 

Definition at line 256 of file join.c.

References es, fld, fputc(), fputs(), i, j, k, nfld, nout, o_field, o_file, olist, s, SEP, and stdout.

int split file   ) 
 

Definition at line 318 of file join.c.

References n, s, sep, and t.

void usage void   ) 
 

Definition at line 173 of file join.c.

References exit(), fprintf(), and stderr.


Variable Documentation

int aflag
 

Definition at line 55 of file join.c.

char buf[2][BUFSIZ]
 

Definition at line 41 of file join.c.

char* cmd
 

Definition at line 59 of file join.c.

char* es
 

Definition at line 57 of file join.c.

Referenced by BZ2_decompress(), dissect(), outputf(), and pbstr().

char* fld[2][MAXFLD]
 

Definition at line 42 of file join.c.

Referenced by get1(), get2(), make_time(), mkfld(), outputf(), print(), and r_mkfld().

FILE* fp[2]
 

Definition at line 37 of file join.c.

long head
 

Definition at line 38 of file join.c.

int kpos[2]
 

Definition at line 45 of file join.c.

Referenced by get1(), and get2().

int nfld[2]
 

Definition at line 43 of file join.c.

Referenced by outputf().

int nout
 

Definition at line 53 of file join.c.

Referenced by outputf().

int o_field
 

Definition at line 51 of file join.c.

Referenced by outputf().

int o_file
 

Definition at line 50 of file join.c.

Referenced by iwritfile(), and outputf().

char oldkey[BUFSIZ]
 

Definition at line 47 of file join.c.

Referenced by get1().

struct { ... } olist[MAXFLD]
 

Referenced by main(), and outputf().

char sep
 

Definition at line 58 of file join.c.

Referenced by ack_emit_instruction(), dissect(), execute(), mkdirp(), pr_map(), split(), Split(), and varvalue().

int vflag
 

Definition at line 56 of file join.c.


Generated on Fri Apr 14 23:06:47 2006 for minix by  doxygen 1.4.6