X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=controller.c;h=3ebf5a9e4c77a4bb313a32f4f074910c9be21d7e;hp=e169a5164dbeee9f7a9432cf2b3f7fd059caeab6;hb=ed2306a6f29bc4d85f5f248c83fff252b22c60a5;hpb=9d122fd5d66aa178547ec4222ab5f526f8a14cf7 diff --git a/controller.c b/controller.c index e169a51..3ebf5a9 100644 --- a/controller.c +++ b/controller.c @@ -94,7 +94,7 @@ SRD_API int srd_init(char *path) /* Environment variable overrides everything, for debugging. */ if ((env_path = getenv("SIGROKDECODE_DIR"))) { - if ((ret = add_modulepath(path)) != SRD_OK) { + if ((ret = add_modulepath(env_path)) != SRD_OK) { Py_Finalize(); return ret; } @@ -494,11 +494,11 @@ SRD_API int srd_inst_stack(struct srd_decoder_inst *di_from, } /** - * Finds a decoder instance by its instance id, but only in the bottom + * Finds a decoder instance by its instance ID, but only in the bottom * level of instances -- instances already stacked on top of another one * will not be found. * - * @param inst_id The instance id to be found. + * @param inst_id The instance ID to be found. * * @return Pointer to struct srd_decoder_inst, or NULL if not found. */ @@ -767,12 +767,12 @@ SRD_API int srd_session_feed(uint64_t start_samplenum, uint8_t *inbuf, * stack). * * @param output_type The output type this callback will receive. Only one - * callback per output type can be registered. + * callback per output type can be registered. * @param cb The function to call. - * @param user_data Unused. + * @param cb_data Unused. */ SRD_API int srd_register_callback(int output_type, - srd_pd_output_callback_t cb, void *user_data) + srd_pd_output_callback_t cb, void *cb_data) { struct srd_pd_callback *pd_cb; @@ -784,8 +784,8 @@ SRD_API int srd_register_callback(int output_type, } pd_cb->output_type = output_type; - pd_cb->callback = cb; - pd_cb->user_data = user_data; + pd_cb->cb = cb; + pd_cb->cb_data = cb_data; callbacks = g_slist_append(callbacks, pd_cb); return SRD_OK; @@ -801,7 +801,7 @@ SRD_PRIV void *srd_find_callback(int output_type) for (l = callbacks; l; l = l->next) { pd_cb = l->data; if (pd_cb->output_type == output_type) { - cb = pd_cb->callback; + cb = pd_cb->cb; break; } }