ReactOS  0.4.15-dev-2961-gecb0c09
strlist.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  strlist_t
 

Macros

#define str_clone   _wcsdup
 
#define strlist_default   { NULL, 0 }
 

Typedefs

typedef struct strlist_t strlist_t
 

Functions

static void strlist_init (strlist_t *plist)
 
static LPWSTR strlist_get_at (strlist_t *plist, unsigned int i)
 
static int strlist_add (strlist_t *plist, LPCWSTR psz)
 
static void strlist_destroy (strlist_t *plist)
 
static int strlist_find_i (strlist_t *plist, LPCWSTR psz)
 

Macro Definition Documentation

◆ str_clone

#define str_clone   _wcsdup

Definition at line 10 of file strlist.h.

◆ strlist_default

#define strlist_default   { NULL, 0 }

Definition at line 17 of file strlist.h.

Typedef Documentation

◆ strlist_t

Function Documentation

◆ strlist_add()

static int strlist_add ( strlist_t plist,
LPCWSTR  psz 
)
static

Definition at line 30 of file strlist.h.

31 {
32  LPWSTR *ppsz, clone = str_clone(psz);
33  if (!clone)
34  return 0;
35  ppsz = (LPWSTR *)realloc(plist->ppsz, (plist->count + 1) * sizeof(LPWSTR));
36  if (!ppsz)
37  {
38  free(clone);
39  return 0;
40  }
41  plist->ppsz = ppsz;
42  plist->ppsz[plist->count] = clone;
43  ++(plist->count);
44  return 1;
45 }
#define realloc
Definition: debug_ros.c:6
static Parse plist[]
Definition: dwarfinfo.c:340
#define free
Definition: debug_ros.c:5
#define str_clone
Definition: strlist.h:10
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by WhereFindByDirs(), WhereGetPathExt(), WhereParseCommandLine(), and WherePrintPath().

◆ strlist_destroy()

static void strlist_destroy ( strlist_t plist)
static

Definition at line 47 of file strlist.h.

48 {
49  unsigned int i;
50  for (i = 0; i < plist->count; ++i)
51  free(plist->ppsz[i]);
52  plist->count = 0;
53  free(plist->ppsz);
54  plist->ppsz = NULL;
55 }
static Parse plist[]
Definition: dwarfinfo.c:340
#define free
Definition: debug_ros.c:5
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define NULL
Definition: types.h:112

Referenced by WhereFindByDirs(), WhereGetPathExt(), and wmain().

◆ strlist_find_i()

static int strlist_find_i ( strlist_t plist,
LPCWSTR  psz 
)
inlinestatic

Definition at line 57 of file strlist.h.

58 {
59  unsigned int i;
60  for (i = 0; i < plist->count; ++i)
61  {
62  if (_wcsicmp(plist->ppsz[i], psz) == 0)
63  return i;
64  }
65  return -1;
66 }
static Parse plist[]
Definition: dwarfinfo.c:340
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)

Referenced by WherePrintPath().

◆ strlist_get_at()

static LPWSTR strlist_get_at ( strlist_t plist,
unsigned int  i 
)
inlinestatic

Definition at line 25 of file strlist.h.

26 {
27  return plist->ppsz[i];
28 }
static Parse plist[]
Definition: dwarfinfo.c:340
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by WhereSearch(), WhereSearchFiles(), and wmain().

◆ strlist_init()

static void strlist_init ( strlist_t plist)
inlinestatic

Definition at line 19 of file strlist.h.

20 {
21  plist->ppsz = NULL;
22  plist->count = 0;
23 }
static Parse plist[]
Definition: dwarfinfo.c:340
#define NULL
Definition: types.h:112