Skip to content
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

Remove the concept of segment in the interface #5

Closed
end2endzone opened this issue Nov 26, 2017 · 2 comments
Closed

Remove the concept of segment in the interface #5

end2endzone opened this issue Nov 26, 2017 · 2 comments

Comments

@end2endzone
Copy link
Owner

Try to get rid of segments. Segment may not be required.

Try to define data a single multi-line strings like the following:

const char * buffer = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus gravida ipsum, vel venenatis metus pellentesque eu. In cursus et arcu vitae tempor. Aenean eu arcu condimentum, fringilla felis eget, accumsan quam. Mauris ut vehicula nisi. Phasellus vulputate dictum leo sit amet suscipit. In hac habitasse platea dictumst. Donec a fringilla ipsum, eu molestie nisl. Vivamus faucibus, orci vel gravida condimentum, sapien urna venenatis augue, "
                      "non consectetur augue orci eget dolor.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tempus gravida ipsum, vel venenatis metus pellentesque eu. In cursus et arcu vitae tempor. Aenean eu arcu condimentum, fringilla felis eget, accumsan quam. Mauris ut vehicula nisi. Phasellus vulputate dictum leo sit amet suscipit. In hac habitasse platea dictumst. Donec a fringilla ipsum, eu molestie nisl. Vivamus faucibus, orci vel gravida cond"
                      "imentum, sapien urna venenatis augue, non consectetur augue orci eget dolor.";
@end2endzone
Copy link
Owner Author

This syntax is only valid for strings which are 65535 bytes or lower. If not, the following error is displayed:

fatal error C1091: compiler limit: string exceeds 65535 bytes in length

end2endzone added a commit that referenced this issue Jan 2, 2018
Modified the API to be simpler and more user friendly.
All string buffers are now moved to a preallocated std::string container.
@end2endzone
Copy link
Owner Author

Created a new command line --generator= which defines the looks of the generated file:

  • The segment generator is the default and generates a file which looks similar to bin2cpp v1.4 signature.
  • The string generator defines the input file as a single string and supports files up to 64Kb.
  • The array generator defines the input file as an array of bytes.

@end2endzone end2endzone changed the title Remove the concept of segment Remove the concept of segment in the interface Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant