projects
/
libsigrokdecode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
276b55e
)
Don't print .py suffix in protocol decoder names.
author
Uwe Hermann
<uwe@hermann-uwe.de>
Sat, 15 Jan 2011 02:07:00 +0000
(
03:07
+0100)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Sat, 15 Jan 2011 02:07:00 +0000
(
03:07
+0100)
decode.c
patch
|
blob
|
history
diff --git
a/decode.c
b/decode.c
index 598b2ba50be0c81299340bbe089ffdcd7a283009..3a1f63da64147f47b2f86e81b8edf4889e12e9a5 100644
(file)
--- a/
decode.c
+++ b/
decode.c
@@
-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);