Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
/* $XConsortium: trierset.c /main/3 1995/11/08 10:38:45 rswiston $ */
/*
Copyright 1988, 1989 Hewlett-Packard Co.
*/
#include <stdio.h>
#include "basic.h"
#include "common.h"
#include "trie.h"
extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
/* Changes the value associated with an entry in a trie. */
void *m_resettrie(xtrie, p, value)
M_TRIE *xtrie ;
M_WCHAR *p ;
void *value ;
{
M_TRIE *currentnode ;
currentnode = xtrie->data ;
while (TRUE) {
if (! currentnode) return(FALSE) ;
if ((int) currentnode->symbol == m_ctupper(*p))
if (! *p) return((void *)(currentnode->data = (M_TRIE *) value)) ;
else {
p++ ;
currentnode = currentnode->data ;
continue ;
}
else if (currentnode->symbol < *p) {
currentnode = currentnode->next ;
continue ;
}
else return(NULL) ;
}
}