Unix.h
资源名称:warftpd.zip [点击查看]
上传用户:surprise9
上传日期:2007-01-04
资源大小:426k
文件大小:2k
源码类别:
Ftp客户端
开发平台:
Visual C++
- // This is part of the WAR SOFTWARE SERIES initiated by Jarle Aase
- // Copyright 1996 by Jarle Aase. All rights reserved.
- // See the "War Software Series Licende Agreement" for details concerning
- // use and distribution.
- // ---
- // This source code, executables and programs containing source code or
- // binaries or proprietetary technology from the War Software Series are
- // NOT alloed used, viewed or tested by any governmental agencies in
- // any countries. This includes the government, departments, police,
- // military etc.
- // ---
- // This file is intended for use with Tab space = 2
- // Created and maintained in MSVC Developer Studio
- // ---
- // NAME : Unix.h
- // PURPOSE : UNIX commands
- // PROGRAM :
- // DATE : Sept. 28 1996
- // AUTHOR : Jarle Aase
- // ---
- // REVISION HISTORY
- //
- class DLL_WAR_SOFTWARE_ CUnix
- {
- public:
- CCmdArgs *m_CmdArgs;
- CLog *m_Log;
- CUserFsys *m_Fsys;
- LPCSTR m_CRLF;
- LPSTR m_TmpName;
- BOOL m_HavePrintedSomething;
- BOOL m_ShowLinkAsFile;
- CWarString m_stdout;
- BOOL m_UseBufferOutput;
- FILE *m_stdio;
- // Used by getopt()
- int opterr; /* if error message should be printed */
- int optind; /* index into parent argv vector */
- int optopt; /* character checked for validity */
- LPSTR optarg; /* argument associated with option */
- LPSTR place;
- public:
- CUnix();
- ~CUnix();
- virtual int main(int argc, char **argv);
- int Exec();
- virtual BOOL Create(CCmdArgs *CmdArgs, CLog *Log,
- FILE *OutFile, CUserFsys *Fsys);
- void LogMsg(int flag, LPCSTR Format, ...);
- int printf(LPCSTR format, ... );
- int putc(int ch);
- int putchar(int ch);
- int puts(LPCSTR str);
- // Unix library functions
- int getuid();
- int getopt(int nargc, char * const *nargv, const char *ostr);
- LPCSTR userfromuid(int uid, int nouser);
- LPCSTR groupfromgid(int gid, int nouser);
- void strmode(DWORD Flags, char *bp);
- int readlink(LPCSTR path, LPSTR buf, int bufsiz);
- LPSTR strsep(LPSTR *stringp, LPCSTR delim);
- BOOL BldFileInfoList(CFileInfoList& FileList, LPCSTR Path, BOOL ListDir);
- int getmode(void *bbox, int omode);
- LPVOID setmode(LPCSTR p);
- int chmod(LPCSTR path, int modeint,
- int SetOwner = -1, int SetClass = -1, LPCSTR SetComment = NULL,
- int DefDirMode = -1, int DefFileMode = -1);
- };
- #define BUFFER_STDIO ((FILE *)0xfffffffe)