Add magimail (crashmail2 fork) to repo
This commit is contained in:
20
utils/magimail/src/oslib/os.h
Normal file
20
utils/magimail/src/oslib/os.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef OS_OS_H
|
||||
#define OS_OS_H
|
||||
|
||||
#include <shared/types.h>
|
||||
|
||||
bool osInit(void);
|
||||
void osEnd(void);
|
||||
|
||||
#if defined(PLATFORM_WIN32)
|
||||
#include <oslib_win32/os_win32.h>
|
||||
#elif defined(PLATFORM_LINUX)
|
||||
#include <oslib_linux/os_linux.h>
|
||||
#elif defined(PLATFORM_OS2)
|
||||
#include <oslib_os2/os_os2.h>
|
||||
#else
|
||||
#error Unsupported platform
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
20
utils/magimail/src/oslib/osdir.h
Normal file
20
utils/magimail/src/oslib/osdir.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef OS_OSDIR_H
|
||||
#define OS_OSDIR_H
|
||||
|
||||
#include "shared/types.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct osFileEntry
|
||||
{
|
||||
struct osFileEntry *Next;
|
||||
char Name[100];
|
||||
time_t Date;
|
||||
uint32_t Size;
|
||||
};
|
||||
|
||||
bool osReadDir(char *dir,struct jbList *filelist,bool (*acceptfunc)(char *filename));
|
||||
bool osScanDir(char *dir,void (*func)(char *file));
|
||||
struct osFileEntry *osGetFileEntry(char *file);
|
||||
|
||||
#endif
|
30
utils/magimail/src/oslib/osfile.h
Normal file
30
utils/magimail/src/oslib/osfile.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef OS_OSFILE_H
|
||||
#define OS_OSFILE_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "shared/types.h"
|
||||
|
||||
typedef void *osFile;
|
||||
|
||||
#define MODE_OLDFILE 1005 /* Corresponds to "rb" with fopen */
|
||||
#define MODE_NEWFILE 1006 /* Corresponds to "wb" with fopen */
|
||||
#define MODE_READWRITE 1004 /* Corresponds to "w+b" with fopen */
|
||||
|
||||
#define OFFSET_BEGINNING -1
|
||||
#define OFFSET_END 1
|
||||
|
||||
osFile osOpen(char *name,uint32_t mode);
|
||||
void osClose(osFile os);
|
||||
int osGetChar(osFile os);
|
||||
uint32_t osRead(osFile os,void *buf,uint32_t bytes);
|
||||
uint32_t osFGets(osFile os,char *str,uint32_t max);
|
||||
off_t osFTell(osFile os);
|
||||
bool osPutChar(osFile os, char ch);
|
||||
bool osWrite(osFile os,const void *buf, uint32_t bytes);
|
||||
bool osPuts(osFile os,char *str);
|
||||
bool osFPrintf(osFile os,char *fmt,...);
|
||||
bool osVFPrintf(osFile os,char *fmt,va_list args);
|
||||
void osSeek(osFile os,off_t offset,short mode);
|
||||
|
||||
#endif
|
10
utils/magimail/src/oslib/osmem.h
Normal file
10
utils/magimail/src/oslib/osmem.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef OS_OSMEM_H
|
||||
#define OS_OSMEM_H
|
||||
|
||||
#include "shared/types.h"
|
||||
|
||||
void *osAlloc(uint32_t size);
|
||||
void *osAllocCleared(uint32_t size);
|
||||
void osFree(void *buf);
|
||||
|
||||
#endif
|
21
utils/magimail/src/oslib/osmisc.h
Normal file
21
utils/magimail/src/oslib/osmisc.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef OS_OSMISC_H
|
||||
#define OS_OSMISC_H
|
||||
|
||||
#include "shared/types.h"
|
||||
|
||||
void osSetComment(char *file,char *comment);
|
||||
bool osExists(char *file);
|
||||
|
||||
int osChDirExecute(char *dir,char *cmd);
|
||||
int osExecute(char *cmd);
|
||||
|
||||
bool osRename(char *oldfile,char *newfile);
|
||||
bool osDelete(char *file);
|
||||
|
||||
bool osMkDir(char *dir);
|
||||
void osSleep(int secs);
|
||||
|
||||
uint32_t osError(void);
|
||||
char *osErrorMsg(uint32_t errnum);
|
||||
|
||||
#endif
|
10
utils/magimail/src/oslib/ospattern.h
Normal file
10
utils/magimail/src/oslib/ospattern.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef OS_OSPATTERN_H
|
||||
#define OS_OSPATTERN_H
|
||||
|
||||
#include "shared/types.h"
|
||||
|
||||
bool osCheckPattern(char *pattern);
|
||||
bool osMatchPattern(char *pattern,char *str);
|
||||
bool osIsPattern(char *pattern);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user