JWM Source Documentation
misc.h
Go to the documentation of this file.
1 
10 #ifndef MISC_H
11 #define MISC_H
12 
17 typedef struct {
18  const char *key;
19  int value;
21 
23 #define ARRAY_LENGTH( a ) (sizeof(a) / sizeof(a[0]))
24 
26 #define Min( x, y ) ( (x) > (y) ? (y) : (x) )
27 
29 #define Max( x, y ) ( (x) > (y) ? (x) : (y) )
30 
35 char IsSpace(char ch, unsigned int *lineNumber);
36 
40 void ExpandPath(char **path);
41 
45 void Trim(char *str);
46 
52 char *CopyString(const char *str);
53 
58 float ParseFloat(const char *str);
59 
67 int FindValue(const StringMappingType *mapping, int count, const char *key);
68 
76 const char *FindKey(const StringMappingType *mapping, int count, int value);
77 
79 int StrCmpNoCase(const char *a, const char *b);
80 
81 #endif /* MISC_H */

joewing.net / Projects / JWM