#include <string.h>


Go to the source code of this file.
Defines | |
| #define | _QVALUE_H 1 |
| #define | MAX_Q ((qvalue_t)1000) |
| #define | MAX_Q_STR "1" |
| #define | MAX_Q_STR_LEN (sizeof(MAX_Q_STR) - 1) |
| #define | MIN_Q ((qvalue_t)0) |
| #define | MIN_Q_STR "0" |
| #define | MIN_Q_STR_LEN (sizeof(MIN_Q_STR) - 1) |
| #define | Q_PREFIX "0." |
| #define | Q_PREFIX_LEN (sizeof(Q_PREFIX) - 1) |
| #define | Q_UNSPECIFIED ((qvalue_t)-1) |
| Use this if the value of q is not specified. | |
Typedefs | |
| typedef int | qvalue_t |
Functions | |
| static qvalue_t | double2q (double q) |
| Convert double to qvalue_t. | |
| static size_t | len_q (qvalue_t q) |
| Calculate the length of printed q. | |
| static double | q2double (qvalue_t q) |
| Convert qvalue_t to double. | |
| static char * | q2str (qvalue_t q, unsigned int *len) |
| Convert q value to string. | |
| int | str2q (qvalue_t *q, char *s, int len) |
| Convert string representation of q parameter in qvalue_t. | |
Definition in file qvalue.h.
| #define MAX_Q ((qvalue_t)1000) |
Definition at line 67 of file qvalue.h.
Referenced by do_query(), enum_pv_query_3(), len_q(), mod_init(), and q2str().
| #define MAX_Q_STR_LEN (sizeof(MAX_Q_STR) - 1) |
| #define MIN_Q ((qvalue_t)0) |
Definition at line 68 of file qvalue.h.
Referenced by alias_db_lookup(), len_q(), mod_init(), and q2str().
| #define MIN_Q_STR_LEN (sizeof(MIN_Q_STR) - 1) |
| #define Q_PREFIX_LEN (sizeof(Q_PREFIX) - 1) |
| #define Q_UNSPECIFIED ((qvalue_t)-1) |
Use this if the value of q is not specified.
Definition at line 64 of file qvalue.h.
Referenced by clear_branches(), cpl_proxy_to_loc_set(), double2q(), dp_update(), ds_update_dst(), exec_str(), get_branch(), len_q(), mod_init(), ops_pushto_avp(), ospPrepareDestination(), print_dset(), q2double(), and q2str().
| static qvalue_t double2q | ( | double | q | ) | [inline, static] |
Convert double to qvalue_t.
Definition at line 118 of file qvalue.h.
References Q_UNSPECIFIED.
Referenced by dbrow2info().
| static size_t len_q | ( | qvalue_t | q | ) | [inline, static] |
Calculate the length of printed q.
Definition at line 84 of file qvalue.h.
References MAX_Q, MAX_Q_STR_LEN, MIN_Q, MIN_Q_STR_LEN, Q_PREFIX_LEN, and Q_UNSPECIFIED.
Referenced by build_contact(), calc_buf_len(), and print_dset().
| static double q2double | ( | qvalue_t | q | ) | [inline, static] |
Convert qvalue_t to double.
Definition at line 105 of file qvalue.h.
References Q_UNSPECIFIED.
Referenced by db_insert_ucontact(), and db_update_ucontact().
| static char* q2str | ( | qvalue_t | q, | |
| unsigned int * | len | |||
| ) | [inline, static] |
Convert q value to string.
Definition at line 131 of file qvalue.h.
References buf, MAX_Q, MAX_Q_STR, MAX_Q_STR_LEN, MIN_Q, MIN_Q_STR, MIN_Q_STR_LEN, Q_PREFIX, Q_PREFIX_LEN, and Q_UNSPECIFIED.
Referenced by build_contact(), mi_add_aor_node(), mi_usrloc_show_contact(), print_dset(), and print_ucontact().
| int str2q | ( | qvalue_t * | q, | |
| char * | s, | |||
| int | len | |||
| ) |
Convert string representation of q parameter in qvalue_t.
Definition at line 38 of file qvalue.c.
References E_INVALID_PARAMS, E_Q_DEC_MISSING, E_Q_EMPTY, E_Q_INV_CHAR, and E_Q_TOO_BIG.
Referenced by calc_contact_q(), mi_usrloc_add(), and sort_contacts().
1.5.6