Vincent Danjean <[email protected]> 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

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to