From: Sven G. <li...@fu...> - 2011-10-18 19:13:08
|
Vincent Danjean <vda...@fr...> wrote: > Yesterday, I repacked the source tarball without the DLL and I > reuploaded the package. It has been accepted today: > http://packages.qa.debian.org/o/owfs.html I just tried to use it and I've got a question :) When trying to compile my own code using owcapi everything works fine but I get tons of debug messages on stdout and stderr. Did you forget to disable a debug switch somewhere? Here is some sample code to illustrate the problem. Compile with "gcc -lowcapi foo.c": --cut-- #include <stdio.h> #include <stdlib.h> #include <string.h> #include <owcapi.h> int main() { char *s,*tok; size_t slen; OW_init("-u"); OW_get("/",&s,&slen); tok=strtok(s,","); while (tok != NULL) { if (tok[2] == '.') { printf("%s\n",tok); } tok=strtok(NULL,","); } } --cut-- This should print the ID of all devices on the bus, but it does a lot more. Sven -- "We don't know the OS that God uses, but the Vatican uses Linux" (Sister Judith Zoebelein, Vatican Webmaster) /me is giggls@ircnet, http://sven.gegg.us/ on the Web |