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 s

⟦dc04484db⟧ TextFile

    Length: 6286 (0x188e)
    Types: TextFile
    Names: »sa-enc.py«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/dsap/x500as/sa-enc.py« 

TextFile

-- sa-dec.py - Seleted Attributes 

-- $Header: /f/osi/dsap/x500as/RCS/sa-enc.py,v 7.0 89/11/23 21:50:51 mrose Rel $
--
--
-- $Log:	sa-enc.py,v $
-- Revision 7.0  89/11/23  21:50:51  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.
--
--


SA
	{
	joint-iso-ccitt
	ds(5)
	modules(1)
	selectedAttributeTypes(5)
	}

DEFINITIONS ::=

%{
#include <stdio.h>
#include "quipu/util.h"
#include "quipu/entry.h"

extern  LLog    * log_dsap;

#define encode_UNIV_PrintableString build_UNIV_PrintableString
#define encode_UNIV_TeletexString   build_UNIV_TeletexString
#define encode_UNIV_OctetString     build_UNIV_OctetString
#define encode_UNIV_IA5String 	    build_UNIV_IA5String
#define encode_UNIV_T61String 	    build_UNIV_T61String

%}

PREFIXES encode decode print

BEGIN

IMPORTS
	AttributeType
		FROM IF
			{
			joint-iso-ccitt
			ds(5)
			modules(1)
			informationFramework(1)
			};

ENCODER encode

FacsimileTelephoneNumber [[P struct fax *]]
%{
    char *bit_parm;
%}
        ::=
        %{
                DLOG(log_dsap, LLOG_PDUS, ("About to encode FacsimileTelephoneNumber"));
        %}
        SEQUENCE
        {
	telephoneNumber
		PrintableString [[s parm->number]],
	parameters
		BIT STRING
		[[x bit_parm = bitstr2strb (parm -> bits, &len) $ len]]
                %{
                    free (bit_parm);
                %}
                OPTIONAL <<parm -> bits>>

        }
        %{
                DLOG(log_dsap, LLOG_PDUS, ("Done encode FacsimileTelephoneNumber"));
        %}

PostalAddress [[P struct postaddr *]]
%{
struct postaddr * tmp;
%}
	::=
        %{
                DLOG(log_dsap, LLOG_PDUS, ("About to encode PostalAddress"));
        %}
	SEQUENCE OF 
		<<tmp=parm; tmp != (struct postaddr *) NULL; tmp=tmp->pa_next>>
	CHOICE << tmp->addrtype >>
		{
		T61String [[s tmp->addrcomp]],
		PrintableString [[s tmp->addrcomp]]
		}

        %{
                DLOG(log_dsap, LLOG_PDUS, ("Done encode PostalAddress"));
        %}

TelexNumber [[P struct telex *]]
	::=
        %{
                DLOG(log_dsap, LLOG_PDUS, ("About to encode TelexNumber"));
        %}
	SEQUENCE
	{
		telexNumber	PrintableString [[s parm->telexnumber]],
		countryCode	PrintableString [[s parm->countrycode]],
		answerback	PrintableString [[s parm->answerback]]
	}
        %{
                DLOG(log_dsap, LLOG_PDUS, ("Done encode TelexNumber"));
        %}

TeletexTerminalIdentifier [[P struct teletex *]]
	::=
        %{
                DLOG(log_dsap, LLOG_PDUS, ("About to encode TeletexTerminalIdentifier"));
        %}
	SEQUENCE
	{
	teletexTerminal
		PrintableString [[s  parm->terminal]],
	parameters
		SET {
	        graphic-character-sets [0] TeletexString
			[[s parm->graphic]] OPTIONAL <<parm->graphic != NULLCP>>,
	        control-character-sets [1] TeletexString
			[[s parm->control]] OPTIONAL << parm->control != NULLCP>>,
	        page-formats [2] OCTET STRING 
			[[s parm->page]] OPTIONAL << parm->page != NULLCP >>,
	        miscellaneous-terminal-capabilities [3] TeletexString
			[[s parm->misc]] OPTIONAL << parm->misc != NULLCP >>,
	        private-use [4] OCTET STRING 
			[[s parm->t_private]] OPTIONAL << parm->t_private != NULLCP >>
		} OPTIONAL << (parm->graphic != NULLCP) || (parm->control != NULLCP)
			   || (parm->page != NULLCP) || (parm->misc != NULLCP) 
			   || (parm->t_private != NULLCP) >>
	}
        %{
                DLOG(log_dsap, LLOG_PDUS, ("Done encode TeletexTerminalIdentifier"));
        %}

PreferredDeliveryMethod [[P struct pref_deliv *]]
%{
struct pref_deliv * tmp;
%}
	::=
        %{
                DLOG(log_dsap, LLOG_PDUS, ("About to encode PreferredDeliveryMethod"));
        %}
	SEQUENCE OF 
		<<tmp=parm; tmp != (struct pref_deliv *)NULL; tmp=tmp->pd_next>>
	INTEGER [[i tmp->deliv ]]
	{
	any-delivery-method	(0),
	mhs-delivery		(1),
	physical-delivery	(2),
	telex-delivery		(3),
	teletex-delivery	(4),
	g3-facsimilie-delivery	(5),
	g4-facsimilie-delivery	(6),
	ia5-terminal-delivery	(7),
	videotex-delivery	(8),
	telephone-delivery	(9)
	}
        %{
                DLOG(log_dsap, LLOG_PDUS, ("Done encode PreferredDeliveryMethod"));
        %}

CriteriaItem [[P struct CriteriaItem *]]
    ::=
         CHOICE <<parm -> offset>> {
                    equality[0]
                        AttributeType
                        [[p parm -> attrib ]],

                    substrings[1]
                        AttributeType
                        [[p parm -> attrib ]],

                    greaterOrEqual[2]
                        AttributeType
                        [[p parm -> attrib ]],

                    lessOrEqual[3]
                        AttributeType
                        [[p parm -> attrib ]],

                    approximateMatch[4]
                        AttributeType
                        [[p parm -> attrib ]]
                
        }


Criteria [[P struct Criteria *]]
    %{
	struct and_or_set *and_or_set;
    %}
    ::=
        CHOICE
            %{
                and_or_set = parm -> un.and_or;
            %}
            <<parm -> offset>>
        {
            type[0]
                CriteriaItem
                [[p parm -> un.type ]],

            and[1]
                SET OF
                    <<and_or_set = parm -> un.and_or;
                            and_or_set;
                            and_or_set = and_or_set -> and_or_next>>
                    Criteria
                    [[p and_or_set -> and_or_comp]],

            or[2]
		SET OF
                    <<and_or_set = parm -> un.and_or;
                            and_or_set;
                            and_or_set = and_or_set -> and_or_next>>
                    Criteria
                    [[p and_or_set -> and_or_comp]],

            not[3]
                Criteria
                [[p parm -> un.not ]]
        }



Guide [[ P struct Guide *]]
    ::=
    SET {
        objectClass [0]
                OBJECT IDENTIFIER
                [[O parm -> objectClass ]]
                OPTIONAL <<parm -> objectClass>>,
	criteria [1]
		Criteria [[p parm -> criteria]]
    }

END