remote.c revision 8d489c7a815fcac696803219572e95aa01532b0f
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "tip.h"
/*
* Attributes to be gleened from remote host description
* data base.
*/
static char **caps[] = {
};
static char *capstrings[] = {
"at", "dv", "cm", "cu", "el", "ie", "oe", "pn", "pr",
"di", "es", "ex", "fo", "rc", "re", "pa", 0
};
extern char *rgetstr(char *, char **);
static void
{
int stat;
char **p, ***q;
if (DV ||
/*
* If the user specifies a device on the commandline,
* don't trust it.
*/
if (host[0] == '/')
trusted_device = 0;
HW = 1;
DU = 0;
if (!BR)
RE = (char *)"tip.record";
EX = (char *)"\t\n\b\f";
DL = 0;
CL = 0;
ET = 10;
return;
}
"tip: unknown host %s\n" :
"tip: can't open host description file\n", host);
exit(3);
}
if (**q == NULL)
if (DU < 0)
DU = 0;
else
exit(3);
}
exit(3);
}
/*
* This effectively eliminates the "hw" attribute
* from the description file
*/
if (!HW)
/*
* see if uppercase mode should be turned on initially
*/
if (rgetflag("ra"))
if (rgetflag("ec"))
if (rgetflag("be"))
if (rgetflag("nb"))
if (rgetflag("sc"))
if (rgetflag("tb"))
if (rgetflag("vb"))
if (rgetflag("nv"))
if (rgetflag("ta"))
if (rgetflag("nt"))
if (rgetflag("rw"))
if (rgetflag("hd"))
if (rgetflag("hf"))
RE = (char *)"tip.record";
EX = (char *)"\t\n\b\f";
DL = 0;
CL = 0;
ET = 10;
}
char *
{
char *cp;
static char *next;
static int lookedup = 0;
if (!lookedup) {
exit(3);
}
lookedup++;
}
/*
* We return a new device each time we're called (to allow
* a rotary action to be simulated)
*/
return (NOSTR);
} else {
*cp++ = '\0';
}
return (DV);
}