xv6/grep.c File Reference

#include "types.h"
#include "stat.h"
#include "user.h"

Go to the source code of this file.

Functions

int match (char *, char *)
void grep (char *pattern, int fd)
int main (int argc, char *argv[])
int matchhere (char *, char *)
int matchstar (int, char *, char *)

Variables

char buf [1024]


Function Documentation

void grep ( char *  pattern,
int  fd 
)

Definition at line 11 of file grep.c.

References match(), memmove(), read(), strchr(), and write().

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 38 of file grep.c.

References close(), exit(), grep(), open(), and printf().

int match ( char *  re,
char *  text 
)

Definition at line 72 of file grep.c.

References matchhere().

Referenced by grep().

int matchhere ( char *  re,
char *  text 
)

Definition at line 84 of file grep.c.

References matchstar().

Referenced by match(), and matchstar().

int matchstar ( int  c,
char *  re,
char *  text 
)

Definition at line 98 of file grep.c.

References matchhere().

Referenced by matchhere().


Variable Documentation

char buf[1024]

Definition at line 7 of file grep.c.


Generated on Fri Jan 7 12:25:49 2011 for xv6 by  doxygen 1.5.6