summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/tip/aculib/v831.c3
-rw-r--r--usr/src/cmd/tip/cmds.c14
-rw-r--r--usr/src/cmd/tip/cu.c4
-rw-r--r--usr/src/cmd/tip/hunt.c3
-rw-r--r--usr/src/cmd/tip/remcap.c5
-rw-r--r--usr/src/cmd/tip/remote.c32
-rw-r--r--usr/src/cmd/tip/tip.c4
-rw-r--r--usr/src/cmd/tip/tip.h172
-rw-r--r--usr/src/cmd/tip/tipout.c3
9 files changed, 133 insertions, 107 deletions
diff --git a/usr/src/cmd/tip/aculib/v831.c b/usr/src/cmd/tip/aculib/v831.c
index eee2763cce..dc4abc9221 100644
--- a/usr/src/cmd/tip/aculib/v831.c
+++ b/usr/src/cmd/tip/aculib/v831.c
@@ -9,8 +9,6 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Routines for dialing up on Vadic 831
*/
@@ -18,6 +16,7 @@
#include "tip.h"
+int AC;
static char dialit(char *, char *);
static char *sanitize(char *);
static void alarmtr(void);
diff --git a/usr/src/cmd/tip/cmds.c b/usr/src/cmd/tip/cmds.c
index bc3c6c59d3..cfea2c6c82 100644
--- a/usr/src/cmd/tip/cmds.c
+++ b/usr/src/cmd/tip/cmds.c
@@ -9,8 +9,6 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
#include <limits.h>
#ifdef USG
@@ -25,8 +23,20 @@
* miscellaneous commands
*/
+struct termios arg;
+struct termios defarg;
+int FD;
+int fildes[2];
+int repdes[2];
+int pid;
+int sfd;
+int stoprompt;
+int timedout;
int quant[] = { 60, 60, 24 };
+char copyname[80];
+char fname[80];
+char ccc;
char null = '\0';
char *sep[] = { "second", "minute", "hour" };
static char *argv[10]; /* argument vector for take and put */
diff --git a/usr/src/cmd/tip/cu.c b/usr/src/cmd/tip/cu.c
index fb911d64bd..7dc15e6ddd 100644
--- a/usr/src/cmd/tip/cu.c
+++ b/usr/src/cmd/tip/cu.c
@@ -9,10 +9,10 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
+int gid, egid;
+int uid, euid;
void cleanup(void);
void timeout(void);
diff --git a/usr/src/cmd/tip/hunt.c b/usr/src/cmd/tip/hunt.c
index f6280c2834..f06f6149bc 100644
--- a/usr/src/cmd/tip/hunt.c
+++ b/usr/src/cmd/tip/hunt.c
@@ -9,10 +9,9 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
+char *uucplock;
static sigjmp_buf deadline;
static int deadfl;
diff --git a/usr/src/cmd/tip/remcap.c b/usr/src/cmd/tip/remcap.c
index 5159d8b4e2..cc176650fa 100644
--- a/usr/src/cmd/tip/remcap.c
+++ b/usr/src/cmd/tip/remcap.c
@@ -9,8 +9,6 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* remcap - routines for dealing with the remote host data base
*
@@ -28,6 +26,7 @@
#include <string.h>
#include <unistd.h>
#include <ctype.h>
+#include "tip.h"
#ifndef BUFSIZ
#define BUFSIZ 1024
@@ -45,8 +44,6 @@
#define V_TERMCAP "REMOTE"
#define V_TERM "HOST"
-char *RM;
-
/*
* termcap - routines for dealing with the terminal capability data base
*
diff --git a/usr/src/cmd/tip/remote.c b/usr/src/cmd/tip/remote.c
index 3dbe742ed4..8e29f6b311 100644
--- a/usr/src/cmd/tip/remote.c
+++ b/usr/src/cmd/tip/remote.c
@@ -9,10 +9,38 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
+char *DV; /* UNIX device(s) to open */
+char *EL; /* chars marking an EOL */
+char *CM; /* initial connection message */
+char *IE; /* EOT to expect on input */
+char *OE; /* EOT to send to complete FT */
+char *CU; /* call unit if making a phone call */
+char *AT; /* acu type */
+char *PN; /* phone number(s) */
+char *DI; /* disconnect string */
+char *PA; /* parity to be generated */
+
+char *PH; /* phone number file */
+char *RM; /* remote file name */
+char *HO; /* host name */
+
+int BR; /* line speed for conversation */
+int FS; /* frame size for transfers */
+char DU; /* this host is dialed up */
+char HW; /* this device is hardwired, see hunt.c */
+char *ES; /* escape character */
+char *EX; /* exceptions */
+char *FO; /* force (literal next) char */
+char *RC; /* raise character */
+char *RE; /* script record file */
+char *PR; /* remote prompt */
+int DL; /* line delay for file transfers to remote */
+int CL; /* char delay for file transfers to remote */
+int ET; /* echocheck timeout */
+int DB; /* dialback - ignore hangup */
+
/*
* Attributes to be gleened from remote host description
* data base.
diff --git a/usr/src/cmd/tip/tip.c b/usr/src/cmd/tip/tip.c
index 9f06d66955..c18a51ba79 100644
--- a/usr/src/cmd/tip/tip.c
+++ b/usr/src/cmd/tip/tip.c
@@ -19,6 +19,10 @@
#include <sys/wait.h>
#include <locale.h>
+int vflag;
+int cumode;
+FILE *phfd;
+
/*
* Baud rate mapping table
*/
diff --git a/usr/src/cmd/tip/tip.h b/usr/src/cmd/tip/tip.h
index 4f90edaeb1..e59b8846eb 100644
--- a/usr/src/cmd/tip/tip.h
+++ b/usr/src/cmd/tip/tip.h
@@ -11,8 +11,6 @@
#ifndef _TIP_H
#define _TIP_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* tip - terminal interface program
*/
@@ -49,49 +47,47 @@ typedef void (*sig_handler_t)(int); /* works on BSD and SV */
/*
* Remote host attributes
*/
-char *DV; /* UNIX device(s) to open */
-char *EL; /* chars marking an EOL */
-char *CM; /* initial connection message */
-char *IE; /* EOT to expect on input */
-char *OE; /* EOT to send to complete FT */
-char *CU; /* call unit if making a phone call */
-char *AT; /* acu type */
-char *PN; /* phone number(s) */
-char *DI; /* disconnect string */
-char *PA; /* parity to be generated */
-
-char *PH; /* phone number file */
-char *RM; /* remote file name */
-char *HO; /* host name */
-
-int BR; /* line speed for conversation */
-int FS; /* frame size for transfers */
-
-signed char DU; /* this host is dialed up */
-char HW; /* this device is hardwired, see hunt.c */
-char *ES; /* escape character */
-char *EX; /* exceptions */
-char *FO; /* force (literal next) char */
-char *RC; /* raise character */
-char *RE; /* script record file */
-char *PR; /* remote prompt */
-int DL; /* line delay for file transfers to remote */
-int CL; /* char delay for file transfers to remote */
-int ET; /* echocheck timeout */
-int DB; /* dialback - ignore hangup */
+extern char *DV; /* UNIX device(s) to open */
+extern char *EL; /* chars marking an EOL */
+extern char *CM; /* initial connection message */
+extern char *IE; /* EOT to expect on input */
+extern char *OE; /* EOT to send to complete FT */
+extern char *CU; /* call unit if making a phone call */
+extern char *AT; /* acu type */
+extern char *PN; /* phone number(s) */
+extern char *DI; /* disconnect string */
+extern char *PA; /* parity to be generated */
+
+extern char *PH; /* phone number file */
+extern char *RM; /* remote file name */
+extern char *HO; /* host name */
+
+extern int BR; /* line speed for conversation */
+extern int FS; /* frame size for transfers */
+
+extern char DU; /* this host is dialed up */
+extern char HW; /* this device is hardwired, see hunt.c */
+extern char *ES; /* escape character */
+extern char *EX; /* exceptions */
+extern char *FO; /* force (literal next) char */
+extern char *RC; /* raise character */
+extern char *RE; /* script record file */
+extern char *PR; /* remote prompt */
+extern int DL; /* line delay for file transfers to remote */
+extern int CL; /* char delay for file transfers to remote */
+extern int ET; /* echocheck timeout */
+extern int DB; /* dialback - ignore hangup */
/*
* String value table
*/
-typedef
- struct {
- char *v_name; /* whose name is it */
- char v_type; /* for interpreting set's */
- char v_access; /* protection of touchy ones */
- char *v_abrev; /* possible abreviation */
- char *v_value; /* casted to a union later */
- }
- value_t;
+typedef struct {
+ char *v_name; /* whose name is it */
+ char v_type; /* for interpreting set's */
+ char v_access; /* protection of touchy ones */
+ char *v_abrev; /* possible abreviation */
+ char *v_value; /* casted to a union later */
+} value_t;
#define STRING 01 /* string valued */
#define BOOL 02 /* true-false value */
@@ -117,14 +113,12 @@ typedef
/*
* Definition of ACU line description
*/
-typedef
- struct {
- char *acu_name;
- int (*acu_dialer)(char *, char *);
- void (*acu_disconnect)(void);
- void (*acu_abort)(void);
- }
- acu_t;
+typedef struct {
+ char *acu_name;
+ int (*acu_dialer)(char *, char *);
+ void (*acu_disconnect)(void);
+ void (*acu_abort)(void);
+} acu_t;
#define equal(a, b) (strcmp(a, b) == 0) /* A nice function to compare */
@@ -134,20 +128,18 @@ typedef
* initialize it in vars.c, so we cast it as needed to keep lint
* happy.
*/
-typedef
- union {
- int zz_number;
- int *zz_address;
+typedef union {
+ int zz_number;
+ int *zz_address;
#if defined(_LITTLE_ENDIAN)
- short zz_boolean;
- char zz_character;
+ short zz_boolean;
+ char zz_character;
#endif
#if defined(_BIG_ENDIAN)
- int zz_boolean;
- int zz_character;
+ int zz_boolean;
+ int zz_character;
#endif
- }
- zzhack;
+} zzhack;
#define value(v) vtable[v].v_value
@@ -162,14 +154,12 @@ typedef
* at the begining of a line (as defined by the eolmarks variable).
*/
-typedef
- struct {
- char e_char; /* char to match on */
- char e_flags; /* experimental, priviledged */
- char *e_help; /* help string */
- void (*e_func)(int); /* command */
- }
- esctable_t;
+typedef struct {
+ char e_char; /* char to match on */
+ char e_flags; /* experimental, priviledged */
+ char *e_help; /* help string */
+ void (*e_func)(int); /* command */
+} esctable_t;
#define NORM 00 /* normal protection, execute anyone */
#define EXP 01 /* experimental, mark it with a `*' on help */
@@ -234,30 +224,30 @@ extern void loginit(void);
#define NOFILE ((FILE *)NULL)
#define NOPWD ((struct passwd *)0)
-struct termios arg; /* current mode of local terminal */
-struct termios defarg; /* initial mode of local terminal */
-
-FILE *fscript; /* FILE for scripting */
-FILE *phfd; /* FILE for PHONES file */
-
-int fildes[2]; /* file transfer synchronization channel */
-int repdes[2]; /* read process sychronization channel */
-int FD; /* open file descriptor to remote host */
-int AC; /* open file descriptor to dialer (v831 only) */
-int vflag; /* print .tiprc initialization sequence */
-int sfd; /* for ~< operation */
-int pid; /* pid of tipout */
-int uid, euid; /* real and effective user id's */
-int gid, egid; /* real and effective group id's */
-int stoprompt; /* for interrupting a prompt session */
-int timedout; /* ~> transfer timedout */
-int cumode; /* simulating the "cu" program */
-
-char fname[80]; /* file name buffer for ~< */
-char copyname[80]; /* file name buffer for ~> */
-char ccc; /* synchronization character */
-char ch; /* for tipout */
-char *uucplock; /* name of lock file for uucp's */
+extern struct termios arg; /* current mode of local terminal */
+extern struct termios defarg; /* initial mode of local terminal */
+
+extern FILE *fscript; /* FILE for scripting */
+extern FILE *phfd; /* FILE for PHONES file */
+
+extern int fildes[2]; /* file transfer synchronization channel */
+extern int repdes[2]; /* read process sychronization channel */
+extern int FD; /* open file descriptor to remote host */
+extern int AC; /* open file descriptor to dialer (v831 only) */
+extern int vflag; /* print .tiprc initialization sequence */
+extern int sfd; /* for ~< operation */
+extern int pid; /* pid of tipout */
+extern int uid, euid; /* real and effective user id's */
+extern int gid, egid; /* real and effective group id's */
+extern int stoprompt; /* for interrupting a prompt session */
+extern int timedout; /* ~> transfer timedout */
+extern int cumode; /* simulating the "cu" program */
+
+extern char fname[80]; /* file name buffer for ~< */
+extern char copyname[80]; /* file name buffer for ~> */
+extern char ccc; /* synchronization character */
+extern char ch; /* for tipout */
+extern char *uucplock; /* name of lock file for uucp's */
extern int trusted_device;
diff --git a/usr/src/cmd/tip/tipout.c b/usr/src/cmd/tip/tipout.c
index befb468ca8..872313ed68 100644
--- a/usr/src/cmd/tip/tipout.c
+++ b/usr/src/cmd/tip/tipout.c
@@ -9,8 +9,6 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "tip.h"
#include <limits.h>
@@ -21,6 +19,7 @@
* reading from the remote host
*/
+FILE *fscript;
static sigjmp_buf sigbuf;
/*