Index: src/longopt.c =================================================================== --- src/longopt.c (revision 43917) +++ src/longopt.c (working copy) @@ -25,36 +25,30 @@ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -static int longopt_get_longopt(PARROT_INTERP, - int argc, +static int longopt_get_longopt(int argc, ARGIN(const char* argv[]), ARGIN(const struct longopt_opt_decl options[]), ARGMOD(struct longopt_opt_info* info_buf)) - __attribute__nonnull__(1) + __attribute__nonnull__(2) __attribute__nonnull__(3) __attribute__nonnull__(4) - __attribute__nonnull__(5) FUNC_MODIFIES(* info_buf); -static int longopt_get_shortopt(PARROT_INTERP, - int argc, +static int longopt_get_shortopt(int argc, ARGIN(const char* argv[]), ARGIN(const struct longopt_opt_decl options[]), ARGMOD(struct longopt_opt_info* info_buf)) - __attribute__nonnull__(1) + __attribute__nonnull__(2) __attribute__nonnull__(3) __attribute__nonnull__(4) - __attribute__nonnull__(5) FUNC_MODIFIES(* info_buf); #define ASSERT_ARGS_longopt_get_longopt __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(argv) \ + PARROT_ASSERT_ARG(argv) \ , PARROT_ASSERT_ARG(options) \ , PARROT_ASSERT_ARG(info_buf)) #define ASSERT_ARGS_longopt_get_shortopt __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(argv) \ + PARROT_ASSERT_ARG(argv) \ , PARROT_ASSERT_ARG(options) \ , PARROT_ASSERT_ARG(info_buf)) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ @@ -101,7 +95,7 @@ return 0; if (info_buf->_shortopt_pos) - return longopt_get_shortopt(interp, argc, argv, options, info_buf); + return longopt_get_shortopt(argc, argv, options, info_buf); if (argv[dex][1] == '-') { /* Long option or -- */ if (argv[dex][2] == '\0') { @@ -109,18 +103,18 @@ return 0; } else { /* Long option */ - return longopt_get_longopt(interp, argc, argv, options, info_buf); + return longopt_get_longopt(argc, argv, options, info_buf); } } else { /* Short option */ - return longopt_get_shortopt(interp, argc, argv, options, info_buf); + return longopt_get_shortopt(argc, argv, options, info_buf); } } /* -=item C Find the option identifier of a long option. @@ -135,7 +129,7 @@ */ static int -longopt_get_longopt(PARROT_INTERP, int argc, ARGIN(const char* argv[]), +longopt_get_longopt(int argc, ARGIN(const char* argv[]), ARGIN(const struct longopt_opt_decl options[]), ARGMOD(struct longopt_opt_info* info_buf)) { @@ -167,7 +161,7 @@ info_buf->opt_arg = &argv[dex][optlen+1]; } else { - Parrot_snprintf(interp, longopt_error_buffer, + snprintf(longopt_error_buffer, sizeof (longopt_error_buffer), "Option %s does not expect an argument", dptr->opt_long[sptr]); @@ -182,7 +176,7 @@ ++info_buf->opt_index; } else { - Parrot_snprintf(interp, longopt_error_buffer, + snprintf(longopt_error_buffer, sizeof (longopt_error_buffer), "Option %s needs an argument", dptr->opt_long[sptr]); @@ -206,7 +200,7 @@ /* Couldn't find it. */ info_buf->opt_id = -1; - Parrot_snprintf(interp, longopt_error_buffer, + snprintf(longopt_error_buffer, sizeof (longopt_error_buffer), "Option %s not known", argv[dex]); info_buf->opt_error = longopt_error_buffer; @@ -215,8 +209,8 @@ /* -=item C Find the option identifier of the next short option. @@ -232,7 +226,7 @@ */ static int -longopt_get_shortopt(PARROT_INTERP, int argc, ARGIN(const char* argv[]), +longopt_get_shortopt(int argc, ARGIN(const char* argv[]), ARGIN(const struct longopt_opt_decl options[]), ARGMOD(struct longopt_opt_info* info_buf)) { @@ -261,7 +255,7 @@ ++info_buf->opt_index; } else { - Parrot_snprintf(interp, longopt_error_buffer, + snprintf(longopt_error_buffer, sizeof (longopt_error_buffer), "Option -%c expects an argument", *pos); info_buf->opt_error = longopt_error_buffer; @@ -299,7 +293,7 @@ /* Couldn't find it in the table */ info_buf->opt_id = -1; - Parrot_snprintf(interp, longopt_error_buffer, + snprintf(longopt_error_buffer, sizeof (longopt_error_buffer), "Option -%c not known", *pos); info_buf->opt_error = longopt_error_buffer;