DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T f

⟦3afbe85aa⟧ TextFile

    Length: 1959 (0x7a7)
    Types: TextFile
    Names: »ftamshare.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/ftam/ftamshare.c« 

TextFile

/* ftamshare.c - FPM: encode/decode shared ASE information */

#ifndef	lint
static char *rcsid = "$Header: /f/osi/ftam/RCS/ftamshare.c,v 7.0 89/11/23 21:53:53 mrose Rel $";
#endif

/* 
 * $Header: /f/osi/ftam/RCS/ftamshare.c,v 7.0 89/11/23 21:53:53 mrose Rel $
 *
 *
 * $Log:	ftamshare.c,v $
 * Revision 7.0  89/11/23  21:53:53  mrose
 * Release 6.0
 * 
 */

/*
 *				  NOTICE
 *
 *    Acquisition, use, and distribution of this module and related
 *    materials are subject to the restrictions of a license agreement.
 *    Consult the Preface in the User's Manual for the full terms of
 *    this agreement.
 *
 */


/* LINTLIBRARY */

#include <stdio.h>
#include "fpkt.h"

/* \f

 */

struct type_FTAM_Shared__ASE__Information *shared2fpm (fsb, sharedASE, fti)
register struct ftamblk *fsb;
PE	sharedASE;
struct FTAMindication *fti;
{
    register struct type_FTAM_Shared__ASE__Information *fpm;

    if ((fpm = (struct type_FTAM_Shared__ASE__Information *)
		    calloc (1, sizeof *fpm)) == NULL) {
	(void) ftamlose (fti, FS_GEN (fsb), 1, NULLCP, "out of memory");
	if (fpm)
	    free_FTAM_Shared__ASE__Information (fpm);
	return NULL;
    }

    fpm -> indirect__reference = sharedASE -> pe_context;
    fpm -> encoding -> offset = choice_UNIV_0_single__ASN1__type;
    (fpm -> encoding -> un.single__ASN1__type = sharedASE) -> pe_refcnt++;

    return fpm;
}

/* \f

 */

int	fpm2shared (fsb, fpm, sharedASE, fti)
struct ftamblk *fsb;
register struct type_FTAM_Shared__ASE__Information *fpm;
PE    *sharedASE;
struct FTAMindication *fti;
{
    PE	    pe;
    
    if (fpm -> encoding -> offset != choice_UNIV_0_single__ASN1__type)
	return ftamlose (fti, FS_GEN (fsb), 1, NULLCP,
			 "shared ASE information not single-ASN1-type");

    if ((pe = pe_cpy (fpm -> encoding -> un.single__ASN1__type)) == NULLPE)
	(void) ftamlose (fti, FS_GEN (fsb), 1, NULLCP, "out of memory");
    (*sharedASE = pe) -> pe_context = fpm -> indirect__reference;

    return OK;
}