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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream-based text line reader #54

Merged
merged 25 commits into from
Apr 1, 2014
Merged

Stream-based text line reader #54

merged 25 commits into from
Apr 1, 2014

Conversation

sshirokov
Copy link
Owner

This PR replaces the file descriptor based reader with the line reader from https://github.com/sshirokov/cgc/

The new reader uses FILE*/fgets instead of file a hand-rolled buffer to read text lines from disk in the text STL case.

To Do

  • Fix downcase
  • Fix trim
  • Test the line reader
  • Handle blank lines in STL files without catching 馃敟 and 馃拃

sshirokov added a commit that referenced this pull request Apr 1, 2014
Stream-based text line reader
@sshirokov sshirokov merged commit 7c80edb into master Apr 1, 2014
@sshirokov sshirokov deleted the line-reader branch April 1, 2014 00:38
obj->facets = calloc(facets->size, sizeof(stl_facet));
check_mem(obj->facets);

stl_facet *facet = NULL;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe movefacet to the for loop setup?

for(int i = 0, stl_facet *facet = NULL; kl_shift(stl_facet, facets, &facet) != -1; i++) {

Or does that offend you?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it adds anything other than chars in a line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants