Giter Club home page Giter Club logo

archived-wfdb-plus's People

Contributors

cx1111 avatar gbmoody avatar

Stargazers

 avatar

Watchers

 avatar  avatar

archived-wfdb-plus's Issues

OS/Platform Support

There appears to be various levels of support for several older/more obscure OSs/platforms, such as FreeBSD, and 16 bit MS Windows, MacOS < 10. It's also not clear which platforms and compilation methods we officially support. eg. See this comment about workarounds that are implemented and yet should be avoided.

While remaking this library, I'm not going to try to maintain the existing support. I simply do not have the ability nor the time to account for and test all these systems. This means that I'll be removing a lot of OS specific functions, variables, and macros.

Instead, we can take this approach as discussed:

  • Aim to write platform independent code that conforms to the standard C++ distribution standards. eg. pay attention to:
    • Sizes of primitive data structures
  • Support 64 bit Linux
  • Add support for other major OS/Platforms one at a time. eg. Windows 32/64 bit, MacOS > 10, etc. Leverage CMake for multi-platform builds.

Replace memory allocation macros

My first C++ conversion target is wfdbio.c with wfdb.h and wfdblib.h. Trying to compile this with C++ settings results in several errors from the memory allocation macros, such as: a value of type "void *" cannot be assigned to an entity of type "char *" when calling SALLOC.

List of said macros: https://github.com/bemoody/wfdb/blob/master/doc/wpg-src/wpg0.tex#L4693

We should try to replace them with standard C++ API calls where possible. This may also include replacing char* with std::string where required. I haven't looked into all of the macros, why they are/were needed, or potential solutions, so feel free to discuss all of that in this issue.

Strategy to break down this work:

  1. Identify and document the replacement strategy for each macro
  2. Remove macros and replace usage in lib directory
  3. Replace usage in other directories

Checklist:

  • SFREE:: Safely release allocated memory.
  • SUALLOC:: Safely allocate memory using a new pointer.
  • SALLOC:: Safely allocate memory, reusing a pointer.
  • SREALLOC:: Safely expand a chunk of allocated memory.
  • SSTRCPY:: Safely copy a string into a new buffer.

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.