Commit Graph

16 Commits

Author SHA1 Message Date
Uwe Hermann 054e670906 sr: out: Use uint8_t (not char) for buffers. 2012-03-31 11:33:43 +02:00
Bert Vermeulen c73d2ea421 sr: adjust copyright year 2012-02-13 14:31:51 +01:00
Uwe Hermann 1a081ca67d sr: Mark API functions with SR_API/SR_PRIV.
Use SR_API to mark public API symbols, and SR_PRIV for private symbols.

Variables and functions marked 'static' are private already and don't
need SR_PRIV. However, functions which are not static (because they need
to be used in other libsigrok-internal files) but are also not meant to
be part of the public libsigrok API, must use SR_PRIV.

This uses the 'visibility' feature of gcc (requires gcc >= 4.0).

Details: http://gcc.gnu.org/wiki/Visibility
2012-02-02 00:03:17 +01:00
Bert Vermeulen af1c793dfe clean up some dead code 2012-01-15 23:25:58 +01:00
Uwe Hermann b7f09cf86d libsigrok: Fix #includes.
In the lib, we should only #include "sigrok.h" or "sigrok-internal.h",
but not the (possibly installed and thus different/older versions) via
<sigrok.h> or <sigrok-internal.h>.

Frontends should of course use <sigrok.h> and <sigrok-internal.h>.
2011-12-28 23:07:08 +01:00
Uwe Hermann 7a6ec0c376 sr_filter_probes(): Check for too many probes.
Return SR_ERR_ARG if the number of enabled probes is higher than the
requested unit size supports.
2011-12-26 21:26:01 +01:00
Uwe Hermann 488a13b110 Improve sr_filter_probes error handling and docs.
- Much more elaborate doxygen comments for the function and its
   parameters, allowed input values, and so on.

 - Make 'probelist' const, the function doesn't modify it.

 - Check for invalid inputs such as NULL pointers.

 - Use g_try_malloc() and g_free() for the output buffer. Document who
   is expected to g_free() the buffer.
2011-12-22 14:16:07 +01:00
Bert Vermeulen 60eb1eb582 fix parameter type 2011-06-19 00:55:36 +02:00
Uwe Hermann 25b4fb8557 Add doxygen comment to sr_filter_probes(). 2011-03-03 20:24:25 +01:00
Uwe Hermann c25d2039de Add sr_ prefix to filter_probes(). 2011-02-20 21:16:23 +01:00
Uwe Hermann 8225e92175 Constify a few more 'char *' parameters. 2011-02-20 21:16:23 +01:00
Uwe Hermann e46b8fb154 Change SIGROK_ prefix to SR_. 2011-01-30 18:32:53 +01:00
Uwe Hermann fdebec2108 filter.c: Error handling, code simplification. 2010-05-09 22:06:30 +02:00
Uwe Hermann 62c8202582 libsigrok: More coding style fixes. 2010-04-15 20:16:53 +02:00
Uwe Hermann afc8e4deb6 Fix all warnings and re-enable -Wextra. 2010-04-09 22:18:46 +02:00
Uwe Hermann a1bb33afbd Start of code base layout restructuring. 2010-04-02 20:27:54 +02:00