Comments (6)
Please fix the problem and submit a pull request.
from simtools.
I think I misdiagnosed this. The file I was using had strange line-endings using only CR instead of CR+LF or LF. I didn't notice before because the editor I was using displayed it normally, but it was apparent when I opened the file in vi, and when I converted all the CR chars to LF, it assembled correctly.
I was looking at what it would take to recognize only CR as a valid line ending, and I'm a little unsure of what all I would need to change. I think '\r' needs to be added to the ISEND macro on line 175, but I think that might break other parts of the code like line 1906, which handles CR+LF endings, and possibly other places that look for '\r' or '\n'.
from simtools.
Well, surely the original file didn't actually have bare CR line endings. They were probably introduced when that file was once used on a very old Mac environment.
If you really wanted to produce an error/warning about this case, where files are opened, you could read a line with fgets and look for an LF. If none was found you could emit a warning about this file and in either case rewind the file and continue. The first message emitted would provide insight to the user about his problem.
from simtools.
¯\_(ツ)_/¯
I downloaded the files again directly from http://bitsavers.trailing-edge.com/bits/DEC/pdp1/from_peter_samson/ just to be sure, and all the .mac files in that directory are that way. I will see about adding a warning when I get a chance.
from simtools.
Pull request created.
from simtools.
Closing this since the initial report was misleading and the discussion on line endings has moved to the pull request.
from simtools.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simtools.