3 * ====================================================================
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
20 * ====================================================================
24 * @brief Option and argument parsing for Subversion command lines
30 #include "svn_opt_impl.h"
33 #include <apr_pools.h>
34 #include <apr_getopt.h>
35 #include <apr_tables.h>
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 #define APR_WANT_STDIO
41 #include <apr_want.h> /* for FILE* */
43 #include "svn_types.h"
47 #endif /* __cplusplus */
52 * All subcommand procedures in Subversion conform to this prototype.
54 * @a os is the apr option state after getopt processing has been run; in
55 * other words, it still contains the non-option arguments following
56 * the subcommand. See @a os->argv and @a os->ind.
58 * @a baton is anything you need it to be.
60 * @a pool is used for allocating errors, and for any other allocation
61 * unless the instance is explicitly documented to allocate from a
64 typedef svn_error_t *(svn_opt_subcommand_t)(
65 apr_getopt_t *os, void *baton, apr_pool_t *pool);
68 /** The maximum number of aliases a subcommand can have. */
69 #define SVN_OPT_MAX_ALIASES 3
71 /** The maximum number of options that can be accepted by a subcommand. */
72 #define SVN_OPT_MAX_OPTIONS 50
74 /** The maximum number of paragraphs of help text a subcommand can have.
75 * @since New in 1.11. */
76 #define SVN_OPT_MAX_PARAGRAPHS 100
78 /** Options that have no short option char should use an identifying
79 * integer equal to or greater than this.
81 #define SVN_OPT_FIRST_LONGOPT_ID 256
84 /** One element of a subcommand dispatch table.
88 typedef struct svn_opt_subcommand_desc3_t
90 /** The full name of this command. */
93 /** The function this command invokes. */
94 svn_opt_subcommand_t *cmd_func;
96 /** A list of alias names for this command (e.g., 'up' for 'update'). */
97 const char *aliases[SVN_OPT_MAX_ALIASES];
99 /** A multi-paragraph string describing this command. */
100 const char *help[SVN_OPT_MAX_PARAGRAPHS];
102 /** A list of options accepted by this command. Each value in the
103 * array is a unique enum (the 2nd field in apr_getopt_option_t)
105 int valid_options[SVN_OPT_MAX_OPTIONS];
107 /** A list of option help descriptions, keyed by the option unique enum
108 * (the 2nd field in apr_getopt_option_t), which override the generic
109 * descriptions given in an apr_getopt_option_t on a per-subcommand basis.
111 struct { int optch; const char *desc; } desc_overrides[SVN_OPT_MAX_OPTIONS];
112 } svn_opt_subcommand_desc3_t;
115 /** One element of a subcommand dispatch table.
118 * @deprecated Provided for backward compatibility with the 1.10 API.
120 typedef struct svn_opt_subcommand_desc2_t
122 /** The full name of this command. */
125 /** The function this command invokes. */
126 svn_opt_subcommand_t *cmd_func;
128 /** A list of alias names for this command (e.g., 'up' for 'update'). */
129 const char *aliases[SVN_OPT_MAX_ALIASES];
131 /** A brief string describing this command, for usage messages. */
134 /** A list of options accepted by this command. Each value in the
135 * array is a unique enum (the 2nd field in apr_getopt_option_t)
137 int valid_options[SVN_OPT_MAX_OPTIONS];
139 /** A list of option help descriptions, keyed by the option unique enum
140 * (the 2nd field in apr_getopt_option_t), which override the generic
141 * descriptions given in an apr_getopt_option_t on a per-subcommand basis.
143 struct { int optch; const char *desc; } desc_overrides[SVN_OPT_MAX_OPTIONS];
144 } svn_opt_subcommand_desc2_t;
147 /** One element of a subcommand dispatch table.
149 * @deprecated Provided for backward compatibility with the 1.3 API.
151 * Like #svn_opt_subcommand_desc2_t but lacking the @c desc_overrides
154 typedef struct svn_opt_subcommand_desc_t
156 /** The full name of this command. */
159 /** The function this command invokes. */
160 svn_opt_subcommand_t *cmd_func;
162 /** A list of alias names for this command (e.g., 'up' for 'update'). */
163 const char *aliases[SVN_OPT_MAX_ALIASES];
165 /** A brief string describing this command, for usage messages. */
168 /** A list of options accepted by this command. Each value in the
169 * array is a unique enum (the 2nd field in apr_getopt_option_t)
171 int valid_options[SVN_OPT_MAX_OPTIONS];
173 } svn_opt_subcommand_desc_t;
177 * Return the entry in @a table whose name matches @a cmd_name, or @c NULL if
178 * none. @a cmd_name may be an alias.
180 * @since New in 1.11.
182 const svn_opt_subcommand_desc3_t *
183 svn_opt_get_canonical_subcommand3(const svn_opt_subcommand_desc3_t *table,
184 const char *cmd_name);
188 * Same as svn_opt_get_canonical_subcommand3(), but with a different
189 * version of the subcommand description table.
192 * @deprecated Provided for backward compatibility with the 1.10 API.
195 const svn_opt_subcommand_desc2_t *
196 svn_opt_get_canonical_subcommand2(const svn_opt_subcommand_desc2_t *table,
197 const char *cmd_name);
201 * Return the entry in @a table whose name matches @a cmd_name, or @c NULL if
202 * none. @a cmd_name may be an alias.
204 * Same as svn_opt_get_canonical_subcommand2(), but acts on
205 * #svn_opt_subcommand_desc_t.
207 * @deprecated Provided for backward compatibility with the 1.3 API.
210 const svn_opt_subcommand_desc_t *
211 svn_opt_get_canonical_subcommand(const svn_opt_subcommand_desc_t *table,
212 const char *cmd_name);
216 * Return pointer to an @c apr_getopt_option_t for the option whose
217 * option code is @a code, or @c NULL if no match. @a option_table must end
218 * with an element whose every field is zero. If @a command is non-NULL,
219 * then return the subcommand-specific option description instead of the
220 * generic one, if a specific description is defined.
222 * The returned value may be statically allocated, or allocated in @a pool.
224 * @since New in 1.11.
226 const apr_getopt_option_t *
227 svn_opt_get_option_from_code3(int code,
228 const apr_getopt_option_t *option_table,
229 const svn_opt_subcommand_desc3_t *command,
233 * Same as svn_opt_get_option_from_code3(), but with a different
234 * version of the subcommand description table.
237 * @deprecated Provided for backward compatibility with the 1.10 API.
240 const apr_getopt_option_t *
241 svn_opt_get_option_from_code2(int code,
242 const apr_getopt_option_t *option_table,
243 const svn_opt_subcommand_desc2_t *command,
248 * Return the first entry from @a option_table whose option code is @a code,
249 * or @c NULL if no match. @a option_table must end with an element whose
250 * every field is zero.
252 * @deprecated Provided for backward compatibility with the 1.3 API.
255 const apr_getopt_option_t *
256 svn_opt_get_option_from_code(int code,
257 const apr_getopt_option_t *option_table);
261 * Return @c TRUE iff subcommand @a command supports option @a
262 * option_code, else return @c FALSE. If @a global_options is
263 * non-NULL, it is a zero-terminated array, and all subcommands take
264 * the options listed in it.
266 * @since New in 1.11.
269 svn_opt_subcommand_takes_option4(const svn_opt_subcommand_desc3_t *command,
271 const int *global_options);
274 * Same as svn_opt_subcommand_takes_option4(), but with a different
275 * version of the subcommand description table.
278 * @deprecated Provided for backward compatibility with the 1.10 API.
282 svn_opt_subcommand_takes_option3(const svn_opt_subcommand_desc2_t *command,
284 const int *global_options);
287 * Same as svn_opt_subcommand_takes_option3(), but with @c NULL for @a
290 * @deprecated Provided for backward compatibility with the 1.4 API.
294 svn_opt_subcommand_takes_option2(const svn_opt_subcommand_desc2_t *command,
299 * Return @c TRUE iff subcommand @a command supports option @a option_code,
300 * else return @c FALSE.
302 * Same as svn_opt_subcommand_takes_option2(), but acts on
303 * #svn_opt_subcommand_desc_t.
305 * @deprecated Provided for backward compatibility with the 1.3 API.
309 svn_opt_subcommand_takes_option(const svn_opt_subcommand_desc_t *command,
314 * Print a generic (not command-specific) usage message to @a stream.
316 * @todo Why is @a stream a stdio file instead of an svn stream?
318 * If @a header is non-NULL, print @a header followed by a newline. Then
319 * loop over @a cmd_table printing the usage for each command (getting
320 * option usages from @a opt_table). Then if @a footer is non-NULL, print
321 * @a footer followed by a newline.
323 * Use @a pool for temporary allocation.
325 * @since New in 1.11.
328 svn_opt_print_generic_help3(const char *header,
329 const svn_opt_subcommand_desc3_t *cmd_table,
330 const apr_getopt_option_t *opt_table,
336 * Same as svn_opt_print_generic_help3(), but with a different
337 * version of the subcommand description table.
340 * @deprecated Provided for backward compatibility with the 1.10 API.
344 svn_opt_print_generic_help2(const char *header,
345 const svn_opt_subcommand_desc2_t *cmd_table,
346 const apr_getopt_option_t *opt_table,
353 * Same as svn_opt_print_generic_help2(), but acts on
354 * #svn_opt_subcommand_desc_t.
356 * @deprecated Provided for backward compatibility with the 1.3 API.
360 svn_opt_print_generic_help(const char *header,
361 const svn_opt_subcommand_desc_t *cmd_table,
362 const apr_getopt_option_t *opt_table,
369 * Print an option @a opt nicely into a @a string allocated in @a pool.
370 * If @a doc is set, include the generic documentation string of @a opt,
371 * localized to the current locale if a translation is available.
374 svn_opt_format_option(const char **string,
375 const apr_getopt_option_t *opt,
382 * Get @a subcommand's usage from @a table, and print it to @c stdout.
383 * Obtain option usage from @a options_table. If not @c NULL, @a
384 * global_options is a zero-terminated list of global options. Use @a
385 * pool for temporary allocation. @a subcommand may be a canonical
386 * command name or an alias. ### @todo Why does this only print to
387 * @c stdout, whereas svn_opt_print_generic_help() gives us a choice?
389 * When printing the description of an option, if the same option code
390 * appears a second time in @a options_table with a different name, then
391 * use that second name as an alias for the first name. This additional
392 * behaviour is new in 1.7.
394 * @since New in 1.11.
397 svn_opt_subcommand_help4(const char *subcommand,
398 const svn_opt_subcommand_desc3_t *table,
399 const apr_getopt_option_t *options_table,
400 const int *global_options,
404 * Same as svn_opt_subcommand_help4(), but with a different
405 * version of the subcommand description table.
408 * @deprecated Provided for backward compatibility with the 1.10 API.
412 svn_opt_subcommand_help3(const char *subcommand,
413 const svn_opt_subcommand_desc2_t *table,
414 const apr_getopt_option_t *options_table,
415 const int *global_options,
419 * Same as svn_opt_subcommand_help3(), but with @a global_options
422 * @deprecated Provided for backward compatibility with the 1.4 API.
426 svn_opt_subcommand_help2(const char *subcommand,
427 const svn_opt_subcommand_desc2_t *table,
428 const apr_getopt_option_t *options_table,
433 * Same as svn_opt_subcommand_help2(), but acts on
434 * #svn_opt_subcommand_desc_t.
436 * @deprecated Provided for backward compatibility with the 1.3 API.
440 svn_opt_subcommand_help(const char *subcommand,
441 const svn_opt_subcommand_desc_t *table,
442 const apr_getopt_option_t *options_table,
447 /* Parsing revision and date options. */
448 /* NOTE: svn_opt_revision_kind is defined in svn_opt_impl.h */
451 * A revision value, which can be specified as a number or a date.
453 * @note This union was formerly an anonymous inline type in
454 * @c svn_opt_revision_t, and was converted to a named type just to
455 * make things easier for SWIG.
459 typedef union svn_opt_revision_value_t
461 /** The revision number */
464 /** the date of the revision */
466 } svn_opt_revision_value_t;
468 /** A revision, specified in one of @c svn_opt_revision_kind ways. */
469 typedef struct svn_opt_revision_t
471 enum svn_opt_revision_kind kind; /**< See svn_opt_revision_kind */
472 svn_opt_revision_value_t value; /**< Extra data qualifying the @c kind */
473 } svn_opt_revision_t;
475 /** A revision range, specified in one of @c svn_opt_revision_kind ways. */
476 typedef struct svn_opt_revision_range_t
478 /** The first revision in the range */
479 svn_opt_revision_t start;
481 /** The last revision in the range */
482 svn_opt_revision_t end;
483 } svn_opt_revision_range_t;
486 * Set @a *start_revision and/or @a *end_revision according to @a arg,
487 * where @a arg is "N" or "N:M", like so:
489 * - If @a arg is "N", set @a *start_revision to represent N, and
490 * leave @a *end_revision untouched.
492 * - If @a arg is "N:M", set @a *start_revision and @a *end_revision
493 * to represent N and M respectively.
495 * N and/or M may be one of the special revision descriptors
496 * recognized by revision_from_word(), or a date in curly braces.
498 * If @a arg is invalid, return -1; else return 0.
499 * It is invalid to omit a revision (as in, ":", "N:" or ":M").
501 * @note It is typical, though not required, for @a *start_revision and
502 * @a *end_revision to be @c svn_opt_revision_unspecified kind on entry.
504 * Use @a pool for temporary allocations.
507 svn_opt_parse_revision(svn_opt_revision_t *start_revision,
508 svn_opt_revision_t *end_revision,
513 * Parse @a arg, where @a arg is "N" or "N:M", into a
514 * @c svn_opt_revision_range_t and push that onto @a opt_ranges.
516 * - If @a arg is "N", set the @c start field of the
517 * @c svn_opt_revision_range_t to represent N and the @c end field
518 * to @c svn_opt_revision_unspecified.
520 * - If @a arg is "N:M", set the @c start field of the
521 * @c svn_opt_revision_range_t to represent N and the @c end field
524 * If @a arg is invalid, return -1; else return 0. It is invalid to omit
525 * a revision (as in, ":", "N:" or ":M").
527 * Use @a pool to allocate @c svn_opt_revision_range_t pushed to the array.
532 svn_opt_parse_revision_to_range(apr_array_header_t *opt_ranges,
537 * Resolve peg revisions and operational revisions in the following way:
539 * - If @a is_url is set and @a peg_rev->kind is
540 * @c svn_opt_revision_unspecified, @a peg_rev->kind defaults to
541 * @c svn_opt_revision_head.
543 * - If @a is_url is not set, and @a peg_rev->kind is
544 * @c svn_opt_revision_unspecified, @a peg_rev->kind defaults to
545 * @c svn_opt_revision_base.
547 * - If @a op_rev->kind is @c svn_opt_revision_unspecified, @a op_rev
548 * defaults to @a peg_rev.
550 * Both @a peg_rev and @a op_rev may be modified as a result of this
551 * function. @a is_url should be set if the path the revisions refer to is
552 * a url, and unset otherwise.
554 * If @a notice_local_mods is set, @c svn_opt_revision_working is used,
555 * instead of @c svn_opt_revision_base.
557 * Use @a pool for allocations.
562 svn_opt_resolve_revisions(svn_opt_revision_t *peg_rev,
563 svn_opt_revision_t *op_rev,
564 svn_boolean_t is_url,
565 svn_boolean_t notice_local_mods,
569 /* Parsing arguments. */
572 * Pull remaining target arguments from @a os into @a *targets_p,
573 * converting them to UTF-8, followed by targets from @a known_targets
574 * (which might come from, for example, the "--targets" command line
575 * option), which are already in UTF-8.
577 * On each URL target, do some IRI-to-URI encoding and some
578 * auto-escaping. On each local path, canonicalize case and path
581 * Allocate @a *targets_p and its elements in @a pool.
583 * If a path has the same name as a Subversion working copy
584 * administrative directory, return SVN_ERR_RESERVED_FILENAME_SPECIFIED;
585 * if multiple reserved paths are encountered, return a chain of
586 * errors, all of which are SVN_ERR_RESERVED_FILENAME_SPECIFIED. Do
587 * not return this type of error in a chain with any other type of
588 * error, and if this is the only type of error encountered, complete
589 * the operation before returning the error(s).
591 * @deprecated Provided for backward compatibility with the 1.5 API.
592 * @see svn_client_args_to_target_array()
596 svn_opt_args_to_target_array3(apr_array_header_t **targets_p,
598 const apr_array_header_t *known_targets,
602 * This is the same as svn_opt_args_to_target_array3() except that it
603 * silently ignores paths that have the same name as a working copy
604 * administrative directory.
608 * @deprecated Provided for backward compatibility with the 1.4 API.
612 svn_opt_args_to_target_array2(apr_array_header_t **targets_p,
614 const apr_array_header_t *known_targets,
619 * The same as svn_opt_args_to_target_array2() except that, in
620 * addition, if @a extract_revisions is set, then look for trailing
621 * "@rev" syntax on the first two paths. If the first target in @a
622 * *targets_p ends in "@rev", replace it with a canonicalized version of
623 * the part before "@rev" and replace @a *start_revision with the value
624 * of "rev". If the second target in @a *targets_p ends in "@rev",
625 * replace it with a canonicalized version of the part before "@rev"
626 * and replace @a *end_revision with the value of "rev". Ignore
627 * revision specifiers on any further paths. "rev" can be any form of
628 * single revision specifier, as accepted by svn_opt_parse_revision().
630 * @deprecated Provided for backward compatibility with the 1.1 API.
634 svn_opt_args_to_target_array(apr_array_header_t **targets_p,
636 const apr_array_header_t *known_targets,
637 svn_opt_revision_t *start_revision,
638 svn_opt_revision_t *end_revision,
639 svn_boolean_t extract_revisions,
644 * Parse revprop key/value pair from @a revprop_spec (name[=value]) into
645 * @a revprops, making copies of both with @a pool. If @a revprops is
646 * @c NULL, allocate a new apr_hash_t in it. @a revprops maps
647 * const char * revprop names to svn_string_t * revprop values for use
648 * with svn_repos_get_commit_editor5 and other get_commit_editor APIs.
653 svn_opt_parse_revprop(apr_hash_t **revprops, const char *revprop_spec,
658 * If no targets exist in @a *targets, add `.' as the lone target.
660 * (Some commands take an implicit "." string argument when invoked
661 * with no arguments. Those commands make use of this function to
662 * add "." to the target array if the user passes no args.)
665 svn_opt_push_implicit_dot_target(apr_array_header_t *targets,
670 * Parse @a num_args non-target arguments from the list of arguments in
671 * @a os->argv, return them as <tt>const char *</tt> in @a *args_p, without
672 * doing any UTF-8 conversion. Allocate @a *args_p and its values in @a pool.
675 svn_opt_parse_num_args(apr_array_header_t **args_p,
682 * Parse all remaining arguments from @a os->argv, return them as
683 * <tt>const char *</tt> in @a *args_p, without doing any UTF-8 conversion.
684 * Allocate @a *args_p and its values in @a pool.
687 svn_opt_parse_all_args(apr_array_header_t **args_p,
692 * Parse a working-copy path or URL in @a path, extracting any trailing
693 * revision specifier of the form "@rev" from the last component of
696 * Some examples would be:
698 * - "foo/bar" -> "foo/bar", (unspecified)
699 * - "foo/bar@13" -> "foo/bar", (number, 13)
700 * - "foo/bar@HEAD" -> "foo/bar", (head)
701 * - "foo/bar@{1999-12-31}" -> "foo/bar", (date, 1999-12-31)
702 * - "http://a/b@27" -> "http://a/b", (number, 27)
703 * - "http://a/b@COMMITTED" -> "http://a/b", (committed) [*]
704 * - "http://a/b@{1999-12-31}" -> "http://a/b", (date, 1999-12-31)
705 * - "http://a/b@%7B1999-12-31%7D" -> "http://a/b", (date, 1999-12-31)
706 * - "foo/bar@1:2" -> error
707 * - "foo/bar@baz" -> error
708 * - "foo/bar@" -> "foo/bar", (unspecified)
709 * - "foo/@bar@" -> "foo/@bar", (unspecified)
710 * - "foo/bar/@13" -> "foo/bar/", (number, 13)
711 * - "foo/bar@@13" -> "foo/bar@", (number, 13)
712 * - "foo/@bar@HEAD" -> "foo/@bar", (head)
713 * - "foo@/bar" -> "foo@/bar", (unspecified)
714 * - "foo@HEAD/bar" -> "foo@HEAD/bar", (unspecified)
715 * - "@foo/bar" -> "@foo/bar", (unspecified)
716 * - "@foo/bar@" -> "@foo/bar", (unspecified)
718 * [*] Syntactically valid but probably not semantically useful.
720 * If a trailing revision specifier is found, parse it into @a *rev and
721 * put the rest of the path into @a *truepath, allocating from @a pool;
722 * or return an @c SVN_ERR_CL_ARG_PARSING_ERROR (with the effect on
723 * @a *truepath undefined) if the revision specifier is invalid.
724 * If no trailing revision specifier is found, set @a *truepath to
725 * @a path and @a rev->kind to @c svn_opt_revision_unspecified.
727 * This function does not require that @a path be in canonical form.
728 * No canonicalization is done and @a *truepath will only be in
729 * canonical form if @a path is in canonical form.
732 * @since Since 1.6.5, this returns an error if @a path contains a peg
733 * specifier with no path before it, such as "@abc".
734 * @since Since 1.9.0, this no longer returns an error if @a path contains a peg
735 * specifier with no path before it, such as "@abc".
738 svn_opt_parse_path(svn_opt_revision_t *rev,
739 const char **truepath,
744 * Central dispatcher function for various kinds of help message.
746 * * subcommand-specific help (svn_opt_subcommand_help)
747 * * generic help (svn_opt_print_generic_help)
749 * * simple usage complaint: "Type '@a pgm_name help' for usage."
751 * If @a os is not @c NULL and it contains arguments, then try
752 * printing help for them as though they are subcommands, using @a
753 * cmd_table and @a option_table for option information. If not @c
754 * NULL, @a global_options is a zero-terminated array of options taken
755 * by all subcommands.
757 * Else, if @a print_version is TRUE, then print version info, in
758 * brief form if @a quiet is also TRUE; if @a quiet is FALSE, then if
759 * @a version_footer is non-NULL, print it following the version
760 * information. If @a verbose is TRUE, also print information about
761 * the running system and loaded shared libraries, where available.
763 * Else, if @a os is not @c NULL and does not contain arguments, print
764 * generic help, via svn_opt_print_generic_help2() with the @a header,
765 * @a cmd_table, @a option_table, and @a footer arguments.
767 * Else, when @a os is @c NULL, print the simple usage complaint.
769 * Use @a pool for temporary allocations.
771 * Notes: The reason this function handles both version printing and
772 * general usage help is that a confused user might put both the
773 * --version flag *and* subcommand arguments on a help command line.
774 * The logic for handling such a situation should be in one place.
776 * @since New in 1.11.
779 svn_opt_print_help5(apr_getopt_t *os,
780 const char *pgm_name,
781 svn_boolean_t print_version,
783 svn_boolean_t verbose,
784 const char *version_footer,
786 const svn_opt_subcommand_desc3_t *cmd_table,
787 const apr_getopt_option_t *option_table,
788 const int *global_options,
793 * Same as svn_opt_print_help5(), but with a different
794 * version of the subcommand description table.
797 * @deprecated Provided for backward compatibility with the 1.10 API.
801 svn_opt_print_help4(apr_getopt_t *os,
802 const char *pgm_name,
803 svn_boolean_t print_version,
805 svn_boolean_t verbose,
806 const char *version_footer,
808 const svn_opt_subcommand_desc2_t *cmd_table,
809 const apr_getopt_option_t *option_table,
810 const int *global_options,
815 * Same as svn_opt_print_help4(), but with @a verbose always @c FALSE.
817 * @deprecated Provided for backward compatibility with the 1.7 API.
822 svn_opt_print_help3(apr_getopt_t *os,
823 const char *pgm_name,
824 svn_boolean_t print_version,
826 const char *version_footer,
828 const svn_opt_subcommand_desc2_t *cmd_table,
829 const apr_getopt_option_t *option_table,
830 const int *global_options,
835 * Same as svn_opt_print_help3(), but with @a global_options always @c
838 * @deprecated Provided for backward compatibility with the 1.4 API.
843 svn_opt_print_help2(apr_getopt_t *os,
844 const char *pgm_name,
845 svn_boolean_t print_version,
847 const char *version_footer,
849 const svn_opt_subcommand_desc2_t *cmd_table,
850 const apr_getopt_option_t *option_table,
856 * Same as svn_opt_print_help2(), but acts on #svn_opt_subcommand_desc_t.
858 * @deprecated Provided for backward compatibility with the 1.3 API.
862 svn_opt_print_help(apr_getopt_t *os,
863 const char *pgm_name,
864 svn_boolean_t print_version,
866 const char *version_footer,
868 const svn_opt_subcommand_desc_t *cmd_table,
869 const apr_getopt_option_t *option_table,
875 #endif /* __cplusplus */
877 #endif /* SVN_OPT_H */