diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2011-01-15 03:07:00 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2011-01-15 03:07:00 +0100 |
commit | 5b05904dc5dd1182fdf381b66fbc4a7ad97e37aa (patch) | |
tree | 90df7abb781ac91e5907ddda3d344365ca3f5a35 /decode.c | |
parent | 276b55eb6e4308cfaf6b18b457f514b2f9409cc5 (diff) | |
download | libsigrokdecode-5b05904dc5dd1182fdf381b66fbc4a7ad97e37aa.tar.gz libsigrokdecode-5b05904dc5dd1182fdf381b66fbc4a7ad97e37aa.zip |
Don't print .py suffix in protocol decoder names.
Diffstat (limited to 'decode.c')
-rw-r--r-- | decode.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -62,7 +62,8 @@ int sigrokdecode_init(void) while ((dp = readdir(dir)) != NULL) { if (!g_str_has_suffix(dp->d_name, ".py")) continue; - if ((tmp = strdup(dp->d_name))) + /* For now use the filename (without .py) as decoder name. */ + if ((tmp = g_strndup(dp->d_name, strlen(dp->d_name) - 3))) list_pds = g_slist_append(list_pds, tmp); } closedir(dir); |