Coder Social home page Coder Social logo

Comments (6)

markpizz avatar markpizz commented on August 10, 2024

Please fix the problem and submit a pull request.

from simtools.

jblang avatar jblang commented on August 10, 2024

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.

markpizz avatar markpizz commented on August 10, 2024

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.

jblang avatar jblang commented on August 10, 2024

¯\_(ツ)_/¯ 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.

jblang avatar jblang commented on August 10, 2024

Pull request created.

from simtools.

jblang avatar jblang commented on August 10, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.