cat.c File Reference

#include <errno.h>
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <minix/minlib.h>
#include <stdio.h>

Include dependency graph for cat.c:

Go to the source code of this file.

Defines

#define CHUNK_SIZE   (2048 * sizeof(char *))

Functions

int main (int argc, char **argv)
static void copyout (char *file, int fd)
static void output (char *buf, size_t count)
static void report (char *label)
static void fatal (char *label)
int main (int argc, char *argv[])

Variables

static int unbuffered
static char ibuf [CHUNK_SIZE]
static char obuf [CHUNK_SIZE]
static char * op = obuf
static char STDIN [] = "standard input"
static char STDOUT [] = "standard output"
static int excode = 0


Define Documentation

#define CHUNK_SIZE   (2048 * sizeof(char *))
 

Definition at line 16 of file cat.c.

Referenced by copyout(), main(), and split().


Function Documentation

static void copyout char *  file,
int  fd
[static]
 

Definition at line 79 of file cat.c.

References CHUNK_SIZE, fatal(), ibuf, memcpy(), n, obuf, output, read, and unbuffered.

Referenced by main().

static void fatal char *  label  )  [static]
 

Definition at line 49 of file installboot.c.

References exit(), and report().

int main int  argc,
char *  argv[]
 

Definition at line 34 of file cat.c.

References close, copyout(), excode, exit(), i, O_RDONLY, obuf, open, output, report(), std_err(), STDIN, STDIN_FILENO, and unbuffered.

int main int  argc,
char **  argv
 

Definition at line 58 of file addaout.c.

References A_IMG, A_MAGIC0, A_MAGIC1, aout, bp, copy_data(), errno, fdin, fdout, INPUT_FILE, lseek, memset(), n, O_CREAT, O_RDONLY, O_TRUNC, O_WRONLY, open, OUTPUT_FILE, printf, r, report(), result, SEEK_SET, stat::st_mode, stat, strerror(), and write.

static void output char *  buf,
size_t  count
[static]
 

static void report char *  label  )  [static]
 

Definition at line 43 of file installboot.c.

References errno, fprintf(), stderr, and strerror().


Variable Documentation

int excode = 0 [static]
 

Definition at line 32 of file cat.c.

Referenced by apply_link(), copylink(), main(), and report().

char ibuf[CHUNK_SIZE] [static]
 

Definition at line 19 of file cat.c.

Referenced by compressStream(), copyout(), kb_read(), kbd_interrupt(), mygetc(), rw_data_zones(), rw_ibmap(), rw_init_super(), and rw_zbmap().

char obuf[CHUNK_SIZE] [static]
 

Definition at line 20 of file cat.c.

Referenced by chg_buf(), copyout(), die(), iwritfile(), main(), myputc(), prepare_output(), rw_data_zones(), rw_ibmap(), rw_init_super(), rw_zbmap(), testStream(), and uncompressStream().

char* op = obuf [static]
 

Definition at line 21 of file cat.c.

Referenced by display(), dyndep(), lex(), m_enter(), m_in(), m_magic(), m_modify(), m_move(), m_out(), m_quit(), m_shell(), m_updown(), main(), nextdevice(), and print().

char STDIN[] = "standard input" [static]
 

Definition at line 29 of file cat.c.

char STDOUT[] = "standard output" [static]
 

Definition at line 30 of file cat.c.

int unbuffered [static]
 

Definition at line 18 of file cat.c.

Referenced by copyout(), and main().


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