2
0
forked from Ivasoft/DSView

v0.4 release

This commit is contained in:
DreamSourceLab
2014-09-24 18:43:42 +08:00
parent 5d7e3237b7
commit 9eb36b33b9
170 changed files with 10539 additions and 4321 deletions

View File

@@ -52,7 +52,7 @@ static int format_match(const char *filename)
static int init(struct sr_input *in, const char *filename)
{
struct sr_probe *probe;
struct sr_channel *probe;
int num_probes, i;
char name[SR_MAX_PROBENAME_LEN + 1];
char *param;
@@ -90,9 +90,9 @@ static int init(struct sr_input *in, const char *filename)
for (i = 0; i < num_probes; i++) {
snprintf(name, SR_MAX_PROBENAME_LEN, "%d", i);
/* TODO: Check return value. */
if (!(probe = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, name)))
if (!(probe = sr_channel_new(i, SR_CHANNEL_LOGIC, TRUE, name)))
return SR_ERR;
in->sdi->probes = g_slist_append(in->sdi->probes, probe);
in->sdi->channels = g_slist_append(in->sdi->channels, probe);
}
return SR_OK;
@@ -113,7 +113,7 @@ static int loadfile(struct sr_input *in, const char *filename)
if ((fd = open(filename, O_RDONLY)) == -1)
return SR_ERR;
num_probes = g_slist_length(in->sdi->probes);
num_probes = g_slist_length(in->sdi->channels);
/* Send header packet to the session bus. */
std_session_send_df_header(in->sdi, LOG_PREFIX);