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 w

⟦41e777c76⟧ TextFile

    Length: 2976 (0xba0)
    Types: TextFile
    Names: »widgethelp.c«

Derivation

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

TextFile

/* widgethelp.c - Display of assorted help texts */

/*    This file has been modified by Damanjit Mahl @ Brunel University
 *    on 31st October 1989.
 */

#ifndef	lint
static char *rcsid = "$Header: /f/osi/others/quipu/uips/widget2/RCS/widgethelp.c,v 7.2 89/12/19 16:21:28 mrose Exp $";
#endif

/* 
 * $Header: /f/osi/others/quipu/uips/widget2/RCS/widgethelp.c,v 7.2 89/12/19 16:21:28 mrose Exp $
 *
 *
 * $Log:	widgethelp.c,v $
 * Revision 7.2  89/12/19  16:21:28  mrose
 * sync
 * 
 * Revision 7.1  89/12/06  08:22:20  mrose
 * sync
 * 
 * Revision 6.0  89/03/18  23:34:58  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 "sequence.h"
#include <stdio.h>
#include "quipu/util.h"
#include "tailor.h"

#define BUFLEN 1024
#define TEXT 1

#ifdef lint
#define ETCDIR "/etc"
#endif 

#define  HELPDIR "widgethelpdir/"

extern D_seq textseq;
extern D_seq dnseq;
extern int text_state;
extern int current_entry, entry_number, display_entry;

helplist()
{
    cleartext();
    xprint("\n   q   - quit this program.\n");
    xprint("   ?   - get Help on using this program.\n\n");

    xprint("   r   - Read the attributes of address specified by Address.\n");
    xprint("   l   - List objects at address specified by Address.\n");
    xprint("   b   - Widen scope of Address by moving back one level.\n");
    xprint("   s   - Search for the object specified in Value field.\n");
    xprint("   t   - Type of attribute in Value field, e.g. countryName for GB.\n");
    xprint("   k   - Type of match required in search.\n");
    xprint("  <n>  - Set these Address to listed object number <n>.\n");
    xprint("\n  Press initial to get detailed help.\n");
}

help_cncs()
{
    cleartext();
    helplist ();
}

help_addr()
{
    get_help("addr");
}

help_list()
{
    get_help("list");
}

help_read()
{
    get_help("read");
}

help_back()
{
    get_help("back");
}

help_number()
{
    get_help("number");
}

help_srch()
{
    get_help("search");
}

get_help(filename)
char *filename;
{
FILE * helpfp;
char helpbuf[BUFLEN];
char filebuf[BUFLEN];
char *str;

    text_state = TEXT;
    entry_number = 0;
    display_entry = current_entry = 1;
    free_seq(dnseq);
    free_seq(textseq);
    dnseq = 0;
    textseq = 0;

    (void) strcpy(filebuf, HELPDIR);
    (void) strcat(filebuf, filename);
    (void) strcpy(helpbuf, isodefile(filebuf, 0));

    if ((helpfp = fopen(helpbuf, "r")) == (FILE *)NULL ) {
         tprint("Can't open help file '%s'.\n",helpbuf);
	 return;
    }

    while(fgets(filebuf, BUFLEN, helpfp) != (char *) NULL) {
         str = filebuf;
	 while(*str != '\n') str++;
	 *str = '\0';
	 add_seq(&textseq, filebuf);
	 entry_number++;
    }

    (void) fclose(helpfp);

    scrollbar('\0');
}