{"id":938,"date":"2016-08-16T14:06:14","date_gmt":"2016-08-16T14:06:14","guid":{"rendered":"http:\/\/ninecrows.com\/career\/?p=938"},"modified":"2016-08-16T14:06:14","modified_gmt":"2016-08-16T14:06:14","slug":"time-to-play-with-c-getopt_long","status":"publish","type":"post","link":"https:\/\/ninecrows.com\/career\/2016\/08\/16\/time-to-play-with-c-getopt_long\/","title":{"rendered":"Time to play with C getopt_long"},"content":{"rendered":"<p>It has been some time since I&#8217;ve had reason to write command line posix code. I spent a bit of time re-familiarizing myself with the <a href=\"https:\/\/www.gnu.org\/software\/libc\/manual\/html_node\/Getopt.html#Getopt\">getopt <\/a>family of functions. The <a href=\"https:\/\/www.gnu.org\/software\/libc\/manual\/html_node\/Getopt-Long-Options.html\">getopt_long<\/a> function seems pretty serviceable&#8230;could do better with a C++ wrapper, but then I&#8217;d have to roll my own (or roll a non-trivial wrapper). At this point I think getopt will do the job I need&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It has been some time since I&#8217;ve had reason to write command line posix code. I spent a bit of time re-familiarizing myself with the getopt family of functions. The getopt_long function seems pretty serviceable&#8230;could do better with a C++ wrapper, but then I&#8217;d have to roll my own (or roll a non-trivial wrapper). At &hellip; <a href=\"https:\/\/ninecrows.com\/career\/2016\/08\/16\/time-to-play-with-c-getopt_long\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Time to play with C getopt_long<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Time to play with C getopt_long","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-938","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7F2Qc-f8","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/938"}],"collection":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/comments?post=938"}],"version-history":[{"count":2,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/938\/revisions"}],"predecessor-version":[{"id":1084,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/938\/revisions\/1084"}],"wp:attachment":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/media?parent=938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/categories?post=938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/tags?post=938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}