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 t

⟦0c82c8846⟧ TextFile

    Length: 2575 (0xa0f)
    Types: TextFile
    Names: »test.c«

Derivation

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

TextFile

/* test.c - */

# ifndef lint
static char Rcsid[] = "@(#)$Header: /cs/research/pp/hubris/pp-beta/Chans/dirlist/RCS/test.c,v 5.0 90/09/20 15:46:20 pp Exp Locker: pp $";
# endif

/*
 * $Header: /cs/research/pp/hubris/pp-beta/Chans/dirlist/RCS/test.c,v 5.0 90/09/20 15:46:20 pp Exp Locker: pp $
 *
 * $Log:	test.c,v $
 * Revision 5.0  90/09/20  15:46:20  pp
 * rcsforce : 5.0 public release
 * 
 */



/*
 *				  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.
 *
 */


#include "quipu/util.h"
#include "quipu/entry.h"
#include <varargs.h>

main ()
{
	char buffer [1024];
	Attr_Sequence as;
	Attr_Sequence as2;
	extern PS opt;
	extern int parse_line;
	extern int parse_status;
	extern char * TidyString ();
	extern int oidformat;
	PE pe = NULLPE;

	isodetailor ("test",1);

	quipu_syntaxes ();
	pp_syntaxes();
	sys_init("test");
	or_myinit();
	load_oid_table ("/cs/research/dsa/hubris/incads/etc/oidtable");


	parse_line = 0;
	parse_error ("Attribute parser %s","test");

	for (;;) {
		(void) fprintf (stderr,"-> ");
		if (fgets (buffer, sizeof buffer, stdin) == 0)
			exit (0);
		parse_status = 0;

		as = str2as (TidyString(buffer));

		if (as == NULLATTR) {
			(void) fprintf (stderr,"NULL value\n");
			continue;
		}
		if (parse_status != 0) {
			(void) fprintf (stderr,"parse error - non null as\n");
                        continue;
		}

		if (encode_IF_Attribute (&pe, 0, 0, NULLCP, as) == NOTOK) {
			(void) fprintf (stderr,"encode problem\n");
			continue;
		}

		pe2pl (opt,pe);

		if (decode_IF_Attribute (pe, 1, NULLIP, NULLVP, as) == NOTOK) {
			(void) fprintf (stderr,"decode problem\n");
			continue;
		}

		(void) as_decode (as);

		ps_print (opt,"EDBOUT:\n");
		as_print (opt,as,EDBOUT);

		as2 = as_cpy (as);

		if (as_cmp (as2,as) != 0)
			(void) fprintf (stderr,"*** Compare/Copy problem ***\n");

		as_free (as);

		if (as2 == NULLATTR)
			(void) fprintf (stderr,"NULL value 2\n");
		else {
			ps_print (opt,"READOUT:\n");
			as_print (opt,as2,READOUT);
		}

		as_free (as2);
		pe = NULLPE;

	}

}

#ifndef lint

void    advise (va_alist)
va_dcl
{
    int     code;
    va_list ap;
    extern LLog * log_dsap;

    va_start (ap);

    code = va_arg (ap, int);

    (void) _ll_log (log_dsap, code, ap);

    va_end (ap);
}

#else
/* VARARGS */

void    advise (code, what, fmt)
char    *what,
        *fmt;
int      code;
{
    advise (code, what, fmt);
}
#endif