output.c File Reference

#include <stdio.h>
#include "shell.h"
#include "syntax.h"
#include "output.h"
#include "memalloc.h"
#include "error.h"
#include <varargs.h>
#include <errno.h>

Include dependency graph for output.c:

Go to the source code of this file.

Defines

#define OUTBUFSIZ   BUFSIZ
#define BLOCK_OUT   -2
#define MEM_OUT   -3
#define OUTPUT_ERR   01
#define TEMPSIZE   24

Functions

void out1str (char *p)
void out2str (char *p)
void outstr (char *p, struct output *file)
void emptyoutbuf (struct output *dest)
void flushall ()
void flushout (struct output *dest)
void freestdout ()
void outfmt (va_alist)
void out1fmt (va_alist)
void fmtstr (va_alist)
void doformat (struct output *dest, char *f, va_list ap)
int xwrite (int fd, char *buf, int nbytes)
int xioctl (fd, request, arg)

Variables

static char sccsid [] = "@(#)output.c 5.1 (Berkeley) 3/7/91"
output output = {NULL, 0, NULL, OUTBUFSIZ, 1, 0}
output errout = {NULL, 0, NULL, 100, 2, 0}
output memout = {NULL, 0, NULL, 0, MEM_OUT, 0}
outputout1 = &output
outputout2 = &errout
char out_junk [16]
static const char digit [17] = "0123456789ABCDEF"


Define Documentation

#define BLOCK_OUT   -2
 

Definition at line 67 of file output.c.

Referenced by emptyoutbuf(), and fmtstr().

#define MEM_OUT   -3
 

Definition at line 68 of file output.c.

Referenced by emptyoutbuf().

#define OUTBUFSIZ   BUFSIZ
 

Definition at line 66 of file output.c.

#define OUTPUT_ERR   01
 

Definition at line 69 of file output.c.

Referenced by emptyoutbuf(), flushout(), and fmtstr().

#define TEMPSIZE   24
 

Definition at line 318 of file output.c.

Referenced by doformat().


Function Documentation

void doformat struct output dest,
char *  f,
va_list  ap
 

Definition at line 328 of file output.c.

References base, c, num(), outc, p, pad, prec, sign, size, TEMPSIZE, va_arg, and width.

Referenced by error(), fmtstr(), out1fmt(), and outfmt().

void emptyoutbuf struct output dest  ) 
 

Definition at line 146 of file output.c.

References BLOCK_OUT, ckmalloc(), ckrealloc(), flushout(), INTOFF, INTON, MEM_OUT, NULL, offset, out_junk, and OUTPUT_ERR.

void flushall  ) 
 

Definition at line 177 of file output.c.

Referenced by do_sync(), error(), exitshell(), get_block(), and readcmd().

void flushout struct output dest  ) 
 

Definition at line 184 of file output.c.

References output::flags, NULL, OUTPUT_ERR, and xwrite().

Referenced by cmdloop(), emptyoutbuf(), evalcommand(), evaltree(), flushall(), main(), and preadbuffer().

void fmtstr va_alist   ) 
 

Definition at line 280 of file output.c.

References BLOCK_OUT, doformat(), output::fd, output::flags, output::nextc, output::nleft, outc, output, OUTPUT_ERR, va_arg, and va_start.

Referenced by getoptscmd(), and synexpect().

void freestdout  ) 
 

Definition at line 198 of file output.c.

References output::buf, ckfree, INTOFF, INTON, output::nleft, NULL, and output.

void out1fmt va_alist   ) 
 

Definition at line 266 of file output.c.

References doformat(), out1, va_arg, va_end, and va_start.

Referenced by docd(), evaltree(), getoptscmd(), jobidcmd(), printentry(), showvarscmd(), trapcmd(), and umaskcmd().

void out1str char *  p  ) 
 

Definition at line 117 of file output.c.

References out1, and outstr().

Referenced by printentry(), and pwdcmd().

void out2str char *  p  ) 
 

Definition at line 125 of file output.c.

References out2, and outstr().

Referenced by chkmail(), evalcommand(), preadbuffer(), putprompt(), and readcmd().

void outfmt va_alist   ) 
 

Definition at line 250 of file output.c.

References doformat(), file, output, va_arg, va_end, and va_start.

Referenced by error(), evalcommand(), evalvar(), and synerror().

void outstr char *  p,
struct output file
 

Definition at line 133 of file output.c.

References outc.

Referenced by do_error(), gnu_symbolic(), help_on(), help_page(), out1str(), out2str(), outea(), pagef(), Printf(), show1instruction(), and symbolic().

int xioctl fd  ,
request  ,
arg 
 

Definition at line 526 of file output.c.

References arg, EINTR, errno, i, ioctl, and request.

int xwrite int  fd,
char *  buf,
int  nbytes
 

Definition at line 493 of file output.c.

References i, n, and write.

Referenced by expandhere(), flushout(), growstackstr(), and openhere().


Variable Documentation

const char digit[17] = "0123456789ABCDEF" [static]
 

Definition at line 323 of file output.c.

Referenced by digit_convert(), getn(), iosetup(), letnum(), lookup(), main(), regcomp(), sprintf(), ul_asc(), and uqd_asc().

struct output errout = {NULL, 0, NULL, 100, 2, 0}
 

Definition at line 73 of file output.c.

Referenced by error(), evalcommand(), evalvar(), flushall(), main(), preadbuffer(), and synerror().

struct output memout = {NULL, 0, NULL, 0, MEM_OUT, 0}
 

Definition at line 74 of file output.c.

Referenced by main().

struct output* out1 = &output
 

Definition at line 75 of file output.c.

Referenced by main(), out1fmt(), and out1str().

struct output* out2 = &errout
 

Definition at line 76 of file output.c.

Referenced by out2str().

char out_junk[16]
 

Definition at line 142 of file output.c.

Referenced by emptyoutbuf().

static void output = {NULL, 0, NULL, OUTBUFSIZ, 1, 0}
 

Definition at line 72 of file output.c.

Referenced by cl_block(), compress(), copyout(), do_print_char(), do_print_num(), domonth(), doyear(), flushall(), fmtstr(), freestdout(), get_set_output(), main(), outfmt(), print_flags(), and report().

char sccsid[] = "@(#)output.c 5.1 (Berkeley) 3/7/91" [static]
 

Definition at line 38 of file output.c.


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