KMR
|
Example for KMR shell command pipeline. More...
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
Go to the source code of this file.
Macros | |
#define | LINELEN 32767 |
Maximum line length. More... | |
Functions | |
int | main (int argc, char *argv[]) |
Main function. More... | |
static void | ReplaceChar (char *wp) |
Replace Character. More... | |
Variables | |
static char | ignoreChar [] = { '\t' } |
Ignore characters. More... | |
Example for KMR shell command pipeline.
It is a mapper for word count.
Definition in file wc.mapper.c.
#define LINELEN 32767 |
Maximum line length.
Definition at line 11 of file wc.mapper.c.
|
inlinestatic |
Replace Character.
Replace ignore characters to a space character.
Definition at line 22 of file wc.mapper.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function.
Read line from stdin, replace character, separate word by space, and output "WORD 1" to stdout.
Definition at line 43 of file wc.mapper.c.
|
static |
Ignore characters.
These characters are replaced to a space character.
Definition at line 17 of file wc.mapper.c.