/* A Bison parser, made from /home/gd4/gnu/inetutils/ftpd/ftpcmd.y
by Bison version A2.5 (Andrew Consortium)
*/
#define YYBISON 1 /* Identify Bison output. */
#define A 258
#define B 259
#define C 260
#define E 261
#define F 262
#define I 263
#define L 264
#define N 265
#define P 266
#define R 267
#define S 268
#define T 269
#define SP 270
#define CRLF 271
#define COMMA 272
#define USER 273
#define PASS 274
#define ACCT 275
#define REIN 276
#define QUIT 277
#define PORT 278
#define PASV 279
#define TYPE 280
#define STRU 281
#define MODE 282
#define RETR 283
#define STOR 284
#define APPE 285
#define MLFL 286
#define MAIL 287
#define MSND 288
#define MSOM 289
#define MSAM 290
#define MRSQ 291
#define MRCP 292
#define ALLO 293
#define REST 294
#define RNFR 295
#define RNTO 296
#define ABOR 297
#define DELE 298
#define CWD 299
#define LIST 300
#define NLST 301
#define SITE 302
#define STAT 303
#define HELP 304
#define NOOP 305
#define MKD 306
#define RMD 307
#define PWD 308
#define CDUP 309
#define STOU 310
#define SMNT 311
#define SYST 312
#define SIZE 313
#define MDTM 314
#define UMASK 315
#define IDLE 316
#define CHMOD 317
#define LEXERR 318
#define STRING 319
#define NUMBER 320
#line 41 "/home/gd4/gnu/inetutils/ftpd/ftpcmd.y"
#ifndef lint
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#endif /* not lint */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <arpa/ftp.h>
#include <ctype.h>
#include <errno.h>
#include <pwd.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#include <unistd.h>
#include <limits.h>
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
/* Include glob.h last, because it may define "const" which breaks
system headers on some platforms. */
#include <glob.h>
#include "extern.h"
#if ! defined (NBBY) && defined (CHAR_BIT)
#define NBBY CHAR_BIT
#endif
extern struct sockaddr_in data_dest;
extern int logged_in;
extern struct passwd *pw;
extern int guest;
extern int logging;
extern int type;
extern int form;
extern int debug;
extern int timeout;
extern int maxtimeout;
extern int pdata;
extern char *hostname, *remotehost;
extern char proctitle[];
extern int usedefault;
extern int transflag;
extern char tmpline[];
off_t restart_point;
static int cmd_type;
static int cmd_form;
static int cmd_bytesz;
char cbuf[512];
char *fromname;
struct tab {
char *name;
short token;
short state;
short implemented; /* 1 if command is implemented */
char *help;
};
extern struct tab cmdtab[], sitetab[];
static char *copy __P((char *));
static void help __P((struct tab *, char *));
static struct tab *
lookup __P((struct tab *, char *));
static void sizecmd __P((char *));
static void toolong __P((int));
static int yylex __P((void));
#line 138 "/home/gd4/gnu/inetutils/ftpd/ftpcmd.y"
typedef union {
int i;
char *s;
} YYSTYPE;
#include <stdio.h>
#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif
#define YYFINAL 206
#define YYFLAG -32768
#define YYNTBASE 66
#define YYTRANSLATE(x) ((unsigned)(x) <= 320 ? yytranslate[x] : 81)
static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65
};
#if YYDEBUG != 0
static const short yyprhs[] = { 0,
0, 1, 4, 7, 12, 17, 22, 26, 31, 36,
41, 46, 55, 61, 67, 73, 77, 83, 87, 93,
99, 102, 108, 113, 116, 120, 126, 129, 134, 137,
143, 149, 153, 157, 162, 169, 175, 183, 193, 198,
205, 211, 214, 220, 226, 229, 232, 238, 243, 245,
246, 248, 250, 262, 264, 266, 268, 270, 274, 276,
280, 282, 284, 288, 291, 293, 295, 297, 299, 301,
303, 305, 307, 309
};
static const short yyrhs[] = { -1,
66, 67, 0, 66, 68, 0, 18, 15, 69, 16,
0, 19, 15, 70, 16, 0, 23, 15, 72, 16,
0, 24, 80, 16, 0, 25, 15, 74, 16, 0,
26, 15, 75, 16, 0, 27, 15, 76, 16, 0,
38, 15, 65, 16, 0, 38, 15, 65, 15, 12,
15, 65, 16, 0, 28, 80, 15, 77, 16, 0,
29, 80, 15, 77, 16, 0, 30, 80, 15, 77,
16, 0, 46, 80, 16, 0, 46, 80, 15, 64,
16, 0, 45, 80, 16, 0, 45, 80, 15, 77,
16, 0, 48, 80, 15, 77, 16, 0, 48, 16,
0, 43, 80, 15, 77, 16, 0, 41, 15, 77,
16, 0, 42, 16, 0, 44, 80, 16, 0, 44,
80, 15, 77, 16, 0, 49, 16, 0, 49, 15,
64, 16, 0, 50, 16, 0, 51, 80, 15, 77,
16, 0, 52, 80, 15, 77, 16, 0, 53, 80,
16, 0, 54, 80, 16, 0, 47, 15, 49, 16,
0, 47, 15, 49, 15, 64, 16, 0, 47, 15,
60, 80, 16, 0, 47, 15, 60, 80, 15, 79,
16, 0, 47, 15, 62, 80, 15, 79, 15, 77,
16, 0, 47, 15, 61, 16, 0, 47, 15, 61,
15, 65, 16, 0, 55, 80, 15, 77, 16, 0,
57, 16, 0, 58, 80, 15, 77, 16, 0, 59,
80, 15, 77, 16, 0, 22, 16, 0, 1, 16,
0, 4