(
data->a_cand <=
data->n_cand) {
73 n=
data->a_cand + 10;
75? realloc(
data->cand,
n*
sizeof(*
data->cand))
83 n= (size_t) rand() % ++
data->n_cand;
84 if(n < data->n_cand - 1) {
85temp =
data->cand +
n++;
105 for(
n= 0;
n<= 100; ++
n) {
125 info->host = localhost;
127&&
info->host != localhost) {
170services,
sizeof(services), 0)) || !*c) {
176 for(s += strspn(s,
" \t"); *s; s += strspn(s,
" \t")) {
177 size_t len= strcspn(s,
" \t");
197 static int s_Sort(
const void* p1,
const void* p2)
218 return i<
data->i_cand ? &
data->cand[
i] : 0;
226 intdns_info_seen = 0
;
235 if(
data->n_cand > 1)
241 while(i < data->
n_cand) {
273 if(n < iter->n_skip) {
274 if(i < --data->
n_cand) {
276(
data->n_cand -
i) *
sizeof(*
data->cand));
285 data->cand[
i].status =
info->rate < 0.0 ? 0.0 :
info->rate;
292 if(
data->i_cand) {
297 for(
i= 0;
i<
data->n_cand;
i++) {
310 data->cand[
i].status =
data->cand[
n].status;
316 if(
i>=
data->n_cand && dns_info_seen)
323 if(n < --data->
n_cand) {
325(
data->n_cand -
n) *
sizeof(*
data->cand));
328}
else if(iter->
last|| iter->
n_skip|| !dns_info_seen) {
333 if(
info&& host_info)
346 for(
i= 0;
i<
data->n_cand;
i++)
393 if(
data->n_cand > 1)
static const struct type types[]
SSERV_Info * SERV_CreateDnsInfo(unsigned int host)
unsigned int TSERV_Type
Bitwise OR of ESERV_Type[Special].
int SERV_EqualInfo(const SSERV_Info *info1, const SSERV_Info *info2)
@ fSERV_Stateless
Stateless servers only.
unsigned int SOCK_GetLocalHostAddress(ESwitch reget)
Same as SOCK_GetLocalHostAddress6() only strictly for IPv4.
int UTIL_MatchesMask(const char *text, const char *mask)
Shortcut for UTIL_MatchesMaskEx(text, mask, 1), that is matching is done case-insensitively for the l...
const char * ConnNetInfo_GetValue(const char *service, const char *param, char *value, size_t value_size, const char *def_value)
#define NCBI_TIME_INFINITE
#define REG_CONN_LOCAL_SERVICES
#define REG_CONN_LOCAL_SERVER
unsigned int
A callback function used to compare two keys in a database.
if(yy_accept[yy_current_state])
const struct ncbi::grid::netcache::search::fields::KEY key
#define LBSM_DEFAULT_RATE
#define LBSM_DEFAULT_TIME
size_t LB_Select(SERV_ITER iter, void *data, FGetCandidate get_candidate, double bonus)
static const SSERV_VTable s_op
static void s_Close(SERV_ITER)
static SLB_Candidate * s_GetCandidate(void *user_data, size_t i)
static int s_LoadSingleService(const char *name, SERV_ITER iter)
static int s_LoadServices(SERV_ITER iter)
static void s_Reset(SERV_ITER)
const SSERV_VTable * SERV_LOCAL_Open(SERV_ITER iter, SSERV_Info **info)
static int s_AddService(const SSERV_Info *info, struct SLOCAL_Data *data)
static int s_Sort(const void *p1, const void *p2)
static SSERV_Info * s_GetNextInfo(SERV_ITER, HOST_INFO *)
unsigned int g_NCBI_ConnectRandomSeed
#define NCBI_CONNECT_SRAND_ADDEND
SSERV_Info * SERV_ReadInfoEx(const char *str, const char *name, int lazy)
const char * SERV_NameOfInfo(const SSERV_Info *info)
char * SERV_ServiceName(const char *service)
voidp calloc(uInt items, uInt size)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4