diff --git a/sinqhm/sinqhm_client.c b/sinqhm/sinqhm_client.c index f1c36f6a..2110b1aa 100755 --- a/sinqhm/sinqhm_client.c +++ b/sinqhm/sinqhm_client.c @@ -1,4 +1,4 @@ -#define IDENT "1C05" +#define IDENT "1C06" /*---------------------------------------------------------------------------*/ #ifdef __DECC #pragma module SinqHM_Client IDENT @@ -373,7 +373,7 @@ if (Rw_skt == 0) { Rw_skt = openConnectionGbl (Rmt_host, &Rmt_port, &Pkt_size, dbg_mode, &Rply_buff, Verbose); - if (Rw_skt == 0) FailInet ("\ndo_project/openConnectionGbl error."); + if (Rw_skt == 0) FailInet ("\ndo_load/openConnectionGbl error."); } split_args (args, &p_p1, NULL); @@ -483,7 +483,11 @@ */ int i; char total_txt[21]; +#ifdef LINUX char dev[] = "/XSERV"; +#else + char dev[] = "/XW"; +#endif char xlab[] = "Bins"; char ylab[] = "Counts"; float xlo, xhi, yhi; @@ -575,7 +579,7 @@ ** Number of bins ** Axis ('X' = x-axis, 'Y' = y-axis) ** x-dim -** Default is to project everything. +** Default is to project everything onto x-axis */ char *p_p1, *p_p2, *p_p3, *p_p4, *p_p5, *p_p6, *p_p7; int i, status, axis; @@ -1205,7 +1209,11 @@ int nx = 1; int ny = 1; char total_txt[21]; +#ifdef LINUX + char dev[] = "/XSERV"; +#else char dev[] = "/XW"; +#endif char xlab[] = "Bins"; char ylab[] = "Counts"; float xlo, xhi, yhi, bias; @@ -2719,7 +2727,7 @@ Req_buff.u.write.first_bin = htonl (f_bin); Req_buff.u.write.bytes_per_bin = htonl (bpb); status = send (Rw_skt, (char *) &Req_buff, sizeof (Req_buff), 0); - if (status == -1) FailInet ("SinqHM_Client -- R/W-Socket send error\n"); + if (status == -1) FailInet ("write_hm -- R/W-Socket send error\n"); if (status != sizeof (Req_buff)) { printf ("SinqHM_Client -- wrong number of bytes sent: %d", status); exit (EXIT_FAILURE); @@ -2733,7 +2741,7 @@ i = (bytes_to_go > Pkt_size) ? Pkt_size : bytes_to_go; status = send (Rw_skt, (char *) p_byte, i, 0); if (status <= 0) { - FailInet ("SinqHM_Client -- R/W-Socket send error\n"); + FailInet ("write_hm -- R/W-Socket send error\n"); exit (EXIT_FAILURE); } bytes_to_go -= status; @@ -2744,7 +2752,7 @@ */ status = recv (Rw_skt, (char *) &Rply_buff, sizeof (Rply_buff), 0); if (status == -1) { - FailInet ("SinqHM_Client -- R/W-Socket recv error\n"); + FailInet ("write_hm -- R/W-Socket recv error\n"); exit (EXIT_FAILURE); }else if (status != sizeof (Rply_buff)) { printf ("SinqHM_Client -- Cnct-Socket recv error - "); @@ -2977,7 +2985,7 @@ Req_buff.cmnd = htonl (SQHM_DAQ); Req_buff.u.daq.sub_cmnd = htonl (DAQ__STOP); status = send (Rw_skt, (char *) &Req_buff, sizeof (Req_buff), 0); - if (status == -1) FailInet ("SinqHM_Client -- R/W-Socket send error\n"); + if (status == -1) FailInet ("\nmain/send -- R/W-Socket send error\n"); if (status != sizeof (Req_buff)) { printf ("\n" "SinqHM_Client -- wrong number of bytes sent: %d", status); @@ -2988,7 +2996,7 @@ */ status = recv (Rw_skt, (char *) &Rply_buff, sizeof (Rply_buff), 0); if (status == -1) { - FailInet ("\nSinqHM_Client -- R/W-Socket recv error\n"); + FailInet ("\nmain/recv -- R/W-Socket recv error\n"); exit (EXIT_FAILURE); }else if (status != sizeof (Rply_buff)) { printf ("\n" @@ -3051,7 +3059,7 @@ Req_buff.u.zero.first_bin = htonl (f_bin); Req_buff.u.zero.n_bins = htonl (n_bins); status = send (Rw_skt, (char *) &Req_buff, sizeof (Req_buff), 0); - if (status == -1) FailInet ("SinqHM_Client -- R/W-Socket send error\n"); + if (status == -1) FailInet ("\nmain/send -- R/W-Socket send error\n"); if (status != sizeof (Req_buff)) { printf ("SinqHM_Client -- wrong number of bytes sent: %d", status); exit (EXIT_FAILURE); @@ -3061,7 +3069,7 @@ */ status = recv (Rw_skt, (char *) &Rply_buff, sizeof (Rply_buff), 0); if (status == -1) { - FailInet ("SinqHM_Client -- R/W-Socket recv error\n"); + FailInet ("\nmain/recv -- R/W-Socket recv error\n"); exit (EXIT_FAILURE); }else if (status != sizeof (Rply_buff)) { printf ("SinqHM_Client -- Cnct-Socket recv error - ");