ironing out the bugs in my kernel--need make few functions-dont know how they work
ok i have my kernel booting loading and printing on screen
now i need to make fscanf, sscanf and sprintf does anybody know how they work |
They use varargs.
There's a pretty famous example. In fact, you might even be able to google the following phrase Quote:
|
Quote:
|
|
LHOL
now i have another problem with the code vsprintf.c needs strnlen but i dont even know what it does much less have it in the kernel |
Quote:
Code:
$ man strnlen |
it doesnt work
i worked it into the kernel and it just freezes at the sprintf call then i tried it out of the kernel still didnt work quite right |
here i will post my code:
Code:
#include <string.h> |
printf and all the things it calls directly or indirectly adds up to a lot of library routines.
From your other threads, I got the idea you were linking without standard libraries. Where are all those library functions coming from? If you let the (Turbo C) library functions into your link, it will be quite a bit of effort to catch and correct all the things that depend on DOS. If you don't, then the likely bugs are in the replacements you've coded for those library routines. Either way, posting your top level code is nearly useless. Also, where did you get vsprintf.c? Is it a copy compatible with your 16 bit environment? Including a .c file in another .c file sometimes causes problems. I think you said you were using .cpp. Including a .c file in a .cpp is even more likely to cause problems. |
i ended up writing my own
still need to figure out the *scanf() functions |
All times are GMT -5. The time now is 04:48 PM. |