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 u

⟦ab9a63498⟧ TextFile

    Length: 2333 (0x91d)
    Types: TextFile
    Names: »ut_mm2p1.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦dc59850a2⟧ »EurOpenD22/pp5.0/pp-5.tar.Z« 
        └─⟦e5a54fb17⟧ 
            └─⟦this⟧ »pp-5.0/Lib/pp/ut_mm2p1.c« 

TextFile

 /* ut_p1_mm.c: Deals with conversions between p1 structures <-> fields */

# ifndef lint
static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Lib/pp/RCS/ut_mm2p1.c,v 5.0 90/09/20 16:12:54 pp Exp Locker: pp $";
# endif

/*
 * $Header: /cs/research/pp/hubris/pp-beta/Lib/pp/RCS/ut_mm2p1.c,v 5.0 90/09/20 16:12:54 pp Exp Locker: pp $
 *
 * $Log:	ut_mm2p1.c,v $
 * Revision 5.0  90/09/20  16:12:54  pp
 * rcsforce : 5.0 public release
 * 
 */



#include	"util.h"
#include	<isode/cmd_srch.h>
#include	"q.h"
#include	"tb_bpt84.h"
#include	"dr.h"


extern CMD_TABLE	bptbl_body_parts84 [/* body part types */];


/* ---------------------  Memory -> Field  -------------------------------- */


int mem2prf (resp, mta, usr)   /* creates a PerRecipientFlag from Memory */
int	resp;
int	mta;
int	usr;
{
	int	field = 0;

	PP_DBG (("Lib/mem2prf (%d %d %d)", resp, mta, usr));

	/* -- set the responsibility field -- */
	field |= resp;


	/* -- set the report request field -- */
	switch (mta) {
	case 0:
		break;
	case 1:
		field |= (1 << 2);
		break;
	case 2:
		field |= (1 << 1);
		break;
	case 3:
		field |= (1 << 1);
		field |= (1 << 2);
		break;
	}


	/* -- set the user report request field -- */
	switch (usr) {
	case 0:
		break;
	case 1:
		field |= (1 << 4);
		break;
	case 2:
		field |= (1 << 3);
		break;
	case 3:
		field |= (1 << 3);
		field |= (1 << 4);
		break;
	}


	PP_DBG (("Lib/mem2prf returns (%d)", field));

	return (field);
}




int mem2enctypes (lptr)   /* Memory -> EncodedInformationTypesBitString */
LIST_BPT		*lptr;
{
	int		i,
			field = 0;
	LIST_BPT	*list;


	PP_DBG (("Lib/pp/mem2enctypes ()"));

	for (list = lptr; list; list = list->li_next) {

		PP_DBG (("Lib/pp/mem2enctypes (%s)", list->li_name));

		switch (cmd_srch (list->li_name, bptbl_body_parts84)) {
		case BPT_UNDEFINED:
		case BPT_ODIF:
			i = 0;
			break;
		case BPT_TLX:
			i = 1;
			break;
		case BPT_IA5:
			i = 2;
			break;
		case BPT_G3FAX:
			i = 3;
			break;
		case BPT_TIF0:
			i = 4;
			break;
		case BPT_TTX:
			i = 5;
			break;
		case BPT_VIDEOTEX:
			i = 6;
			break;
		case BPT_VOICE:
			i = 7;
			break;
		case BPT_SFD:
			i = 8;
			break;
		case BPT_TIF1:
			i = 9;
			break;
		default:
			i = -1;
			break;
		}

		if (i > -1)
			field |= (1 << i);
	}


	PP_DBG (("Lib/pp/mem2enctypes (%d)", field));

	return (field);
}