HELP on compiling BASIC C Source Code
|
05-05-2014, 07:42 PM
Post: #9
|
|||
|
|||
RE: HELP on compiling BASIC C Source Code
(05-03-2014 07:26 PM)Alvaro Wrote: Hi,unistd.h declares a bunch of unix functions. assert.h declares the assert() function. What really matters are the implicitly declared functions that follow. You might want to google "<function> man page" to get a description of what each function does. Then you can reimplement, replace it or ignore it as you see fit. Quote:main.c: In function '_destroy_code':the assert() function is used to assert something that is always true. if the argument to assert() is false then it aborts the program. You can probably reimplement this. Quote:main.c: In function '_load_file':ftell() returns the current position within an open file. You can use the return value as an argument to fseek() to go back to that place in the file. Quote:main.c: In function '_clear_screen':system() takes a string and more-or-less execute the string as though it had been typed on the keyboard. Since this is inside _clear_screen(), I suspect that you can just reimplement clear_screen() using the hpgcc graphics functions. Quote:main.c: In function '_list_program':These can probably be ignored. Check the type of the argument to atoi(). It is supposed to be a char*. Quote:main.c: In function '_kill_program':unlink() removes a file. Quote:main.c: In function '_do_line':strcasecmp() compares two strings without regard to upper/lower case. I'm surprised that this isn't in the hpgcc libs already. Maybe you just need to find the right header file to include to get this. Hope this helps, Dave |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)