Keil Logo Arm Logo

Discussion Forum

vsscanf not in stdio.h

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Michel Ketelaars
Posted
20-May-2005 14:44 GMT
Toolset
C166
New! vsscanf not in stdio.h
My stdio.h library from keil do not have a function vsscanf which normally works the same way as sscanf but uses a pointer to an argument list instead of a additional argument list.

Does anybody know a smart or easy way to create an vsscanf function. Or maybe there is a newer version of the stdio.h library which includes this function.

I am now using stdio.h version 5. (At least that is writen in the header.)
Read-Only
Author
Mike Kleshov
Posted
21-May-2005 11:59 GMT
Toolset
C166
New! RE: vsscanf not in stdio.h
Does anybody know a smart or easy way to create an vsscanf function

I can think of a way to create a vsscanf function out of sscanf:
1) Figure out how the C166 compiler passes argumets to a function accepting varying number of arguments, like scanf. I imagine it pushes arguments onto the user stack in addition to using GPRs for parameter passing.
2) Write a vsscanf wrapper function in assembly language that would accept a pointer to the argument list and push them onto the user stack in the appropriate order before calling sscanf.

Regards,
- mike
Read-Only
Author
Michel Ketelaars
Posted
23-May-2005 08:36 GMT
Toolset
C166
New! RE: vsscanf not in stdio.h
I think the way you discribe is the way to do it. Thank you for your reaction.

Regards,
Michel

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.