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 a

⟦555c98e13⟧ TextFile

    Length: 967 (0x3c7)
    Types: TextFile
    Names: »ap_dmflip.c«

Derivation

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

TextFile

/* ap_dmflip.c: flip domains around */

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

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



#include "util.h"


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


char *ap_dmflip(buf)
char    *buf;
{
	char            tbuf[LINESIZE];
	char            *cp;
	register char   *p,
			*q;

	/* -- don't flip if quoted or dlit -- */
	if (*buf == '"' || *buf == '[')
		return (strdup (buf));

	(void) strcpy (tbuf, buf);

	cp = smalloc (strlen (buf) + 1);

	for(q = cp; (p = rindex (tbuf, '.')) != NULLCP;  *(q-1) = '.') {
		*p++ = 0;
		while(*q++ = *p++);
	}

	p = tbuf;
	while(*q++ = *p++);
	return (cp);
}