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 d

⟦051d6d4e0⟧ TextFile

    Length: 4537 (0x11b9)
    Types: TextFile
    Names: »dishhelp.c«

Derivation

└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
    └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« 
        └─⟦d3ac74d73⟧ 
            └─⟦this⟧ »isode-5.0/quipu/dish/dishhelp.c« 

TextFile

/* dishhelp.c - */

#ifndef	lint
static char *rcsid = "$Header: /f/osi/quipu/dish/RCS/dishhelp.c,v 6.0 89/03/18 23:40:42 mrose Rel $";
#endif

/* 
 * $Header: /f/osi/quipu/dish/RCS/dishhelp.c,v 6.0 89/03/18 23:40:42 mrose Rel $
 *
 *
 * $Log:	dishhelp.c,v $
 * Revision 6.0  89/03/18  23:40:42  mrose
 * Release 5.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/name.h"

extern PS       opt;
extern PS       rps;

struct {
	char           *command;
	char           *args;
	char            serv;
	char	        other;
	char 	       *use;
	
} help_info[] = {
	"showentry", 	"[-[no]cache] [-[no]name] [-[no]move]", TRUE,TRUE,
			"show an entry, read it if not cached,",
	"showname", 	"[-[no]compact]", TRUE,TRUE,
			"show the name of an entry,",
	"compare", 	"-attribute <attributeType '=' attributeValue>\n[-[no]print]", TRUE,FALSE,
			"compare attribute with the supplied value,",
	"list", 	"[-cache] [-noshow] [-[no]move]", TRUE,TRUE,
			"list children of the current node",
	"search", 	"[-baseobject] [-singlelevel] [-subtree]\n [-filter <filter>]\n[-[no]relative]", TRUE,FALSE,
			"search the tree for an object,",
	"delete", 	0, TRUE,FALSE,
			"delete an object,",
	"add", 		"[-draft <draft> [-noedit]] [-newdraft]\n [-objectclass <objectclass>]", TRUE,FALSE,
			"add a new node,",
	"modify", 	"[-draft <draft> [-noedit]] [-newdraft] ", TRUE,TRUE,
			"modify an existing node,",
	"modifyrdn", 	"-name <attributeType '=' attributeValue> [-[no]delete]", TRUE, FALSE,
			"modify the name of a node,",
	"dsacontrol", 	"[-[un]lock <entry>] [-dump <file>]\n[-tailor <string>] [-abort]\n[-refresh <entry>] [-resync <entry>] [-slave]", FALSE, FALSE,
			"control the operation of the dsa,",
	"squid",	"[-sequence]",FALSE, FALSE,
			"status of dish,",
	"unbind", 	"[-noquit] [-cache <cache file>]", FALSE, FALSE,
			"disconnect from the directory,",
	"bind",		"[-noconnect] [-user <name>]\n[-password <password>]\n\t[-call <dsa name>] [-cache <cache file>]", FALSE, FALSE,
			"connect to the directory,",
	"moveto", 	"[-[no]pwd] [-[no]check] <position>", FALSE, FALSE,
			"move to position in the DIT",
	"dish",		"[-pipe] [-noconnect] [-user <name>]\n[-password <password>] [-call <dsa name>]", FALSE, FALSE,
			"Directory Shell.",
	0, 		0, FALSE
};

Usage (rtn)
char           *rtn;
{
	extern DN       dn,
	                savename;
	int             i;

	dn_free (dn);
	dn = savename;
	savename = NULLDN;

	if (print_arg_error (opt) == OK)
		return;

	for (i = 0; help_info[i].command != 0; i++)
		if (strcmp (help_info[i].command, rtn) == 0) {
			if (help_info[i].serv) {
				ps_printf (opt, "Usage %s [-help] [<object>] %s \n", rtn, help_info[i].args);
				print_other(opt, help_info[i].other);
				ps_printf (opt, "[<service controls>]\n");
			} else
				ps_printf (opt, "Usage %s [-help] %s\n", rtn, help_info[i].args);
			return;
		}
	ps_print (opt, "Usage...\n");
}

help_arg (rtn)
char           *rtn;
{
	int             i;

	for (i = 0; help_info[i].command != 0; i++)
		if (strcmp (help_info[i].command, rtn) == 0) {
			if (help_info[i].serv) {
				ps_printf (rps, "%-10s - %s\n[<object>] %s ", rtn, help_info[i].use,help_info[i].args);
				print_other(rps,help_info[i].other);
				print_service();
			} else
				ps_printf (rps, "%-10s - %s\n%s\n", rtn, help_info[i].use,help_info[i].args);
			return;
		}
	ps_print (opt,"Sorry - No help available\n");
}

print_other (aps,x) 
PS aps;
char x;
{
	if (x == FALSE)
		return;
		
	ps_print (aps,"\n[-[no]types <attribute-type> *] [-[no]all]\n[-[no]value] [-[no]show]\n[-[no]key] [-edb] ");
}

print_service ()
{
	ps_print (rps,"[-[no]sequence]\n");
	ps_print (rps,"[-[no]preferchain] [-[no]chaining]\n");
	ps_print (rps,"[-[dont]usecopy] [-[dont]dereferencealias]\n");
	ps_print (rps,"[-low] [-medium] [-high]\n");
	ps_print (rps,"[-timelimit n] [-notimelimit]\n");
	ps_print (rps,"[-sizelimit n] [-nosizelimit]\n");
	ps_print (rps,"[-[no]localscope] [-help]\n");

}

call_help ()
{
	int             i;

	ps_print (rps, "The following commands are recognised...\n\n");

	for (i = 0; help_info[i+1].command != 0; i++)
		ps_printf (rps, "%-10s - %s\n", help_info[i].command, help_info[i].use);

	ps_print (rps,"\nEnter <command> -help for help on that command\n");
	ps_print (rps, "See the DISH manual for full details\n\n");
}