|
|
BSD 4.3reno
/* showentry.c - */
#ifndef lint
static char *rcsid = "$Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/quipu/dish/showentry.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $";
#endif
/*
* $Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/quipu/dish/showentry.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
*
*
* $Log: showentry.c,v $
* Revision 1.1.1.1 2018/04/24 16:12:56 root
* BSD 4.3reno
*
* Revision 7.2 90/03/15 11:18:34 mrose
* quipu-sync
*
* 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_phone;
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_phone = FALSE;
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], "-phone",5))
fred_phone = TRUE;
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();
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.