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

Possible unexpanded macro #26

Open
damib opened this issue Dec 29, 2018 · 4 comments
Open

Possible unexpanded macro #26

damib opened this issue Dec 29, 2018 · 4 comments

Comments

@damib
Copy link

damib commented Dec 29, 2018

/* No, we didn't. One more read will certainly accumulate a value string of length BUF_SIZE */

The code is going to concatenate two buffers after macro expansion, so a macro falling between the two buffers will not be expanded.

@ralphlange
Copy link
Member

ralphlange commented Dec 29, 2018

Isn't this about restoring an autosave file, i.e. a file that has been written using actual data from the database before? How is this related to macro expansion?

@damib
Copy link
Author

damib commented Dec 30, 2018

Hi Ralph, you are right, nevertheless the code is currently expanding macro on those buffers (look at line 958), I don't know if this was on purpose or not, may be the macro substitution on the value string.

@timmmooney
Copy link
Contributor

Yeah, this is a bug, alright. It does intend to expand a macro that could begin on one buffer and end in the next buffer. It should expand after concatenating. (It's unusual for autosave to restore a file that contains unexpanded macros. This happens only if the file was edited by hand, which I do for some files used by configMenu to hold softGlue circuits. It's handy if people can load an example circuit without having to edit the .cfg file so it has their IOC prefix.)

@mark0n
Copy link
Contributor

mark0n commented Jan 2, 2019

Hmm, I'm wondering if it's really necessary to do macro expansion in autosave. Shouldn't it be the user's responsibility to expand macros if he chooses to put them in manually (e.g. using msi)?

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

No branches or pull requests

4 participants