diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | README | 4 | ||||
| -rw-r--r-- | config.mk | 4 | ||||
| -rw-r--r-- | median.1 | 4 | ||||
| -rw-r--r-- | median.c | 1 |
5 files changed, 8 insertions, 7 deletions
@@ -1,4 +1,4 @@ -.PHONY: +.POSIX: CONFIGFILE = config.mk include $(CONFIGFILE) @@ -17,8 +17,8 @@ DESCRIPTION string as the key, for lines with a blank space, the first blank space is parsed as part of the key. - For groups with an even number of elements, if the mean of - the middle two values are used as the median if all values + For groups with an even number of elements, the mean of + the middle two values is used as the median if all values in the group are numerical, otherwise the lower value is used as the median. @@ -1,8 +1,8 @@ PREFIX = /usr MANPREFIX = $(PREFIX)/share/man -CC = cc +CC = c99 CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -CFLAGS = -std=c99 -Wall -O2 +CFLAGS = LDFLAGS = -s @@ -18,8 +18,8 @@ Lines without a blank space are parsed as having the empty string as the key, for lines with a blank space, the first blank space is parsed as part of the key. .PP -For groups with an even number of elements, if the mean of -the middle two values are used as the median if all values +For groups with an even number of elements, the mean of +the middle two values is used as the median if all values in the group are numerical, otherwise the lower value is used as the median. .SH EXAMPLES @@ -5,6 +5,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #if defined(__GNUC__) # define PURE __attribute__((__pure__)) |
