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 r

⟦477cb855a⟧ TextFile

    Length: 1296 (0x510)
    Types: TextFile
    Names: »rfc2msgid.c«

Derivation

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

TextFile

/* rfc2msgid - Converts a RFC string into a MPDUid struct */

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

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



#include        "util.h"
#include        "mta.h"




/* ---------------------  Begin  Routines  -------------------------------- */




int rfc2msgid (mp, str)
register MPDUid         *mp;
char                    *str;
{
	char            *cp, *start, *end, *temp;

	PP_DBG (("Lib/rfc2msgid (%s)", str));

	temp = strdup(str);
	start = temp;
	if (*start == '[') {
		start++;
		end = str+strlen(str);
		if (*end == ']')
			*end = '\0';
	}

	/* try parsing as dom;string */
	cp = rindex (start, ';');
	if (cp != NULLCP) {
		*cp++ = '\0';
		if (rfc2globalid (&mp->mpduid_DomId, start) == OK) {
			mp->mpduid_string = strdup (cp);
			free(temp);
			return OK;
		}
	}
	free(temp);
	GlobalDomId_free(&mp->mpduid_DomId);
	/* put in loc dom and string */
	mp->mpduid_string = strdup (str);
	GlobalDomId_new (&mp->mpduid_DomId);
	return OK;
}