rswrite.c revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1996-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 *
* *
* Phong Vo <kpv@research.att.com> *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#include "rshdr.h"
/* Writing sorted objects.
**
** Written by Kiem-Phong Vo (07/08/96).
*/
do { \
for (;;) \
{ for (;;) \
return -1; \
if (c == RS_DELETE) \
break; \
} \
break; \
} \
if (c != RS_INSERT) \
break; \
} \
} while (0)
} \
} \
}
t = (fr); \
}
#if __STD_C
#else
Sfio_t* f; /* stream to write to */
int type; /* RS_TEXT */
#endif
{
#if 0
return -1;
return -1;
}
#endif
}
else /* external call */
return 0;
return -1;
}
#if _PACKAGE_ast
#else
#endif
{ for(; r; r = r->right)
{ if(r->equal)
return -1;
if(c == RS_DELETE)
continue;
if(c == RS_INSERT)
{ usr = *r;
r = &usr;
}
}
w = r->datalen;
if (u)
else
}
}
{ if(head>=0)
{ for(; r; r = r->right)
{ w = r->datalen;
if (u)
else
}
}
else
{ w = r->datalen;
for(; r; r = r->right)
if (u)
else
}
}
}
else
{ if(head>=0)
{ for(; r; r = r->right)
{ w = r->datalen;
if (u)
else
{ w = e->datalen;
if (u)
else
}
}
}
else
{ w = r->datalen;
for(; r; r = r->right)
if (u)
else
if (u)
else
}
}
}
}
}
else if(local)
n = -n;
goto write_size;
}
{ /* count and write chain size */
for(n = 0, e = r; e; e = e->right)
n += 1;
n = -n;
if(n != 0)
}
{ for(; r; r = r->right)
{ if(r->equal)
return -1;
if(c == RS_DELETE)
continue;
if(c == RS_INSERT)
{ usr = *r;
r = &usr;
}
}
if(head>0)
}
}
else if(head>=0)
{ for(; r; r = r->right)
if(head)
}
}
else
{ w = r->datalen;
for(; r; r = r->right)
}
}
}
else
{ while(r)
{ if((e = r->equal) )
w += 1;
}
else
w += 1;
n = -w;
}
if(head>0)
if((o = r->equal) )
r = r->right;
else if(!(o = r->right) )
break;
else r = e;
if(head>=0)
{ for(; o != e; o = o->right)
if(head)
}
}
else
{ w = o->datalen;
for(; o != e; o = o->right)
}
}
}
}
if(local)
}
else
{ if(rsrv)
}
return 0;
}