"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "qftp-0.98/txtif.h" of archive qftp-0.98.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 /*
    2  *  qftp
    3  *  Copyright (C) 1997,1998 Peter Strand
    4  *  Distributed under the GNU Pulic Licence
    5  */
    6 
    7 
    8 #ifndef _TXTIF_H_
    9 #define _TXTIF_H_
   10 
   11 #include "conf.h"
   12 #include "flist.h"
   13 #include "ftpconn.h"
   14 #include "hosts.h"
   15 
   16 #define PAGER "less"
   17 
   18 struct options {
   19 	char bg;	// b
   20 	char proc;	// z
   21 	char force;	// f
   22 	char cont;	// c
   23 	char longl;	// l
   24 	char anon;	// a
   25 	char retry;	// r
   26 	char retrsl;	// s
   27 	char noinf;	// n
   28 	char rec;	// r
   29 };
   30 
   31 class TxtIF {
   32 	FtpConn *ftp;
   33 	Conf gconf;
   34 	Hosts *hosts;
   35 	char user[128], pass[128], anonuser[128], anonpass[128];
   36 	struct options opts;
   37 	char prompt[1024];
   38 	DirList curList;
   39 	DirList markList;
   40 
   41 	int Get(Conf &conf, char *p, FtpConn *nftp = NULL);
   42 	int Expand(int &n, char *a[]);
   43 	void Glob(char *, DirList&, int glob = 0);
   44  public:
   45 	TxtIF();
   46 	TxtIF(FtpConn *ftp, Conf &nconf, Hosts *hosts);
   47 	void go();
   48 	int lookup(char *s);
   49 	int Khelp(int n, char *a[]);
   50 	int Open(int n, char *a[]);
   51 	int Close(int n, char *a[]);
   52 	int Mark(int n, char *a[]);
   53 	int GetMarked(int n, char *a[]);
   54 	int ListMarked(int n, char *a[]);
   55 	int List(int n, char *a[]);
   56 	int LongList(int n, char *a[]);
   57 	int Cd(int n, char *a[]);
   58 	int Put(int n, char *a[]);
   59 	int Get(int n, char *a[]);
   60 	int Quote(int n, char *a[]);
   61 	int Help(int n, char *a[]);
   62 	int LCd(int n, char *a[]);
   63 	int Set(int n, char *a[]);
   64 	int View(int n, char *a[]);
   65 };
   66 
   67 
   68 #endif
   69 
   70 
   71 
   72