From 2ef8a59ae61b83ad2ba9d4c9381eead5ae403cb0 Mon Sep 17 00:00:00 2001 From: Toby Goodwin Date: Wed, 31 Oct 2001 12:31:57 +0000 Subject: candidate: rc-1.6c4 --- tripping.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tripping.c') diff --git a/tripping.c b/tripping.c index aff7927..a9099ce 100644 --- a/tripping.c +++ b/tripping.c @@ -1,7 +1,12 @@ /* This is an auxiliary test program for rc. */ +#include "config.h" + #include #include +#include +#include +#include static void out0(void) { putchar('t'); putchar('r'); @@ -14,6 +19,21 @@ static void ctrl_a(void) { puts("a\001ab\002b"); } +static void large(void) { + char c = 'c'; + +#define LARGE (((off_t)1<<33)+1) + + if (lseek(1, LARGE, SEEK_SET) != LARGE) { + perror("lseek"); + exit(1); + } + if (write(1, &c, 1) == -1) { + perror("write"); + exit(1); + } +} + static void makenonblock(void) { int flags; @@ -32,6 +52,9 @@ int main(int argc, char **argv) { case 'a': ctrl_a(); break; + case 'l': + large(); + break; case 'n': makenonblock(); break; -- cgit v1.2.3