/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1999-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#include "sftest.h"
tmain()
{
char* s;
Sfoff_t p;
int r, w;
terror("Can't open f1");
terror("Can't open f1");
terror("Can't open f2");
terror("Writing to f1");
terror("Bad sftell1 %ld",p);
terror("Writing to f2");
terror("Bad sftell2");
terror("Bad seek");
terror("Bad getr1");
if(strcmp(s,"012345678") != 0)
terror("Bad input1");
terror("Bad sftell3");
terror("Writing to f1");
terror("Bad sftell4");
terror("Bad seek");
terror("Bad getr2");
if(strcmp(s,"abcdefghi") != 0)
terror("Bad input2");
terror("Bad getr3");
if(strcmp(s,"012345678") != 0)
terror("Bad input3");
terror("Can't open file to write");
for(r = 0; r < 1024; ++r)
buf[r] = 'a';
terror("writing w=%d", w);
terror("Can't open file to append");
terror("writing w=%d", w);
terror("seek position wrong s=%d", r);
texit(0);
}