{"id":911,"date":"2022-08-30T15:09:14","date_gmt":"2022-08-30T15:09:14","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/mysql-c-api-handle_options-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:09:14","modified_gmt":"2022-08-30T15:09:14","slug":"mysql-c-api-handle_options-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/mysql-c-api-handle_options-collection-of-common-programming-errors\/","title":{"rendered":"MySQL C API handle_options-Collection of common programming errors"},"content":{"rendered":"<p>I am using the handle_options function in a client program written in C that is using the MySQL API. Considering there is no actual reference to this function (to my knowledge) except the book &#8216;MySQL&#8217; (or something) written by DuBois, I&#8217;m asking for help here.<\/p>\n<p>So I want to process some command line arguments that aren&#8217;t mysql options. The problem is, they arguments are going to sometimes be negative numbers. The dash (-) representing the negative number gets recognised by handle_options as a mysql option and I then receive the following error message in console.<\/p>\n<p><code>unknown OPTION '-2'<\/code><\/p>\n<p>Anyone know any way to tell handle_options to only look for the options that I have defined in my my_option struct and to leave everything else prefixed with a &#8216;-&#8216; alone? Or will I have to resort to using a different symbol to represent a negative number for the command line arguments<\/p>\n<p>Cheers.<\/p>\n<p>Edit: This is written in\/for windows.<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:57:20. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am using the handle_options function in a client program written in C that is using the MySQL API. Considering there is no actual reference to this function (to my knowledge) except the book &#8216;MySQL&#8217; (or something) written by DuBois, I&#8217;m asking for help here. So I want to process some command line arguments that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-911","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=911"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/911\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}