#include "pcache.h"
-static int PData_invariant(const PData * my)
+static int PData_invariant(const PData *my)
{
int retVal;
- retVal = my != NULL
- && my->name != NULL
- && my->idx != NULL
- && (my->type == PInt);
+ retVal = my != NULL && my->name != NULL && my->idx != NULL && (my->type == PInt);
return retVal;
}
return my;
}
-static void delPData(PData * my)
+static void delPData(PData *my)
{
if (my != NULL) {
switch (my->type) {
}
}
-static int compare(const PData * my, const char *name, const char *idx)
+static int compare(const PData *my, const char *name, const char *idx)
{
int retVal;
return retVal < 0 ? -1 : retVal > 0 ? 1 : 0;
}
-static PCache *insert(PCache * my, const char *name, const char *idx, unsigned long int value)
+static PCache *insert(PCache *my, const char *name, const char *idx, unsigned long int value)
{
if (my == NULL) {
my = malloc(sizeof(PCache));
return my;
}
-static PData *find(const PCache * my, const char *name, const char *idx)
+static PData *find(const PCache *my, const char *name, const char *idx)
{
PData *retVal;
return retVal;
}
-int PCache_storeInt(PCache ** my, const char *name, const char *idx, unsigned long int value)
+int PCache_storeInt(PCache **my, const char *name, const char *idx, unsigned long int value)
{
*my = insert(*my, name, idx, value);
return 0;
}
-int PCache_getInt(const PCache * my, const char *name, const char *idx, unsigned long int *value)
+int PCache_getInt(const PCache *my, const char *name, const char *idx, unsigned long int *value)
{
int retVal;
const PData *data;
char *PString;
unsigned long int *PIntArray;
char **PStringArray;
- }
- value;
+ } value;
};
typedef struct PDataS PData;
};
typedef struct PCacheS PCache;
-int PCache_storeInt(PCache ** my, const char *name, const char *idx, unsigned long int value);
-int PCache_getInt(const PCache * my, const char *name, const char *idx, unsigned long int *value);
+int PCache_storeInt(PCache **my, const char *name, const char *idx, unsigned long int value);
+int PCache_getInt(const PCache *my, const char *name, const char *idx, unsigned long int *value);
#endif