-
Notifications
You must be signed in to change notification settings - Fork 3
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
Pass header & events as null-terminated strings #6
Comments
As I stated in my comments on #5, I don't have a problem with adding an alternative api function that lets the user provide events as a string. But I also don't see a good reason to get rid of the current api function. edit: in concert with #7, the current |
The functions with characters counting could just end with _str and call their variable length equivalents with the length parameter calculated by strlen on data - that simple. Though i would prefer they replace the old (->their names) which get _n appended, following the usual C style. |
I don't see a good reason to start appending things on the end of function names, usual C style or not. I'd like to avoid using for example, something like: int assi_addEventsFromString( const char *eventString );
// Following two functions are interchangeable. If `eventLength == 0`, use
// `strlen` to determine length.
int assi_pushEvent( const char *event );
int assi_pushEventWithLength( const char *event, const unsigned int eventLength ); |
ASS is a text format, there will be no null character in header or event, so outsourcing character counting is just pushing work to users.
The text was updated successfully, but these errors were encountered: