Question about lseek/fseek

2011-07-04 Thread Martin Möller
Hi Hackers, Why does these function allow seeking beyond the EOF of a file in O_RDONLY/²rb² mode ? How does these function then signal the EOF correctly ? Seeking beyond the EOF makes sense for me in write-mode but not in read-only mode ! With Regards, Martin

Question about lseek/fseek

2011-07-02 Thread Martin Möller
Hi Hackers, why does these function allow seeking beyond the EOF of a file in O_RDONLY/²rb² mode ? How does these function then signal the EOF correctly ? Seeking beyond the EOF makes sense for me in write-mode but not in read-only mode ! With Regards, Martin

Re: [LIBC] Modfied Version of sscanf

2011-05-02 Thread Martin Möller
Hello, Thanks for all the replies. We have so far discovered the following suggetions for the parsing Problem: Using: o a tokenizer/parser is too much overhead for such a simple task o strchr, memchr is too low-level and not elegant enough o strtok would not even parse (tokenize) this

Re: [LIBC] Modfied Version of sscanf

2011-05-01 Thread Martin Möller
ou do that with sscanf ? With regards, Martin > > On 01/05/2011, at 2:14, Martin Möller wrote: >> outputs total garbage on my FreeBSD-7.0-RELEASE #0 amd64. >> Is there already a way to do this or should we release a new version of >> sscanf, e.g. called sscanfWS. >>

[LIBC] Modfied Version of sscanf

2011-04-30 Thread Martin Möller
Hi to all, This is my first email to this list, so hello to all members. The current version of sscanf, stops when a whitespace characters occurs in a string when the Œ%s¹ (string) type is used. The following code: char name [20], value [20]; sscanf (³Test 2->Test 3², ³%s->%s², name, value) prin

Accessing SSH from a C program

2006-02-24 Thread Martin Möller
Hi all, I try to copy some files securely from one machine to another. What is the fastest and easiest way to accomplish this task? Can I access SSH routines in C (is there a library) or is it better just to call "scp" externally? Greetings, m. -- Martin Möller IM: 822