Lines Matching refs:value
182 static int date_from_ISO8601 (const char *text, time_t * value) { in date_from_ISO8601() argument
266 *value = mkgmtime(&tm); in date_from_ISO8601()
272 static int date_to_ISO8601 (time_t value, char *buf, int length) { in date_to_ISO8601() argument
274 tm = php_gmtime_r(&value, &tmbuf); in date_to_ISO8601()
896 const char *XMLRPC_SetValueID_Case(XMLRPC_VALUE value, const char* id, int len, XMLRPC_CASE id_case… in XMLRPC_SetValueID_Case() argument
898 if(value) { in XMLRPC_SetValueID_Case()
900 simplestring_clear(&value->id); in XMLRPC_SetValueID_Case()
901 (len > 0) ? simplestring_addn(&value->id, id, len) : in XMLRPC_SetValueID_Case()
902 simplestring_add(&value->id, id); in XMLRPC_SetValueID_Case()
907 for(i = 0; i < value->id.len; i++) { in XMLRPC_SetValueID_Case()
908 value->id.str[i] = in XMLRPC_SetValueID_Case()
910 xmlrpc_case_lower) ? tolower (value->id. in XMLRPC_SetValueID_Case()
911 str[i]) : toupper (value-> in XMLRPC_SetValueID_Case()
917 pRetval = value->id.str; in XMLRPC_SetValueID_Case()
950 const char *XMLRPC_SetValueString(XMLRPC_VALUE value, const char* val, int len) { in XMLRPC_SetValueString() argument
952 if(value && val) { in XMLRPC_SetValueString()
953 simplestring_clear(&value->str); in XMLRPC_SetValueString()
954 (len > 0) ? simplestring_addn(&value->str, val, len) : in XMLRPC_SetValueString()
955 simplestring_add(&value->str, val); in XMLRPC_SetValueString()
956 value->type = xmlrpc_string; in XMLRPC_SetValueString()
957 pRetval = (char *)value->str.str; in XMLRPC_SetValueString()
982 void XMLRPC_SetValueInt(XMLRPC_VALUE value, int val) { in XMLRPC_SetValueInt() argument
983 if(value) { in XMLRPC_SetValueInt()
984 value->type = xmlrpc_int; in XMLRPC_SetValueInt()
985 value->i = val; in XMLRPC_SetValueInt()
1008 void XMLRPC_SetValueBoolean(XMLRPC_VALUE value, int val) { in XMLRPC_SetValueBoolean() argument
1009 if(value) { in XMLRPC_SetValueBoolean()
1010 value->type = xmlrpc_boolean; in XMLRPC_SetValueBoolean()
1011 value->i = val ? 1 : 0; in XMLRPC_SetValueBoolean()
1040 int XMLRPC_SetIsVector(XMLRPC_VALUE value, XMLRPC_VECTOR_TYPE type) { in XMLRPC_SetIsVector() argument
1043 if (value) { in XMLRPC_SetIsVector()
1045 if(value->type == xmlrpc_vector) { in XMLRPC_SetIsVector()
1046 if(value->v) { in XMLRPC_SetIsVector()
1047 if(!Q_Size(value->v->q)) { in XMLRPC_SetIsVector()
1048 value->v->type = type; in XMLRPC_SetIsVector()
1053 value->v = ecalloc(1, sizeof(STRUCT_XMLRPC_VECTOR)); in XMLRPC_SetIsVector()
1054 if(value->v) { in XMLRPC_SetIsVector()
1055 value->v->q = (queue*)emalloc(sizeof(queue)); in XMLRPC_SetIsVector()
1056 if(value->v->q) { in XMLRPC_SetIsVector()
1057 Q_Init(value->v->q); in XMLRPC_SetIsVector()
1058 value->v->type = type; in XMLRPC_SetIsVector()
1059 value->type = xmlrpc_vector; in XMLRPC_SetIsVector()
1296 int XMLRPC_VectorRemoveValue(XMLRPC_VALUE vector, XMLRPC_VALUE value) { in XMLRPC_VectorRemoveValue() argument
1297 if(vector && vector->v && vector->v->q && value) { in XMLRPC_VectorRemoveValue()
1302 if(xIter == value) { in XMLRPC_VectorRemoveValue()
1335 XMLRPC_VALUE value = NULL; in XMLRPC_CreateValueString() local
1337 value = XMLRPC_CreateValueEmpty(); in XMLRPC_CreateValueString()
1338 if(value) { in XMLRPC_CreateValueString()
1339 XMLRPC_SetValueString(value, val, len); in XMLRPC_CreateValueString()
1341 XMLRPC_SetValueID(value, id, 0); in XMLRPC_CreateValueString()
1345 return value; in XMLRPC_CreateValueString()
1441 void XMLRPC_CleanupValue(XMLRPC_VALUE value) { in XMLRPC_CleanupValue() argument
1442 if(value) { in XMLRPC_CleanupValue()
1443 if(value->iRefCount > 0) { in XMLRPC_CleanupValue()
1444 value->iRefCount --; in XMLRPC_CleanupValue()
1448 if(value->id.str) { in XMLRPC_CleanupValue()
1449 printf ("decremented refcount of %s, now %i\n", value->id.str, in XMLRPC_CleanupValue()
1450 value->iRefCount); in XMLRPC_CleanupValue()
1453 printf ("decremented refcount of 0x%x, now %i\n", value, in XMLRPC_CleanupValue()
1454 value->iRefCount); in XMLRPC_CleanupValue()
1458 if(value->type == xmlrpc_vector) { in XMLRPC_CleanupValue()
1459 if(value->v) { in XMLRPC_CleanupValue()
1460 if(value->iRefCount == 0) { in XMLRPC_CleanupValue()
1461 XMLRPC_VALUE cur = (XMLRPC_VALUE)Q_Head(value->v->q); in XMLRPC_CleanupValue()
1468 if(value->v && value->v->q) { in XMLRPC_CleanupValue()
1469 cur = Q_Next(value->v->q); in XMLRPC_CleanupValue()
1476 Q_Destroy(value->v->q); in XMLRPC_CleanupValue()
1477 my_free(value->v->q); in XMLRPC_CleanupValue()
1478 my_free(value->v); in XMLRPC_CleanupValue()
1484 if(value->iRefCount == 0) { in XMLRPC_CleanupValue()
1487 switch(value->type) { in XMLRPC_CleanupValue()
1497 if(value->id.str) { in XMLRPC_CleanupValue()
1498 printf("free'd %s\n", value->id.str); in XMLRPC_CleanupValue()
1501 printf("free'd 0x%x\n", value); in XMLRPC_CleanupValue()
1504 simplestring_free(&value->id); in XMLRPC_CleanupValue()
1505 simplestring_free(&value->str); in XMLRPC_CleanupValue()
1507 memset(value, 0, sizeof(STRUCT_XMLRPC_VALUE)); in XMLRPC_CleanupValue()
1508 my_free(value); in XMLRPC_CleanupValue()
1541 void XMLRPC_SetValueDateTime(XMLRPC_VALUE value, time_t time) { in XMLRPC_SetValueDateTime() argument
1542 if(value) { in XMLRPC_SetValueDateTime()
1544 value->type = xmlrpc_datetime; in XMLRPC_SetValueDateTime()
1545 value->i = time; in XMLRPC_SetValueDateTime()
1552 XMLRPC_SetValueDateTime_ISO8601 (value, timeBuf); in XMLRPC_SetValueDateTime()
1580 XMLRPC_VALUE XMLRPC_CopyValue(XMLRPC_VALUE value) { in XMLRPC_CopyValue() argument
1581 if(value) { in XMLRPC_CopyValue()
1582 value->iRefCount ++; in XMLRPC_CopyValue()
1584 if(value->id.str) { in XMLRPC_CopyValue()
1585 printf ("incremented refcount of %s, now %i\n", value->id.str, in XMLRPC_CopyValue()
1586 value->iRefCount); in XMLRPC_CopyValue()
1589 printf ("incremented refcount of 0x%x, now %i\n", value, in XMLRPC_CopyValue()
1590 value->iRefCount); in XMLRPC_CopyValue()
1594 return value; in XMLRPC_CopyValue()
1724 void XMLRPC_SetValueDateTime_ISO8601(XMLRPC_VALUE value, const char* s) { in XMLRPC_SetValueDateTime_ISO8601() argument
1725 if(value) { in XMLRPC_SetValueDateTime_ISO8601()
1728 value->type = xmlrpc_datetime; in XMLRPC_SetValueDateTime_ISO8601()
1730 value->i = time_val; in XMLRPC_SetValueDateTime_ISO8601()
1731 simplestring_clear(&value->str); in XMLRPC_SetValueDateTime_ISO8601()
1732 simplestring_add(&value->str, s); in XMLRPC_SetValueDateTime_ISO8601()
1796 void XMLRPC_SetValueBase64(XMLRPC_VALUE value, const char* s, int len) { in XMLRPC_SetValueBase64() argument
1797 if(value && s) { in XMLRPC_SetValueBase64()
1798 simplestring_clear(&value->str); in XMLRPC_SetValueBase64()
1799 (len > 0) ? simplestring_addn(&value->str, s, len) : in XMLRPC_SetValueBase64()
1800 simplestring_add(&value->str, s); in XMLRPC_SetValueBase64()
1801 value->type = xmlrpc_base64; in XMLRPC_SetValueBase64()
1860 void XMLRPC_SetValueDouble(XMLRPC_VALUE value, double val) { in XMLRPC_SetValueDouble() argument
1861 if(value) { in XMLRPC_SetValueDouble()
1862 value->type = xmlrpc_double; in XMLRPC_SetValueDouble()
1863 value->d = val; in XMLRPC_SetValueDouble()
1917 const char* XMLRPC_GetValueString(XMLRPC_VALUE value) { in XMLRPC_GetValueString() argument
1918 return ((value && value->type == xmlrpc_string) ? value->str.str : 0); in XMLRPC_GetValueString()
1940 int XMLRPC_GetValueStringLen(XMLRPC_VALUE value) { in XMLRPC_GetValueStringLen() argument
1941 return ((value) ? value->str.len : 0); in XMLRPC_GetValueStringLen()
1964 int XMLRPC_GetValueInt(XMLRPC_VALUE value) { in XMLRPC_GetValueInt() argument
1965 return ((value && value->type == xmlrpc_int) ? value->i : 0); in XMLRPC_GetValueInt()
1988 int XMLRPC_GetValueBoolean(XMLRPC_VALUE value) { in XMLRPC_GetValueBoolean() argument
1989 return ((value && value->type == xmlrpc_boolean) ? value->i : 0); in XMLRPC_GetValueBoolean()
2012 double XMLRPC_GetValueDouble(XMLRPC_VALUE value) { in XMLRPC_GetValueDouble() argument
2013 return ((value && value->type == xmlrpc_double) ? value->d : 0); in XMLRPC_GetValueDouble()
2037 const char* XMLRPC_GetValueBase64(XMLRPC_VALUE value) { in XMLRPC_GetValueBase64() argument
2038 return ((value && value->type == xmlrpc_base64) ? value->str.str : 0); in XMLRPC_GetValueBase64()
2062 time_t XMLRPC_GetValueDateTime(XMLRPC_VALUE value) { in XMLRPC_GetValueDateTime() argument
2063 return (time_t)((value && value->type == xmlrpc_datetime) ? value->i : 0); in XMLRPC_GetValueDateTime()
2085 const char* XMLRPC_GetValueDateTime_ISO8601(XMLRPC_VALUE value) { in XMLRPC_GetValueDateTime_ISO8601() argument
2086 return ((value && value->type == xmlrpc_datetime) ? value->str.str : 0); in XMLRPC_GetValueDateTime_ISO8601()
2109 const char* XMLRPC_GetValueID(XMLRPC_VALUE value) { in XMLRPC_GetValueID() argument
2110 return (const char*)((value && value->id.len) ? value->id.str : 0); in XMLRPC_GetValueID()
2134 int XMLRPC_VectorSize(XMLRPC_VALUE value) { in XMLRPC_VectorSize() argument
2136 if(value && value->type == xmlrpc_vector && value->v) { in XMLRPC_VectorSize()
2137 size = Q_Size(value->v->q); in XMLRPC_VectorSize()
2162 XMLRPC_VALUE XMLRPC_VectorRewind(XMLRPC_VALUE value) { in XMLRPC_VectorRewind() argument
2164 if(value && value->type == xmlrpc_vector && value->v) { in XMLRPC_VectorRewind()
2165 xReturn = (XMLRPC_VALUE)Q_Head(value->v->q); in XMLRPC_VectorRewind()
2188 XMLRPC_VALUE XMLRPC_VectorNext(XMLRPC_VALUE value) { in XMLRPC_VectorNext() argument
2190 if(value && value->type == xmlrpc_vector && value->v) { in XMLRPC_VectorNext()
2191 xReturn = (XMLRPC_VALUE)Q_Next(value->v->q); in XMLRPC_VectorNext()
2219 XMLRPC_VALUE_TYPE XMLRPC_GetValueType(XMLRPC_VALUE value) { in XMLRPC_GetValueType() argument
2220 return value ? value->type : xmlrpc_empty; in XMLRPC_GetValueType()
2247 XMLRPC_VECTOR_TYPE XMLRPC_GetVectorType(XMLRPC_VALUE value) { in XMLRPC_GetVectorType() argument
2248 return(value && value->v) ? value->v->type : xmlrpc_none; in XMLRPC_GetVectorType()
2273 XMLRPC_VALUE_TYPE_EASY XMLRPC_GetValueTypeEasy (XMLRPC_VALUE value) { in XMLRPC_GetValueTypeEasy() argument
2274 if (value) { in XMLRPC_GetValueTypeEasy()
2275 switch (value->type) { in XMLRPC_GetValueTypeEasy()
2277 switch (value->v->type) { in XMLRPC_GetValueTypeEasy()
2289 return(XMLRPC_VALUE_TYPE_EASY) value->type; in XMLRPC_GetValueTypeEasy()
2836 int XMLRPC_ValueIsFault (XMLRPC_VALUE value) { in XMLRPC_ValueIsFault() argument
2837 if( XMLRPC_VectorGetValueWithID(value, "faultCode") && in XMLRPC_ValueIsFault()
2838 XMLRPC_VectorGetValueWithID(value, "faultString") ) { in XMLRPC_ValueIsFault()
2884 int XMLRPC_GetValueFaultCode (XMLRPC_VALUE value) { in XMLRPC_GetValueFaultCode() argument
2885 return XMLRPC_VectorGetIntWithID(value, "faultCode"); in XMLRPC_GetValueFaultCode()
2929 const char* XMLRPC_GetValueFaultString (XMLRPC_VALUE value) { in XMLRPC_GetValueFaultString() argument
2930 return XMLRPC_VectorGetStringWithID(value, "faultString"); in XMLRPC_GetValueFaultString()