[Getdata-commits] SF.net SVN: getdata:[927] trunk/defile
Scientific Database Format
Brought to you by:
ketiltrout
|
From: <ket...@us...> - 2014-10-11 04:38:50
|
Revision: 927
http://sourceforge.net/p/getdata/code/927
Author: ketiltrout
Date: 2014-10-11 04:38:47 +0000 (Sat, 11 Oct 2014)
Log Message:
-----------
Fix offset handling in Rate display.
Modified Paths:
--------------
trunk/defile/bin/net.c
trunk/defile/input/ascii.c
trunk/defile/lib/libdefile.c
Modified: trunk/defile/bin/net.c
===================================================================
--- trunk/defile/bin/net.c 2014-10-01 00:19:16 UTC (rev 926)
+++ trunk/defile/bin/net.c 2014-10-11 04:38:47 UTC (rev 927)
@@ -792,7 +792,7 @@
}
framepos = 0;
case 6:
- DF_GET_DATA(2, p_uint16[1], p_uint32[1]);
+ DF_GET_DATA(1, p_uint16[1], p_uint32[1]);
case 7:
df_dprintf(DF_PRN_DEBUG_I, "RPC: df_add_lut(\"%s\", %u, 0x%X, "
"<xdata>, 0x%X, <ydata>)\n", string[0], p_uint32[0], p_uint16[0],
Modified: trunk/defile/input/ascii.c
===================================================================
--- trunk/defile/input/ascii.c 2014-10-01 00:19:16 UTC (rev 926)
+++ trunk/defile/input/ascii.c 2014-10-11 04:38:47 UTC (rev 927)
@@ -1194,7 +1194,7 @@
}
/* record PIDs */
- ascii_conf.filt_pid = (pid_t*)malloc(sizeof(pid_t) * ascii_conf.n_filt);
+ ascii_conf.filt_pid = malloc(sizeof(pid_t) * ascii_conf.n_filt);
if (ascii_conf.filt_pid == NULL) {
df_printf(DF_PRN_ERR, "out of memory\n");
return 1;
@@ -1588,7 +1588,7 @@
/* create the framedef */
fd.n_fields = nraw;
fd.framesize = nraw * sizeof(double);
- fd.field = (struct df_fdef_field*)malloc(sizeof(struct df_fdef_field) * nraw);
+ fd.field = malloc(sizeof(struct df_fdef_field) * nraw);
if (fd.field == NULL) {
df_puts(DF_PRN_ERR, "out of memory\n");
df_exit(1, 1);
Modified: trunk/defile/lib/libdefile.c
===================================================================
--- trunk/defile/lib/libdefile.c 2014-10-01 00:19:16 UTC (rev 926)
+++ trunk/defile/lib/libdefile.c 2014-10-11 04:38:47 UTC (rev 927)
@@ -1229,7 +1229,9 @@
/* handle a starting offset */
pthread_mutex_lock(&df_config_mx);
- offset = (df->input_offset > df->offset) ? df->input_offset : df->offset;
+ if (df->input_offset > df->offset)
+ df->offset = df->input_offset;
+ offset = df->offset;
pthread_mutex_unlock(&df_config_mx);
/* output frameoffset */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|