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

⟦998f57182⟧ TextFile

    Length: 3132 (0xc3c)
    Types: TextFile
    Names: »showentry.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/quipu/dish/showentry.c« 

TextFile

/* showentry.c - */

#ifndef	lint
static char *rcsid = "$Header: /f/osi/quipu/dish/RCS/showentry.c,v 7.1 90/01/11 18:37:46 mrose Exp $";
#endif

/* 
 * $Header: /f/osi/quipu/dish/RCS/showentry.c,v 7.1 90/01/11 18:37:46 mrose Exp $
 *
 *
 * $Log:	showentry.c,v $
 * Revision 7.1  90/01/11  18:37:46  mrose
 * real-sync
 * 
 * Revision 7.0  89/11/23  22:20:22  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.
 *
 */


#include "quipu/util.h"
#include "quipu/dua.h"
#include "quipu/entry.h"
#include "quipu/read.h"

extern Entry    current_entry;
extern DN       current_dn;

#define	OPT	(!frompipe || rps -> ps_byteno == 0 ? opt : rps)
#define	RPS	(!frompipe || opt -> ps_byteno == 0 ? rps : opt)
extern	char	frompipe;
extern	PS	opt, rps;

extern DN       dn;
char 		move_flag;

extern char	fred_flag;
extern char	fred_expand;
extern char	fred_long;
extern char	fred_sequence;
extern char	fred_subdisplay;

extern LLog    *log_dua;

call_showentry (argc, argv)
int             argc;
char          **argv;
{
	Attr_Sequence   eptr;
	char           *vect[2];
	int             x;
	extern char	name_flag;
	extern char	all_flag;
	extern Attr_Sequence as_flag;
	extern char	flag_show;

	vect[0] = "showentry";

	move_flag = FALSE;
 	fred_flag = FALSE;
 	fred_expand = FALSE;
 	fred_long = 2;
 	fred_sequence = TRUE;
 	fred_subdisplay = FALSE;
	name_flag = FALSE;

	for (x=1; x<argc; x++) {
		if (test_arg (argv[x], "-move",2))
			move_flag = TRUE;
		else if (test_arg (argv[x], "-nomove",3))
			move_flag = FALSE;
		else if (test_arg (argv[x], "-fred",4))
			fred_flag = TRUE;
		else if (test_arg (argv[x], "-expand",4))
			fred_expand = TRUE;
		else if (test_arg (argv[x], "-full",4))
			fred_long = TRUE;
		else if (test_arg (argv[x], "-summary",7))
			fred_long = FALSE;
		else if (test_arg (argv[x], "-nofredseq",9))
			fred_sequence = FALSE;
		else if (test_arg (argv[x], "-subdisplay",10))
			fred_subdisplay = TRUE;
		else
			continue;
		shuffle_up (argc--,argv,x--);

	}
	if ((argc = read_cache (argc, argv)) < 0)
		return;

	
	if (argc != 1) {
		ps_printf (OPT,"Unknown option %s\n",argv[1]);
		Usage (argv[0]);
		return;
	}

	if (current_entry == NULLENTRY) {
		ps_print (OPT,"Specify an entry \n");
		/* this CAN happen - when the entry is not cache, but -noread */
		return;
	}

	if (fred_flag) {
	    if (fred_long == 2)
		if ((fred_subdisplay && fred_expand)
			|| (!fred_subdisplay && !fred_expand))
		    fred_long = TRUE;
		else
		    fred_long = fred_expand;
	    if (fred_expand)
		fred_long = fred_subdisplay = TRUE;

	    (void) showfred (current_dn, fred_long, fred_subdisplay);
	}
	else {
		if (name_flag) {
			dn_print (RPS,dn,EDBOUT);
			ps_print (RPS,"\n");
		}

		if (all_flag) 
			eptr = current_entry->e_attributes;
		else
			eptr = as_flag;

			if (flag_show)
			for (; eptr != NULLATTR; eptr = eptr->attr_link)
				showattribute (&eptr->attr_type);
	}

	consolidate_move();
}