Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

No scanf tokenstream#460

Closed
mgeplf wants to merge 35 commits intomasterfrom
no-scanf-tokenstream
Closed

No scanf tokenstream#460
mgeplf wants to merge 35 commits intomasterfrom
no-scanf-tokenstream

Conversation

@mgeplf
Copy link
Copy Markdown
Contributor

@mgeplf mgeplf commented Jun 21, 2023

No description provided.

@mgeplf mgeplf force-pushed the no-scanf-tokenstream branch from ed331a4 to 20e8888 Compare June 22, 2023 13:04
@mgeplf mgeplf force-pushed the no-scanf-tokenstream branch from 20e8888 to e7a674a Compare June 22, 2023 13:14
@mgeplf mgeplf mentioned this pull request Jun 23, 2023
@mgeplf mgeplf requested a review from eleftherioszisis June 23, 2023 08:36
@mgeplf
Copy link
Copy Markdown
Contributor Author

mgeplf commented Jun 23, 2023

It passes all the tests, including the ones from NeuroM. Please let me know if it's understandable.

@mgeplf
Copy link
Copy Markdown
Contributor Author

mgeplf commented Jul 3, 2023

As of 081aeca this improves performance (parsing an SWC goes from 1.01ms to 0.817ms) and supports locales.

@mgeplf mgeplf force-pushed the no-scanf-tokenstream branch from 081aeca to 00b8bbb Compare July 4, 2023 10:54
/** Section self parent error message */
std::string ERROR_SELF_PARENT(const Sample& sample) const;

/** The end of the file was reached before parsing finshed */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
/** The end of the file was reached before parsing finshed */
/** The end of the file was reached before parsing finished */

Comment thread src/readers/utils.cpp
Comment on lines +4 to +6
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
#define freelocale _free_locale
#define strtol_l _strtol_l
Copy link
Copy Markdown
Contributor

@eleftherioszisis eleftherioszisis May 27, 2024

Choose a reason for hiding this comment

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

Maybe add a comment here concerning the freelocale?

Comment thread src/readers/utils.cpp
Comment on lines +25 to +31
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
: locale(_create_locale(LC_ALL, "C")) {
}
#else
: locale(newlocale(LC_NUMERIC_MASK, "POSIX", nullptr)) {
}
#endif
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here. It's not clear to me why these are configured this way.

@mgeplf mgeplf closed this Oct 11, 2024
@mgeplf mgeplf deleted the no-scanf-tokenstream branch October 11, 2024 09:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants