ReactOS  r76032
cmds.c File Reference
#include "precomp.h"
#include "pathnames.h"
Include dependency graph for cmds.c:

Go to the source code of this file.

Classes

struct  types
 

Functions

static const charremglob (const char *argv[], int doswitch)
 
const chardotrans (const char *name)
 
const chardomap (const char *name)
 
void setpeer (int argc, const char *argv[])
 
void settype (int argc, const char *argv[])
 
void setbinary (int argc, const char *argv[])
 
void setascii (int argc, const char *argv[])
 
void settenex (int argc, const char *argv[])
 
void setebcdic ()
 
void fsetmode (int argc, const char *argv[])
 
void setform (int argc, const char *argv[])
 
void setstruct (int argc, const char *argv[])
 
void put (int argc, const char *argv[])
 
void mput (int argc, const char *argv[])
 
void reget (int argc, const char *argv[])
 
void get (int argc, const char *argv[])
 
int getit (int argc, const char *argv[], int restartit, const char *mode)
 
void mget (int argc, const char *argv[])
 
static const charonoff (int bool)
 
void status (int argc, const char *argv[])
 
void setbell (int argc, const char *argv[])
 
void settrace (int argc, const char *argv[])
 
void sethash (int argc, const char *argv[])
 
void setverbose (int argc, const char *argv[])
 
void setport (int argc, const char *argv[])
 
void setprompt (int argc, const char *argv[])
 
void setglob (int argc, const char *argv[])
 
void setdebug (int argc, const char *argv[])
 
void cd (int argc, const char *argv[])
 
void lcd (int argc, const char *argv[])
 
void delete (int argc, const char *argv[])
 
void mdelete (int argc, const char *argv[])
 
void renamefile (int argc, const char *argv[])
 
void ls (int argc, const char *argv[])
 
void mls (int argc, const char *argv[])
 
void shell (int argc, const char *argv[])
 
void user (int argc, const char *argv[])
 
void pwd (int argc, const char *argv[])
 
void makedir (int argc, const char *argv[])
 
void removedir (int argc, const char *argv[])
 
void quote (int argc, const char *argv[])
 
void site (int argc, const char *argv[])
 
void do_chmod (int argc, const char *argv[])
 
void do_umask (int argc, const char *argv[])
 
void idle (int argc, const char *argv[])
 
void rmthelp (int argc, const char *argv[])
 
void quit (int argc, const char *argv[])
 
void disconnect (int argc, const char *argv[])
 
int confirm (const char *cmd, const char *file)
 
int globulize (const char **cpp)
 
void account (int argc, const char *argv[])
 
void doproxy (int argc, const char *argv[])
 
void setcase (int argc, const char *argv[])
 
void setcr (int argc, const char *argv[])
 
void setntrans (int argc, const char *argv[])
 
void setpassive (int argc, const char *argv[])
 
void setnmap (int argc, const char *argv[])
 
void setsunique (int argc, const char *argv[])
 
void setrunique (int argc, const char *argv[])
 
void cdup (int argc, const char *argv[])
 
void restart (int argc, const char *argv[])
 
void syst (int argc, const char *argv[])
 
void macdef (int argc, const char *argv[])
 
void sizecmd (int argc, const char *argv[])
 
void modtime (int argc, const char *argv[])
 
void rmtstatus (int argc, const char *argv[])
 
void newer (int argc, const char *argv[])
 

Variables

static char sccsid [] = "@(#)cmds.c 5.18 (Berkeley) 4/20/89"
 
chargloberr
 
char home []
 
int allbinary
 
off_t restart_point
 
char reply_string []
 
const charmname
 
jmp_buf jabort
 
short portnum
 
charhostname
 
int autologin
 
struct types types []
 
const charstype []
 
jmp_buf abortprox
 

Function Documentation

void account ( int  argc,
const char argv[] 
)

Definition at line 1690 of file cmds.c.

Referenced by check_wellknown_name(), get_sid_info(), test_create_delete_svc(), test_LookupAccountName(), test_LsaLookupNames2(), test_process_security(), and test_sid_str().

