LMMS
Loading...
Searching...
No Matches
swell-ini.cpp File Reference
#include "swell.h"
#include "../assocarray.h"
#include "../wdlcstring.h"
#include "../mutex.h"
#include "../queue.h"
#include <sys/stat.h>
#include <sys/file.h>
#include <sys/types.h>

Classes

struct  iniFileContext

Macros

#define NUM_OPEN_CONTEXTS   32
#define WRSTR(v)

Functions

static void deleteStringKeyedArray (WDL_StringKeyedArray< char * > *p)
static time_t getfileupdtimesize (const char *fn, int *szOut)
static bool fgets_to_typedbuf (WDL_TypedBuf< char > *buf, FILE *fp)
static iniFileContextGetFileContext (const char *name)
static void WriteBackFile (iniFileContext *ctx)
BOOL WritePrivateProfileSection (const char *appname, const char *strings, const char *fn)
BOOL WritePrivateProfileString (const char *appname, const char *keyname, const char *val, const char *fn)
static void lstrcpyn_trimmed (char *dest, const char *src, int len)
DWORD GetPrivateProfileSection (const char *appname, char *strout, DWORD strout_len, const char *fn)
DWORD GetPrivateProfileString (const char *appname, const char *keyname, const char *def, char *ret, int retsize, const char *fn)
int GetPrivateProfileInt (const char *appname, const char *keyname, int def, const char *fn)
static bool __readbyte (char *src, unsigned char *out)
BOOL GetPrivateProfileStruct (const char *appname, const char *keyname, void *buf, int bufsz, const char *fn)
BOOL WritePrivateProfileStruct (const char *appname, const char *keyname, const void *buf, int bufsz, const char *fn)

Variables

static iniFileContext s_ctxs [NUM_OPEN_CONTEXTS]
static WDL_Mutex m_mutex

Macro Definition Documentation

◆ NUM_OPEN_CONTEXTS

#define NUM_OPEN_CONTEXTS   32

◆ WRSTR

#define WRSTR ( v)
Value:
l = (int)strlen(v); \
if (l > (int)strout_len - szOut - 2) l = (int)strout_len - 2 - szOut; \
if (l>0) { memcpy(strout+szOut,v,l); szOut+=l; }
int * l
Definition inflate.c:1579
unsigned v[N_MAX]
Definition inflate.c:1584
memcpy(hh, h, RAND_HEAD_LEN)
if(GLOBAL(newzip))
Definition crypt.c:475
typedef int(UZ_EXP MsgFn)()

Function Documentation

◆ __readbyte()

bool __readbyte ( char * src,
unsigned char * out )
static

◆ deleteStringKeyedArray()

void deleteStringKeyedArray ( WDL_StringKeyedArray< char * > * p)
static

◆ fgets_to_typedbuf()

bool fgets_to_typedbuf ( WDL_TypedBuf< char > * buf,
FILE * fp )
static

◆ GetFileContext()

iniFileContext * GetFileContext ( const char * name)
static

◆ getfileupdtimesize()

time_t getfileupdtimesize ( const char * fn,
int * szOut )
static

◆ GetPrivateProfileInt()

int GetPrivateProfileInt ( const char * appname,
const char * keyname,
int def,
const char * fn )

◆ GetPrivateProfileSection()

DWORD GetPrivateProfileSection ( const char * appname,
char * strout,
DWORD strout_len,
const char * fn )

◆ GetPrivateProfileString()

DWORD GetPrivateProfileString ( const char * appname,
const char * keyname,
const char * def,
char * ret,
int retsize,
const char * fn )

◆ GetPrivateProfileStruct()

BOOL GetPrivateProfileStruct ( const char * appname,
const char * keyname,
void * buf,
int bufsz,
const char * fn )

◆ lstrcpyn_trimmed()

void lstrcpyn_trimmed ( char * dest,
const char * src,
int len )
static

◆ WriteBackFile()

void WriteBackFile ( iniFileContext * ctx)
static

◆ WritePrivateProfileSection()

BOOL WritePrivateProfileSection ( const char * appname,
const char * strings,
const char * fn )

◆ WritePrivateProfileString()

BOOL WritePrivateProfileString ( const char * appname,
const char * keyname,
const char * val,
const char * fn )

◆ WritePrivateProfileStruct()

BOOL WritePrivateProfileStruct ( const char * appname,
const char * keyname,
const void * buf,
int bufsz,
const char * fn )

Variable Documentation

◆ m_mutex

WDL_Mutex m_mutex
static

◆ s_ctxs