/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#include "sfdchdr.h"
/* Make a sequence of streams act like a single stream.
** This is for reading only.
**
** Written by Kiem-Phong Vo, kpv@research.att.com, 03/18/1998.
*/
typedef struct _file_s
{ Sfio_t* f; /* the stream */
} File_t;
typedef struct _union_s
{
short c; /* current stream */
short n; /* number of streams */
} Union_t;
#if __STD_C
#else
Sfio_t* f; /* stream involved */
size_t n; /* number of bytes to read */
#endif
{
return -1;
}
#if __STD_C
#else
Sfio_t* f; /* stream involved */
size_t n; /* number of bytes to read */
#endif
{
m = n;
while(1)
break;
m -= r;
if(m == 0)
break;
}
return n-m;
}
#if __STD_C
#else
Sfio_t* f;
int type;
#endif
{
reg int i;
return -1L;
if(type == 2)
{ extent = 0;
for(i = 0; i < un->n; ++i)
}
else if(type == 1)
if(addr < 0)
return -1;
/* find the stream where the addr could be in */
extent = 0;
for(i = 0; i < un->n-1; ++i)
break;
extent += s;
}
return -1;
un->c = i;
for(i += 1; i < un->n; ++i)
return addr;
}
/* on close, remove the discipline */
#if __STD_C
#else
Sfio_t* f;
int type;
#endif
{
return 0;
}
#if __STD_C
#else
Sfio_t* f;
int n;
#endif
{
reg int i;
if(n <= 0)
return -1;
return -1;
un->n = n;
for(i = 0; i < n; ++i)
}
}
return -1;
}
return 0;
}