From: Uwe Hermann Date: Thu, 27 Jan 2011 23:11:00 +0000 (+0100) Subject: libsigrokdecode: Always load all decoders upon init. X-Git-Tag: libsigrokdecode-0.1.0~296 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=53bec0cfaef9ce8c646deee7d9ba6340137713a1;hp=53bec0cfaef9ce8c646deee7d9ba6340137713a1 libsigrokdecode: Always load all decoders upon init. Let sigrokdecode_init() always load all decoders it can find in the decoders directory, i.e., the user doesn't need to manually load decoders. Instead he can just look up the list via sigrokdecode_list_decoders() after sigrokdecode_init() has run. This is not a problem, as sigrokdecode_init() is only run once per sigrok-cli or sigrok-gui invocation, and even with many decoders this should not take too long. The list of decoders within libsigrokdecode is no longer a string, but rather a list of 'struct sigrokdecode_decoder *' pointers. Add sigrokdecode_get_decoder_by_id() API function which returns the decoder with the specified ID (file name without ".py" suffix, for now), or NULL if it cannot be found. sigrokdecode_load_decoder() is now a private function and not exported via the lib, i.e. not available to users of libsigrokdecode. ---