Bernard Foche wrote:
Now why not have an alloca(3) in libc? Sure it is not the best way to
manage dynamic memory but vfprintf/scanf are typicall applications where it
is acceptable. And a functionning alloca() is always handy.
We *are* already having a working alloca. It's within gcc. Only
Russell Shaw wrote on Dienstag, 6. September 2005 04:45 :
- The INTERRUPT() macro has been deprecated, and it will be
removed in a future version. Use __attribute__((interrupt))
explicitly if this functionality is really needed.
Maybe instead of interrupt, you could use
As Bernard Fouche wrote:
Errm, you'd still need to supply a dummy implementation for malloc()
anyway when using the floating-point versions. ...
Now why not have an alloca(3) in libc? Sure it is not the best way
to manage dynamic memory but vfprintf/scanf are typicall
applications where it
Joerg Wunsch wrote:
As malloc() was `in' there (from fdevopen()) anyway, it came in handy.
Of course, if there's consensus among the users that this is not
needed, and an additional 40 bytes on the stack are no big deal for
the floating-point versions, we could easily drop that completely, and
Joerg Wunsch wrote:
As the malloc()-less API change is long overdue, I'd rather move that
in by the same time. We're going to have a new library minor version
number, so we are eligible for an API change anyway.
Great!
How about the following API:
#define __STDIO_FBUF_SIZE
As Joerg Wunsch wrote:
-in stdio.h:
#define STDIO_SETUP(stream,buf,put,get,flags) FILE stream={buf,\
0,\
flags,\
sizeof(buf),\
0,\
put,\
get}
That might basically
As Joerg Wunsch wrote:
-in stdio.h:
#define STDIO_SETUP(stream,buf,put,get,flags) FILE stream={buf,\
0,\
flags,\
sizeof(buf),\
0,\
put,\
get}
That might basically
Joerg Wunsch wrote:
. The get backend function can now return -2 to indicate an
end-of-file condition, in addition to -1 for an error condition.
This will affect the internal state that can be queried using
the standard feof() and ferror() functions.
The documentation says
Joerg Wunsch wrote:
As Joerg Wunsch wrote:
-in stdio.h:
#define STDIO_SETUP(stream,buf,put,get,flags) FILE stream={buf,\
0,\
flags,\
sizeof(buf),\
0,\
put,\
get}
That might