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,49 @@
/* $XConsortium: ifdata.c /main/3 1995/11/08 10:53:18 rswiston $ */
/* Copyright 1988, 1989 Hewlett-Packard Co. */
/* Ifdata.c contains functions used by the interface to access the
single item of interface-determined data stored on the parse stack. */
#include <stdio.h>
#include "basic.h"
#include "trie.h"
#include "dtdext.h"
#include "parser.h"
/* Retrieve the interface data stored with the current element's nth parent */
void *m_getdata(n, flag)
int n ;
LOGICAL *flag ;
{
M_PARSE *stackptr ;
for (stackptr = m_stacktop ;
stackptr->oldtop && n >= 0 ;
stackptr = stackptr->oldtop, n--) {
if (! n) {
*flag = TRUE ;
return(stackptr->ifdata) ;
}
}
*flag = FALSE ;
return(NULL) ;
}
/* Store interface data for the current element's nth parent */
LOGICAL m_putdata(data, n)
void *data ;
int n ;
{
M_PARSE *stackptr ;
for (stackptr = m_stacktop ;
stackptr->oldtop && n >= 0 ;
stackptr = stackptr->oldtop, n--) {
if (! n) {
stackptr->ifdata = data ;
return(TRUE) ;
}
}
return(FALSE) ;
}