1691 {
1692  char acct[50], *getpass(), *ap;
1693 
1694  if (argc > 1) {
1695  ++argv;
1696  --argc;
1697  (void) strncpy(acct,*argv,49);
1698  acct[49] = '\0';
1699  while (argc > 1) {
1700  --argc;
1701  ++argv;
1702  (void) strncat(acct,*argv, 49-strlen(acct));
1703  }
1704  ap = acct;
1705  }
1706  else {
1707  ap = getpass("Account:");
1708  }
1709  (void) command("ACCT %s", ap);
1710 }
static int argc
Definition: ServiceArgs.c:15
char * strncat(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:605
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
static char ** argv
Definition: ServiceArgs.c:14
char * getpass(const char *prompt)
Definition: fake.c:231
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int command(const char *fmt,...)
Definition: ftp.c:262
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
void cd ( int  argc,
const char argv[] 
)

Definition at line 965 of file cmds.c.

966 {
967 
968  if (argc < 2) {
969  (void) strcat(line, " ");
970  printf("(remote-directory) ");
971  (void) fflush(stdout);
972  (void) gets(&line[strlen(line)]);
973  makeargv();
974  argc = margc;
975  argv = margv;
976  }
977  if (argc < 2) {
978  printf("usage:%s remote-directory\n", argv[0]);
979  (void) fflush(stdout);
980  code = -1;
981  return;
982  }
983  if (command("CWD %s", argv[1]) == ERROR && code == 500) {
984  if (verbose) {
985  printf("CWD command not recognized, trying XCWD\n");
986  (void) fflush(stdout);
987  }
988  (void) command("XCWD %s", argv[1]);
989  }
990 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
#define ERROR(err)
Definition: vbo_exec_api.c:413
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203
void cdup ( int  argc,
const char argv[] 
)

Definition at line 2103 of file cmds.c.

2104 {
2105  if (command("CDUP") == ERROR && code == 500) {
2106  if (verbose) {
2107  printf("CDUP command not recognized, trying XCUP\n");
2108  (void) fflush(stdout);
2109  }
2110  (void) command("XCUP");
2111  }
2112 }
#define ERROR(err)
Definition: vbo_exec_api.c:413
FILE * stdout
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203
int confirm ( const char cmd,
const char file 
)

Definition at line 1636 of file cmds.c.

Referenced by ls(), mdelete(), mget(), mls(), and mput().

1637 {
1638  char line[BUFSIZ];
1639 
1640  if (!interactive)
1641  return (1);
1642  printf("%s %s? ", cmd, file);
1643  (void) fflush(stdout);
1644  (void) gets(line);
1645  return (*line != 'n' && *line != 'N');
1646 }
Definition: ftp_var.h:139
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
#define BUFSIZ
Definition: nsplookup.c:26
#define interactive
Definition: rosglue.h:34
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define printf
Definition: config.h:203
Definition: fci.c:114
void delete ( int  argc,
const char argv[] 
)

Definition at line 1025 of file cmds.c.

1026 {
1027 
1028  if (argc < 2) {
1029  (void) strcat(line, " ");
1030  printf("(remote-file) ");
1031  (void) fflush(stdout);
1032  (void) gets(&line[strlen(line)]);
1033  makeargv();
1034  argc = margc;
1035  argv = margv;
1036  }
1037  if (argc < 2) {
1038  printf("usage:%s remote-file\n", argv[0]);
1039  (void) fflush(stdout);
1040  code = -1;
1041  return;
1042  }
1043  (void) command("DELE %s", argv[1]);
1044 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203
void disconnect ( int  argc,
const char argv[] 
)

Definition at line 1620 of file cmds.c.

Referenced by quit().

1621 {
1622  extern SOCKET cout;
1623  extern int data;
1624 
1625  if (!connected)
1626  return;
1627  (void) command("QUIT");
1628  cout = 0;
1629  connected = 0;
1630  data = -1;
1631  if (!proxy) {
1632  macnum = 0;
1633  }
1634 }
int proxy
Definition: main.c:67
#define cout
Definition: iostream.cpp:38
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int connected
Definition: main.c:61
int command(const char *fmt,...)
Definition: ftp.c:262
int macnum
Definition: main.c:108
UINT_PTR SOCKET
Definition: winsock.h:47
void do_chmod ( int  argc,
const char argv[] 
)

Definition at line 1546 of file cmds.c.

1547 {
1548  if (argc == 2) {
1549  printf("usage: %s mode file-name\n", argv[0]);
1550  (void) fflush(stdout);
1551  code = -1;
1552  return;
1553  }
1554  if (argc < 3) {
1555  (void) strcat(line, " ");
1556  printf("(mode and file-name) ");
1557  (void) fflush(stdout);
1558  (void) gets(&line[strlen(line)]);
1559  makeargv();
1560  argc = margc;
1561  argv = margv;
1562  }
1563  if (argc != 3) {
1564  printf("usage: %s mode file-name\n", argv[0]);
1565  (void) fflush(stdout);
1566  code = -1;
1567  return;
1568  }
1569  (void)command("SITE CHMOD %s %s", argv[1], argv[2]);
1570 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203
void do_umask ( int  argc,
const char argv[] 
)

Definition at line 1572 of file cmds.c.

1573 {
1574  int oldverbose = verbose;
1575 
1576  verbose = 1;
1577  (void) command(argc == 1 ? "SITE UMASK" : "SITE UMASK %s", argv[1]);
1578  verbose = oldverbose;
1579 }
static int argc
Definition: ServiceArgs.c:15
static char ** argv
Definition: ServiceArgs.c:14
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int command(const char *fmt,...)
Definition: ftp.c:262
const char * domap ( const char name)

Definition at line 1914 of file cmds.c.

Referenced by getit(), mget(), mput(), and put().

1915 {
1916  static char new[MAXPATHLEN];
1917  const char *cp1 = name;
1918  char *cpn, *cp2 = mapin;
1919  const char *tp[9], *te[9];
1920  int i, toks[9], toknum = 0, match = 1;
1921 
1922  for (i=0; i < 9; ++i) {
1923  toks[i] = 0;
1924  }
1925  while (match && *cp1 && *cp2) {
1926  switch (*cp2) {
1927  case '\\':
1928  if (*++cp2 != *cp1) {
1929  match = 0;
1930  }
1931  break;
1932  case '$':
1933  if (*(cp2+1) >= '1' && (*cp2+1) <= '9') {
1934  if (*cp1 != *(++cp2+1)) {
1935  toks[toknum = *cp2 - '1']++;
1936  tp[toknum] = cp1;
1937  while (*++cp1 && *(cp2+1)
1938  != *cp1);
1939  te[toknum] = cp1;
1940  }
1941  cp2++;
1942  break;
1943  }
1944  /* FALLTHROUGH */
1945  default:
1946  if (*cp2 != *cp1) {
1947  match = 0;
1948  }
1949  break;
1950  }
1951  if (match && *cp1) {
1952  cp1++;
1953  }
1954  if (match && *cp2) {
1955  cp2++;
1956  }
1957  }
1958  if (!match && *cp1) /* last token mismatch */
1959  {
1960  toks[toknum] = 0;
1961  }
1962 
1963  cpn = new;
1964  *cpn = '\0';
1965  cp2 = mapout;
1966  while (*cp2) {
1967  match = 0;
1968  switch (*cp2) {
1969  case '\\':
1970  if (*(cp2 + 1)) {
1971  *cpn++ = *++cp2;
1972  }
1973  break;
1974  case '[':
1975 LOOP:
1976  if (*++cp2 == '$' && isdigit(*(cp2+1))) {
1977  if (*++cp2 == '0') {
1978  const char *cp3 = name;
1979 
1980  while (*cp3) {
1981  *cpn++ = *cp3++;
1982  }
1983  match = 1;
1984  }
1985  else if (toks[toknum = *cp2 - '1']) {
1986  const char *cp3 = tp[toknum];
1987 
1988  while (cp3 != te[toknum]) {
1989  *cpn++ = *cp3++;
1990  }
1991  match = 1;
1992  }
1993  }
1994  else {
1995  while (*cp2 && *cp2 != ',' &&
1996  *cp2 != ']') {
1997  if (*cp2 == '\\') {
1998  cp2++;
1999  }
2000  else if (*cp2 == '$' &&
2001  isdigit(*(cp2+1))) {
2002  if (*++cp2 == '0') {
2003  const char *cp3 = name;
2004 
2005  while (*cp3) {
2006  *cpn++ = *cp3++;
2007  }
2008  }
2009  else if (toks[toknum =
2010  *cp2 - '1']) {
2011  const char *cp3=tp[toknum];
2012 
2013  while (cp3 !=
2014  te[toknum]) {
2015  *cpn++ = *cp3++;
2016  }
2017  }
2018  }
2019  else if (*cp2) {
2020  *cpn++ = *cp2++;
2021  }
2022  }
2023  if (!*cp2) {
2024  printf("nmap: unbalanced brackets\n");
2025  (void) fflush(stdout);
2026  return(name);
2027  }
2028  match = 1;
2029  cp2--;
2030  }
2031  if (match) {
2032  while (*++cp2 && *cp2 != ']') {
2033  if (*cp2 == '\\' && *(cp2 + 1)) {
2034  cp2++;
2035  }
2036  }
2037  if (!*cp2) {
2038  printf("nmap: unbalanced brackets\n");
2039  (void) fflush(stdout);
2040  return(name);
2041  }
2042  break;
2043  }
2044  switch (*++cp2) {
2045  case ',':
2046  goto LOOP;
2047  case ']':
2048  break;
2049  default:
2050  cp2--;
2051  goto LOOP;
2052  }
2053  break;
2054  case '$':
2055  if (isdigit(*(cp2 + 1))) {
2056  if (*++cp2 == '0') {
2057  const char *cp3 = name;
2058 
2059  while (*cp3) {
2060  *cpn++ = *cp3++;
2061  }
2062  }
2063  else if (toks[toknum = *cp2 - '1']) {
2064  const char *cp3 = tp[toknum];
2065 
2066  while (cp3 != te[toknum]) {
2067  *cpn++ = *cp3++;
2068  }
2069  }
2070  break;
2071  }
2072  /* intentional drop through */
2073  default:
2074  *cpn++ = *cp2;
2075  break;
2076  }
2077  cp2++;
2078  }
2079  *cpn = '\0';
2080  if (!*new) {
2081  return(name);
2082  }
2083  return(new);
2084 }
Definition: match.c:28
FILE * stdout
GLuint const GLchar * name
Definition: glext.h:6031
GLenum GLclampf GLint i
Definition: glfuncs.h:14
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2584
#define isdigit(c)
Definition: acclib.h:68
#define LOOP
Definition: m_xform.c:79
#define MAXPATHLEN
Definition: ftp_var.h:35
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
Definition: name.c:23
char mapin[MAXPATHLEN]
Definition: main.c:82
char mapout[MAXPATHLEN]
Definition: main.c:83
#define printf
Definition: config.h:203
void doproxy ( int  argc,
const char argv[] 
)

Definition at line 1734 of file cmds.c.

1735 {
1736  register struct cmd *c;
1737  struct cmd *getcmd();
1738 // extern struct cmd cmdtab[];
1739  extern jmp_buf abortprox;
1740 
1741  if (argc < 2) {
1742  (void) strcat(line, " ");
1743  printf("(command) ");
1744  (void) fflush(stdout);
1745  (void) gets(&line[strlen(line)]);
1746  makeargv();
1747  argc = margc;
1748  argv = margv;
1749  }
1750  if (argc < 2) {
1751  printf("usage:%s command\n", argv[0]);
1752  (void) fflush(stdout);
1753  code = -1;
1754  return;
1755  }
1756  c = getcmd(argv[1]);
1757  if (c == (struct cmd *) -1) {
1758  printf("?Ambiguous command\n");
1759  (void) fflush(stdout);
1760  code = -1;
1761  return;
1762  }
1763  if (c == 0) {
1764  printf("?Invalid command\n");
1765  (void) fflush(stdout);
1766  code = -1;
1767  return;
1768  }
1769  if (!c->c_proxy) {
1770  printf("?Invalid proxy command\n");
1771  (void) fflush(stdout);
1772  code = -1;
1773  return;
1774  }
1775  if (setjmp(abortprox)) {
1776  code = -1;
1777  return;
1778  }
1779 // oldintr = signal(SIGINT, proxabort);
1780  pswitch(1);
1781  if (c->c_conn && !connected) {
1782  printf("Not connected\n");
1783  (void) fflush(stdout);
1784  pswitch(0);
1785 // (void) signal(SIGINT, oldintr);
1786  code = -1;
1787  return;
1788  }
1789  (*c->c_handler)(argc-1, argv+1);
1790  if (connected) {
1791  proxflag = 1;
1792  }
1793  else {
1794  proxflag = 0;
1795  }
1796  pswitch(0);
1797 // (void) signal(SIGINT, oldintr);
1798 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
Definition: ftp_var.h:139
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
void(* c_handler)(int argc, const char *argv[])
Definition: ftp_var.h:145
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
char c_proxy
Definition: ftp_var.h:144
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
int proxflag
Definition: main.c:69
jmp_buf abortprox
Definition: cmds.c:1712
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
int connected
Definition: main.c:61
char c_conn
Definition: ftp_var.h:143
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define setjmp
Definition: setjmp.h:183
void pswitch(int flag)
Definition: ftp.c:1306
#define c
Definition: ke_i.h:80
long jmp_buf[100]
Definition: of.h:11
struct cmd * getcmd(const char *name)
Definition: main.c:350
#define printf
Definition: config.h:203
const char * dotrans ( const char name)

Definition at line 1838 of file cmds.c.

Referenced by getit(), mget(), mput(), and put().

1839 {
1840  static char new[MAXPATHLEN];
1841  const char *cp1;
1842  char *cp2 = new;
1843  register int i, ostop, found;
1844 
1845  for (ostop = 0; ostop < 16 && *(ntout + ostop); ostop++);
1846  for (cp1 = name; *cp1; cp1++) {
1847  found = 0;
1848  for (i = 0; i < 16 && *(ntin + i); i++) {
1849  if (*cp1 == *(ntin + i)) {
1850  found++;
1851  if (i < ostop) {
1852  *cp2++ = *(ntout + i);
1853  }
1854  break;
1855  }
1856  }
1857  if (!found) {
1858  *cp2++ = *cp1;
1859  }
1860  }
1861  *cp2 = '\0';
1862  return(new);
1863 }
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define MAXPATHLEN
Definition: ftp_var.h:35
char ntin[17]
Definition: main.c:79
Definition: name.c:23
char ntout[17]
Definition: main.c:80
void fsetmode ( int  argc,
const char argv[] 
)

Definition at line 243 of file cmds.c.

244 {
245 
246  printf("We only support %s mode, sorry.\n", modename);
247  (void) fflush(stdout);
248  code = -1;
249 }
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
char modename[32]
Definition: main.c:90
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define printf
Definition: config.h:203
void get ( int  argc,
const char argv[] 
)

Definition at line 480 of file cmds.c.

481 {
482  (void) getit(argc, argv, 0, restart_point ? "r+w" : "w" );
483 }
static int argc
Definition: ServiceArgs.c:15
off_t restart_point
Definition: ftp.c:77
static char ** argv
Definition: ServiceArgs.c:14
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int getit(int argc, const char *argv[], int restartit, const char *mode)
Definition: cmds.c:488
int getit ( int  argc,
const char argv[],
int  restartit,
const char mode 
)

Definition at line 488 of file cmds.c.

Referenced by get(), newer(), and reget().

489 {
490  int loc = 0;
491  const char *oldargv1, *oldargv2;
492 
493  if (argc == 2) {
494  argc++;
495  argv[2] = argv[1];
496  loc++;
497  }
498  if (argc < 2) {
499  (void) strcat(line, " ");
500  printf("(remote-file) ");
501  (void) fflush(stdout);
502  (void) gets(&line[strlen(line)]);
503  makeargv();
504  argc = margc;
505  argv = margv;
506  }
507  if (argc < 2) {
508 usage:
509  printf("usage: %s remote-file [ local-file ]\n", argv[0]);
510  (void) fflush(stdout);
511  code = -1;
512  return (0);
513  }
514  if (argc < 3) {
515  (void) strcat(line, " ");
516  printf("(local-file) ");
517  (void) fflush(stdout);
518  (void) gets(&line[strlen(line)]);
519  makeargv();
520  argc = margc;
521  argv = margv;
522  }
523  if (argc < 3)
524  goto usage;
525  oldargv1 = argv[1];
526  oldargv2 = argv[2];
527  if (!globulize(&argv[2])) {
528  code = -1;
529  return (0);
530  }
531  if (loc && mcase) {
532  const char *tp = argv[1];
533  char *tp2, tmpbuf[MAXPATHLEN];
534 
535  while (*tp && !islower(*tp)) {
536  tp++;
537  }
538  if (!*tp) {
539  tp = argv[2];
540  tp2 = tmpbuf;
541  while ((*tp2 = *tp)) {
542  if (isupper(*tp2)) {
543  *tp2 = 'a' + *tp2 - 'A';
544  }
545  tp++;
546  tp2++;
547  }
548  argv[2] = tmpbuf;
549  }
550  }
551  if (loc && ntflag)
552  argv[2] = dotrans(argv[2]);
553  if (loc && mapflag)
554  argv[2] = domap(argv[2]);
555  if (restartit) {
556  struct stat stbuf;
557  int ret;
558 
559  ret = stat(argv[2], &stbuf);
560  if (restartit == 1) {
561  if (ret < 0) {
562  perror(argv[2]);
563  return (0);
564  }
565  restart_point = stbuf.st_size;
566  } else {
567  if (ret == 0) {
568  int overbose;
569 
570  overbose = verbose;
571  if (debug == 0)
572  verbose = -1;
573  if (command("MDTM %s", argv[1]) == COMPLETE) {
574  int yy, mo, day, hour, min, sec;
575  struct tm *tm;
576  verbose = overbose;
578  "%*s %04d%02d%02d%02d%02d%02d",
579  &yy, &mo, &day, &hour, &min, &sec);
580  tm = gmtime(&stbuf.st_mtime);
581  tm->tm_mon++;
582  if (tm->tm_year > yy%100)
583  return (1);
584  else if (tm->tm_year == yy%100) {
585  if (tm->tm_mon > mo)
586  return (1);
587  } else if (tm->tm_mon == mo) {
588  if (tm->tm_mday > day)
589  return (1);
590  } else if (tm->tm_mday == day) {
591  if (tm->tm_hour > hour)
592  return (1);
593  } else if (tm->tm_hour == hour) {
594  if (tm->tm_min > min)
595  return (1);
596  } else if (tm->tm_min == min) {
597  if (tm->tm_sec > sec)
598  return (1);
599  }
600  } else {
601  printf("%s\n", reply_string);
602  (void) fflush(stdout);
603  verbose = overbose;
604  return (0);
605  }
606  }
607  }
608  }
609 
610  recvrequest("RETR", argv[2], argv[1], mode,
611  argv[1] != oldargv1 || argv[2] != oldargv2);
612  restart_point = 0;
613  return (0);
614 }
static int argc
Definition: ServiceArgs.c:15
int tm_min
Definition: time.h:78
int ntflag
Definition: main.c:73
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
off_t restart_point
Definition: ftp.c:77
void recvrequest(const char *cmd, const char *local, const char *remote, const char *mode, int printnames)
Definition: ftp.c:713
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
static DOUBLE day(DOUBLE time)
Definition: date.c:102
int tm_mday
Definition: time.h:80
#define COMPLETE
Definition: main.h:128
int tm_year
Definition: time.h:82
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
#define verbose
Definition: rosglue.h:36
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
const char * dotrans(const char *name)
Definition: cmds.c:1838
const char * domap(const char *name)
Definition: cmds.c:1914
Definition: parser.c:48
int mcase
Definition: main.c:72
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
int tm_mon
Definition: time.h:81
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2584
void makeargv(void)
Definition: main.c:384
#define isupper(c)
Definition: acclib.h:71
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
int ret
int globulize(const char **cpp)
Definition: cmds.c:1663
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
Definition: stat.h:55
#define MAXPATHLEN
Definition: ftp_var.h:35
Definition: time.h:76
#define islower(c)
Definition: acclib.h:72
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
Definition: stat.h:345
char reply_string[]
Definition: ftp.c:305
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define min(a, b)
Definition: monoChain.cc:55
int mapflag
Definition: main.c:74
int tm_sec
Definition: time.h:77
int command(const char *fmt,...)
Definition: ftp.c:262
int tm_hour
Definition: time.h:79
#define debug(msg)
Definition: key_call.c:71
_CRTIMP struct tm *__cdecl gmtime(const time_t *_Time)
Definition: time.h:425
#define printf
Definition: config.h:203
int globulize ( const char **  cpp)

Definition at line 1663 of file cmds.c.

Referenced by getit(), lcd(), ls(), mls(), and put().

1664 {
1665  char **globbed;
1666 
1667  if (!doglob)
1668  return (1);
1669  globbed = glob(*cpp);
1670  if (globerr != NULL) {
1671  printf("%s: %s\n", *cpp, globerr);
1672  (void) fflush(stdout);
1673  if (globbed) {
1674  blkfree(globbed);
1675  free((char *)globbed);
1676  }
1677  return (0);
1678  }
1679  if (globbed) {
1680  *cpp = *globbed++;
1681  /* don't waste too much memory */
1682  if (*globbed) {
1683  blkfree(globbed);
1684  free((char *)globbed);
1685  }
1686  }
1687  return (1);
1688 }
int doglob
Definition: main.c:66
#define free
Definition: debug_ros.c:5
void blkfree(char **av0)
Definition: fake.c:28
char * globerr
Definition: main.c:48
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:557
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
char ** glob(const char *v)
Definition: fake.c:36
#define printf
Definition: config.h:203
void idle ( int  argc,
const char argv[] 
)

Definition at line 1581 of file cmds.c.

1582 {
1583  int oldverbose = verbose;
1584 
1585  verbose = 1;
1586  (void) command(argc == 1 ? "SITE IDLE" : "SITE IDLE %s", argv[1]);
1587  verbose = oldverbose;
1588 }
static int argc
Definition: ServiceArgs.c:15
static char ** argv
Definition: ServiceArgs.c:14
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int command(const char *fmt,...)
Definition: ftp.c:262
void lcd ( int  argc,
const char argv[] 
)

Definition at line 996 of file cmds.c.

997 {
998  char buf[MAXPATHLEN];
999 
1000  if (argc < 2)
1001  argc++, argv[1] = home;
1002  if (argc != 2) {
1003  printf("usage:%s local-directory\n", argv[0]);
1004  (void) fflush(stdout);
1005  code = -1;
1006  return;
1007  }
1008  if (!globulize(&argv[1])) {
1009  code = -1;
1010  return;
1011  }
1012  if (chdir(argv[1]) < 0) {
1013  perror(argv[1]);
1014  code = -1;
1015  return;
1016  }
1017  printf("Local directory now %s\n", getcwd(buf,sizeof(buf)));
1018  (void) fflush(stdout);
1019  code = 0;
1020 }
static int argc
Definition: ServiceArgs.c:15
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
#define chdir
Definition: syshdrs.h:69
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
char home[]
Definition: main.c:47
int globulize(const char **cpp)
Definition: cmds.c:1663
#define MAXPATHLEN
Definition: ftp_var.h:35
_Check_return_ _Ret_opt_z_ _CRTIMP char *__cdecl getcwd(_Out_writes_opt_(_SizeInBytes) char *_DstBuf, _In_ int _SizeInBytes)
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define printf
Definition: config.h:203
void ls ( int  argc,
const char argv[] 
)

Definition at line 1136 of file cmds.c.

Referenced by create_file_with_version(), GSUB_apply_LigatureSubst(), init_test(), ME_GetParaLineSpace(), and msi_compare_file_versions().

1137 {
1138  const char *cmd;
1139 
1140  if (argc < 2)
1141  argc++, argv[1] = NULL;
1142  if (argc < 3)
1143  argc++, argv[2] = "-";
1144  if (argc > 3) {
1145  printf("usage: %s remote-directory local-file\n", argv[0]);
1146  (void) fflush(stdout);
1147  code = -1;
1148  return;
1149  }
1150  cmd = argv[0][0] == 'n' ? "NLST" : "LIST";
1151 // cmd = argv[0][0] == 'n' ? "NLST -CF" : "NLST -CF";
1152  if (strcmp(argv[2], "-") && !globulize(&argv[2])) {
1153  code = -1;
1154  return;
1155  }
1156  if (strcmp(argv[2], "-") && *argv[2] != '|')
1157  if (!globulize(&argv[2]) || !confirm("output to local-file:", argv[2])) {
1158  code = -1;
1159  return;
1160  }
1161  recvrequest(cmd, argv[2], argv[1], "w", 0);
1162 }
static int argc
Definition: ServiceArgs.c:15
void recvrequest(const char *cmd, const char *local, const char *remote, const char *mode, int printnames)
Definition: ftp.c:713
Definition: ftp_var.h:139
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:557
int globulize(const char **cpp)
Definition: cmds.c:1663
int confirm(const char *cmd, const char *file)
Definition: cmds.c:1636
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define printf
Definition: config.h:203
void macdef ( int  argc,
const char argv[] 
)

Definition at line 2133 of file cmds.c.

2134 {
2135  char *tmp;
2136  int c;
2137 
2138  if (macnum == 16) {
2139  printf("Limit of 16 macros have already been defined\n");
2140  (void) fflush(stdout);
2141  code = -1;
2142  return;
2143  }
2144  if (argc < 2) {
2145  (void) strcat(line, " ");
2146  printf("(macro name) ");
2147  (void) fflush(stdout);
2148  (void) gets(&line[strlen(line)]);
2149  makeargv();
2150  argc = margc;
2151  argv = margv;
2152  }
2153  if (argc != 2) {
2154  printf("Usage: %s macro_name\n",argv[0]);
2155  (void) fflush(stdout);
2156  code = -1;
2157  return;
2158  }
2159  if (interactive) {
2160  printf("Enter macro line by line, terminating it with a null line\n");
2161  (void) fflush(stdout);
2162  }
2163  (void) strncpy(macros[macnum].mac_name, argv[1], 8);
2164  if (macnum == 0) {
2165  macros[macnum].mac_start = macbuf;
2166  }
2167  else {
2168  macros[macnum].mac_start = macros[macnum - 1].mac_end + 1;
2169  }
2170  tmp = macros[macnum].mac_start;
2171  while (tmp != macbuf+4096) {
2172  if ((c = getchar()) == EOF) {
2173  printf("macdef:end of file encountered\n");
2174  (void) fflush(stdout);
2175  code = -1;
2176  return;
2177  }
2178  if ((*tmp = c) == '\n') {
2179  if (tmp == macros[macnum].mac_start) {
2180  macros[macnum++].mac_end = tmp;
2181  code = 0;
2182  return;
2183  }
2184  if (*(tmp-1) == '\0') {
2185  macros[macnum++].mac_end = tmp - 1;
2186  code = 0;
2187  return;
2188  }
2189  *tmp = '\0';
2190  }
2191  tmp++;
2192  }
2193  while (1) {
2194  while ((c = getchar()) != '\n' && c != EOF)
2195  /* LOOP */;
2196  if (c == EOF || getchar() == '\n') {
2197  printf("Macro not defined - 4k buffer exceeded\n");
2198  (void) fflush(stdout);
2199  code = -1;
2200  return;
2201  }
2202  }
2203 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
#define interactive
Definition: rosglue.h:34
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
_Check_return_ _CRTIMP int __cdecl getchar(void)
Definition: file.c:3543
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
struct macel macros[16]
Definition: main.c:109
#define EOF
Definition: stdio.h:24
int macnum
Definition: main.c:108
#define c
Definition: ke_i.h:80
char macbuf[4096]
Definition: main.c:110
#define printf
Definition: config.h:203
void makedir ( int  argc,
const char argv[] 
)

Definition at line 1420 of file cmds.c.

1421 {
1422 
1423  if (argc < 2) {
1424  (void) strcat(line, " ");
1425  printf("(directory-name) ");
1426  (void) fflush(stdout);
1427  (void) gets(&line[strlen(line)]);
1428  makeargv();
1429  argc = margc;
1430  argv = margv;
1431  }
1432  if (argc < 2) {
1433  printf("usage: %s directory-name\n", argv[0]);
1434  (void) fflush(stdout);
1435  code = -1;
1436  return;
1437  }
1438  if (command("MKD %s", argv[1]) == ERROR && code == 500) {
1439  if (verbose) {
1440  printf("MKD command not recognized, trying XMKD\n");
1441  (void) fflush(stdout);
1442  }
1443  (void) command("XMKD %s", argv[1]);
1444  }
1445 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
#define ERROR(err)
Definition: vbo_exec_api.c:413
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203
void mdelete ( int  argc,
const char argv[] 
)

Definition at line 1049 of file cmds.c.

1050 {
1051  const char *cp;
1052  int ointer;
1053  extern jmp_buf jabort;
1054 
1055  if (argc < 2) {
1056  (void) strcat(line, " ");
1057  printf("(remote-files) ");
1058  (void) fflush(stdout);
1059  (void) gets(&line[strlen(line)]);
1060  makeargv();
1061  argc = margc;
1062  argv = margv;
1063  }
1064  if (argc < 2) {
1065  printf("usage:%s remote-files\n", argv[0]);
1066  (void) fflush(stdout);
1067  code = -1;
1068  return;
1069  }
1070  mname = argv[0];
1071  mflag = 1;
1072 // oldintr = signal(SIGINT, mabort);
1073  (void) setjmp(jabort);
1074  while ((cp = remglob(argv,0)) != NULL) {
1075  if (*cp == '\0') {
1076  mflag = 0;
1077  continue;
1078  }
1079  if (mflag && confirm(argv[0], cp)) {
1080  (void) command("DELE %s", cp);
1081  if (!mflag && fromatty) {
1082  ointer = interactive;
1083  interactive = 1;
1084  if (confirm("Continue with", "mdelete")) {
1085  mflag++;
1086  }
1087  interactive = ointer;
1088  }
1089  }
1090  }
1091 // (void) signal(SIGINT, oldintr);
1092  mflag = 0;
1093 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
#define interactive
Definition: rosglue.h:34
int mflag
Definition: finger.c:66
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
const char * mname
Definition: cmds.c:37
int fromatty
Definition: main.c:62
static const char * remglob(const char *argv[], int doswitch)
Definition: cmds.c:715
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:557
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
jmp_buf jabort
Definition: cmds.c:38
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
int confirm(const char *cmd, const char *file)
Definition: cmds.c:1636
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define setjmp
Definition: setjmp.h:183
int command(const char *fmt,...)
Definition: ftp.c:262
POINT cp
Definition: magnifier.c:58
long jmp_buf[100]
Definition: of.h:11
#define printf
Definition: config.h:203
void mget ( int  argc,
const char argv[] 
)

Definition at line 642 of file cmds.c.

643 {
644  const char *cp, *tp;
645  char *tp2, tmpbuf[MAXPATHLEN];
646  int ointer;
647  extern jmp_buf jabort;
648 
649  if (argc < 2) {
650  (void) strcat(line, " ");
651  printf("(remote-files) ");
652  (void) fflush(stdout);
653  (void) gets(&line[strlen(line)]);
654  makeargv();
655  argc = margc;
656  argv = margv;
657  }
658  if (argc < 2) {
659  printf("usage:%s remote-files\n", argv[0]);
660  (void) fflush(stdout);
661  code = -1;
662  return;
663  }
664  mname = argv[0];
665  mflag = 1;
666 // oldintr = signal(SIGINT,mabort);
667  (void) setjmp(jabort);
668  while ((cp = remglob(argv,proxy)) != NULL) {
669  if (*cp == '\0') {
670  mflag = 0;
671  continue;
672  }
673  if (mflag && confirm(argv[0], cp)) {
674  tp = cp;
675  if (mcase) {
676  while (*tp && !islower(*tp)) {
677  tp++;
678  }
679  if (!*tp) {
680  tp = cp;
681  tp2 = tmpbuf;
682  while ((*tp2 = *tp)) {
683  if (isupper(*tp2)) {
684  *tp2 = 'a' + *tp2 - 'A';
685  }
686  tp++;
687  tp2++;
688  }
689  }
690  tp = tmpbuf;
691  }
692  if (ntflag) {
693  tp = dotrans(tp);
694  }
695  if (mapflag) {
696  tp = domap(tp);
697  }
698  recvrequest("RETR", tp, cp, "w",
699  tp != cp || !interactive);
700  if (!mflag && fromatty) {
701  ointer = interactive;
702  interactive = 1;
703  if (confirm("Continue with","mget")) {
704  mflag++;
705  }
706  interactive = ointer;
707  }
708  }
709  }
710 // (void) signal(SIGINT,oldintr);
711  mflag = 0;
712 }
static int argc
Definition: ServiceArgs.c:15
int proxy
Definition: main.c:67
int ntflag
Definition: main.c:73
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
void recvrequest(const char *cmd, const char *local, const char *remote, const char *mode, int printnames)
Definition: ftp.c:713
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
#define interactive
Definition: rosglue.h:34
int mflag
Definition: finger.c:66
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
const char * mname
Definition: cmds.c:37
int fromatty
Definition: main.c:62
static const char * remglob(const char *argv[], int doswitch)
Definition: cmds.c:715
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
const char * dotrans(const char *name)
Definition: cmds.c:1838
smooth NULL
Definition: ftsmooth.c:557
const char * domap(const char *name)
Definition: cmds.c:1914
Definition: parser.c:48
int mcase
Definition: main.c:72
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2584
void makeargv(void)
Definition: main.c:384
jmp_buf jabort
Definition: cmds.c:38
#define isupper(c)
Definition: acclib.h:71
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
#define MAXPATHLEN
Definition: ftp_var.h:35
#define islower(c)
Definition: acclib.h:72
int confirm(const char *cmd, const char *file)
Definition: cmds.c:1636
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define setjmp
Definition: setjmp.h:183
int mapflag
Definition: main.c:74
POINT cp
Definition: magnifier.c:58
long jmp_buf[100]
Definition: of.h:11
#define printf
Definition: config.h:203
void mls ( int  argc,
const char argv[] 
)

Definition at line 1168 of file cmds.c.

1169 {
1170  const char *cmd, *dest;
1171  char mode[1];
1172  int ointer, i;
1173  extern jmp_buf jabort;
1174 
1175  if (argc < 2) {
1176  (void) strcat(line, " ");
1177  printf("(remote-files) ");
1178  (void) fflush(stdout);
1179  (void) gets(&line[strlen(line)]);
1180  makeargv();
1181  argc = margc;
1182  argv = margv;
1183  }
1184  if (argc < 3) {
1185  (void) strcat(line, " ");
1186  printf("(local-file) ");
1187  (void) fflush(stdout);
1188  (void) gets(&line[strlen(line)]);
1189  makeargv();
1190  argc = margc;
1191  argv = margv;
1192  }
1193  if (argc < 3) {
1194  printf("usage:%s remote-files local-file\n", argv[0]);
1195  (void) fflush(stdout);
1196  code = -1;
1197  return;
1198  }
1199  dest = argv[argc - 1];
1200  argv[argc - 1] = NULL;
1201  if (strcmp(dest, "-") && *dest != '|')
1202  if (!globulize(&dest) || !confirm("output to local-file:", dest)) {
1203  code = -1;
1204  return;
1205  }
1206  cmd = argv[0][1] == 'l' ? "NLST" : "LIST";
1207  mname = argv[0];
1208  mflag = 1;
1209 // oldintr = signal(SIGINT, mabort);
1210  (void) setjmp(jabort);
1211  for (i = 1; mflag && i < argc-1; ++i) {
1212  *mode = (i == 1) ? 'w' : 'a';
1213  recvrequest(cmd, dest, argv[i], mode, 0);
1214  if (!mflag && fromatty) {
1215  ointer = interactive;
1216  interactive = 1;
1217  if (confirm("Continue with", argv[0])) {
1218  mflag ++;
1219  }
1220  interactive = ointer;
1221  }
1222  }
1223 // (void) signal(SIGINT, oldintr);
1224  mflag = 0;
1225 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
void recvrequest(const char *cmd, const char *local, const char *remote, const char *mode, int printnames)
Definition: ftp.c:713
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
Definition: ftp_var.h:139
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
#define interactive
Definition: rosglue.h:34
int mflag
Definition: finger.c:66
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
const char * mname
Definition: cmds.c:37
GLenum GLclampf GLint i
Definition: glfuncs.h:14
int fromatty
Definition: main.c:62
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:557
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
jmp_buf jabort
Definition: cmds.c:38
GLfloat CONST GLvector4f CONST GLfloat GLvector4f * dest
Definition: m_xform.h:122
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
int globulize(const char **cpp)
Definition: cmds.c:1663
int confirm(const char *cmd, const char *file)
Definition: cmds.c:1636
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define setjmp
Definition: setjmp.h:183
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
long jmp_buf[100]
Definition: of.h:11
#define printf
Definition: config.h:203
void modtime ( int  argc,
const char argv[] 
)

Definition at line 2232 of file cmds.c.

Referenced by FTPUtime().

2233 {
2234  int overbose;
2235 
2236  if (argc < 2) {
2237  (void) strcat(line, " ");
2238  printf("(filename) ");
2239  (void) fflush(stdout);
2240  (void) gets(&line[strlen(line)]);
2241  makeargv();
2242  argc = margc;
2243  argv = margv;
2244  }
2245  if (argc < 2) {
2246  printf("usage:%s filename\n", argv[0]);
2247  (void) fflush(stdout);
2248  code = -1;
2249  return;
2250  }
2251  overbose = verbose;
2252  if (debug == 0)
2253  verbose = -1;
2254  if (command("MDTM %s", argv[1]) == COMPLETE) {
2255  int yy, mo, day, hour, min, sec;
2256  sscanf(reply_string, "%*s %04d%02d%02d%02d%02d%02d", &yy, &mo,
2257  &day, &hour, &min, &sec);
2258  /* might want to print this in local time */
2259  printf("%s\t%02d/%02d/%04d %02d:%02d:%02d GMT\n", argv[1],
2260  mo, day, yy, hour, min, sec);
2261  } else
2262  printf("%s\n", reply_string);
2263  verbose = overbose;
2264  (void) fflush(stdout);
2265 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
static DOUBLE day(DOUBLE time)
Definition: date.c:102
#define COMPLETE
Definition: main.h:128
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
char reply_string[]
Definition: ftp.c:305
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define min(a, b)
Definition: monoChain.cc:55
int command(const char *fmt,...)
Definition: ftp.c:262
#define debug(msg)
Definition: key_call.c:71
#define printf
Definition: config.h:203
void mput ( int  argc,
const char argv[] 
)

Definition at line 344 of file cmds.c.

345 {
346  register int i;
347  int ointer;
348  extern jmp_buf jabort;
349  const char *tp;
350 
351  if (argc < 2) {
352  (void) strcat(line, " ");
353  printf("(local-files) ");
354  (void) fflush(stdout);
355  (void) gets(&line[strlen(line)]);
356  makeargv();
357  argc = margc;
358  argv = margv;
359  }
360  if (argc < 2) {
361  printf("usage:%s local-files\n", argv[0]);
362  (void) fflush(stdout);
363  code = -1;
364  return;
365  }
366  mname = argv[0];
367  mflag = 1;
368 // oldintr = signal(SIGINT, mabort);
369  (void) setjmp(jabort);
370  if (proxy) {
371  const char *cp;
372  char *tp2, tmpbuf[MAXPATHLEN];
373 
374  while ((cp = remglob(argv,0)) != NULL) {
375  if (*cp == 0) {
376  mflag = 0;
377  continue;
378  }
379  if (mflag && confirm(argv[0], cp)) {
380  tp = cp;
381  if (mcase) {
382  while (*tp && !islower(*tp)) {
383  tp++;
384  }
385  if (!*tp) {
386  tp = cp;
387  tp2 = tmpbuf;
388  while ((*tp2 = *tp)) {
389  if (isupper(*tp2)) {
390  *tp2 = 'a' + *tp2 - 'A';
391  }
392  tp++;
393  tp2++;
394  }
395  }
396  tp = tmpbuf;
397  }
398  if (ntflag) {
399  tp = dotrans(tp);
400  }
401  if (mapflag) {
402  tp = domap(tp);
403  }
404  sendrequest((sunique) ? "STOU" : "STOR",
405  cp, tp, cp != tp || !interactive);
406  if (!mflag && fromatty) {
407  ointer = interactive;
408  interactive = 1;
409  if (confirm("Continue with","mput")) {
410  mflag++;
411  }
412  interactive = ointer;
413  }
414  }
415  }
416 // (void) signal(SIGINT, oldintr);
417  mflag = 0;
418  return;
419  }
420  for (i = 1; i < argc; i++) {
421  register char **cpp, **gargs;
422 
423  if (!doglob) {
424  if (mflag && confirm(argv[0], argv[i])) {
425  tp = (ntflag) ? dotrans(argv[i]) : argv[i];
426  tp = (mapflag) ? domap(tp) : tp;
427  sendrequest((sunique) ? "STOU" : "STOR",
428  argv[i], tp, tp != argv[i] || !interactive);
429  if (!mflag && fromatty) {
430  ointer = interactive;
431  interactive = 1;
432  if (confirm("Continue with","mput")) {
433  mflag++;
434  }
435  interactive = ointer;
436  }
437  }
438  continue;
439  }
440  gargs = glob(argv[i]);
441  if (globerr != NULL) {
442  printf("%s\n", globerr);
443  (void) fflush(stdout);
444  if (gargs) {
445  blkfree(gargs);
446  free((char *)gargs);
447  }
448  continue;
449  }
450  for (cpp = gargs; cpp && *cpp != NULL; cpp++) {
451  if (mflag && confirm(argv[0], *cpp)) {
452  tp = (ntflag) ? dotrans(*cpp) : *cpp;
453  tp = (mapflag) ? domap(tp) : tp;
454  sendrequest((sunique) ? "STOU" : "STOR",
455  *cpp, tp, *cpp != tp || !interactive);
456  if (!mflag && fromatty) {
457  ointer = interactive;
458  interactive = 1;
459  if (confirm("Continue with","mput")) {
460  mflag++;
461  }
462  interactive = ointer;
463  }
464  }
465  }
466  if (gargs != NULL) {
467  blkfree(gargs);
468  free((char *)gargs);
469  }
470  }
471 // (void) signal(SIGINT, oldintr);
472  mflag = 0;
473 }
static int argc
Definition: ServiceArgs.c:15
int sunique
Definition: main.c:70
int proxy
Definition: main.c:67
int ntflag
Definition: main.c:73
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
int doglob
Definition: main.c:66
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
#define free
Definition: debug_ros.c:5
void blkfree(char **av0)
Definition: fake.c:28
char * globerr
Definition: main.c:48
#define interactive
Definition: rosglue.h:34
int mflag
Definition: finger.c:66
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
const char * mname
Definition: cmds.c:37
GLenum GLclampf GLint i
Definition: glfuncs.h:14
int fromatty
Definition: main.c:62
static const char * remglob(const char *argv[], int doswitch)
Definition: cmds.c:715
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
const char * dotrans(const char *name)
Definition: cmds.c:1838
smooth NULL
Definition: ftsmooth.c:557
const char * domap(const char *name)
Definition: cmds.c:1914
Definition: parser.c:48
int mcase
Definition: main.c:72
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2584
void makeargv(void)
Definition: main.c:384
jmp_buf jabort
Definition: cmds.c:38
#define isupper(c)
Definition: acclib.h:71
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
#define MAXPATHLEN
Definition: ftp_var.h:35
#define islower(c)
Definition: acclib.h:72
int confirm(const char *cmd, const char *file)
Definition: cmds.c:1636
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
char ** glob(const char *v)
Definition: fake.c:36
#define setjmp
Definition: setjmp.h:183
int mapflag
Definition: main.c:74
void sendrequest(const char *cmd, const char *local, const char *remote, int printnames)
Definition: ftp.c:439
POINT cp
Definition: magnifier.c:58
long jmp_buf[100]
Definition: of.h:11
#define printf
Definition: config.h:203
void newer ( int  argc,
const char argv[] 
)

Definition at line 2278 of file cmds.c.

Referenced by CertAddCRLContextToStore(), and CertAddCTLContextToStore().

2279 {
2280  if (getit(argc, argv, -1, "w")) {
2281  printf("Local file \"%s\" is newer than remote file \"%s\"\n",
2282  argv[1], argv[2]);
2283  (void) fflush(stdout);
2284  }
2285 }
static int argc
Definition: ServiceArgs.c:15
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int getit(int argc, const char *argv[], int restartit, const char *mode)
Definition: cmds.c:488
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define printf
Definition: config.h:203
static const char* onoff ( int  bool)
static

Definition at line 777 of file cmds.c.

Referenced by setbell(), setcase(), setcr(), setdebug(), setglob(), sethash(), setpassive(), setport(), setprompt(), setrunique(), SetSocketNagleAlgorithm(), setsunique(), settrace(), setverbose(), and status().

778 {
779  return (bool ? "on" : "off");
780 }
void put ( int  argc,
const char argv[] 
)

Definition at line 279 of file cmds.c.

280 {
281  const char *cmd;
282  int loc = 0;
283  const char *oldargv1, *oldargv2;
284 
285  if (argc == 2) {
286  argc++;
287  argv[2] = argv[1];
288  loc++;
289  }
290  if (argc < 2) {
291  (void) strcat(line, " ");
292  printf("(local-file) ");
293  (void) fflush(stdout);
294  (void) gets(&line[strlen(line)]);
295  makeargv();
296  argc = margc;
297  argv = margv;
298  }
299  if (argc < 2) {
300 usage:
301  printf("usage:%s local-file remote-file\n", argv[0]);
302  (void) fflush(stdout);
303  code = -1;
304  return;
305  }
306  if (argc < 3) {
307  (void) strcat(line, " ");
308  printf("(remote-file) ");
309  (void) fflush(stdout);
310  (void) gets(&line[strlen(line)]);
311  makeargv();
312  argc = margc;
313  argv = margv;
314  }
315  if (argc < 3)
316  goto usage;
317  oldargv1 = argv[1];
318  oldargv2 = argv[2];
319  if (!globulize(&argv[1])) {
320  code = -1;
321  return;
322  }
323  /*
324  * If "globulize" modifies argv[1], and argv[2] is a copy of
325  * the old argv[1], make it a copy of the new argv[1].
326  */
327  if (argv[1] != oldargv1 && argv[2] == oldargv1) {
328  argv[2] = argv[1];
329  }
330  cmd = (argv[0][0] == 'a') ? "APPE" : ((sunique) ? "STOU" : "STOR");
331  if (loc && ntflag) {
332  argv[2] = dotrans(argv[2]);
333  }
334  if (loc && mapflag) {
335  argv[2] = domap(argv[2]);
336  }
337  sendrequest(cmd, argv[1], argv[2],
338  argv[1] != oldargv1 || argv[2] != oldargv2);
339 }
static int argc
Definition: ServiceArgs.c:15
int sunique
Definition: main.c:70
int ntflag
Definition: main.c:73
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
Definition: ftp_var.h:139
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
const char * dotrans(const char *name)
Definition: cmds.c:1838
const char * domap(const char *name)
Definition: cmds.c:1914
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
int globulize(const char **cpp)
Definition: cmds.c:1663
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int mapflag
Definition: main.c:74
void sendrequest(const char *cmd, const char *local, const char *remote, int printnames)
Definition: ftp.c:439
#define printf
Definition: config.h:203
void pwd ( int  argc,
const char argv[] 
)

Definition at line 1401 of file cmds.c.

Referenced by FTPChdir3(), GetContentsOfDialog(), GetContentsOfMenu(), InternetCrackUrlW_test(), MenuFill(), MenuScan(), netname2user(), and StrangeMenuFill().

1402 {
1403  int oldverbose = verbose;
1404 
1405  /*
1406  * If we aren't verbose, this doesn't do anything!
1407  */
1408  verbose = 1;
1409  if (command("PWD") == ERROR && code == 500) {
1410  printf("PWD command not recognized, trying XPWD\n");
1411  (void) fflush(stdout);
1412  (void) command("XPWD");
1413  }
1414  verbose = oldverbose;
1415 }
#define ERROR(err)
Definition: vbo_exec_api.c:413
FILE * stdout
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203
void quit ( int  argc,
const char argv[] 
)

Definition at line 1606 of file cmds.c.

Referenced by cmdscanner(), FsRtlAddBaseMcbEntry(), FsRtlGetNextBaseMcbEntry(), FsRtlLookupBaseMcbEntry(), FsRtlRemoveBaseMcbEntry(), get_subtests(), and main().

1607 {
1608  if (connected)
1609  disconnect(0, NULL);
1610  pswitch(1);
1611  if (connected) {
1612  disconnect(0, NULL);
1613  }
1614  exit(0);
1615 }
smooth NULL
Definition: ftsmooth.c:557
#define exit(n)
Definition: config.h:202
int connected
Definition: main.c:61
void disconnect(int argc, const char *argv[])
Definition: cmds.c:1620
void pswitch(int flag)
Definition: ftp.c:1306
void quote ( int  argc,
const char argv[] 
)

Definition at line 1480 of file cmds.c.

1481 {
1482  int i;
1483  char buf[BUFSIZ];
1484 
1485  if (argc < 2) {
1486  (void) strcat(line, " ");
1487  printf("(command line to send) ");
1488  (void) fflush(stdout);
1489  (void) gets(&line[strlen(line)]);
1490  makeargv();
1491  argc = margc;
1492  argv = margv;
1493  }
1494  if (argc < 2) {
1495  printf("usage: %s line-to-send\n", argv[0]);
1496  (void) fflush(stdout);
1497  code = -1;
1498  return;
1499  }
1500  (void) strcpy(buf, argv[1]);
1501  for (i = 2; i < argc; i++) {
1502  (void) strcat(buf, " ");
1503  (void) strcat(buf, argv[i]);
1504  }
1505  if (command(buf) == PRELIM) {
1506  while (getreply(0) == PRELIM);
1507  }
1508 }
static int argc
Definition: ServiceArgs.c:15
int getreply(int expecteof)
Definition: ftp.c:310
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define BUFSIZ
Definition: nsplookup.c:26
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define PRELIM
Definition: ftp_var.h:41
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define printf
Definition: config.h:203
void reget ( int  argc,
const char argv[] 
)

Definition at line 475 of file cmds.c.

476 {
477  (void) getit(argc, argv, 1, "r+w");
478 }
static int argc
Definition: ServiceArgs.c:15
static char ** argv
Definition: ServiceArgs.c:14
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int getit(int argc, const char *argv[], int restartit, const char *mode)
Definition: cmds.c:488
const char * remglob ( const char argv[],
int  doswitch 
)
static

Definition at line 715 of file cmds.c.

Referenced by mdelete(), mget(), and mput().

716 {
717  char temp[16];
718  static char buf[MAXPATHLEN];
719  static FILE *ftemp = NULL;
720  static const char **args;
721  int oldverbose, oldhash;
722  const char *cp;
723  const char *mode;
724  char *terminator;
725 
726  if (!mflag) {
727  if (!doglob) {
728  args = NULL;
729  }
730  else {
731  if (ftemp) {
732  (void) fclose(ftemp);
733  ftemp = NULL;
734  }
735  }
736  return(NULL);
737  }
738  if (!doglob) {
739  if (args == NULL)
740  args = argv;
741  if ((cp = *++args) == NULL)
742  args = NULL;
743  return (cp);
744  }
745  if (ftemp == NULL) {
746  (void) strcpy(temp, _PATH_TMP);
747  (void) mktemp(temp);
748  oldverbose = verbose, verbose = 0;
749  oldhash = hash, hash = 0;
750  if (doswitch) {
751  pswitch(!proxy);
752  }
753  for (mode = "w"; *++argv != NULL; mode = "a")
754  recvrequest ("NLST", temp, *argv, mode, 0);
755  if (doswitch) {
756  pswitch(!proxy);
757  }
758  verbose = oldverbose; hash = oldhash;
759  ftemp = fopen(temp, "r");
760  (void) unlink(temp);
761  if (ftemp == NULL) {
762  printf("can't find list of remote files, oops\n");
763  (void) fflush(stdout);
764  return (NULL);
765  }
766  }
767  if (fgets(buf, sizeof (buf), ftemp) == NULL) {
768  (void) fclose(ftemp), ftemp = NULL;
769  return (NULL);
770  }
771  if ((terminator = index(buf, '\n')) != NULL)
772  *terminator = '\0';
773  return (buf);
774 }
int proxy
Definition: main.c:67
void recvrequest(const char *cmd, const char *local, const char *remote, const char *mode, int printnames)
Definition: ftp.c:713
int doglob
Definition: main.c:66
#define _PATH_TMP
Definition: pathnames.h:20
#define unlink
Definition: syshdrs.h:54
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
int mflag
Definition: finger.c:66
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
#define verbose
Definition: rosglue.h:36
int hash
Definition: main.c:58
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:557
_CRTIMP char *__cdecl mktemp(_Inout_z_ char *_TemplateName)
#define index(s, c)
Definition: various.h:29
GLenum mode
Definition: glext.h:6217
#define MAXPATHLEN
Definition: ftp_var.h:35
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
static stack_node_t temp
Definition: rpn.c:18
_Check_return_opt_ _CRTIMP char *__cdecl fgets(_Out_writes_z_(_MaxCount) char *_Buf, _In_ int _MaxCount, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
void pswitch(int flag)
Definition: ftp.c:1306
POINT cp
Definition: magnifier.c:58
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
Definition: _hash_fun.h:40
#define args
Definition: format.c:66
#define printf
Definition: config.h:203
void removedir ( int  argc,
const char argv[] 
)

Definition at line 1450 of file cmds.c.

1451 {
1452 
1453  if (argc < 2) {
1454  (void) strcat(line, " ");
1455  printf("(directory-name) ");
1456  (void) fflush(stdout);
1457  (void) gets(&line[strlen(line)]);
1458  makeargv();
1459  argc = margc;
1460  argv = margv;
1461  }
1462  if (argc < 2) {
1463  printf("usage: %s directory-name\n", argv[0]);
1464  (void) fflush(stdout);
1465  code = -1;
1466  return;
1467  }
1468  if (command("RMD %s", argv[1]) == ERROR && code == 500) {
1469  if (verbose) {
1470  printf("RMD command not recognized, trying XRMD\n");
1471  (void) fflush(stdout);
1472  }
1473  (void) command("XRMD %s", argv[1]);
1474  }
1475 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
#define ERROR(err)
Definition: vbo_exec_api.c:413
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203
void renamefile ( int  argc,
const char argv[] 
)

Definition at line 1098 of file cmds.c.

1099 {
1100 
1101  if (argc < 2) {
1102  (void) strcat(line, " ");
1103  printf("(from-name) ");
1104  (void) fflush(stdout);
1105  (void) gets(&line[strlen(line)]);
1106  makeargv();
1107  argc = margc;
1108  argv = margv;
1109  }
1110  if (argc < 2) {
1111 usage:
1112  printf("%s from-name to-name\n", argv[0]);
1113  (void) fflush(stdout);
1114  code = -1;
1115  return;
1116  }
1117  if (argc < 3) {
1118  (void) strcat(line, " ");
1119  printf("(to-name) ");
1120  (void) fflush(stdout);
1121  (void) gets(&line[strlen(line)]);
1122  makeargv();
1123  argc = margc;
1124  argv = margv;
1125  }
1126  if (argc < 3)
1127  goto usage;
1128  if (command("RNFR %s", argv[1]) == CONTINUE)
1129  (void) command("RNTO %s", argv[2]);
1130 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
#define CONTINUE
Definition: ftp_var.h:43
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203
void restart ( int  argc,
const char argv[] 
)

Definition at line 2115 of file cmds.c.

Referenced by check_file(), DRIVER_UnloadAll(), ext3_find_entry(), open_file_test(), ParseChar(), RtlInterlockedPopEntrySList(), and xsltTestCompMatch().

2116 {
2117  if (argc != 2)
2118  printf("restart: offset not specified\n");
2119  else {
2120  restart_point = atol(argv[1]);
2121  printf("restarting at %ld. %s\n", restart_point,
2122  "execute get, put or append to initiate transfer");
2123  }
2124  (void) fflush(stdout);
2125 }
static int argc
Definition: ServiceArgs.c:15
off_t restart_point
Definition: ftp.c:77
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_ long __cdecl atol(_In_z_ const char *_Str)
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define printf
Definition: config.h:203
void rmthelp ( int  argc,
const char argv[] 
)

Definition at line 1593 of file cmds.c.

1594 {
1595  int oldverbose = verbose;
1596 
1597  verbose = 1;
1598  (void) command(argc == 1 ? "HELP" : "HELP %s", argv[1]);
1599  verbose = oldverbose;
1600 }
static int argc
Definition: ServiceArgs.c:15
static char ** argv
Definition: ServiceArgs.c:14
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int command(const char *fmt,...)
Definition: ftp.c:262
void rmtstatus ( int  argc,
const char argv[] 
)

Definition at line 2270 of file cmds.c.

2271 {
2272  (void) command(argc > 1 ? "STAT %s" : "STAT" , argv[1]);
2273 }
static int argc
Definition: ServiceArgs.c:15
static char ** argv
Definition: ServiceArgs.c:14
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int command(const char *fmt,...)
Definition: ftp.c:262
void setascii ( int  argc,
const char argv[] 
)

Definition at line 212 of file cmds.c.

Referenced by proxtrans(), and recvrequest().

213 {
214  stype[1] = "ascii";
215  settype(2, stype);
216 }
void settype(int argc, const char *argv[])
Definition: cmds.c:147
const char * stype[]
Definition: cmds.c:192
void setbell ( int  argc,
const char argv[] 
)

Definition at line 840 of file cmds.c.

841 {
842 
843  bell = !bell;
844  printf("Bell mode %s.\n", onoff(bell));
845  (void) fflush(stdout);
846  code = bell;
847 }
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int bell
Definition: main.c:65
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void setbinary ( int  argc,
const char argv[] 
)

Definition at line 202 of file cmds.c.

Referenced by proxtrans(), recvrequest(), and setpeer().

203 {
204  stype[1] = "binary";
205  settype(2, stype);
206 }
void settype(int argc, const char *argv[])
Definition: cmds.c:147
const char * stype[]
Definition: cmds.c:192
void setcase ( int  argc,
const char argv[] 
)

Definition at line 1800 of file cmds.c.

1801 {
1802  mcase = !mcase;
1803  printf("Case mapping %s.\n", onoff(mcase));
1804  (void) fflush(stdout);
1805  code = mcase;
1806 }
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int mcase
Definition: main.c:72
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void setcr ( int  argc,
const char argv[] 
)

Definition at line 1808 of file cmds.c.

1809 {
1810  crflag = !crflag;
1811  printf("Carriage Return stripping %s.\n", onoff(crflag));
1812  (void) fflush(stdout);
1813  code = crflag;
1814 }
int crflag
Definition: main.c:76
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void setdebug ( int  argc,
const char argv[] 
)

Definition at line 937 of file cmds.c.

938 {
939  int val;
940 
941  if (argc > 1) {
942  val = atoi(argv[1]);
943  if (val < 0) {
944  printf("%s: bad debugging value.\n", argv[1]);
945  (void) fflush(stdout);
946  code = -1;
947  return;
948  }
949  } else
950  val = !debug;
951  debug = val;
952  if (debug)
953  options |= SO_DEBUG;
954  else
955  options &= ~SO_DEBUG;
956  printf("Debugging %s (debug=%d).\n", onoff(debug), debug);
957  (void) fflush(stdout);
958  code = debug > 0;
959 }
static int argc
Definition: ServiceArgs.c:15
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
GLuint GLfloat * val
Definition: glext.h:7180
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define debug(msg)
Definition: key_call.c:71
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
#define SO_DEBUG
Definition: winsock.h:178
void setebcdic ( void  )

Definition at line 232 of file cmds.c.

Referenced by proxtrans(), and recvrequest().

233 {
234  stype[1] = "ebcdic";
235  settype(2, stype);
236 }
void settype(int argc, const char *argv[])
Definition: cmds.c:147
const char * stype[]
Definition: cmds.c:192
void setform ( int  argc,
const char argv[] 
)

Definition at line 256 of file cmds.c.

257 {
258 
259  printf("We only support %s format, sorry.\n", formname);
260  (void) fflush(stdout);
261  code = -1;
262 }
char formname[32]
Definition: main.c:88
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define printf
Definition: config.h:203
void setglob ( int  argc,
const char argv[] 
)

Definition at line 923 of file cmds.c.

924 {
925 
926  doglob = !doglob;
927  printf("Globbing %s.\n", onoff(doglob));
928  (void) fflush(stdout);
929  code = doglob;
930 }
int doglob
Definition: main.c:66
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void sethash ( int  argc,
const char argv[] 
)

Definition at line 866 of file cmds.c.

867 {
868 
869  hash = !hash;
870  printf("Hash mark printing %s", onoff(hash));
871  code = hash;
872  if (hash)
873  printf(" (%d bytes/hash mark)", 1024);
874  printf(".\n");
875  (void) fflush(stdout);
876 }
FILE * stdout
int hash
Definition: main.c:58
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
Definition: _hash_fun.h:40
#define printf
Definition: config.h:203
void setnmap ( int  argc,
const char argv[] 
)

Definition at line 1873 of file cmds.c.

1874 {
1875  char *cp;
1876 
1877  if (argc == 1) {
1878  mapflag = 0;
1879  printf("Nmap off.\n");
1880  (void) fflush(stdout);
1881  code = mapflag;
1882  return;
1883  }
1884  if (argc < 3) {
1885  (void) strcat(line, " ");
1886  printf("(mapout) ");
1887  (void) fflush(stdout);
1888  (void) gets(&line[strlen(line)]);
1889  makeargv();
1890  argc = margc;
1891  argv = margv;
1892  }
1893  if (argc < 3) {
1894  printf("Usage: %s [mapin mapout]\n",argv[0]);
1895  (void) fflush(stdout);
1896  code = -1;
1897  return;
1898  }
1899  mapflag = 1;
1900  code = 1;
1901  cp = index(altarg, ' ');
1902  if (proxy) {
1903  while(*++cp == ' ');
1904  altarg = cp;
1905  cp = index(altarg, ' ');
1906  }
1907  *cp = '\0';
1908  (void) strncpy(mapin, altarg, MAXPATHLEN - 1);
1909  while (*++cp == ' ');
1910  (void) strncpy(mapout, cp, MAXPATHLEN - 1);
1911 }
static int argc
Definition: ServiceArgs.c:15
int proxy
Definition: main.c:67
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
#define index(s, c)
Definition: various.h:29
#define MAXPATHLEN
Definition: ftp_var.h:35
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int mapflag
Definition: main.c:74
POINT cp
Definition: magnifier.c:58
char mapin[MAXPATHLEN]
Definition: main.c:82
char * altarg
Definition: main.c:78
char mapout[MAXPATHLEN]
Definition: main.c:83
#define printf
Definition: config.h:203
void setntrans ( int  argc,
const char argv[] 
)

Definition at line 1816 of file cmds.c.

1817 {
1818  if (argc == 1) {
1819  ntflag = 0;
1820  printf("Ntrans off.\n");
1821  (void) fflush(stdout);
1822  code = ntflag;
1823  return;
1824  }
1825  ntflag++;
1826  code = ntflag;
1827  (void) strncpy(ntin, argv[1], 16);
1828  ntin[16] = '\0';
1829  if (argc == 2) {
1830  ntout[0] = '\0';
1831  return;
1832  }
1833  (void) strncpy(ntout, argv[2], 16);
1834  ntout[16] = '\0';
1835 }
static int argc
Definition: ServiceArgs.c:15
int ntflag
Definition: main.c:73
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
char ntin[17]
Definition: main.c:79
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define printf
Definition: config.h:203
char ntout[17]
Definition: main.c:80
void setpassive ( int  argc,
const char argv[] 
)

Definition at line 1865 of file cmds.c.

1866 {
1868  printf("Passive mode %s.\n", onoff(passivemode));
1869  (void) fflush(stdout);
1870  code = passivemode;
1871 }
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int passivemode
Definition: main.c:68
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void setpeer ( int  argc,
const char argv[] 
)

Definition at line 49 of file cmds.c.

Referenced by main().

50 {
51  char *host;
52 
53  if (connected) {
54  printf("Already connected to %s, use close first.\n",
55  hostname);
56  (void) fflush(stdout);
57  code = -1;
58  return;
59  }
60  if (argc < 2) {
61  (void) strcat(line, " ");
62  printf("(to) ");
63  (void) fflush(stdout);
64  (void) gets(&line[strlen(line)]);
65  makeargv();
66  argc = margc;
67  argv = margv;
68  }
69  if (argc > 3) {
70  printf("usage: %s host-name [port]\n", argv[0]);
71  (void) fflush(stdout);
72  code = -1;
73  return;
74  }
75  if (argc > 2) {
76  portnum = atoi(argv[2]);
77  if (portnum <= 0) {
78  printf("%s: bad port number-- %s\n", argv[1], argv[2]);
79  printf ("usage: %s host-name [port]\n", argv[0]);
80  (void) fflush(stdout);
81  code = -1;
82  return;
83  }
85  }
86  host = hookup(argv[1], portnum);
87  if (host) {
88  int overbose;
89  connected = 1;
90  if (autologin)
91  (void) login(argv[1]);
92 
93  overbose = verbose;
94  if (debug == 0)
95  verbose = -1;
96  allbinary = 0;
97  if (command("SYST") == COMPLETE && overbose) {
98  register char *cp, c;
99  cp = index(reply_string+4, ' ');
100  if (cp == NULL)
101  cp = index(reply_string+4, '\r');
102  if (cp) {
103  if (cp[-1] == '.')
104  cp--;
105  c = *cp;
106  *cp = '\0';
107  }
108 
109  printf("Remote system type is %s.\n",
110  reply_string+4);
111  if (cp)
112  *cp = c;
113  }
114  if (!strncmp(reply_string, "215 UNIX Type: L8", 17)) {
115  setbinary(0, NULL);
116  /* allbinary = 1; this violates the RFC */
117  if (overbose)
118  printf("Using %s mode to transfer files.\n",
119  typename);
120  } else if (overbose &&
121  !strncmp(reply_string, "215 TOPS20", 10)) {
122  printf(
123 "Remember to set tenex mode when transfering binary files from this machine.\n");
124  }
125  verbose = overbose;
126  }
127  (void) fflush(stdout);
128 }
static int argc
Definition: ServiceArgs.c:15
void setbinary(int argc, const char *argv[])
Definition: cmds.c:202
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
char * host
Definition: whois.c:55
#define COMPLETE
Definition: main.h:128
int login(const char *host)
Definition: ftp.c:185
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
char * hostname
Definition: ftp.c:84
int autologin
Definition: main.c:49
#define verbose
Definition: rosglue.h:36
int allbinary
Definition: ftp.c:73
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:557
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
short portnum
Definition: main.c:45
char * hookup(const char *host, int port)
Definition: ftp.c:92
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
#define index(s, c)
Definition: various.h:29
int connected
Definition: main.c:61
char reply_string[]
Definition: ftp.c:305
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
POINT cp
Definition: magnifier.c:58
#define c
Definition: ke_i.h:80
#define debug(msg)
Definition: key_call.c:71
#define htons(x)
Definition: module.h:213
#define printf
Definition: config.h:203
void setport ( int  argc,
const char argv[] 
)

Definition at line 895 of file cmds.c.

896 {
897 
898  sendport = !sendport;
899  printf("Use of PORT cmds %s.\n", onoff(sendport));
900  (void) fflush(stdout);
901  code = sendport;
902 }
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int sendport
Definition: main.c:117
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void setprompt ( int  argc,
const char argv[] 
)

Definition at line 909 of file cmds.c.

910 {
911 
913  printf("Interactive mode %s.\n", onoff(interactive));
914  (void) fflush(stdout);
915  code = interactive;
916 }
#define interactive
Definition: rosglue.h:34
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void setrunique ( int  argc,
const char argv[] 
)

Definition at line 2094 of file cmds.c.

2095 {
2096  runique = !runique;
2097  printf("Receive unique %s.\n", onoff(runique));
2098  (void) fflush(stdout);
2099  code = runique;
2100 }
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int runique
Definition: main.c:71
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void setstruct ( int  argc,
const char argv[] 
)

Definition at line 268 of file cmds.c.

269 {
270 
271  printf("We only support %s structure, sorry.\n", structname);
272  (void) fflush(stdout);
273  code = -1;
274 }
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
char structname[32]
Definition: main.c:86
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define printf
Definition: config.h:203
void setsunique ( int  argc,
const char argv[] 
)

Definition at line 2086 of file cmds.c.

2087 {
2088  sunique = !sunique;
2089  printf("Store unique %s.\n", onoff(sunique));
2090  (void) fflush(stdout);
2091  code = sunique;
2092 }
int sunique
Definition: main.c:70
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void settenex ( int  argc,
const char argv[] 
)

Definition at line 222 of file cmds.c.

Referenced by proxtrans(), and recvrequest().

223 {
224  stype[1] = "tenex";
225  settype(2, stype);
226 }
void settype(int argc, const char *argv[])
Definition: cmds.c:147
const char * stype[]
Definition: cmds.c:192
void settrace ( int  argc,
const char argv[] 
)

Definition at line 853 of file cmds.c.

854 {
855 
856  trace = !trace;
857  printf("Packet tracing %s.\n", onoff(trace));
858  (void) fflush(stdout);
859  code = trace;
860 }
#define trace(...)
Definition: kmt_test.h:172
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void settype ( int  argc,
const char argv[] 
)

Definition at line 147 of file cmds.c.

Referenced by setascii(), setbinary(), setebcdic(), and settenex().

148 {
149  register struct types *p;
150  int comret;
151 
152  if (argc > 2) {
153  const char *sep;
154 
155  printf("usage: %s [", argv[0]);
156  sep = " ";
157  for (p = types; p->t_name; p++) {
158  printf("%s%s", sep, p->t_name);
159  if (*sep == ' ')
160  sep = " | ";
161  }
162  printf(" ]\n");
163  (void) fflush(stdout);
164  code = -1;
165  return;
166  }
167  if (argc < 2) {
168  printf("Using %s mode to transfer files.\n", typename);
169  (void) fflush(stdout);
170  code = 0;
171  return;
172  }
173  for (p = types; p->t_name; p++)
174  if (strcmp(argv[1], p->t_name) == 0)
175  break;
176  if (p->t_name == 0) {
177  printf("%s: unknown mode\n", argv[1]);
178  (void) fflush(stdout);
179  code = -1;
180  return;
181  }
182  if ((p->t_arg != NULL) && (*(p->t_arg) != '\0'))
183  comret = command ("TYPE %s %s", p->t_mode, p->t_arg);
184  else
185  comret = command("TYPE %s", p->t_mode);
186  if (comret == COMPLETE) {
187  (void) strcpy(typename, p->t_name);
188  type = p->t_type;
189  }
190 }
static int argc
Definition: ServiceArgs.c:15
const char * t_name
Definition: cmds.c:131
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define COMPLETE
Definition: main.h:128
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:557
Definition: cmds.c:130
const char * t_mode
Definition: cmds.c:132
int t_type
Definition: cmds.c:133
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
char * t_arg
Definition: cmds.c:134
int command(const char *fmt,...)
Definition: ftp.c:262
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
GLfloat GLfloat p
Definition: glext.h:8902
#define printf
Definition: config.h:203
void setverbose ( int  argc,
const char argv[] 
)

Definition at line 882 of file cmds.c.

883 {
884 
885  verbose = !verbose;
886  printf("Verbose mode %s.\n", onoff(verbose));
887  (void) fflush(stdout);
888  code = verbose;
889 }
FILE * stdout
#define verbose
Definition: rosglue.h:36
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
static const char * onoff(int bool)
Definition: cmds.c:777
#define printf
Definition: config.h:203
void shell ( int  argc,
const char argv[] 
)

Definition at line 1231 of file cmds.c.

Referenced by create_test_verb_dde(), FindShellProxy(), ILCreateFromPathA(), ILCreateFromPathW(), ILFindChild(), ILGetDisplayName(), ILGetDisplayNameEx(), ILLoadFromStream(), ILRemoveLastID(), ILSaveToStream(), CShellLink::Load(), main(), parseAndPrintFile(), CShellLink::SetAdvertiseInfo(), SHBindToParent(), SHCloneSpecialIDList(), shell(), SHGetDataFromIDListA(), SHGetDataFromIDListW(), SHGetPathFromIDListW(), SHILCreateFromPathA(), SHILCreateFromPathW(), and test_wshshell().

1232 {
1233 #if 0
1234  int pid;
1235  sig_t (*old1)(), (*old2)();
1236  char shellnam[40], *shell, *namep;
1237  union wait status;
1238 
1239  old1 = signal (SIGINT, SIG_IGN);
1240  old2 = signal (SIGQUIT, SIG_IGN);
1241  if ((pid = fork()) == 0) {
1242  for (pid = 3; pid < 20; pid++)
1243  (void) close(pid);
1244  (void) signal(SIGINT, SIG_DFL);
1245  (void) signal(SIGQUIT, SIG_DFL);
1246  shell = getenv("SHELL");
1247  if (shell == NULL)
1248  shell = _PATH_BSHELL;
1249  namep = rindex(shell,'/');
1250  if (namep == NULL)
1251  namep = shell;
1252  (void) strcpy(shellnam,"-");
1253  (void) strcat(shellnam, ++namep);
1254  if (strcmp(namep, "sh") != 0)
1255  shellnam[0] = '+';
1256  if (debug) {
1257  printf ("%s\n", shell);
1258  (void) fflush (stdout);
1259  }
1260  if (argc > 1) {
1261  execl(shell,shellnam,"-c",altarg,(char *)0);
1262  }
1263  else {
1264  execl(shell,shellnam,(char *)0);
1265  }
1266  perror(shell);
1267  code = -1;
1268  exit(1);
1269  }
1270  if (pid > 0)
1271  while (wait(&status) != pid)
1272  ;
1273  (void) signal(SIGINT, old1);
1274  (void) signal(SIGQUIT, old2);
1275  if (pid == -1) {
1276  perror("Try again later");
1277  code = -1;
1278  }
1279  else {
1280  code = 0;
1281  }
1282 #endif
1283 
1284  char * AppName;
1285  char ShellCmd[MAX_PATH];
1286  char CmdLine[MAX_PATH];
1287  int i;
1288  PROCESS_INFORMATION ProcessInformation;
1289  BOOL Result;
1290  STARTUPINFO StartupInfo;
1291  char ShellName[] = "COMSPEC";
1292  int NumBytes;
1293 
1294  NumBytes = GetEnvironmentVariable( ShellName, ShellCmd, MAX_PATH);
1295 
1296  if (NumBytes == 0)
1297  {
1298  return;
1299  }
1300 
1301  AppName = ShellCmd;
1302  strcpy( CmdLine, ShellCmd );
1303 
1304  if (argc > 1)
1305  {
1306  strncat(CmdLine, " /C", MAX_PATH - strlen(CmdLine) - 1);
1307  }
1308 
1309  for (i=1; i<argc; i++)
1310  {
1311  strncat(CmdLine, " ", MAX_PATH - strlen(CmdLine) - 1);
1312  strncat(CmdLine, argv[i], MAX_PATH - strlen(CmdLine) - 1);
1313  }
1314 
1315  StartupInfo.cb = sizeof( StartupInfo );
1316  StartupInfo.lpReserved = NULL;
1317  StartupInfo.lpDesktop = NULL;
1318  StartupInfo.lpTitle = NULL;
1319  StartupInfo.dwX = 0;
1320  StartupInfo.dwY = 0;
1321  StartupInfo.dwXSize = 0;
1322  StartupInfo.dwYSize = 0;
1323  StartupInfo.dwFlags = 0;
1324  StartupInfo.wShowWindow = 0;
1325  StartupInfo.cbReserved2 = 0;
1326  StartupInfo.lpReserved2 = NULL;
1327 
1328  Result = CreateProcess( AppName, // cmd name
1329  CmdLine, // cmd line arguments
1330  NULL,
1331  NULL, // security attributes
1332  FALSE, // inherit flags
1333  0, // Creation flags
1334  NULL, // Environment
1335  NULL, // Current directory
1336  &StartupInfo, // Startup info structure
1337  &ProcessInformation); // processInfo structure
1338 
1339  if (Result)
1340  {
1341  WaitForSingleObject( ProcessInformation.hProcess, 0xffffffff);
1342 
1343  CloseHandle( ProcessInformation.hProcess);
1344  }
1345 }
void ShellCmd(const int argc, const char **const argv, const CommandPtr cmdp, const ArgvInfoPtr aip)
Definition: cmds.c:3094
static int argc
Definition: ServiceArgs.c:15
DWORD dwXSize
Definition: winbase.h:788
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
char CmdLine[0x100]
Definition: mach.c:35
#define CloseHandle
Definition: compat.h:398
LPSTR lpTitle
Definition: winbase.h:785
char * strncat(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:605
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP intptr_t __cdecl execl(_In_z_ const char *_Filename, _In_z_ const char *_ArgList,...)
static CHAR AppName[MAX_PATH]
Definition: dem.c:252
DWORD dwFlags
Definition: winbase.h:793
#define SIGQUIT
Definition: signal.h:24
#define SIGINT
Definition: signal.h:23
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
#define SIG_DFL
Definition: signal.h:47
DWORD dwY
Definition: winbase.h:787
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define rindex(s, c)
Definition: various.h:30
#define FALSE
Definition: types.h:117
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
smooth NULL
Definition: ftsmooth.c:557
PBYTE lpReserved2
Definition: winbase.h:796
LPSTR lpReserved
Definition: winbase.h:783
DWORD dwYSize
Definition: winbase.h:789
DWORD dwX
Definition: winbase.h:786
unsigned int BOOL
Definition: ntddk_ex.h:94
DWORD cb
Definition: winbase.h:782
#define MAX_PATH
Definition: compat.h:26
int signal
Definition: xcptfil.c:12
#define exit(n)
Definition: config.h:202
#define close
Definition: acwin.h:74
#define CreateProcess
Definition: winbase.h:3520
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
LPSTR lpDesktop
Definition: winbase.h:784
WORD cbReserved2
Definition: winbase.h:795
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
void shell(int argc, const char *argv[])
Definition: cmds.c:1231
WORD wShowWindow
Definition: winbase.h:794
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define GetEnvironmentVariable
Definition: winbase.h:3576
#define debug(msg)
Definition: key_call.c:71
char * altarg
Definition: main.c:78
#define SIG_IGN
Definition: signal.h:48
#define _PATH_BSHELL
Definition: pathnames.h:21
int sig_t
Definition: ftp_var.h:161
#define printf
Definition: config.h:203
Definition: ps.c:97
void site ( int  argc,
const char argv[] 
)

Definition at line 1515 of file cmds.c.

1516 {
1517  int i;
1518  char buf[BUFSIZ];
1519 
1520  if (argc < 2) {
1521  (void) strcat(line, " ");
1522  printf("(arguments to SITE command) ");
1523  (void) fflush(stdout);
1524  (void) gets(&line[strlen(line)]);
1525  makeargv();
1526  argc = margc;
1527  argv = margv;
1528  }
1529  if (argc < 2) {
1530  printf("usage: %s line-to-send\n", argv[0]);
1531  (void) fflush(stdout);
1532  code = -1;
1533  return;
1534  }
1535  (void) strcpy(buf, "SITE ");
1536  (void) strcat(buf, argv[1]);
1537  for (i = 2; i < argc; i++) {
1538  (void) strcat(buf, " ");
1539  (void) strcat(buf, argv[i]);
1540  }
1541  if (command(buf) == PRELIM) {
1542  while (getreply(0) == PRELIM);
1543  }
1544 }
static int argc
Definition: ServiceArgs.c:15
int getreply(int expecteof)
Definition: ftp.c:310
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define BUFSIZ
Definition: nsplookup.c:26
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define PRELIM
Definition: ftp_var.h:41
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define printf
Definition: config.h:203
void sizecmd ( int  argc,
const char argv[] 
)

Definition at line 2208 of file cmds.c.

2209 {
2210 
2211  if (argc < 2) {
2212  (void) strcat(line, " ");
2213  printf("(filename) ");
2214  (void) fflush(stdout);
2215  (void) gets(&line[strlen(line)]);
2216  makeargv();
2217  argc = margc;
2218  argv = margv;
2219  }
2220  if (argc < 2) {
2221  printf("usage:%s filename\n", argv[0]);
2222  (void) fflush(stdout);
2223  code = -1;
2224  return;
2225  }
2226  (void) command("SIZE %s", argv[1]);
2227 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203
void status ( int  argc,
const char argv[] 
)

Definition at line 786 of file cmds.c.

Referenced by RunBookmarkEditor(), and ShellCmd().

787 {
788  int i;
789 
790  if (connected)
791  printf("Connected to %s.\n", hostname);
792  else
793  printf("Not connected.\n");
794  if (!proxy) {
795  pswitch(1);
796  if (connected) {
797  printf("Connected for proxy commands to %s.\n", hostname);
798  }
799  else {
800  printf("No proxy connection.\n");
801  }
802  pswitch(0);
803  }
804  printf("Mode: %s; Type: %s; Form: %s; Structure: %s\n",
805  modename, typename, formname, structname);
806  printf("Verbose: %s; Bell: %s; Prompting: %s; Globbing: %s\n",
808  onoff(doglob));
809  printf("Store unique: %s; Receive unique: %s\n", onoff(sunique),
810  onoff(runique));
811  printf("Case: %s; CR stripping: %s\n",onoff(mcase),onoff(crflag));
812  if (ntflag) {
813  printf("Ntrans: (in) %s (out) %s\n", ntin,ntout);
814  }
815  else {
816  printf("Ntrans: off\n");
817  }
818  if (mapflag) {
819  printf("Nmap: (in) %s (out) %s\n", mapin, mapout);
820  }
821  else {
822  printf("Nmap: off\n");
823  }
824  printf("Hash mark printing: %s; Use of PORT cmds: %s\n",
825  onoff(hash), onoff(sendport));
826  if (macnum > 0) {
827  printf("Macros:\n");
828  for (i=0; i<macnum; i++) {
829  printf("\t%s\n",macros[i].mac_name);
830  }
831  }
832  (void) fflush(stdout);
833  code = 0;
834 }
int sunique
Definition: main.c:70
int proxy
Definition: main.c:67
char formname[32]
Definition: main.c:88
int ntflag
Definition: main.c:73
int doglob
Definition: main.c:66
int crflag
Definition: main.c:76
#define interactive
Definition: rosglue.h:34
FILE * stdout
char * hostname
Definition: ftp.c:84
#define verbose
Definition: rosglue.h:36
GLenum GLclampf GLint i
Definition: glfuncs.h:14
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int mcase
Definition: main.c:72
char structname[32]
Definition: main.c:86
int runique
Definition: main.c:71
char modename[32]
Definition: main.c:90
int sendport
Definition: main.c:117
int connected
Definition: main.c:61
char ntin[17]
Definition: main.c:79
int bell
Definition: main.c:65
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
struct macel macros[16]
Definition: main.c:109
int mapflag
Definition: main.c:74
void pswitch(int flag)
Definition: ftp.c:1306
int macnum
Definition: main.c:108
char mapin[MAXPATHLEN]
Definition: main.c:82
static const char * onoff(int bool)
Definition: cmds.c:777
Definition: _hash_fun.h:40
char mapout[MAXPATHLEN]
Definition: main.c:83
#define printf
Definition: config.h:203
char ntout[17]
Definition: main.c:80
void syst ( int  argc,
const char argv[] 
)

Definition at line 2128 of file cmds.c.

2129 {
2130  (void) command("SYST");
2131 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int command(const char *fmt,...)
Definition: ftp.c:262
void user ( int  argc,
const char argv[] 
)

Definition at line 1350 of file cmds.c.

Referenced by cb_running(), cb_stopped(), change_channel_CB(), create_cookie_url(), CredDialogCommandOk(), ctrl_handler(), do_authorization(), enum_components(), enum_dir_treeWA(), enum_load_modW64_32(), enum_load_modW64_64(), enum_modW64_32(), enum_modW64_64(), enum_products(), EnumDirTree(), fetch_elf_module_info_cb(), fetch_pe_module_info_cb(), fetch_user_component(), fetch_user_product(), FindDfltProvRegVals(), get_user_sid(), HTMLXMLHttpRequest_open(), HTTP_DoAuthorization(), HttpProtocol_open_request(), if(), INTERNET_InternetOpenUrlW(), InternetCrackUrlA(), InternetCrackUrlW_test(), login(), module_find_cb(), MSI_GetUserInfo(), MsiGetUserInfoA(), MsiGetUserInfoW(), nego_AcquireCredentialsHandleA(), nsURI_GetUserPass(), nsURI_SetUsername(), nsURI_SetUserPass(), ntlm_AcquireCredentialsHandleA(), ntlm_AcquireCredentialsHandleW(), ntlm_GetUsernameArg(), POP3Transport_CallbackSendUSERCmd(), POP3Transport_CommandUSER(), process_get_owner(), process_invade_cb(), rpcrt4_http_internet_connect(), sffip_cb(), SspiPromptForCredentialsW(), sym_register_cb(), SymFindFileInPath(), SymFindFileInPathW(), test_complicated_cookie(), test_CreateDirectoryA(), test_GetNamedSecurityInfoA(), test_GetWindowsAccountDomainSid(), test_LsaLookupSids(), test_MsiGetUserInfo(), test_null_auth_data(), test_process_security(), test_readwrite(), test_Win32_Process(), user_cache_alloc(), UserChangePassword(), UserNew(), and WinHttpCrackUrl_test().

1351 {
1352  char acct[80], *getpass();
1353  int n, aflag = 0;
1354 
1355  if (argc < 2) {
1356  (void) strcat(line, " ");
1357  printf("(username) ");
1358  (void) fflush(stdout);
1359  (void) gets(&line[strlen(line)]);
1360  makeargv();
1361  argc = margc;
1362  argv = margv;
1363  }
1364  if (argc > 4) {
1365  printf("usage: %s username [password] [account]\n", argv[0]);
1366  (void) fflush(stdout);
1367  code = -1;
1368  return;
1369  }
1370  n = command("USER %s", argv[1]);
1371  if (n == CONTINUE) {
1372  if (argc < 3 )
1373  argv[2] = getpass("Password: "), argc++;
1374  n = command("PASS %s", argv[2]);
1375  }
1376  if (n == CONTINUE) {
1377  if (argc < 4) {
1378  printf("Account: "); (void) fflush(stdout);
1379  (void) fflush(stdout);
1380  (void) fgets(acct, sizeof(acct) - 1, stdin);
1381  acct[strlen(acct) - 1] = '\0';
1382  argv[3] = acct; argc++;
1383  }
1384  n = command("ACCT %s", argv[3]);
1385  aflag++;
1386  }
1387  if (n != COMPLETE) {
1388  fprintf(stdout, "Login failed.\n");
1389  (void) fflush(stdout);
1390  return;
1391  }
1392  if (!aflag && argc == 4) {
1393  (void) command("ACCT %s", argv[3]);
1394  }
1395 }
static int argc
Definition: ServiceArgs.c:15
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
_CRTIMP char *__cdecl gets(char *_Buffer)
Definition: file.c:3559
FILE * stdin
#define COMPLETE
Definition: main.h:128
static char ** argv
Definition: ServiceArgs.c:14
FILE * stdout
GLuint n
Definition: s_context.h:57
char * getpass(const char *prompt)
Definition: fake.c:231
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
Definition: parser.c:48
void makeargv(void)
Definition: main.c:384
const char * margv[20]
Definition: main.c:102
int margc
Definition: main.c:101
#define CONTINUE
Definition: ftp_var.h:43
_Check_return_opt_ _CRTIMP char *__cdecl fgets(_Out_writes_z_(_MaxCount) char *_Buf, _In_ int _MaxCount, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int command(const char *fmt,...)
Definition: ftp.c:262
#define printf
Definition: config.h:203

Variable Documentation

jmp_buf abortprox

Definition at line 1712 of file cmds.c.

Referenced by doproxy().

int allbinary

Definition at line 73 of file ftp.c.

Referenced by recvrequest(), and setpeer().

int autologin

Definition at line 49 of file main.c.

Referenced by main(), and setpeer().

char* globerr

Definition at line 48 of file main.c.

Referenced by globulize(), and mput().

jmp_buf jabort

Definition at line 38 of file cmds.c.

Referenced by mdelete(), mget(), mls(), and mput().

const char* mname

Definition at line 37 of file cmds.c.

Referenced by mdelete(), mget(), mls(), mput(), and RegisterClassExA().

short portnum

Definition at line 45 of file main.c.

Referenced by main(), and setpeer().

char reply_string[]

Definition at line 305 of file ftp.c.

Referenced by getit(), getreply(), modtime(), and setpeer().

off_t restart_point

Definition at line 77 of file ftp.c.

Referenced by get(), getit(), recvrequest(), restart(), and sendrequest().

char sccsid[] = "@(#)cmds.c 5.18 (Berkeley) 4/20/89"
static

Definition at line 27 of file cmds.c.

const char* stype[]
Initial value:
= {
"type",
"",
0
}

Definition at line 192 of file cmds.c.

Referenced by setascii(), setbinary(), setebcdic(), and settenex().

Initial value:
= {
{ "ascii", "A", TYPE_A, 0 },
{ "binary", "I", TYPE_I, 0 },
{ "image", "I", TYPE_I, 0 },
{ "ebcdic", "E", TYPE_E, 0 },
{ "tenex", "L", TYPE_L, bytename },
{0 }
}
#define TYPE_E
Definition: ftp_var.h:38
#define TYPE_L
Definition: ftp_var.h:39
#define TYPE_I
Definition: ftp_var.h:37
char bytename[32]
Definition: main.c:92
#define TYPE_A
Definition: ftp_var.h:36