plptools
Loading...
Searching...
No Matches
ftp.cc File Reference
#include "config.h"
#include <bufferarray.h>
#include <bufferstore.h>
#include <Enum.h>
#include <path.h>
#include <plpintl.h>
#include <tcpsocket.h>
#include <rclip.h>
#include <rfsv.h>
#include <rpcs.h>
#include <iostream>
#include <string>
#include <iomanip>
#include <sys/types.h>
#include <dirent.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <signal.h>
#include <netdb.h>
#include <fnmatch.h>
#include "ignore-value.h"
#include "string-buffer.h"
#include "xalloc.h"
#include "xvasprintf.h"
#include "ftp.h"
#include "yesno.h"
Include dependency graph for ftp.cc:

Go to the source code of this file.

Macros

#define CLIPFILE   "C:/System/Data/Clpboard.cbd"
 
#define MATCHFUNCTION   rl_completion_matches
 

Functions

char * readline ()
 
static char * join_string_vector (vector< char * > argv, const char *sep)
 
static int checkAbortNoHash (void *, uint32_t)
 
static int checkAbortHash (void *, uint32_t)
 
static void sigint_handler (int)
 
static void sigint_handler2 (int)
 
static int stopPrograms (rpcs &r, const char *file)
 
static char * get_upto (FILE *fp, const char *term, size_t *final_len)
 
static char * getln (FILE *fp)
 
static int startPrograms (rpcs &r, rfsv &a, const char *file)
 
static void psiText2ascii (char *buf, int len)
 
static void ascii2PsiText (char *buf, int len)
 
static char * slurp (FILE *fp, size_t *final_len)
 
static char * epoc_dir_from (const char *path)
 Compute new directory from path, which may be absolute or relative, and cwd. More...
 
static char * filename_generator (const char *text, int state)
 
static char * command_generator (const char *text, int state)
 
static char * null_completion (const char *, int)
 
static char ** do_completion (const char *text, int start, int)
 

Variables

static char * psionDir
 
static rfsvcomp_a
 
static int continueRunning
 
static const char * all_commands []
 
static const char * localfile_commands []
 
static const char * remote_dir_commands []
 
static PlpDir comp_files
 
static long maskAttr
 
static char * cplPath
 

Macro Definition Documentation

◆ CLIPFILE

#define CLIPFILE   "C:/System/Data/Clpboard.cbd"

Definition at line 85 of file ftp.cc.

◆ MATCHFUNCTION

#define MATCHFUNCTION   rl_completion_matches

Definition at line 1335 of file ftp.cc.

Function Documentation

◆ ascii2PsiText()

static void ascii2PsiText ( char *  buf,
int  len 
)
static

Definition at line 380 of file ftp.cc.

◆ checkAbortHash()

static int checkAbortHash ( void *  ,
uint32_t   
)
static

Definition at line 166 of file ftp.cc.

◆ checkAbortNoHash()

static int checkAbortNoHash ( void *  ,
uint32_t   
)
static

Definition at line 160 of file ftp.cc.

◆ command_generator()

static char * command_generator ( const char *  text,
int  state 
)
static

Definition at line 1397 of file ftp.cc.

◆ do_completion()

static char ** do_completion ( const char *  text,
int  start,
int   
)
static

Definition at line 1424 of file ftp.cc.

◆ epoc_dir_from()

static char * epoc_dir_from ( const char *  path)
static

Compute new directory from path, which may be absolute or relative, and cwd.

Definition at line 624 of file ftp.cc.

◆ filename_generator()

static char * filename_generator ( const char *  text,
int  state 
)
static

Definition at line 1358 of file ftp.cc.

◆ get_upto()

static char * get_upto ( FILE *  fp,
const char *  term,
size_t *  final_len 
)
static

Definition at line 229 of file ftp.cc.

◆ getln()

static char * getln ( FILE *  fp)
static

Definition at line 259 of file ftp.cc.

◆ join_string_vector()

static char * join_string_vector ( vector< char * >  argv,
const char *  sep 
)
static

Definition at line 146 of file ftp.cc.

◆ null_completion()

static char * null_completion ( const char *  ,
int   
)
static

Definition at line 1418 of file ftp.cc.

◆ psiText2ascii()

static void psiText2ascii ( char *  buf,
int  len 
)
static

Definition at line 353 of file ftp.cc.

◆ readline()

char * readline ( )

◆ sigint_handler()

static void sigint_handler ( int  )
static

Definition at line 175 of file ftp.cc.

◆ sigint_handler2()

static void sigint_handler2 ( int  )
static

Definition at line 181 of file ftp.cc.

◆ slurp()

static char * slurp ( FILE *  fp,
size_t *  final_len 
)
static

Definition at line 400 of file ftp.cc.

◆ startPrograms()

static int startPrograms ( rpcs r,
rfsv a,
const char *  file 
)
static

Definition at line 265 of file ftp.cc.

◆ stopPrograms()

static int stopPrograms ( rpcs r,
const char *  file 
)
static

Definition at line 188 of file ftp.cc.

Variable Documentation

◆ all_commands

const char* all_commands[]
static
Initial value:
= {
"pwd", "ren", "touch", "gtime", "test", "gattr", "sattr", "devs",
"dir", "ls", "dircnt", "cd", "lcd", "get", "put", "mget", "mput",
"del", "rm", "mkdir", "rmdir", "prompt", "bye", "cp", "volname",
"ps", "kill", "killsave", "runrestore", "run", "machinfo",
"ownerinfo", "help", "settime", "setupinfo", NULL
}

Definition at line 1337 of file ftp.cc.

◆ comp_a

rfsv* comp_a
static

Definition at line 82 of file ftp.cc.

◆ comp_files

PlpDir comp_files
static

Definition at line 1353 of file ftp.cc.

◆ continueRunning

int continueRunning
static

Definition at line 83 of file ftp.cc.

◆ cplPath

char* cplPath
static

Definition at line 1355 of file ftp.cc.

◆ localfile_commands

const char* localfile_commands[]
static
Initial value:
= {
"lcd ", "put ", "mput ", "killsave ", "runrestore ", NULL
}

Definition at line 1345 of file ftp.cc.

◆ maskAttr

long maskAttr
static

Definition at line 1354 of file ftp.cc.

◆ psionDir

char* psionDir
static

Definition at line 81 of file ftp.cc.

◆ remote_dir_commands

const char* remote_dir_commands[]
static
Initial value:
= {
"cd ", "rmdir ", NULL
}

Definition at line 1349 of file ftp.cc.