86 INTS4 i_j,i_l,
l_status,l_chan,l_swap,l_buffer,l_histos,l_size;
99 strcpy(s_his_comm_cli.
c_histo,
"*");
100 strcpy(s_his_comm_cli.
c_access,pc_access);
101 strcpy(s_his_comm_cli.
c_base,pc_base);
109 if(l_swap) l_status =
f_swaplw((
INTS4 *)&s_his_comm_cli,5,NULL);
114 l_buffer = s_his_comm_cli.
lu_size;
118 l_buffer=l_buffer%16384;
119 for(i_j=0;i_j<i_l;i_j++){l_status =
f_stc_read (pl_l,16384,l_chan,-1);pl_l+=4096;}
120 if(l_buffer > 0) l_status =
f_stc_read (pl_l,l_buffer,l_chan,-1);
194 INTS4 i_j,i_l,
l_status,l_chan,l_swap,l_buffer,l_histos,l_size;
206 strcpy(s_his_comm_cli.
c_histo,pc_histo);
207 strcpy(s_his_comm_cli.
c_access,pc_access);
208 strcpy(s_his_comm_cli.
c_base,pc_base);
216 if(l_swap) l_status =
f_swaplw((
INTS4 *)&s_his_comm_cli,5,NULL);
224 pl_all = (
INTS4 *)malloc(l_size);
229 if(*pl_histos < l_histos) {l_status=
COMM__ERROR;
goto g_return;}
232 *pl_histos = l_histos;
233 l_buffer = s_his_comm_cli.
lu_size;
237 l_buffer=l_buffer%16384;
238 for(i_j=0;i_j<i_l;i_j++){l_status =
f_stc_read (pl_l,16384,l_chan,-1);pl_l+=4096;}
239 if(l_buffer > 0) l_status =
f_stc_read (pl_l,l_buffer,l_chan,-1);
243 for(i_j=0;i_j<s_his_comm_cli.
lu_histos;i_j++)
245 if(l_swap) l_status =
f_swaplw((
INTS4 *)ps_his_head,16,NULL);
316 INTS4 i_j,i_l,
l_status,l_chan,l_swap,l_buffer,l_histos,l_size;
317 INTS4 *pl_all,*pl_head,*pl_l;
328 strcpy(s_his_comm_cli.
c_histo,pc_histo);
329 strcpy(s_his_comm_cli.
c_access,pc_access);
330 strcpy(s_his_comm_cli.
c_base,pc_base);
338 if(l_swap) l_status =
f_swaplw((
INTS4 *)&s_his_comm_cli,5,NULL);
345 pl_all = (
INTS4 *)malloc(l_size);
350 if(*pl_size < l_size) {l_status=
COMM__ERROR;
goto g_return;}
357 *p_head = ps_his_head;
359 else ps_his_head = *p_head;
362 if(l_swap) l_status =
f_swaplw((
INTS4 *)ps_his_head,16,NULL);
370 l_buffer=l_buffer%16384;
371 for(i_j=0;i_j<i_l;i_j++){l_status =
f_stc_read (pl_l,16384,l_chan,-1);pl_l+=4096;}
372 if(l_buffer > 0) l_status =
f_stc_read (pl_l,l_buffer,l_chan,-1);
375 if(l_swap) l_status =
f_swaplw((
INTS4 *)pl_all,l_size/4,NULL);
434 printf(
"Error creating histogram server\n");
494 printf(
"Client connected with wrong password [%s]. \n",s_his_comm_serv.
c_access);
506 printf(
"Client connected for wrong base [%s]. \n",s_his_comm_serv.
c_base);
516 if(
l_gl_serv_verb == 1) {printf(
"%d: %d %d %d %d %d \"%s\" \"%s\" \"%s\"\n",l_status
526 strcpy(pc_histo,s_his_comm_serv.
c_histo);
578 pl_l=(
INTS4 *)ps_head;
579 l_buffer = s_his_comm_serv.
lu_size;
581 l_buffer=l_buffer%16384;
634 ps_his_head = ps_head;
635 for(ll=0;ll<l_histos;ll++)
638 if(strcmp(ps_his_head->
c_name,pc_histo) == 0)
654 l_buffer=l_buffer%16384;
665 if(
l_gl_serv_verb == 1) {printf(
"Histogram %s not found\n",pc_histo);}
708 printf(
"Exit histogram server\n");
INTS4 f_his_senddir(s_his_head *ps_head, INTS4 l_histos)
INTS4 f_stc_close(struct s_tcpcomm *ps_tcp)
s_his_comm s_his_comm_serv
INTS4 f_stc_read(void *p_buffer, INTS4 i_buflen, INTS4 i_channel, INTS4 i_timeout)
int f_swaplw(int *pp_source, int l_len, int *pp_dest)
INTS4 f_his_swpbas(s_head *ps_head)
INTS4 f_stc_write(void *p_buffer, INTS4 i_buflen, INTS4 i_channel)
INTS4 f_his_sendhis(s_his_head *ps_head, INTS4 l_histos, CHARS *pc_histo, INTS4 *pl_data)
INTS4 f_stc_acceptclient(struct s_tcpcomm *ps_server, INTS4 *pi_channel)
INTS4 f_his_getbas(CHARS *pc_server, INTS4 l_port, CHARS *pc_base, CHARS *pc_access, INTS4 **p_buffer)
INTS4 f_stc_discclient(INTS4 i_channel)
INTS4 f_stc_connectserver(CHARS *c_node, INTS4 l_port, INTS4 *pi_channel, struct s_tcpcomm *ps_client)
INTS4 f_his_wait(INTS4 *pl_action, CHARS *pc_histo)
INTS4 f_his_getdir(CHARS *pc_server, INTS4 l_port, CHARS *pc_base, CHARS *pc_access, CHARS *pc_histo, INTS4 **p_buffer, INTS4 *pl_histos)
static CHARS c_gl_serv_access[64]
struct s_tcpcomm * ps_tcpserv
static INTS4 l_gl_serv_verb
INTS4 f_ut_compr_unpack(INTU1 *pc_input, INTU1 *pc_output, INTS4 l_outlen)
static INTS4 l_gl_serv_chan
void f_his_toupper(CHARS *c, INTS4 i)
INTS4 f_stc_createserver(INTS4 *pl_port, struct s_tcpcomm *ps_server)
INTS4 f_his_gethis(CHARS *pc_server, INTS4 l_port, CHARS *pc_base, CHARS *pc_access, CHARS *pc_histo, s_his_head **p_head, INTS4 **p_buffer, INTS4 *pl_size)
static CHARS c_gl_serv_base[32]
static INTS4 l_gl_serv_port
INTS4 f_his_server(CHARS *pc_base, CHARS *pc_access, INTS4 *pl_port)