Argument-parsing helpers for C/Unix

前端 未结 7 2169
清酒与你
清酒与你 2020-11-28 04:53

I know of the following:

  • The venerable getopt(3)
  • The extended getopt_long
  • glibc\'s argp parser for Unix-style argum
7条回答
  •  猫巷女王i
    2020-11-28 05:30

    As the saying goes, "standard is better than better". So I always use getopt_long() and anything that is non-GNOME/glibby, and the glib one on anything that does.

    For the same reason I always use optparse in Python applications, even though it has a lot of missing features relative to getopt_long() ... but that's the Python standard.

提交回复
热议问题