-
-
Notifications
You must be signed in to change notification settings - Fork 63
fixed return values for ti_(Rewind/Tell/GetSize) and fixed ftell #635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
59fcda2
to
fea6317
Compare
97efe58
to
fea6317
Compare
as pointed out by calc84maniac, |
Fixed a bug in |
Not a bug. Don't do this. |
We would only test Under the C calling convention, If we have |
No. I don't freaking care what the complier does, the libraries are not "tied to the compiler". There are countless programs out there that use ICE, old ZDS complier code, etc that are not the current compiler that you just so happen to define. We are not breaking backwards compatibility for a frivolous check. |
gotcha, will undo then |
should we change the prototype to |
Sure that seems fine |
03a2766
to
227f443
Compare
The prototype has now been changed: int ti_SetArchiveStatus(bool archive, uint8_t handle);
int ti_SetArchiveStatus(uint8_t archive, uint8_t handle); However, this means that #define ti_SetArchiveStatus(archive, handle) \
ti_SetArchiveStatus((bool)(archive), (handle)) I also duplicated the documentation for |
ti_AllocString and ti_AllocEqu didn't check if the allocation routine returned NULL, which has now been fixed. |
Fixes the issues outlined in #634
int ti_Rewind
returns-1
orEOF
on failure.ti_Tell
andti_GetSize
return(uint16_t)-1
or65535
on failure, which is larger thanOS_VAR_MAX_SIZE
or65512
.ftell
callsti_Tell
, so I made sure that it will return-1L
when an error occurs.