/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1987-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> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Bell Laboratories
*
* pax conversion support
*/
#include "pax.h"
/*
* set char code conversion for section
*/
void
{
{
}
}
/*
* convert string to lower case in place
*/
char*
strlower(register char* s)
{
register int c;
register char* t;
for (t = s; c = *t; t++)
if (isupper(c))
*t = tolower(c);
return s;
}
/*
* convert string to upper case in place
*/
char*
strupper(register char* s)
{
register int c;
register char* t;
for (t = s; c = *t; t++)
if (islower(c))
*t = toupper(c);
return s;
}
/*
* return 1 if s is a portable string
*/
int
{
register unsigned char* u = (unsigned char*)s;
register unsigned char* m;
register int c;
{
while (c = *u++)
if (c > 0177)
return 0;
}
else
{
while (c = m[*u++])
if (c > 0177)
return 0;
}
return 1;
}
/*
* this is an obsolete version of the ast library implementation
*/
#define OHASHPART(b,h,c,l,r) (h = ((h = ((unsigned)h << (l)) ^ (h >> (r)) ^ (c)) & ((unsigned)1 << (b)) ? ~h : h) & (((((unsigned)1 << ((b) - 1)) - 1) << 2) | 3))
unsigned long
omemsum(const void* b, int n, register unsigned long c)
{
register unsigned char* p;
register unsigned char* e;
p = (unsigned char*)b;
e = p + n;
while (p < e) OHASHLPART(c, *p++ + 1);
return c;
}