Giter Club home page Giter Club logo

Comments (4)

surreylabs avatar surreylabs commented on May 29, 2024

Hi @micolous, the original idea of developing argtable3 is to replace getopt.c, so I never think about this conflict situation. May I know in what use cases we need to have both getopt.c and argtable3.c at the same time?

The reason to include getopt.c in argtable3.c is to make argtable3 an amalgamation library like SQLite, because it can make using the library so much easier. By including getopt.c inside argtable3.c, we can make sure the library has no external dependencies.

Thank you for reminding me the README attribution acknowledgement issue. I'll fix this.

from argtable3.

surreylabs avatar surreylabs commented on May 29, 2024

Have added the copyright notice from NetBSD getopt library to README.md and LICENSE.

from argtable3.

micolous avatar micolous commented on May 29, 2024

What prompted this is that proxmark3 has, over the years, collected a number of different standalone-programs which have been compiled into the main binary, but they each can include things like getopt. Additionally, any program which migrates to argparse3 will have to replace getopt immediately with argparse's version.

There are a few different implementations of getopt around, and they're not all compatible.

I acknowledge what you're trying to achieve, however sqlite3 does the source amalgamation by Makefile.

You'll also see this sort of thing in Javascript projects like jQuery and Leaflet, where they have a build step to generate the single source file (and then cut releases of that file). A couple of other projects also include these single source files in the git repository directly, and periodically rebuild them with a CI system which allows use as a git submodule.

This way, it's easier to track when there are changes introduced to getopt.c, and you can handle the case where you already use getopt somewhere else more cleanly, as you don't have to pull apart argparse3's getopt.h.

It also makes license tracking much easier, which keeps corporate lawyercats happy. 🐱

While having the acknowledgement in there now is a great step, I don't think it sufficiently addresses the other issues above.

from argtable3.

surreylabs avatar surreylabs commented on May 29, 2024

@micolous , I think you're right. There should be two versions of argtable3, one is composed of several files (including getopt), and the other is the amalgamation version, which is generated from the Makefile.

I do make the amalgamation version from an internal Makefile, however, I never publish it. I'll cleanup the code and re-arrange the source code directory structure, so that projects like proxmark3 can use argtable3 in their own way.

from argtable3.

Related Issues (20)

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.