genericunixprotocols/ftpsrv/src/ftpcmd.cpp
author ravikurupati
Mon, 22 Mar 2010 11:28:32 +0530
changeset 2 23ed33aed077
parent 0 c6b0df440bee
permissions -rw-r--r--
Updated the readme to reflect the current support.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
     1
//
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
     2
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
     3
// All rights reserved.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
     4
// This component and the accompanying materials are made available
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
     5
// under the terms of "Eclipse Public License v1.0"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
     6
// which accompanies this distribution, and is available
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
     7
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
     8
//
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
     9
// Initial Contributors:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    10
// Nokia Corporation - initial contribution.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    11
//
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    12
// Contributors:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    13
//
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    14
// Description:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    15
//
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    16
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    17
/* A Bison parser, made by GNU Bison 2.1.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    18
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    19
/* Skeleton parser for Yacc-like parsing with Bison,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    20
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    21
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    22
   This program is free software; you can redistribute it and/or modify
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    23
   it under the terms of the GNU General Public License as published by
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    24
   the Free Software Foundation; either version 2, or (at your option)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    25
   any later version.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    26
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    27
   This program is distributed in the hope that it will be useful,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    28
   but WITHOUT ANY WARRANTY; without even the implied warranty of
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    29
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    30
   GNU General Public License for more details.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    31
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    32
   You should have received a copy of the GNU General Public License
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    33
   along with this program; if not, write to the Free Software
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    34
   Foundation, Inc., 51 Franklin Street, Fifth Floor,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    35
   Boston, MA 02110-1301, USA.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    36
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    37
/* As a special exception, when this file is copied by Bison into a
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    38
   Bison output file, you may use that output file without restriction.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    39
   This special exception was added by the Free Software Foundation
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    40
   in version 1.24 of Bison.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    41
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    42
/* Written by Richard Stallman by simplifying the original so called
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    43
   ``semantic'' parser.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    44
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    45
/* All symbols defined below should begin with yy or YY, to avoid
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    46
   infringing on user name space.  This should be done even for local
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    47
   variables, as they might otherwise be expanded by user macros.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    48
   There are some unavoidable exceptions within include files to
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    49
   define necessary library symbols; they are noted "INFRINGES ON
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    50
   USER NAME SPACE" below.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    51
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    52
/* Identify Bison output.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    53
#define YYBISON 1
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    54
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    55
/* Bison version.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    56
#define YYBISON_VERSION "2.1"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    57
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    58
/* Skeleton name.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    59
#define YYSKELETON_NAME "yacc.c"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    60
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    61
/* Pure parsers.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    62
#define YYPURE 0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    63
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    64
/* Using locations.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    65
#define YYLSP_NEEDED 0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    66
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    67
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    68
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    69
/* Tokens.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    70
#ifndef YYTOKENTYPE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    71
# define YYTOKENTYPE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    72
   /* Put the tokens into the symbol table, so that GDB and other debuggers
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    73
      know about them.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    74
   enum yytokentype {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    75
     A = 258,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    76
     B = 259,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    77
     C = 260,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    78
     E = 261,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    79
     F = 262,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    80
     I = 263,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    81
     L = 264,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    82
     N = 265,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    83
     P = 266,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    84
     R = 267,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    85
     S = 268,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    86
     T = 269,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    87
     SP = 270,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    88
     CRLF = 271,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    89
     COMMA = 272,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    90
     USER = 273,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    91
     PASS = 274,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    92
     ACCT = 275,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    93
     REIN = 276,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    94
     QUIT = 277,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    95
     PORT = 278,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    96
     PASV = 279,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    97
     TYPE = 280,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    98
     STRU = 281,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
    99
     MODE = 282,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   100
     RETR = 283,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   101
     STOR = 284,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   102
     APPE = 285,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   103
     MLFL = 286,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   104
     MAIL = 287,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   105
     MSND = 288,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   106
     MSOM = 289,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   107
     MSAM = 290,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   108
     MRSQ = 291,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   109
     MRCP = 292,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   110
     ALLO = 293,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   111
     REST = 294,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   112
     RNFR = 295,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   113
     RNTO = 296,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   114
     ABOR = 297,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   115
     DELE = 298,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   116
     CWD = 299,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   117
     LIST = 300,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   118
     NLST = 301,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   119
     SITE = 302,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   120
     STAT = 303,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   121
     HELP = 304,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   122
     NOOP = 305,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   123
     MKD = 306,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   124
     RMD = 307,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   125
     PWD = 308,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   126
     CDUP = 309,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   127
     STOU = 310,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   128
     SMNT = 311,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   129
     SYST = 312,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   130
     SIZE = 313,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   131
     MDTM = 314,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   132
     UMASK = 315,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   133
     IDLE = 316,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   134
     CHMOD = 317,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   135
     LEXERR = 318,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   136
     STRING = 319,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   137
     NUMBER = 320
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   138
   };
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   139
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   140
/* Tokens.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   141
#define A 258
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   142
#define B 259
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   143
#define C 260
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   144
#define E 261
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   145
#define F 262
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   146
#define I 263
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   147
#define L 264
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   148
#define N 265
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   149
#define P 266
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   150
#define R 267
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   151
#define S 268
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   152
#define T 269
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   153
#define SP 270
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   154
#define CRLF 271
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   155
#define COMMA 272
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   156
#define USER 273
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   157
#define PASS 274
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   158
#define ACCT 275
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   159
#define REIN 276
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   160
#define QUIT 277
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   161
#define PORT 278
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   162
#define PASV 279
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   163
#define TYPE 280
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   164
#define STRU 281
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   165
#define MODE 282
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   166
#define RETR 283
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   167
#define STOR 284
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   168
#define APPE 285
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   169
#define MLFL 286
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   170
#define MAIL 287
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   171
#define MSND 288
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   172
#define MSOM 289
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   173
#define MSAM 290
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   174
#define MRSQ 291
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   175
#define MRCP 292
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   176
#define ALLO 293
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   177
#define REST 294
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   178
#define RNFR 295
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   179
#define RNTO 296
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   180
#define ABOR 297
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   181
#define DELE 298
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   182
#define CWD 299
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   183
#define LIST 300
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   184
#define NLST 301
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   185
#define SITE 302
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   186
#define STAT 303
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   187
#define HELP 304
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   188
#define NOOP 305
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   189
#define MKD 306
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   190
#define RMD 307
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   191
#define PWD 308
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   192
#define CDUP 309
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   193
#define STOU 310
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   194
#define SMNT 311
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   195
#define SYST 312
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   196
#define SIZE 313
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   197
#define MDTM 314
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   198
#define UMASK 315
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   199
#define IDLE 316
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   200
#define CHMOD 317
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   201
#define LEXERR 318
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   202
#define STRING 319
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   203
#define NUMBER 320
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   204
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   205
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   206
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   207
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   208
/* Copy the first part of user declarations.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   209
#line 43 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   210
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   211
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   212
char ftpcmd_rcsid[] = 
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   213
  "$Id: ftpcmd.y,v 1.11 1999/10/09 02:32:12 dholland Exp $";
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   214
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   215
#include <sys/param.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   216
#include <sys/socket.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   217
#include <sys/stat.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   218
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   219
#include <netinet/in.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   220
#include <arpa/ftp.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   221
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   222
#include <ctype.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   223
#include <errno.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   224
#include <glob.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   225
#include <pwd.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   226
#include <setjmp.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   227
#include <signal.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   228
#include <stdio.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   229
#include <stdlib.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   230
#include <string.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   231
//#include <syslog.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   232
#include <time.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   233
#include <unistd.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   234
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   235
//#ifndef __linux__
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   236
//#include <tzfile.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   237
//#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   238
#define TM_YEAR_BASE 1900
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   239
//#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   240
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   241
#include "extern.h"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   242
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   243
extern	struct sockaddr_in data_dest;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   244
extern	int logged_in;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   245
extern	struct passwd *pw;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   246
extern	int guest;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   247
extern	int logging;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   248
extern	int type;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   249
extern	int form;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   250
extern	int debug;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   251
extern	int timeout;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   252
extern	int maxtimeout;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   253
extern  int pdata;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   254
extern	char hostname[], remotehost[];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   255
extern	char proctitle[];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   256
extern	int usedefault;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   257
extern  int transflag;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   258
extern  char tmpline[];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   259
extern	int portcheck;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   260
extern	struct sockaddr_in his_addr;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   261
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   262
off_t	restart_point;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   263
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   264
static	int cmd_type;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   265
static	int cmd_form;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   266
static	int cmd_bytesz;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   267
char	cbuf[512];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   268
char	*fromname;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   269
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   270
struct tab;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   271
static int	 yylex __P((void));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   272
//static void	 sizecmd __P((char *));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   273
static void	 help __P((struct tab *, char *));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   274
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   275
//extern struct tab cmdtab[];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   276
//extern struct tab sitetab[];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   277
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   278
#define	CMD	0	/* beginning of command */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   279
#define	ARGS	1	/* expect miscellaneous arguments */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   280
#define	STR1	2	/* expect SP followed by STRING */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   281
#define	STR2	3	/* expect STRING */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   282
#define	OSTR	4	/* optional SP then STRING */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   283
#define	ZSTR1	5	/* SP then optional STRING */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   284
#define	ZSTR2	6	/* optional STRING after SP */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   285
#define	SITECMD	7	/* SITE command */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   286
#define	NSTR	8	/* Number followed by a string */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   287
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   288
struct tab {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   289
const char	*name;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   290
short	token;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   291
short	state;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   292
short	implemented;	/* 1 if command is implemented */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   293
const char	*help;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   294
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   295
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   296
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   297
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   298
extern struct tab cmdtab[] = {		/* In order defined in RFC 765 */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   299
{ "USER", USER, STR1, 1,	"<sp> username" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   300
{ "PASS", PASS, ZSTR1, 1,	"<sp> password" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   301
{ "ACCT", ACCT, STR1, 0,	"(specify account)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   302
{ "SMNT", SMNT, ARGS, 0,	"(structure mount)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   303
{ "REIN", REIN, ARGS, 0,	"(reinitialize server state)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   304
{ "QUIT", QUIT, ARGS, 1,	"(terminate service)", },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   305
{ "PORT", PORT, ARGS, 1,	"<sp> b0, b1, b2, b3, b4" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   306
{ "PASV", PASV, ARGS, 1,	"(set server in passive mode)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   307
{ "TYPE", TYPE, ARGS, 1,	"<sp> [ A | E | I | L ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   308
{ "STRU", STRU, ARGS, 1,	"(specify file structure)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   309
{ "MODE", MODE, ARGS, 1,	"(specify transfer mode)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   310
{ "RETR", RETR, STR1, 1,	"<sp> file-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   311
{ "STOR", STOR, STR1, 1,	"<sp> file-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   312
{ "APPE", APPE, STR1, 1,	"<sp> file-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   313
{ "MLFL", MLFL, OSTR, 0,	"(mail file)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   314
{ "MAIL", MAIL, OSTR, 0,	"(mail to user)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   315
{ "MSND", MSND, OSTR, 0,	"(mail send to terminal)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   316
{ "MSOM", MSOM, OSTR, 0,	"(mail send to terminal or mailbox)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   317
{ "MSAM", MSAM, OSTR, 0,	"(mail send to terminal and mailbox)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   318
{ "MRSQ", MRSQ, OSTR, 0,	"(mail recipient scheme question)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   319
{ "MRCP", MRCP, STR1, 0,	"(mail recipient)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   320
{ "ALLO", ALLO, ARGS, 1,	"allocate storage (vacuously)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   321
{ "REST", REST, ARGS, 1,	"<sp> offset (restart command)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   322
{ "RNFR", RNFR, STR1, 1,	"<sp> file-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   323
{ "RNTO", RNTO, STR1, 1,	"<sp> file-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   324
{ "ABOR", ABOR, ARGS, 1,	"(abort operation)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   325
{ "DELE", DELE, STR1, 1,	"<sp> file-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   326
{ "CWD",  CWD,  OSTR, 1,	"[ <sp> directory-name ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   327
{ "XCWD", CWD,	OSTR, 1,	"[ <sp> directory-name ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   328
{ "LIST", LIST, OSTR, 1,	"[ <sp> path-name ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   329
{ "NLST", NLST, OSTR, 1,	"[ <sp> path-name ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   330
{ "SITE", SITE, SITECMD, 1,	"site-cmd [ <sp> arguments ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   331
{ "SYST", SYST, ARGS, 1,	"(get type of operating system)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   332
{ "STAT", STAT, OSTR, 1,	"[ <sp> path-name ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   333
{ "HELP", HELP, OSTR, 1,	"[ <sp> <string> ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   334
{ "NOOP", NOOP, ARGS, 1,	"" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   335
{ "MKD",  MKD,  STR1, 1,	"<sp> path-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   336
{ "XMKD", MKD,  STR1, 1,	"<sp> path-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   337
{ "RMD",  RMD,  STR1, 1,	"<sp> path-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   338
{ "XRMD", RMD,  STR1, 1,	"<sp> path-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   339
{ "PWD",  PWD,  ARGS, 1,	"(return current directory)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   340
{ "XPWD", PWD,  ARGS, 1,	"(return current directory)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   341
{ "CDUP", CDUP, ARGS, 1,	"(change to parent directory)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   342
{ "XCUP", CDUP, ARGS, 1,	"(change to parent directory)" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   343
{ "STOU", STOU, STR1, 1,	"<sp> file-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   344
{ "SIZE", SIZE, OSTR, 1,	"<sp> path-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   345
{ "MDTM", MDTM, OSTR, 1,	"<sp> path-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   346
{ NULL,   0,    0,    0,	0 }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   347
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   348
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   349
extern struct tab sitetab[] = {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   350
{ "UMASK", UMASK, ARGS, 1,	"[ <sp> umask ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   351
{ "IDLE", IDLE, ARGS, 1,	"[ <sp> maximum-idle-time ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   352
{ "CHMOD", CHMOD, NSTR, 1,	"<sp> mode <sp> file-name" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   353
{ "HELP", HELP, OSTR, 1,	"[ <sp> <string> ]" },
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   354
{ NULL,   0,    0,    0,	0 }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   355
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   356
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   357
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   358
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   359
/* Enabling traces.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   360
#ifndef YYDEBUG
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   361
# define YYDEBUG 0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   362
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   363
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   364
/* Enabling verbose error messages.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   365
#ifdef YYERROR_VERBOSE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   366
# undef YYERROR_VERBOSE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   367
# define YYERROR_VERBOSE 1
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   368
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   369
# define YYERROR_VERBOSE 0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   370
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   371
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   372
/* Enabling the token table.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   373
#ifndef YYTOKEN_TABLE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   374
# define YYTOKEN_TABLE 0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   375
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   376
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   377
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   378
#line 113 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   379
typedef union YYSTYPE {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   380
	int	i;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   381
	char   *s;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   382
} YYSTYPE;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   383
/* Line 196 of yacc.c.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   384
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   385
# define YYSTYPE_IS_DECLARED 1
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   386
# define YYSTYPE_IS_TRIVIAL 1
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   387
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   388
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   389
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   390
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   391
/* Copy the second part of user declarations.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   392
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   393
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   394
/* Line 219 of yacc.c.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   395
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   396
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   397
# define YYSIZE_T __SIZE_TYPE__
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   398
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   399
#if ! defined (YYSIZE_T) && defined (size_t)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   400
# define YYSIZE_T size_t
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   401
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   402
#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   403
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   404
# define YYSIZE_T size_t
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   405
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   406
#if ! defined (YYSIZE_T)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   407
# define YYSIZE_T unsigned int
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   408
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   409
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   410
#ifndef YY_
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   411
# if YYENABLE_NLS
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   412
#  if ENABLE_NLS
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   413
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   414
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   415
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   416
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   417
# ifndef YY_
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   418
#  define YY_(msgid) msgid
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   419
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   420
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   421
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   422
#if ! defined (yyoverflow) || YYERROR_VERBOSE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   423
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   424
/* The parser invokes alloca or malloc; define the necessary symbols.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   425
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   426
# ifdef YYSTACK_USE_ALLOCA
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   427
#  if YYSTACK_USE_ALLOCA
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   428
#   ifdef __GNUC__
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   429
#    define YYSTACK_ALLOC __builtin_alloca
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   430
#   else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   431
#    define YYSTACK_ALLOC alloca
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   432
#    if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   433
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   434
#     define YYINCLUDED_STDLIB_H
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   435
#    endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   436
#   endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   437
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   438
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   439
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   440
# ifdef YYSTACK_ALLOC
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   441
   /* Pacify GCC's `empty if-body' warning. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   442
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   443
#  ifndef YYSTACK_ALLOC_MAXIMUM
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   444
    /* The OS might guarantee only one guard page at the bottom of the stack,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   445
       and a page size can be as small as 4096 bytes.  So we cannot safely
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   446
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   447
       to allow for a few compiler-allocated temporary stack slots.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   448
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   449
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   450
# else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   451
#  define YYSTACK_ALLOC YYMALLOC
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   452
#  define YYSTACK_FREE YYFREE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   453
#  ifndef YYSTACK_ALLOC_MAXIMUM
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   454
#   define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   455
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   456
#  ifdef __cplusplus
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   457
extern "C" {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   458
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   459
#  ifndef YYMALLOC
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   460
#   define YYMALLOC malloc
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   461
#   if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   462
	&& (defined (__STDC__) || defined (__cplusplus)))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   463
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   464
#   endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   465
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   466
#  ifndef YYFREE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   467
#   define YYFREE free
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   468
#   if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   469
	&& (defined (__STDC__) || defined (__cplusplus)))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   470
void free (void *); /* INFRINGES ON USER NAME SPACE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   471
#   endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   472
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   473
#  ifdef __cplusplus
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   474
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   475
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   476
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   477
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   478
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   479
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   480
#if (! defined (yyoverflow) \
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   481
     && (! defined (__cplusplus) \
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   482
	 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   483
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   484
/* A type that is properly aligned for any stack member.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   485
union yyalloc
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   486
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   487
  short int yyss;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   488
  YYSTYPE yyvs;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   489
  };
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   490
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   491
/* The size of the maximum gap between one aligned stack and the next.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   492
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   493
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   494
/* The size of an array large to enough to hold all stacks, each with
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   495
   N elements.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   496
# define YYSTACK_BYTES(N) \
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   497
     ((N) * (sizeof (short int) + sizeof (YYSTYPE))			\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   498
      + YYSTACK_GAP_MAXIMUM)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   499
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   500
/* Copy COUNT objects from FROM to TO.  The source and destination do
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   501
   not overlap.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   502
# ifndef YYCOPY
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   503
#  if defined (__GNUC__) && 1 < __GNUC__
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   504
#   define YYCOPY(To, From, Count) \
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   505
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   506
#  else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   507
#   define YYCOPY(To, From, Count)		\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   508
      do					\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   509
	{					\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   510
	  YYSIZE_T yyi;				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   511
	  for (yyi = 0; yyi < (Count); yyi++)	\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   512
	    (To)[yyi] = (From)[yyi];		\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   513
	}					\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   514
      while (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   515
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   516
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   517
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   518
/* Relocate STACK from its old location to the new one.  The
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   519
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   520
   elements in the stack, and YYPTR gives the new location of the
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   521
   stack.  Advance YYPTR to a properly aligned location for the next
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   522
   stack.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   523
# define YYSTACK_RELOCATE(Stack)					\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   524
    do									\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   525
      {									\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   526
	YYSIZE_T yynewbytes;						\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   527
	YYCOPY (&yyptr->Stack, Stack, yysize);				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   528
	Stack = &yyptr->Stack;						\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   529
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   530
	yyptr += yynewbytes / sizeof (*yyptr);				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   531
      }									\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   532
    while (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   533
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   534
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   535
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   536
#if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   537
   typedef signed char yysigned_char;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   538
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   539
   typedef short int yysigned_char;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   540
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   541
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   542
/* YYFINAL -- State number of the termination state. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   543
#define YYFINAL  2
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   544
/* YYLAST -- Last index in YYTABLE.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   545
#define YYLAST   206
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   546
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   547
/* YYNTOKENS -- Number of terminals. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   548
#define YYNTOKENS  66
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   549
/* YYNNTS -- Number of nonterminals. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   550
#define YYNNTS  16
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   551
/* YYNRULES -- Number of rules. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   552
#define YYNRULES  75
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   553
/* YYNRULES -- Number of states. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   554
#define YYNSTATES  216
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   555
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   556
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   557
#define YYUNDEFTOK  2
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   558
#define YYMAXUTOK   320
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   559
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   560
#define YYTRANSLATE(YYX)						\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   561
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   562
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   563
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   564
static const unsigned char yytranslate[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   565
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   566
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   567
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   568
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   569
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   570
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   571
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   572
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   573
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   574
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   575
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   576
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   577
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   578
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   579
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   580
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   581
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   582
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   583
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   584
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   585
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   586
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   587
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   588
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   589
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   590
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   591
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   592
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   593
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   594
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   595
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   596
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   597
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   598
      65
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   599
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   600
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   601
#if YYDEBUG
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   602
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   603
   YYRHS.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   604
static const unsigned short int yyprhs[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   605
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   606
       0,     0,     3,     4,     7,    10,    15,    20,    26,    30,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   607
      36,    42,    48,    54,    64,    70,    76,    82,    86,    92,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   608
      96,   102,   108,   112,   118,   124,   128,   132,   138,   141,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   609
     146,   149,   155,   161,   165,   169,   174,   181,   187,   195,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   610
     205,   211,   219,   225,   229,   235,   241,   244,   247,   253,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   611
     259,   261,   262,   264,   266,   278,   280,   282,   284,   286,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   612
     290,   292,   296,   298,   300,   304,   307,   309,   311,   313,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   613
     315,   317,   319,   321,   323,   325
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   614
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   615
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   616
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   617
static const yysigned_char yyrhs[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   618
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   619
      67,     0,    -1,    -1,    67,    68,    -1,    67,    69,    -1,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   620
      18,    15,    70,    16,    -1,    19,    15,    71,    16,    -1,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   621
      23,    81,    15,    73,    16,    -1,    24,    81,    16,    -1,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   622
      25,    81,    15,    75,    16,    -1,    26,    81,    15,    76,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   623
      16,    -1,    27,    81,    15,    77,    16,    -1,    38,    81,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   624
      15,    65,    16,    -1,    38,    81,    15,    65,    15,    12,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   625
      15,    65,    16,    -1,    28,    81,    15,    78,    16,    -1,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   626
      29,    81,    15,    78,    16,    -1,    30,    81,    15,    78,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   627
      16,    -1,    46,    81,    16,    -1,    46,    81,    15,    64,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   628
      16,    -1,    45,    81,    16,    -1,    45,    81,    15,    78,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   629
      16,    -1,    48,    81,    15,    78,    16,    -1,    48,    81,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   630
      16,    -1,    43,    81,    15,    78,    16,    -1,    41,    81,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   631
      15,    78,    16,    -1,    42,    81,    16,    -1,    44,    81,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   632
      16,    -1,    44,    81,    15,    78,    16,    -1,    49,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   633
      -1,    49,    15,    64,    16,    -1,    50,    16,    -1,    51,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   634
      81,    15,    78,    16,    -1,    52,    81,    15,    78,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   635
      -1,    53,    81,    16,    -1,    54,    81,    16,    -1,    47,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   636
      15,    49,    16,    -1,    47,    15,    49,    15,    64,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   637
      -1,    47,    15,    60,    81,    16,    -1,    47,    15,    60,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   638
      81,    15,    80,    16,    -1,    47,    15,    62,    81,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   639
      80,    15,    78,    16,    -1,    47,    15,    81,    61,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   640
      -1,    47,    15,    81,    61,    15,    65,    16,    -1,    55,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   641
      81,    15,    78,    16,    -1,    57,    81,    16,    -1,    58,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   642
      81,    15,    78,    16,    -1,    59,    81,    15,    78,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   643
      -1,    22,    16,    -1,     1,    16,    -1,    40,    81,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   644
      78,    16,    -1,    39,    81,    15,    72,    16,    -1,    64,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   645
      -1,    -1,    64,    -1,    65,    -1,    65,    17,    65,    17,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   646
      65,    17,    65,    17,    65,    17,    65,    -1,    10,    -1,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   647
      14,    -1,     5,    -1,     3,    -1,     3,    15,    74,    -1,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   648
       6,    -1,     6,    15,    74,    -1,     8,    -1,     9,    -1,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   649
       9,    15,    72,    -1,     9,    72,    -1,     7,    -1,    12,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   650
      -1,    11,    -1,    13,    -1,     4,    -1,     5,    -1,    79,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   651
      -1,    64,    -1,    65,    -1,    -1
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   652
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   653
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   654
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   655
static const unsigned short int yyrline[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   656
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   657
       0,   148,   148,   150,   155,   159,   164,   170,   199,   205,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   658
     239,   253,   267,   273,   279,   286,   293,   300,   305,   312,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   659
     317,   324,   331,   336,   343,   357,   362,   367,   374,   378,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   660
     396,   400,   407,   414,   419,   424,   428,   435,   445,   460,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   661
     474,   481,   497,   504,   530,   547,   569,   574,   580,   594,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   662
     607,   612,   615,   619,   623,   647,   651,   655,   662,   667,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   663
     672,   677,   682,   686,   691,   697,   705,   709,   713,   720,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   664
     724,   728,   735,   779,   783,   811
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   665
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   666
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   667
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   668
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   669
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   670
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   671
static const char *const yytname[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   672
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   673
  "$end", "error", "$undefined", "A", "B", "C", "E", "F", "I", "L", "N",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   674
  "P", "R", "S", "T", "SP", "CRLF", "COMMA", "USER", "PASS", "ACCT",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   675
  "REIN", "QUIT", "PORT", "PASV", "TYPE", "STRU", "MODE", "RETR", "STOR",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   676
  "APPE", "MLFL", "MAIL", "MSND", "MSOM", "MSAM", "MRSQ", "MRCP", "ALLO",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   677
  "REST", "RNFR", "RNTO", "ABOR", "DELE", "CWD", "LIST", "NLST", "SITE",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   678
  "STAT", "HELP", "NOOP", "MKD", "RMD", "PWD", "CDUP", "STOU", "SMNT",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   679
  "SYST", "SIZE", "MDTM", "UMASK", "IDLE", "CHMOD", "LEXERR", "STRING",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   680
  "NUMBER", "$accept", "cmd_list", "cmd", "rcmd", "username", "password",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   681
  "byte_size", "host_port", "form_code", "type_code", "struct_code",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   682
  "mode_code", "pathname", "pathstring", "octal_number", "check_login", 0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   683
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   684
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   685
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   686
# ifdef YYPRINT
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   687
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   688
   token YYLEX-NUM.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   689
static const unsigned short int yytoknum[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   690
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   691
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   692
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   693
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   694
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   695
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   696
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   697
     315,   316,   317,   318,   319,   320
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   698
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   699
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   700
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   701
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   702
static const unsigned char yyr1[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   703
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   704
       0,    66,    67,    67,    67,    68,    68,    68,    68,    68,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   705
      68,    68,    68,    68,    68,    68,    68,    68,    68,    68,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   706
      68,    68,    68,    68,    68,    68,    68,    68,    68,    68,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   707
      68,    68,    68,    68,    68,    68,    68,    68,    68,    68,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   708
      68,    68,    68,    68,    68,    68,    68,    68,    69,    69,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   709
      70,    71,    71,    72,    73,    74,    74,    74,    75,    75,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   710
      75,    75,    75,    75,    75,    75,    76,    76,    76,    77,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   711
      77,    77,    78,    79,    80,    81
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   712
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   713
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   714
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   715
static const unsigned char yyr2[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   716
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   717
       0,     2,     0,     2,     2,     4,     4,     5,     3,     5,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   718
       5,     5,     5,     9,     5,     5,     5,     3,     5,     3,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   719
       5,     5,     3,     5,     5,     3,     3,     5,     2,     4,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   720
       2,     5,     5,     3,     3,     4,     6,     5,     7,     9,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   721
       5,     7,     5,     3,     5,     5,     2,     2,     5,     5,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   722
       1,     0,     1,     1,    11,     1,     1,     1,     1,     3,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   723
       1,     3,     1,     1,     3,     2,     1,     1,     1,     1,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   724
       1,     1,     1,     1,     1,     0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   725
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   726
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   727
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   728
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   729
   means the default is an error.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   730
static const unsigned char yydefact[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   731
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   732
       2,     0,     1,     0,     0,     0,     0,    75,    75,    75,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   733
      75,    75,    75,    75,    75,    75,    75,    75,    75,    75,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   734
      75,    75,    75,    75,     0,    75,     0,     0,    75,    75,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   735
      75,    75,    75,    75,    75,    75,     3,     4,    47,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   736
      51,    46,     0,     0,     0,     0,     0,     0,     0,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   737
       0,     0,     0,     0,     0,     0,     0,     0,     0,    75,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   738
       0,     0,    28,    30,     0,     0,     0,     0,     0,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   739
       0,     0,    50,     0,    52,     0,     0,     8,     0,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   740
       0,     0,     0,     0,     0,     0,     0,     0,    25,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   741
       0,    26,     0,    19,     0,    17,     0,    75,    75,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   742
       0,    22,     0,     0,     0,    33,    34,     0,    43,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   743
       0,     5,     6,     0,     0,    58,    60,    62,    63,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   744
      66,    68,    67,     0,    70,    71,    69,     0,    73,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   745
      72,     0,     0,     0,    53,     0,     0,     0,     0,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   746
       0,     0,     0,    35,     0,     0,     0,     0,    29,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   747
       0,     0,     0,     0,     0,     7,     0,     0,     0,    65,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   748
       9,    10,    11,    14,    15,    16,     0,    12,    49,    48,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   749
      24,    23,    27,    20,    18,     0,     0,    37,     0,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   750
      40,    21,    31,    32,    42,    44,    45,     0,    57,    55,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   751
      56,    59,    61,    64,     0,    36,    74,     0,     0,     0,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   752
       0,     0,    38,     0,    41,     0,     0,     0,     0,    13,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   753
      39,     0,     0,     0,     0,    54
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   754
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   755
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   756
/* YYDEFGOTO[NTERM-NUM]. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   757
static const short int yydefgoto[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   758
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   759
      -1,     1,    36,    37,    73,    75,   135,   114,   191,   119,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   760
     123,   127,   129,   130,   197,    42
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   761
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   762
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   763
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   764
   STATE-NUM.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   765
#define YYPACT_NINF -102
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   766
static const short int yypact[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   767
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   768
    -102,    47,  -102,   -13,    -9,     1,     8,  -102,  -102,  -102,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   769
    -102,  -102,  -102,  -102,  -102,  -102,  -102,  -102,  -102,  -102,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   770
    -102,  -102,  -102,  -102,    11,  -102,    52,    29,  -102,  -102,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   771
    -102,  -102,  -102,  -102,  -102,  -102,  -102,  -102,  -102,    -4,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   772
      -2,  -102,    64,    65,    69,    88,   102,   105,   113,   114,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   773
     115,   116,   117,   118,   119,   121,    92,    94,    96,   -47,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   774
      98,    70,  -102,  -102,   122,   123,   124,   125,   127,   128,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   775
     130,   131,  -102,   132,  -102,   133,    74,  -102,    55,    71,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   776
       7,    79,    79,    79,    82,    85,    79,    79,  -102,    79,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   777
      79,  -102,    79,  -102,    87,  -102,   100,  -102,  -102,    91,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   778
      79,  -102,   137,    79,    79,  -102,  -102,    79,  -102,    79,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   779
      79,  -102,  -102,   138,   140,   139,   142,  -102,    -6,   143,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   780
    -102,  -102,  -102,   144,  -102,  -102,  -102,   145,  -102,   146,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   781
    -102,   147,   148,   107,  -102,   149,   150,   151,   152,   153,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   782
     154,   155,   108,  -102,   109,   158,   111,   159,  -102,   160,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   783
     161,   162,   163,   164,    93,  -102,     9,     9,    85,  -102,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   784
    -102,  -102,  -102,  -102,  -102,  -102,   169,  -102,  -102,  -102,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   785
    -102,  -102,  -102,  -102,  -102,   166,   120,  -102,   120,   126,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   786
    -102,  -102,  -102,  -102,  -102,  -102,  -102,   157,  -102,  -102,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   787
    -102,  -102,  -102,  -102,   168,  -102,  -102,   170,   172,   173,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   788
     129,   134,  -102,    79,  -102,   167,   174,   176,   135,  -102,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   789
    -102,   171,   136,   178,   141,  -102
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   790
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   791
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   792
/* YYPGOTO[NTERM-NUM].  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   793
static const yysigned_char yypgoto[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   794
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   795
    -102,  -102,  -102,  -102,  -102,  -102,  -101,  -102,    36,  -102,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   796
    -102,  -102,   -82,  -102,    18,    21
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   797
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   798
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   799
/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   800
   positive, shift that token.  If negative, reduce the rule which
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   801
   number is the opposite.  If zero, do what YYDEFACT says.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   802
   If YYTABLE_NINF, syntax error.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   803
#define YYTABLE_NINF -1
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   804
static const unsigned char yytable[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   805
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   806
     131,   132,    96,    38,   136,   137,    39,   138,   139,   158,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   807
     140,   124,   125,    97,   188,    98,    40,   159,   147,   189,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   808
     126,   149,   150,   190,    41,   151,    59,   152,   153,    43,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   809
      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   810
      54,    55,    56,    57,    58,    63,    60,     2,     3,    64,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   811
      65,    66,    67,    68,    69,    70,    71,   193,   115,   134,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   812
      72,   116,    74,   117,   118,     4,     5,    61,    62,     6,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   813
       7,     8,     9,    10,    11,    12,    13,    14,   120,    76,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   814
      99,    77,   121,   122,    78,    15,    16,    17,    18,    19,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   815
      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   816
      30,    31,    32,    79,    33,    34,    35,    90,    91,    92,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   817
      93,    94,    95,   100,   101,   142,   143,    80,   144,   145,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   818
      81,   207,   166,   167,   176,   177,   179,   180,    82,    83,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   819
      84,    85,    86,    87,   102,    88,    89,   103,   104,   113,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   820
     105,   106,   107,   128,   108,   109,   110,   133,   111,   112,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   821
     134,   141,   146,   148,   156,   154,   155,   157,   187,   160,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   822
     161,   162,   163,   164,   165,   168,   169,   170,   171,   172,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   823
     173,   174,   175,   178,   200,   181,   182,   183,   184,   185,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   824
     186,   194,   195,   201,   208,   196,   202,   203,   212,   204,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   825
     209,   199,   210,   192,   205,   214,   198,     0,     0,   206,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   826
     211,   213,     0,     0,     0,     0,   215
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   827
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   828
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   829
static const short int yycheck[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   830
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   831
      82,    83,    49,    16,    86,    87,    15,    89,    90,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   832
      92,     4,     5,    60,     5,    62,    15,   118,   100,    10,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   833
      13,   103,   104,    14,    16,   107,    15,   109,   110,     8,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   834
       9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   835
      19,    20,    21,    22,    23,    16,    25,     0,     1,    28,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   836
      29,    30,    31,    32,    33,    34,    35,   158,     3,    65,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   837
      64,     6,    64,     8,     9,    18,    19,    15,    16,    22,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   838
      23,    24,    25,    26,    27,    28,    29,    30,     7,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   839
      59,    16,    11,    12,    15,    38,    39,    40,    41,    42,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   840
      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   841
      53,    54,    55,    15,    57,    58,    59,    15,    16,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   842
      16,    15,    16,    15,    16,    15,    16,    15,    97,    98,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   843
      15,   203,    15,    16,    15,    16,    15,    16,    15,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   844
      15,    15,    15,    15,    64,    16,    15,    15,    15,    65,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   845
      16,    16,    15,    64,    16,    15,    15,    65,    16,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   846
      65,    64,    61,    16,    15,    17,    16,    15,    65,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   847
      16,    16,    16,    16,    16,    16,    16,    16,    16,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   848
      16,    16,    64,    15,    17,    16,    16,    16,    16,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   849
      16,    12,    16,    15,    17,    65,    16,    15,    17,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   850
      16,    65,    16,   157,    65,    17,   178,    -1,    -1,    65,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   851
      65,    65,    -1,    -1,    -1,    -1,    65
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   852
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   853
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   854
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   855
   symbol of state STATE-NUM.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   856
static const unsigned char yystos[] =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   857
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   858
       0,    67,     0,     1,    18,    19,    22,    23,    24,    25,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   859
      26,    27,    28,    29,    30,    38,    39,    40,    41,    42,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   860
      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   861
      53,    54,    55,    57,    58,    59,    68,    69,    16,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   862
      15,    16,    81,    81,    81,    81,    81,    81,    81,    81,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   863
      81,    81,    81,    81,    81,    81,    81,    81,    81,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   864
      81,    15,    16,    16,    81,    81,    81,    81,    81,    81,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   865
      81,    81,    64,    70,    64,    71,    15,    16,    15,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   866
      15,    15,    15,    15,    15,    15,    15,    15,    16,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   867
      15,    16,    15,    16,    15,    16,    49,    60,    62,    81,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   868
      15,    16,    64,    15,    15,    16,    16,    15,    16,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   869
      15,    16,    16,    65,    73,     3,     6,     8,     9,    75,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   870
       7,    11,    12,    76,     4,     5,    13,    77,    64,    78,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   871
      79,    78,    78,    65,    65,    72,    78,    78,    78,    78,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   872
      78,    64,    15,    16,    81,    81,    61,    78,    16,    78,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   873
      78,    78,    78,    78,    17,    16,    15,    15,    15,    72,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   874
      16,    16,    16,    16,    16,    16,    15,    16,    16,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   875
      16,    16,    16,    16,    16,    64,    15,    16,    15,    15,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   876
      16,    16,    16,    16,    16,    16,    16,    65,     5,    10,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   877
      14,    74,    74,    72,    12,    16,    65,    80,    80,    65,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   878
      17,    15,    16,    15,    16,    65,    65,    78,    17,    16,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   879
      16,    65,    17,    65,    17,    65
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   880
};
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   881
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   882
#define yyerrok		(yyerrstatus = 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   883
#define yyclearin	(yychar = YYEMPTY)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   884
#define YYEMPTY		(-2)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   885
#define YYEOF		0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   886
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   887
#define YYACCEPT	goto yyacceptlab
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   888
#define YYABORT		goto yyabortlab
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   889
#define YYERROR		goto yyerrorlab
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   890
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   891
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   892
/* Like YYERROR except do call yyerror.  This remains here temporarily
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   893
   to ease the transition to the new meaning of YYERROR, for GCC.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   894
   Once GCC version 2 has supplanted version 1, this can go.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   895
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   896
#define YYFAIL		goto yyerrlab
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   897
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   898
#define YYRECOVERING()  (!!yyerrstatus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   899
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   900
#define YYBACKUP(Token, Value)					\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   901
do								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   902
  if (yychar == YYEMPTY && yylen == 1)				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   903
    {								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   904
      yychar = (Token);						\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   905
      yylval = (Value);						\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   906
      yytoken = YYTRANSLATE (yychar);				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   907
      YYPOPSTACK;						\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   908
      goto yybackup;						\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   909
    }								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   910
  else								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   911
    {								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   912
      yyerror (YY_("syntax error: cannot back up")); \
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   913
      YYERROR;							\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   914
    }								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   915
while (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   916
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   917
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   918
#define YYTERROR	1
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   919
#define YYERRCODE	256
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   920
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   921
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   922
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   923
   If N is 0, then set CURRENT to the empty location which ends
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   924
   the previous symbol: RHS[0] (always defined).  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   925
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   926
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   927
#ifndef YYLLOC_DEFAULT
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   928
# define YYLLOC_DEFAULT(Current, Rhs, N)				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   929
    do									\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   930
      if (N)								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   931
	{								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   932
	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   933
	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   934
	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   935
	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   936
	}								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   937
      else								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   938
	{								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   939
	  (Current).first_line   = (Current).last_line   =		\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   940
	    YYRHSLOC (Rhs, 0).last_line;				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   941
	  (Current).first_column = (Current).last_column =		\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   942
	    YYRHSLOC (Rhs, 0).last_column;				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   943
	}								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   944
    while (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   945
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   946
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   947
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   948
/* YY_LOCATION_PRINT -- Print the location on the stream.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   949
   This macro was not mandated originally: define only if we know
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   950
   we won't break user code: when these are the locations we know.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   951
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   952
#ifndef YY_LOCATION_PRINT
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   953
# if YYLTYPE_IS_TRIVIAL
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   954
#  define YY_LOCATION_PRINT(File, Loc)			\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   955
     fprintf (File, "%d.%d-%d.%d",			\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   956
              (Loc).first_line, (Loc).first_column,	\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   957
              (Loc).last_line,  (Loc).last_column)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   958
# else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   959
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   960
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   961
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   962
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   963
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   964
/* YYLEX -- calling `yylex' with the right arguments.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   965
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   966
#ifdef YYLEX_PARAM
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   967
# define YYLEX yylex (YYLEX_PARAM)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   968
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   969
# define YYLEX yylex ()
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   970
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   971
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   972
/* Enable debugging if requested.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   973
#if YYDEBUG
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   974
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   975
# ifndef YYFPRINTF
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   976
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   977
#  define YYFPRINTF fprintf
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   978
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   979
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   980
# define YYDPRINTF(Args)			\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   981
do {						\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   982
  if (yydebug)					\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   983
    YYFPRINTF Args;				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   984
} while (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   985
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   986
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)		\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   987
do {								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   988
  if (yydebug)							\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   989
    {								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   990
      YYFPRINTF (stderr, "%s ", Title);				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   991
      yysymprint (stderr,					\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   992
                  Type, Value);	\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   993
      YYFPRINTF (stderr, "\n");					\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   994
    }								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   995
} while (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   996
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   997
/*------------------------------------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   998
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
   999
| TOP (included).                                                   |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1000
`------------------------------------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1001
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1002
#if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1003
static void
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1004
yy_stack_print (short int *bottom, short int *top)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1005
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1006
static void
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1007
yy_stack_print (bottom, top)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1008
    short int *bottom;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1009
    short int *top;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1010
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1011
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1012
  YYFPRINTF (stderr, "Stack now");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1013
  for (/* Nothing. */; bottom <= top; ++bottom)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1014
    YYFPRINTF (stderr, " %d", *bottom);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1015
  YYFPRINTF (stderr, "\n");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1016
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1017
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1018
# define YY_STACK_PRINT(Bottom, Top)				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1019
do {								\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1020
  if (yydebug)							\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1021
    yy_stack_print ((Bottom), (Top));				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1022
} while (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1023
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1024
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1025
/*------------------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1026
| Report that the YYRULE is going to be reduced.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1027
`------------------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1028
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1029
#if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1030
static void
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1031
yy_reduce_print (int yyrule)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1032
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1033
static void
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1034
yy_reduce_print (yyrule)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1035
    int yyrule;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1036
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1037
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1038
  int yyi;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1039
  unsigned long int yylno = yyrline[yyrule];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1040
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1041
             yyrule - 1, yylno);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1042
  /* Print the symbols being reduced, and their result.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1043
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1044
    YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1045
  YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1046
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1047
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1048
# define YY_REDUCE_PRINT(Rule)		\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1049
do {					\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1050
  if (yydebug)				\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1051
    yy_reduce_print (Rule);		\
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1052
} while (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1053
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1054
/* Nonzero means print parse trace.  It is left uninitialized so that
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1055
   multiple parsers can coexist.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1056
int yydebug;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1057
#else /* !YYDEBUG */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1058
# define YYDPRINTF(Args)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1059
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1060
# define YY_STACK_PRINT(Bottom, Top)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1061
# define YY_REDUCE_PRINT(Rule)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1062
#endif /* !YYDEBUG */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1063
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1064
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1065
/* YYINITDEPTH -- initial size of the parser's stacks.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1066
#ifndef	YYINITDEPTH
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1067
# define YYINITDEPTH 200
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1068
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1069
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1070
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1071
   if the built-in stack extension method is used).
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1072
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1073
   Do not make this value too large; the results are undefined if
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1074
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1075
   evaluated with infinite-precision integer arithmetic.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1076
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1077
#ifndef YYMAXDEPTH
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1078
# define YYMAXDEPTH 10000
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1079
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1080
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1081

c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1082
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1083
#if YYERROR_VERBOSE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1084
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1085
# ifndef yystrlen
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1086
#  if defined (__GLIBC__) && defined (_STRING_H)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1087
#   define yystrlen strlen
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1088
#  else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1089
/* Return the length of YYSTR.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1090
static YYSIZE_T
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1091
#   if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1092
yystrlen (const char *yystr)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1093
#   else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1094
yystrlen (yystr)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1095
     const char *yystr;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1096
#   endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1097
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1098
  const char *yys = yystr;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1099
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1100
  while (*yys++ != '\0')
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1101
    continue;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1102
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1103
  return yys - yystr - 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1104
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1105
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1106
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1107
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1108
# ifndef yystpcpy
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1109
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1110
#   define yystpcpy stpcpy
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1111
#  else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1112
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1113
   YYDEST.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1114
static char *
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1115
#   if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1116
yystpcpy (char *yydest, const char *yysrc)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1117
#   else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1118
yystpcpy (yydest, yysrc)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1119
     char *yydest;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1120
     const char *yysrc;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1121
#   endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1122
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1123
  char *yyd = yydest;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1124
  const char *yys = yysrc;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1125
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1126
  while ((*yyd++ = *yys++) != '\0')
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1127
    continue;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1128
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1129
  return yyd - 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1130
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1131
#  endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1132
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1133
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1134
# ifndef yytnamerr
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1135
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1136
   quotes and backslashes, so that it's suitable for yyerror.  The
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1137
   heuristic is that double-quoting is unnecessary unless the string
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1138
   contains an apostrophe, a comma, or backslash (other than
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1139
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1140
   null, do not copy; instead, return the length of what the result
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1141
   would have been.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1142
static YYSIZE_T
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1143
yytnamerr (char *yyres, const char *yystr)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1144
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1145
  if (*yystr == '"')
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1146
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1147
      size_t yyn = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1148
      char const *yyp = yystr;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1149
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1150
      for (;;)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1151
	switch (*++yyp)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1152
	  {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1153
	  case '\'':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1154
	  case ',':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1155
	    goto do_not_strip_quotes;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1156
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1157
	  case '\\':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1158
	    if (*++yyp != '\\')
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1159
	      goto do_not_strip_quotes;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1160
	    /* Fall through.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1161
	  default:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1162
	    if (yyres)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1163
	      yyres[yyn] = *yyp;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1164
	    yyn++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1165
	    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1166
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1167
	  case '"':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1168
	    if (yyres)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1169
	      yyres[yyn] = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1170
	    return yyn;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1171
	  }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1172
    do_not_strip_quotes: ;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1173
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1174
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1175
  if (! yyres)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1176
    return yystrlen (yystr);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1177
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1178
  return yystpcpy (yyres, yystr) - yyres;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1179
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1180
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1181
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1182
#endif /* YYERROR_VERBOSE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1183
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1184

c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1185
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1186
#if YYDEBUG
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1187
/*--------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1188
| Print this symbol on YYOUTPUT.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1189
`--------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1190
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1191
#if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1192
static void
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1193
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1194
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1195
static void
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1196
yysymprint (yyoutput, yytype, yyvaluep)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1197
    FILE *yyoutput;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1198
    int yytype;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1199
    YYSTYPE *yyvaluep;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1200
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1201
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1202
  /* Pacify ``unused variable'' warnings.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1203
  (void) yyvaluep;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1204
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1205
  if (yytype < YYNTOKENS)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1206
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1207
  else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1208
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1209
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1210
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1211
# ifdef YYPRINT
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1212
  if (yytype < YYNTOKENS)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1213
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1214
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1215
  switch (yytype)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1216
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1217
      default:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1218
        break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1219
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1220
  YYFPRINTF (yyoutput, ")");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1221
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1222
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1223
#endif /* ! YYDEBUG */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1224
/*-----------------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1225
| Release the memory associated to this symbol.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1226
`-----------------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1227
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1228
#if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1229
static void
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1230
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1231
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1232
static void
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1233
yydestruct (yymsg, yytype, yyvaluep)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1234
    const char *yymsg;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1235
    int yytype;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1236
    YYSTYPE *yyvaluep;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1237
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1238
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1239
  /* Pacify ``unused variable'' warnings.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1240
  (void) yyvaluep;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1241
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1242
  if (!yymsg)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1243
    yymsg = "Deleting";
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1244
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1245
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1246
  switch (yytype)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1247
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1248
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1249
      default:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1250
        break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1251
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1252
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1253

c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1254
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1255
/* Prevent warnings from -Wmissing-prototypes.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1256
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1257
#ifdef YYPARSE_PARAM
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1258
# if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1259
int yyparse (void *YYPARSE_PARAM);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1260
# else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1261
int yyparse ();
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1262
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1263
#else /* ! YYPARSE_PARAM */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1264
#if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1265
int yyparse (void);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1266
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1267
int yyparse ();
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1268
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1269
#endif /* ! YYPARSE_PARAM */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1270
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1271
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1272
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1273
/* The look-ahead symbol.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1274
int yychar;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1275
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1276
/* The semantic value of the look-ahead symbol.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1277
YYSTYPE yylval;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1278
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1279
/* Number of syntax errors so far.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1280
int yynerrs;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1281
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1282
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1283
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1284
/*----------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1285
| yyparse.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1286
`----------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1287
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1288
#ifdef YYPARSE_PARAM
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1289
# if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1290
int yyparse (void *YYPARSE_PARAM)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1291
# else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1292
int yyparse (YYPARSE_PARAM)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1293
  void *YYPARSE_PARAM;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1294
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1295
#else /* ! YYPARSE_PARAM */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1296
#if defined (__STDC__) || defined (__cplusplus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1297
int
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1298
yyparse (void)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1299
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1300
int
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1301
yyparse ()
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1302
    ;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1303
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1304
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1305
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1306
  
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1307
  int yystate;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1308
  int yyn;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1309
  int yyresult;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1310
  /* Number of tokens to shift before error messages enabled.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1311
  int yyerrstatus;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1312
  /* Look-ahead token as an internal (translated) token number.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1313
  int yytoken = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1314
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1315
  /* Three stacks and their tools:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1316
     `yyss': related to states,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1317
     `yyvs': related to semantic values,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1318
     `yyls': related to locations.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1319
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1320
     Refer to the stacks thru separate pointers, to allow yyoverflow
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1321
     to reallocate them elsewhere.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1322
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1323
  /* The state stack.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1324
  short int yyssa[YYINITDEPTH];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1325
  short int *yyss = yyssa;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1326
  short int *yyssp;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1327
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1328
  /* The semantic value stack.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1329
  YYSTYPE yyvsa[YYINITDEPTH];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1330
  YYSTYPE *yyvs = yyvsa;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1331
  YYSTYPE *yyvsp;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1332
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1333
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1334
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1335
#define YYPOPSTACK   (yyvsp--, yyssp--)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1336
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1337
  YYSIZE_T yystacksize = YYINITDEPTH;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1338
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1339
  /* The variables used to return semantic value and location from the
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1340
     action routines.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1341
  YYSTYPE yyval;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1342
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1343
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1344
  /* When reducing, the number of symbols on the RHS of the reduced
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1345
     rule.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1346
  int yylen;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1347
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1348
  YYDPRINTF ((stderr, "Starting parse\n"));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1349
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1350
  yystate = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1351
  yyerrstatus = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1352
  yynerrs = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1353
  yychar = YYEMPTY;		/* Cause a token to be read.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1354
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1355
  /* Initialize stack pointers.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1356
     Waste one element of value and location stack
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1357
     so that they stay on the same level as the state stack.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1358
     The wasted elements are never initialized.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1359
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1360
  yyssp = yyss;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1361
  yyvsp = yyvs;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1362
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1363
  goto yysetstate;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1364
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1365
/*------------------------------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1366
| yynewstate -- Push a new state, which is found in yystate.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1367
`------------------------------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1368
 yynewstate:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1369
  /* In all cases, when you get here, the value and location stacks
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1370
     have just been pushed. so pushing a state here evens the stacks.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1371
     */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1372
  yyssp++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1373
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1374
 yysetstate:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1375
  *yyssp = yystate;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1376
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1377
  if (yyss + yystacksize - 1 <= yyssp)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1378
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1379
      /* Get the current used size of the three stacks, in elements.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1380
      YYSIZE_T yysize = yyssp - yyss + 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1381
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1382
#ifdef yyoverflow
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1383
      {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1384
	/* Give user a chance to reallocate the stack. Use copies of
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1385
	   these so that the &'s don't force the real ones into
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1386
	   memory.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1387
	YYSTYPE *yyvs1 = yyvs;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1388
	short int *yyss1 = yyss;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1389
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1390
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1391
	/* Each stack pointer address is followed by the size of the
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1392
	   data in use in that stack, in bytes.  This used to be a
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1393
	   conditional around just the two extra args, but that might
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1394
	   be undefined if yyoverflow is a macro.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1395
	yyoverflow (YY_("memory exhausted"),
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1396
		    &yyss1, yysize * sizeof (*yyssp),
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1397
		    &yyvs1, yysize * sizeof (*yyvsp),
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1398
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1399
		    &yystacksize);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1400
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1401
	yyss = yyss1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1402
	yyvs = yyvs1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1403
      }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1404
#else /* no yyoverflow */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1405
# ifndef YYSTACK_RELOCATE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1406
      goto yyexhaustedlab;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1407
# else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1408
      /* Extend the stack our own way.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1409
      if (YYMAXDEPTH <= yystacksize)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1410
	goto yyexhaustedlab;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1411
      yystacksize *= 2;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1412
      if (YYMAXDEPTH < yystacksize)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1413
	yystacksize = YYMAXDEPTH;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1414
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1415
      {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1416
	short int *yyss1 = yyss;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1417
	union yyalloc *yyptr =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1418
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1419
	if (! yyptr)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1420
	  goto yyexhaustedlab;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1421
	YYSTACK_RELOCATE (yyss);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1422
	YYSTACK_RELOCATE (yyvs);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1423
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1424
#  undef YYSTACK_RELOCATE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1425
	if (yyss1 != yyssa)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1426
	  YYSTACK_FREE (yyss1);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1427
      }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1428
# endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1429
#endif /* no yyoverflow */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1430
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1431
      yyssp = yyss + yysize - 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1432
      yyvsp = yyvs + yysize - 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1433
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1434
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1435
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1436
		  (unsigned long int) yystacksize));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1437
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1438
      if (yyss + yystacksize - 1 <= yyssp)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1439
	YYABORT;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1440
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1441
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1442
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1443
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1444
  goto yybackup;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1445
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1446
/*-----------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1447
| yybackup.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1448
`-----------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1449
yybackup:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1450
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1451
/* Do appropriate processing given the current state.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1452
/* Read a look-ahead token if we need one and don't already have one.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1453
/* yyresume: */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1454
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1455
  /* First try to decide what to do without reference to look-ahead token.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1456
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1457
  yyn = yypact[yystate];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1458
  if (yyn == YYPACT_NINF)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1459
    goto yydefault;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1460
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1461
  /* Not known => get a look-ahead token if don't already have one.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1462
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1463
  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1464
  if (yychar == YYEMPTY)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1465
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1466
      YYDPRINTF ((stderr, "Reading a token: "));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1467
      yychar = YYLEX;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1468
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1469
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1470
  if (yychar <= YYEOF)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1471
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1472
      yychar = yytoken = YYEOF;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1473
      YYDPRINTF ((stderr, "Now at end of input.\n"));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1474
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1475
  else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1476
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1477
      yytoken = YYTRANSLATE (yychar);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1478
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1479
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1480
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1481
  /* If the proper action on seeing token YYTOKEN is to reduce or to
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1482
     detect an error, take that action.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1483
  yyn += yytoken;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1484
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1485
    goto yydefault;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1486
  yyn = yytable[yyn];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1487
  if (yyn <= 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1488
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1489
      if (yyn == 0 || yyn == YYTABLE_NINF)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1490
	goto yyerrlab;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1491
      yyn = -yyn;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1492
      goto yyreduce;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1493
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1494
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1495
  if (yyn == YYFINAL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1496
    YYACCEPT;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1497
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1498
  /* Shift the look-ahead token.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1499
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1500
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1501
  /* Discard the token being shifted unless it is eof.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1502
  if (yychar != YYEOF)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1503
    yychar = YYEMPTY;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1504
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1505
  *++yyvsp = yylval;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1506
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1507
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1508
  /* Count tokens shifted since error; after three, turn off error
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1509
     status.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1510
  if (yyerrstatus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1511
    yyerrstatus--;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1512
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1513
  yystate = yyn;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1514
  goto yynewstate;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1515
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1516
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1517
/*-----------------------------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1518
| yydefault -- do the default action for the current state.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1519
`-----------------------------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1520
yydefault:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1521
  yyn = yydefact[yystate];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1522
  if (yyn == 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1523
    goto yyerrlab;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1524
  goto yyreduce;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1525
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1526
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1527
/*-----------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1528
| yyreduce -- Do a reduction.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1529
`-----------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1530
yyreduce:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1531
  /* yyn is the number of a rule to reduce with.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1532
  yylen = yyr2[yyn];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1533
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1534
  /* If YYLEN is nonzero, implement the default value of the action:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1535
     `$$ = $1'.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1536
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1537
     Otherwise, the following line sets YYVAL to garbage.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1538
     This behavior is undocumented and Bison
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1539
     users should not rely upon it.  Assigning to YYVAL
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1540
     unconditionally makes the parser a bit smaller, and it avoids a
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1541
     GCC warning that YYVAL may be used uninitialized.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1542
  yyval = yyvsp[1-yylen];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1543
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1544
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1545
  YY_REDUCE_PRINT (yyn);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1546
  switch (yyn)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1547
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1548
        case 3:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1549
#line 151 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1550
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1551
			fromname = (char *) 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1552
			restart_point = (off_t) 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1553
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1554
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1555
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1556
  case 5:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1557
#line 160 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1558
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1559
			user((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1560
			free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1561
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1562
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1563
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1564
  case 6:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1565
#line 165 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1566
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1567
			pass((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1568
			memset((yyvsp[-1].s), 0, strlen((yyvsp[-1].s)));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1569
			free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1570
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1571
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1572
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1573
  case 7:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1574
#line 171 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1575
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1576
			if ((yyvsp[-3].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1577
				if ((yyvsp[-1].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1578
					usedefault = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1579
					reply(500,	
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1580
					    "Illegal PORT rejected (range errors).");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1581
				} else if (portcheck &&
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1582
				    /*ntohs(*/data_dest.sin_port/*)*/ < IPPORT_RESERVED) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1583
					usedefault = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1584
					reply(500,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1585
					    "Illegal PORT rejected (reserved port).");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1586
				} else if (portcheck &&
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1587
				    memcmp(&data_dest.sin_addr,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1588
				    &his_addr.sin_addr,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1589
				    sizeof data_dest.sin_addr)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1590
					usedefault = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1591
					reply(500,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1592
					    "Illegal PORT rejected (address wrong).");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1593
				} else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1594
					usedefault = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1595
					if (pdata >= 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1596
						(void) close(pdata);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1597
						pdata = -1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1598
					}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1599
					reply(200, "PORT command successful.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1600
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1601
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1602
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1603
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1604
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1605
  case 8:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1606
#line 200 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1607
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1608
			if ((yyvsp[-1].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1609
				passive();
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1610
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1611
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1612
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1613
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1614
  case 9:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1615
#line 206 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1616
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1617
			if ((yyvsp[-3].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1618
				switch (cmd_type) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1619
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1620
				case TYPE_A:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1621
					if (cmd_form == FORM_N) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1622
						reply(200, "Type set to A.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1623
						type = cmd_type;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1624
						form = cmd_form;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1625
					} else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1626
						reply(504, "Form must be N.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1627
					break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1628
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1629
				case TYPE_E:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1630
					reply(504, "Type E not implemented.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1631
					break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1632
	
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1633
				case TYPE_I:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1634
					reply(200, "Type set to I.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1635
					type = cmd_type;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1636
					break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1637
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1638
				case TYPE_L:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1639
					if (cmd_bytesz == 8) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1640
					       reply(200,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1641
					       "Type set to L (byte size 8).");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1642
					       type = cmd_type;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1643
					} else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1644
					    reply(504, "Byte size must be 8.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1645
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1646
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1647
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1648
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1649
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1650
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1651
  case 10:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1652
#line 240 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1653
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1654
			if ((yyvsp[-3].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1655
				switch ((yyvsp[-1].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1656
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1657
				case STRU_F:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1658
					reply(200, "STRU F ok.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1659
					break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1660
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1661
				default:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1662
					reply(504, "Unimplemented STRU type.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1663
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1664
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1665
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1666
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1667
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1668
  case 11:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1669
#line 254 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1670
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1671
			if ((yyvsp[-3].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1672
				switch ((yyvsp[-1].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1673
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1674
				case MODE_S:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1675
					reply(200, "MODE S ok.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1676
					break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1677
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1678
				default:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1679
					reply(502, "Unimplemented MODE type.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1680
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1681
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1682
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1683
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1684
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1685
  case 12:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1686
#line 268 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1687
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1688
			if ((yyvsp[-3].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1689
				reply(202, "ALLO command ignored.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1690
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1691
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1692
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1693
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1694
  case 13:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1695
#line 274 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1696
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1697
			if ((yyvsp[-7].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1698
				reply(202, "ALLO command ignored.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1699
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1700
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1701
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1702
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1703
  case 14:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1704
#line 280 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1705
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1706
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1707
				retrieve((char *) 0, (yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1708
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1709
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1710
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1711
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1712
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1713
  case 15:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1714
#line 287 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1715
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1716
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1717
				store((yyvsp[-1].s), "w", 0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1718
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1719
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1720
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1721
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1722
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1723
  case 16:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1724
#line 294 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1725
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1726
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1727
				store((yyvsp[-1].s), "a", 0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1728
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1729
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1730
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1731
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1732
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1733
  case 17:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1734
#line 301 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1735
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1736
			if ((yyvsp[-1].i))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1737
				send_file_list(".",1);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1738
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1739
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1740
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1741
  case 18:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1742
#line 306 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1743
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1744
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1745
				send_file_list((yyvsp[-1].s),1);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1746
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1747
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1748
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1749
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1750
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1751
  case 19:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1752
#line 313 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1753
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1754
			if ((yyvsp[-1].i))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1755
				send_file_list(".",0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1756
				//retrieve("/bin/ls -lgA", "");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1757
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1758
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1759
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1760
  case 20:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1761
#line 318 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1762
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1763
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1764
				send_file_list((yyvsp[-1].s),0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1765
				//retrieve("/bin/ls -lgA %s", (yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1766
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1767
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1768
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1769
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1770
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1771
  case 21:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1772
#line 325 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1773
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1774
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1775
				statfilecmd((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1776
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1777
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1778
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1779
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1780
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1781
  case 22:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1782
#line 332 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1783
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1784
			if ((yyvsp[-1].i))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1785
				statcmd();
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1786
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1787
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1788
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1789
  case 23:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1790
#line 337 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1791
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1792
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1793
				dele((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1794
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1795
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1796
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1797
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1798
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1799
  case 24:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1800
#line 344 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1801
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1802
			if ((yyvsp[-3].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1803
				if (fromname) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1804
					renamecmd(fromname, (yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1805
					free(fromname);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1806
					fromname = (char *) 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1807
				} else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1808
					reply(503, 
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1809
					  "Bad sequence of commands.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1810
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1811
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1812
			free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1813
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1814
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1815
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1816
  case 25:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1817
#line 358 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1818
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1819
			if ((yyvsp[-1].i)) 
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1820
				reply(225, "ABOR command successful.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1821
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1822
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1823
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1824
  case 26:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1825
#line 363 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1826
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1827
			if ((yyvsp[-1].i))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1828
				cwd(pw->pw_dir);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1829
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1830
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1831
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1832
  case 27:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1833
#line 368 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1834
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1835
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1836
				cwd((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1837
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1838
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1839
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1840
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1841
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1842
  case 28:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1843
#line 375 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1844
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1845
			help(cmdtab, (char *) 0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1846
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1847
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1848
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1849
  case 29:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1850
#line 379 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1851
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1852
			char *cp = (yyvsp[-1].s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1853
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1854
			if (strncasecmp(cp, "SITE", 4) == 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1855
				cp = (yyvsp[-1].s) + 4;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1856
				if (*cp == ' ')
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1857
					cp++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1858
				if (*cp)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1859
					help(sitetab, cp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1860
				else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1861
					help(sitetab, (char *) 0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1862
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1863
			else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1864
				help(cmdtab, (yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1865
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1866
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1867
				free ((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1868
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1869
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1870
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1871
  case 30:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1872
#line 397 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1873
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1874
			reply(200, "NOOP command successful.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1875
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1876
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1877
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1878
  case 31:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1879
#line 401 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1880
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1881
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1882
				makedir((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1883
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1884
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1885
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1886
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1887
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1888
  case 32:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1889
#line 408 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1890
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1891
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1892
				removedir((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1893
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1894
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1895
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1896
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1897
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1898
  case 33:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1899
#line 415 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1900
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1901
			if ((yyvsp[-1].i))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1902
				pwd();
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1903
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1904
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1905
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1906
  case 34:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1907
#line 420 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1908
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1909
			if ((yyvsp[-1].i))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1910
				cwd("..");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1911
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1912
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1913
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1914
  case 35:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1915
#line 425 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1916
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1917
			help(sitetab, (char *) 0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1918
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1919
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1920
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1921
  case 36:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1922
#line 429 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1923
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1924
			help(sitetab, (yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1925
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1926
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1927
				free ((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1928
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1929
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1930
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1931
  case 37:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1932
#line 436 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1933
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1934
			int oldmask;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1935
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1936
			if ((yyvsp[-1].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1937
				oldmask = umask(0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1938
				(void) umask(oldmask);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1939
				reply(200, "Current UMASK is %03o", oldmask);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1940
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1941
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1942
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1943
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1944
  case 38:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1945
#line 446 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1946
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1947
			int oldmask;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1948
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1949
			if ((yyvsp[-3].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1950
				if (((yyvsp[-1].i) == -1) || ((yyvsp[-1].i) > 0777)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1951
					reply(501, "Bad UMASK value");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1952
				} else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1953
					oldmask = umask((yyvsp[-1].i));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1954
					reply(200,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1955
					    "UMASK set to %03o (was %03o)",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1956
					    (yyvsp[-1].i), oldmask);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1957
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1958
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1959
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1960
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1961
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1962
  case 39:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1963
#line 461 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1964
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1965
			if ((yyvsp[-5].i) && ((yyvsp[-1].s) != NULL)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1966
				if ((yyvsp[-3].i) > 0777)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1967
					reply(501,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1968
				"CHMOD: Mode value must be between 0 and 0777");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1969
				else if (chmod((yyvsp[-1].s), (yyvsp[-3].i)) < 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1970
					perror_reply(550, (yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1971
				else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1972
					reply(200, "CHMOD command successful.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1973
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1974
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1975
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1976
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1977
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1978
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1979
  case 40:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1980
#line 475 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1981
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1982
			if ((yyvsp[-2].i))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1983
			  reply(200,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1984
	       		    "Current IDLE time limit is %d seconds; max %d",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1985
				timeout, maxtimeout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1986
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1987
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1988
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1989
  case 41:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1990
#line 482 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1991
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1992
			if ((yyvsp[-4].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1993
				if ((yyvsp[-1].i) < 30 || (yyvsp[-1].i) > maxtimeout) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1994
				reply(501,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1995
	       		 "Maximum IDLE time must be between 30 and %d seconds",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1996
				    maxtimeout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1997
				} else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1998
					timeout = (yyvsp[-1].i);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  1999
					//(void) alarm((unsigned) timeout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2000
					reply(200,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2001
					 "Maximum IDLE time set to %d seconds",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2002
					    timeout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2003
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2004
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2005
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2006
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2007
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2008
  case 42:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2009
#line 498 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2010
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2011
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2012
				store((yyvsp[-1].s), "w", 1);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2013
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2014
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2015
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2016
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2017
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2018
  case 43:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2019
#line 505 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2020
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2021
			if ((yyvsp[-1].i))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2022
#ifdef __linux__
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2023
			reply(215, "UNIX Type: L%d (Linux)", CHAR_BIT);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2024
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2025
#ifdef unix
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2026
#ifdef BSD
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2027
			reply(215, "UNIX Type: L%d Version: BSD-%d",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2028
				CHAR_BIT, BSD);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2029
#else /* BSD */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2030
			reply(215, "UNIX Type: L%d", CHAR_BIT);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2031
#endif /* BSD */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2032
#else /* unix */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2033
#ifdef __SYMBIAN32__		
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2034
			reply(215, "UNIX Type: L%d", CHAR_BIT);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2035
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2036
			reply(215, "UNKNOWN Type: L%d", CHAR_BIT);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2037
#endif /* __SYMBIAN32__ */			
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2038
#endif /* unix */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2039
#endif /* __linux__ */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2040
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2041
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2042
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2043
  case 44:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2044
#line 531 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2045
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2046
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2047
				sizecmd((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2048
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2049
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2050
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2051
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2052
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2053
  case 45:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2054
#line 548 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2055
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2056
			if ((yyvsp[-3].i) && (yyvsp[-1].s) != NULL) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2057
				struct stat stbuf;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2058
				if (stat((yyvsp[-1].s), &stbuf) < 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2059
					reply(550, "%s: %s",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2060
					    (yyvsp[-1].s), strerror(errno));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2061
				else if (!S_ISREG(stbuf.st_mode)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2062
					reply(550, "%s: not a plain file.", (yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2063
				} else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2064
					struct tm *t;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2065
					t = gmtime(&stbuf.st_mtime);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2066
					reply(213,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2067
					    "%04d%02d%02d%02d%02d%02d",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2068
					    TM_YEAR_BASE + t->tm_year,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2069
					    t->tm_mon+1, t->tm_mday,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2070
					    t->tm_hour, t->tm_min, t->tm_sec);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2071
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2072
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2073
			if ((yyvsp[-1].s) != NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2074
				free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2075
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2076
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2077
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2078
  case 46:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2079
#line 570 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2080
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2081
			reply(221, "Goodbye.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2082
			dologout(0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2083
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2084
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2085
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2086
  case 47:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2087
#line 575 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2088
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2089
			yyerrok;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2090
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2091
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2092
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2093
  case 48:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2094
#line 581 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2095
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2096
			restart_point = (off_t) 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2097
			if ((yyvsp[-3].i) && (yyvsp[-1].s)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2098
				fromname = renamefrom((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2099
				if (fromname == (char *) 0 && (yyvsp[-1].s)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2100
					free((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2101
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2102
			} else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2103
				if ((yyvsp[-1].s))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2104
					free ((yyvsp[-1].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2105
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2106
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2107
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2108
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2109
  case 49:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2110
#line 595 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2111
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2112
			if ((yyvsp[-3].i)) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2113
			    fromname = (char *) 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2114
			    restart_point = (yyvsp[-1].i);	/* XXX $4 is only "int" */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2115
			    reply(350, "Restarting at %qd. %s", 
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2116
			       (quad_t) restart_point,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2117
			       "Send STORE or RETRIEVE to initiate transfer.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2118
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2119
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2120
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2121
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2122
  case 51:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2123
#line 612 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2124
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2125
			(yyval.s) = (char *)calloc(1, sizeof(char));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2126
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2127
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2128
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2129
  case 54:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2130
#line 625 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2131
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2132
			char *a, *p;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2133
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2134
			if ((yyvsp[-10].i) < 0 || (yyvsp[-10].i) > 255 || (yyvsp[-8].i) < 0 || (yyvsp[-8].i) > 255 ||
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2135
			    (yyvsp[-6].i) < 0 || (yyvsp[-6].i) > 255 || (yyvsp[-4].i) < 0 || (yyvsp[-4].i) > 255 ||
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2136
			    (yyvsp[-2].i) < 0 || (yyvsp[-2].i) > 255 || (yyvsp[0].i) < 0 || (yyvsp[0].i) > 255) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2137
				(yyval.i) = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2138
			} else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2139
//#ifndef __linux__
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2140
//				data_dest.sin_len = sizeof(struct sockaddr_in);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2141
//#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2142
				data_dest.sin_family = AF_INET;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2143
				p = (char *)&data_dest.sin_port;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2144
				p[0] = (yyvsp[-2].i); p[1] = (yyvsp[0].i);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2145
				a = (char *)&data_dest.sin_addr;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2146
				a[0] = (yyvsp[-10].i); a[1] = (yyvsp[-8].i); a[2] = (yyvsp[-6].i); a[3] = (yyvsp[-4].i);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2147
				(yyval.i) = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2148
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2149
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2150
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2151
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2152
  case 55:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2153
#line 648 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2154
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2155
			(yyval.i) = FORM_N;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2156
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2157
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2158
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2159
  case 56:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2160
#line 652 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2161
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2162
			(yyval.i) = FORM_T;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2163
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2164
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2165
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2166
  case 57:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2167
#line 656 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2168
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2169
			(yyval.i) = FORM_C;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2170
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2171
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2172
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2173
  case 58:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2174
#line 663 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2175
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2176
			cmd_type = TYPE_A;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2177
			cmd_form = FORM_N;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2178
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2179
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2180
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2181
  case 59:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2182
#line 668 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2183
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2184
			cmd_type = TYPE_A;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2185
			cmd_form = (yyvsp[0].i);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2186
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2187
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2188
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2189
  case 60:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2190
#line 673 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2191
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2192
			cmd_type = TYPE_E;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2193
			cmd_form = FORM_N;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2194
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2195
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2196
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2197
  case 61:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2198
#line 678 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2199
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2200
			cmd_type = TYPE_E;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2201
			cmd_form = (yyvsp[0].i);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2202
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2203
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2204
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2205
  case 62:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2206
#line 683 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2207
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2208
			cmd_type = TYPE_I;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2209
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2210
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2211
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2212
  case 63:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2213
#line 687 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2214
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2215
			cmd_type = TYPE_L;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2216
			cmd_bytesz = CHAR_BIT;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2217
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2218
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2219
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2220
  case 64:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2221
#line 692 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2222
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2223
			cmd_type = TYPE_L;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2224
			cmd_bytesz = (yyvsp[0].i);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2225
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2226
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2227
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2228
  case 65:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2229
#line 698 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2230
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2231
			cmd_type = TYPE_L;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2232
			cmd_bytesz = (yyvsp[0].i);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2233
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2234
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2235
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2236
  case 66:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2237
#line 706 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2238
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2239
			(yyval.i) = STRU_F;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2240
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2241
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2242
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2243
  case 67:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2244
#line 710 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2245
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2246
			(yyval.i) = STRU_R;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2247
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2248
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2249
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2250
  case 68:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2251
#line 714 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2252
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2253
			(yyval.i) = STRU_P;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2254
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2255
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2256
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2257
  case 69:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2258
#line 721 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2259
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2260
			(yyval.i) = MODE_S;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2261
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2262
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2263
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2264
  case 70:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2265
#line 725 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2266
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2267
			(yyval.i) = MODE_B;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2268
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2269
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2270
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2271
  case 71:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2272
#line 729 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2273
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2274
			(yyval.i) = MODE_C;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2275
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2276
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2277
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2278
  case 72:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2279
#line 736 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2280
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2281
			/*
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2282
			 * Problem: this production is used for all pathname
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2283
			 * processing, but only gives a 550 error reply.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2284
			 * This is a valid reply in some cases but not in others.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2285
			 */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2286
			if (logged_in && (yyvsp[0].s) && strchr((yyvsp[0].s), '~') != NULL) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2287
				glob_t gl;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2288
#ifdef __linux__
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2289
				/* see popen.c */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2290
				int flags = GLOB_NOCHECK;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2291
#else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2292
				int flags =
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2293
				 GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2294
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2295
				char *pptr = (yyvsp[0].s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2296
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2297
				/*
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2298
				 * glob() will only find a leading ~, but
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2299
				 * Netscape kindly puts a slash in front of
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2300
				 * it for publish URLs.  There needs to be
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2301
				 * a flag for glob() that expands tildes
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2302
				 * anywhere in the string.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2303
				 */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2304
				if ((pptr[0] == '/') && (pptr[1] == '~'))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2305
					pptr++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2306
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2307
				memset(&gl, 0, sizeof(gl));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2308
				if (glob(pptr, flags, NULL, &gl) ||
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2309
				    gl.gl_pathc == 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2310
					reply(550, "not found");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2311
					(yyval.s) = NULL;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2312
				} else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2313
					(yyval.s) = strdup(gl.gl_pathv[0]);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2314
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2315
				globfree(&gl);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2316
				free((yyvsp[0].s));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2317
			} else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2318
				(yyval.s) = (yyvsp[0].s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2319
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2320
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2321
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2322
  case 74:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2323
#line 784 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2324
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2325
			int ret, dec, multby, digit;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2326
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2327
			/*
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2328
			 * Convert a number that was read as decimal number
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2329
			 * to what it would be if it had been read as octal.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2330
			 */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2331
			dec = (yyvsp[0].i);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2332
			multby = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2333
			ret = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2334
			while (dec) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2335
				digit = dec%10;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2336
				if (digit > 7) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2337
					ret = -1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2338
					break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2339
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2340
				ret += digit * multby;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2341
				multby *= 8;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2342
				dec /= 10;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2343
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2344
			(yyval.i) = ret;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2345
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2346
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2347
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2348
  case 75:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2349
#line 811 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2350
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2351
			if (logged_in)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2352
				(yyval.i) = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2353
			else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2354
				reply(530, "Please login with USER and PASS.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2355
				(yyval.i) = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2356
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2357
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2358
    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2359
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2360
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2361
      default: break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2362
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2363
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2364
/* Line 1126 of yacc.c.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2365
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2366
  yyvsp -= yylen;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2367
  yyssp -= yylen;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2368
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2369
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2370
  YY_STACK_PRINT (yyss, yyssp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2371
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2372
  *++yyvsp = yyval;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2373
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2374
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2375
  /* Now `shift' the result of the reduction.  Determine what state
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2376
     that goes to, based on the state we popped back to and the rule
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2377
     number reduced by.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2378
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2379
  yyn = yyr1[yyn];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2380
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2381
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2382
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2383
    yystate = yytable[yystate];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2384
  else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2385
    yystate = yydefgoto[yyn - YYNTOKENS];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2386
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2387
  goto yynewstate;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2388
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2389
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2390
/*------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2391
| yyerrlab -- here on detecting error |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2392
`------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2393
yyerrlab:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2394
  /* If not already recovering from an error, report this error.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2395
  if (!yyerrstatus)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2396
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2397
      ++yynerrs;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2398
#if YYERROR_VERBOSE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2399
      yyn = yypact[yystate];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2400
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2401
      if (YYPACT_NINF < yyn && yyn < YYLAST)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2402
	{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2403
	  int yytype = YYTRANSLATE (yychar);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2404
	  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2405
	  YYSIZE_T yysize = yysize0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2406
	  YYSIZE_T yysize1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2407
	  int yysize_overflow = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2408
	  char *yymsg = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2409
#	  define YYERROR_VERBOSE_ARGS_MAXIMUM 5
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2410
	  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2411
	  int yyx;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2412
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2413
#if 0
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2414
	  /* This is so xgettext sees the translatable formats that are
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2415
	     constructed on the fly.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2416
	  YY_("syntax error, unexpected %s");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2417
	  YY_("syntax error, unexpected %s, expecting %s");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2418
	  YY_("syntax error, unexpected %s, expecting %s or %s");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2419
	  YY_("syntax error, unexpected %s, expecting %s or %s or %s");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2420
	  YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2421
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2422
	  char *yyfmt;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2423
	  char const *yyf;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2424
	  static char const yyunexpected[] = "syntax error, unexpected %s";
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2425
	  static char const yyexpecting[] = ", expecting %s";
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2426
	  static char const yyor[] = " or %s";
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2427
	  char yyformat[sizeof yyunexpected
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2428
			+ sizeof yyexpecting - 1
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2429
			+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2430
			   * (sizeof yyor - 1))];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2431
	  char const *yyprefix = yyexpecting;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2432
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2433
	  /* Start YYX at -YYN if negative to avoid negative indexes in
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2434
	     YYCHECK.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2435
	  int yyxbegin = yyn < 0 ? -yyn : 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2436
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2437
	  /* Stay within bounds of both yycheck and yytname.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2438
	  int yychecklim = YYLAST - yyn;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2439
	  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2440
	  int yycount = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2441
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2442
	  yyarg[0] = yytname[yytype];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2443
	  yyfmt = yystpcpy (yyformat, yyunexpected);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2444
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2445
	  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2446
	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2447
	      {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2448
		if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2449
		  {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2450
		    yycount = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2451
		    yysize = yysize0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2452
		    yyformat[sizeof yyunexpected - 1] = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2453
		    break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2454
		  }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2455
		yyarg[yycount++] = yytname[yyx];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2456
		yysize1 = yysize + yytnamerr (0, yytname[yyx]);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2457
		yysize_overflow |= yysize1 < yysize;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2458
		yysize = yysize1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2459
		yyfmt = yystpcpy (yyfmt, yyprefix);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2460
		yyprefix = yyor;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2461
	      }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2462
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2463
	  yyf = YY_(yyformat);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2464
	  yysize1 = yysize + yystrlen (yyf);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2465
	  yysize_overflow |= yysize1 < yysize;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2466
	  yysize = yysize1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2467
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2468
	  if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2469
	    yymsg = (char *) YYSTACK_ALLOC (yysize);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2470
	  if (yymsg)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2471
	    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2472
	      /* Avoid sprintf, as that infringes on the user's name space.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2473
		 Don't have undefined behavior even if the translation
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2474
		 produced a string with the wrong number of "%s"s.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2475
	      char *yyp = yymsg;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2476
	      int yyi = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2477
	      while ((*yyp = *yyf))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2478
		{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2479
		  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2480
		    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2481
		      yyp += yytnamerr (yyp, yyarg[yyi++]);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2482
		      yyf += 2;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2483
		    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2484
		  else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2485
		    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2486
		      yyp++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2487
		      yyf++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2488
		    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2489
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2490
	      yyerror (yymsg);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2491
	      YYSTACK_FREE (yymsg);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2492
	    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2493
	  else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2494
	    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2495
	      yyerror (YY_("syntax error"));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2496
	      goto yyexhaustedlab;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2497
	    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2498
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2499
      else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2500
#endif /* YYERROR_VERBOSE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2501
	yyerror (YY_("syntax error"));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2502
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2503
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2504
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2505
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2506
  if (yyerrstatus == 3)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2507
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2508
      /* If just tried and failed to reuse look-ahead token after an
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2509
	 error, discard it.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2510
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2511
      if (yychar <= YYEOF)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2512
        {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2513
	  /* Return failure if at end of input.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2514
	  if (yychar == YYEOF)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2515
	    YYABORT;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2516
        }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2517
      else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2518
	{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2519
	  yydestruct ("Error: discarding", yytoken, &yylval);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2520
	  yychar = YYEMPTY;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2521
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2522
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2523
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2524
  /* Else will try to reuse look-ahead token after shifting the error
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2525
     token.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2526
  goto yyerrlab1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2527
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2528
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2529
/*---------------------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2530
| yyerrorlab -- error raised explicitly by YYERROR.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2531
`---------------------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2532
yyerrorlab:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2533
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2534
  /* Pacify compilers like GCC when the user code never invokes
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2535
     YYERROR and the label yyerrorlab therefore never appears in user
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2536
     code.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2537
  if (0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2538
     goto yyerrorlab;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2539
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2540
yyvsp -= yylen;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2541
  yyssp -= yylen;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2542
  yystate = *yyssp;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2543
  goto yyerrlab1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2544
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2545
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2546
/*-------------------------------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2547
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2548
`-------------------------------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2549
yyerrlab1:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2550
  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2551
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2552
  for (;;)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2553
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2554
      yyn = yypact[yystate];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2555
      if (yyn != YYPACT_NINF)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2556
	{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2557
	  yyn += YYTERROR;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2558
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2559
	    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2560
	      yyn = yytable[yyn];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2561
	      if (0 < yyn)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2562
		break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2563
	    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2564
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2565
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2566
      /* Pop the current state because it cannot handle the error token.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2567
      if (yyssp == yyss)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2568
	YYABORT;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2569
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2570
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2571
      yydestruct ("Error: popping", yystos[yystate], yyvsp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2572
      YYPOPSTACK;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2573
      yystate = *yyssp;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2574
      YY_STACK_PRINT (yyss, yyssp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2575
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2576
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2577
  if (yyn == YYFINAL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2578
    YYACCEPT;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2579
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2580
  *++yyvsp = yylval;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2581
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2582
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2583
  /* Shift the error token. */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2584
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2585
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2586
  yystate = yyn;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2587
  goto yynewstate;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2588
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2589
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2590
/*-------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2591
| yyacceptlab -- YYACCEPT comes here.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2592
`-------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2593
yyacceptlab:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2594
  yyresult = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2595
  goto yyreturn;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2596
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2597
/*-----------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2598
| yyabortlab -- YYABORT comes here.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2599
`-----------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2600
yyabortlab:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2601
  yyresult = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2602
  goto yyreturn;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2603
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2604
#ifndef yyoverflow
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2605
/*-------------------------------------------------.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2606
| yyexhaustedlab -- memory exhaustion comes here.  |
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2607
`-------------------------------------------------*/
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2608
yyexhaustedlab:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2609
  yyerror (YY_("memory exhausted"));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2610
  yyresult = 2;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2611
  /* Fall through.  */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2612
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2613
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2614
yyreturn:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2615
  if (yychar != YYEOF && yychar != YYEMPTY)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2616
     yydestruct ("Cleanup: discarding lookahead",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2617
		 yytoken, &yylval);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2618
  while (yyssp != yyss)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2619
    {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2620
      yydestruct ("Cleanup: popping",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2621
		  yystos[*yyssp], yyvsp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2622
      YYPOPSTACK;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2623
    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2624
#ifndef yyoverflow
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2625
  if (yyss != yyssa)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2626
    YYSTACK_FREE (yyss);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2627
#endif
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2628
  return yyresult;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2629
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2630
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2631
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2632
#line 821 "ftpcmd.y"
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2633
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2634
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2635
extern jmp_buf errcatch;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2636
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2637
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2638
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2639
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2640
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2641
//static void	 help __P((struct tab *, char *));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2642
static struct tab *
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2643
		 lookup __P((struct tab *, char *));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2644
//static void	 sizecmd __P((char *));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2645
static int	 yylex __P((void));
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2646
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2647
static struct tab *lookup(struct tab *p, char *cmd)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2648
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2649
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2650
	for (; p->name != NULL; p++)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2651
		if (strcmp(cmd, p->name) == 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2652
			return (p);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2653
	return (0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2654
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2655
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2656
#include <arpa/telnet.h>
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2657
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2658
/*
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2659
 * getline - a hacked up version of fgets to ignore TELNET escape codes.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2660
 */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2661
char * ftpd_getline(char *s, int n, FILE *iop)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2662
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2663
	int c;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2664
	register char *cs;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2665
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2666
	cs = s;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2667
/* tmpline may contain saved command from urgent mode interruption */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2668
	for (c = 0; tmpline[c] != '\0' && --n > 0; ++c) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2669
		*cs++ = tmpline[c];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2670
		if (tmpline[c] == '\n') {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2671
			*cs++ = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2672
//			if (debug)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2673
//				syslog(LOG_DEBUG, "command: %s", s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2674
			tmpline[0] = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2675
			return(s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2676
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2677
		if (c == 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2678
			tmpline[0] = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2679
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2680
	while ((c = getc(iop)) != EOF) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2681
		c &= 0377;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2682
		if (c == IAC) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2683
		    if ((c = getc(iop)) != EOF) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2684
			c &= 0377;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2685
			switch (c) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2686
			case WILL:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2687
			case WONT:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2688
				c = getc(iop);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2689
				printf("%c%c%c", IAC, DONT, 0377&c);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2690
				(void) fflush(stdout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2691
				continue;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2692
			case DO:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2693
			case DONT:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2694
				c = getc(iop);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2695
				printf("%c%c%c", IAC, WONT, 0377&c);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2696
				(void) fflush(stdout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2697
				continue;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2698
			case IAC:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2699
				break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2700
			default:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2701
				continue;	/* ignore command */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2702
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2703
		    }
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2704
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2705
		*cs++ = c;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2706
		if (--n <= 0 || c == '\n')
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2707
			break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2708
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2709
	if (c == EOF && cs == s)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2710
		return (NULL);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2711
	*cs++ = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2712
	if (debug) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2713
		if (!guest && strncasecmp("pass ", s, 5) == 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2714
			/* Don't syslog passwords */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2715
			//syslog(LOG_DEBUG, "command: %.5s ???", s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2716
		} else {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2717
			register char *cp;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2718
			register int len;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2719
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2720
			/* Don't syslog trailing CR-LF */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2721
			len = strlen(s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2722
			cp = s + len - 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2723
			while (cp >= s && (*cp == '\n' || *cp == '\r')) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2724
				--cp;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2725
				--len;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2726
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2727
			//syslog(LOG_DEBUG, "command: %.*s", len, s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2728
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2729
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2730
	return (s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2731
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2732
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2733
void toolong(int signo)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2734
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2735
	(void)signo;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2736
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2737
	reply(421,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2738
	    "Timeout (%d seconds): closing control connection.", timeout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2739
//	if (logging)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2740
//		syslog(LOG_INFO, "User %s timed out after %d seconds",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2741
//		    (pw ? pw -> pw_name : "unknown"), timeout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2742
	dologout(1);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2743
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2744
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2745
static int yylex(void)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2746
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2747
	static int cpos, state;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2748
	char *cp, *cp2;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2749
	struct tab *p;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2750
	int n, value;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2751
	char c;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2752
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2753
	for (;;) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2754
		switch (state) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2755
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2756
		case CMD:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2757
			//(void) signal(SIGALRM, toolong);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2758
			//(void) alarm((unsigned) timeout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2759
			if (ftpd_getline(cbuf, sizeof(cbuf)-1, stdin)==NULL) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2760
				reply(221, "You could at least say goodbye.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2761
				dologout(0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2762
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2763
			//(void) alarm(0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2764
			cp = strchr(cbuf, '\r');
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2765
			if (cp) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2766
				*cp++ = '\n';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2767
				*cp = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2768
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2769
#ifdef HASSETPROCTITLE
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2770
			if (strncasecmp(cbuf, "PASS", 4) != 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2771
				cp = strpbrk(cbuf, "\n");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2772
				if (cp) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2773
					c = *cp;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2774
					*cp = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2775
					setproctitle("%s: %s", proctitle, cbuf);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2776
					*cp = c;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2777
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2778
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2779
#endif /* HASSETPROCTITLE */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2780
			cp = strpbrk(cbuf, " \n");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2781
			if (cp)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2782
				cpos = cp - cbuf;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2783
			if (cpos == 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2784
				cpos = 4;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2785
			c = cbuf[cpos];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2786
			cbuf[cpos] = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2787
			upper(cbuf);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2788
			p = lookup(cmdtab, cbuf);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2789
			cbuf[cpos] = c;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2790
			if (p != 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2791
				if (p->implemented == 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2792
					nack(p->name);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2793
					longjmp(errcatch,0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2794
					/* NOTREACHED */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2795
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2796
				state = p->state;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2797
				yylval.s = (char *)p->name;  /* XXX */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2798
				return (p->token);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2799
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2800
			break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2801
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2802
		case SITECMD:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2803
			if (cbuf[cpos] == ' ') {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2804
				cpos++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2805
				return (SP);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2806
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2807
			cp = &cbuf[cpos];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2808
			cp2 = strpbrk(cp, " \n");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2809
			if (cp2)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2810
				cpos = cp2 - cbuf;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2811
			c = cbuf[cpos];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2812
			cbuf[cpos] = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2813
			upper(cp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2814
			p = lookup(sitetab, cp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2815
			cbuf[cpos] = c;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2816
			if (p != 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2817
				if (p->implemented == 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2818
					state = CMD;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2819
					nack(p->name);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2820
					longjmp(errcatch,0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2821
					/* NOTREACHED */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2822
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2823
				state = p->state;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2824
				yylval.s = (char *) p->name;  /* XXX */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2825
				return (p->token);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2826
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2827
			state = CMD;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2828
			break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2829
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2830
		case OSTR:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2831
			if (cbuf[cpos] == '\n') {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2832
				state = CMD;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2833
				return (CRLF);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2834
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2835
			/* FALLTHROUGH */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2836
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2837
		case STR1:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2838
		case ZSTR1:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2839
		dostr1:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2840
			if (cbuf[cpos] == ' ') {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2841
				cpos++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2842
				/* DOH!!! who wrote this?
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2843
				 * state = ++state; is undefined in C!
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2844
				 * state = state == OSTR ? STR2 : ++state;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2845
				 * looks elegant but not correct, adding 'value'
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2846
				 */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2847
				value = state == OSTR ? STR2 : ++state;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2848
				state = value;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2849
				return (SP);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2850
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2851
			break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2852
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2853
		case ZSTR2:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2854
			if (cbuf[cpos] == '\n') {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2855
				state = CMD;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2856
				return (CRLF);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2857
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2858
			/* FALLTHROUGH */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2859
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2860
		case STR2:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2861
			cp = &cbuf[cpos];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2862
			n = strlen(cp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2863
			cpos += n - 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2864
			/*
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2865
			 * Make sure the string is nonempty and \n terminated.
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2866
			 */
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2867
			if (n > 1 && cbuf[cpos] == '\n') {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2868
				cbuf[cpos] = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2869
				yylval.s = strdup(cp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2870
				if (yylval.s == NULL)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2871
					fatal("Ran out of memory.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2872
				cbuf[cpos] = '\n';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2873
				state = ARGS;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2874
				return (STRING);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2875
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2876
			break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2877
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2878
		case NSTR:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2879
			if (cbuf[cpos] == ' ') {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2880
				cpos++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2881
				return (SP);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2882
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2883
			if (isdigit(cbuf[cpos])) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2884
				cp = &cbuf[cpos];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2885
				while (isdigit(cbuf[++cpos]))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2886
					;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2887
				c = cbuf[cpos];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2888
				cbuf[cpos] = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2889
				yylval.i = atoi(cp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2890
				cbuf[cpos] = c;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2891
				state = STR1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2892
				return (NUMBER);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2893
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2894
			state = STR1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2895
			goto dostr1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2896
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2897
		case ARGS:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2898
			if (isdigit(cbuf[cpos])) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2899
				cp = &cbuf[cpos];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2900
				while (isdigit(cbuf[++cpos]))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2901
					;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2902
				c = cbuf[cpos];
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2903
				cbuf[cpos] = '\0';
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2904
				yylval.i = atoi(cp);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2905
				cbuf[cpos] = c;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2906
				return (NUMBER);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2907
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2908
			switch (cbuf[cpos++]) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2909
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2910
			case '\n':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2911
				state = CMD;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2912
				return (CRLF);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2913
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2914
			case ' ':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2915
				return (SP);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2916
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2917
			case ',':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2918
				return (COMMA);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2919
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2920
			case 'A':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2921
			case 'a':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2922
				return (A);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2923
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2924
			case 'B':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2925
			case 'b':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2926
				return (B);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2927
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2928
			case 'C':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2929
			case 'c':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2930
				return (C);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2931
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2932
			case 'E':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2933
			case 'e':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2934
				return (E);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2935
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2936
			case 'F':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2937
			case 'f':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2938
				return (F);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2939
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2940
			case 'I':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2941
			case 'i':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2942
				return (I);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2943
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2944
			case 'L':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2945
			case 'l':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2946
				return (L);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2947
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2948
			case 'N':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2949
			case 'n':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2950
				return (N);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2951
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2952
			case 'P':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2953
			case 'p':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2954
				return (P);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2955
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2956
			case 'R':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2957
			case 'r':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2958
				return (R);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2959
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2960
			case 'S':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2961
			case 's':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2962
				return (S);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2963
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2964
			case 'T':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2965
			case 't':
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2966
				return (T);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2967
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2968
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2969
			break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2970
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2971
		default:
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2972
			fatal("Unknown state in scanner.");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2973
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2974
		yyerror((char *) 0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2975
		state = CMD;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2976
		longjmp(errcatch,0);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2977
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2978
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2979
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2980
void upper(char *s)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2981
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2982
	while (*s != '\0') {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2983
		if (islower(*s))
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2984
			*s = toupper(*s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2985
		s++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2986
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2987
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2988
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2989
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2990
static void help(struct tab *ctab, char *s)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2991
{
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2992
	struct tab *c;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2993
	int width, NCMDS;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2994
	const char *type;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2995
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2996
	if (ctab == sitetab)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2997
		type = "SITE ";
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2998
	else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  2999
		type = "";
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3000
	width = 0, NCMDS = 0;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3001
	for (c = ctab; c->name != NULL; c++) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3002
		int len = strlen(c->name);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3003
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3004
		if (len > width)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3005
			width = len;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3006
		NCMDS++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3007
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3008
	width = (width + 8) &~ 7;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3009
	if (s == 0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3010
		int i, j, w;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3011
		int columns, lines;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3012
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3013
		lreply(214, "The following %scommands are recognized %s.",
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3014
		    type, "(* =>'s unimplemented)");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3015
		columns = 76 / width;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3016
		if (columns == 0)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3017
			columns = 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3018
		lines = (NCMDS + columns - 1) / columns;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3019
		for (i = 0; i < lines; i++) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3020
			printf("   ");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3021
			for (j = 0; j < columns; j++) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3022
				c = ctab + j * lines + i;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3023
				printf("%s%c", c->name,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3024
					c->implemented ? ' ' : '*');
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3025
				if (c + lines >= &ctab[NCMDS])
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3026
					break;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3027
				w = strlen(c->name) + 1;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3028
				while (w < width) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3029
					putchar(' ');
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3030
					w++;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3031
				}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3032
			}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3033
			printf("\r\n");
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3034
		}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3035
		(void) fflush(stdout);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3036
		reply(214, "Direct comments to ftp-bugs@%s.", hostname);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3037
		return;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3038
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3039
	upper(s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3040
	c = lookup(ctab, s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3041
	if (c == (struct tab *)0) {
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3042
		reply(502, "Unknown command %s.", s);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3043
		return;
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3044
	}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3045
	if (c->implemented)
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3046
		reply(214, "Syntax: %s%s %s", type, c->name, c->help);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3047
	else
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3048
		reply(214, "%s%-*s\t%s; unimplemented.", type, width,
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3049
		    c->name, c->help);
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3050
}
c6b0df440bee Initial contribution of EPL licensed sources
ravikurupati
parents:
diff changeset
  3051