MCPcopy Index your code
hub / github.com/git/git / usage_argh

Function usage_argh

parse-options.c:1237–1287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1235}
1236
1237static int usage_argh(const struct option *opts, FILE *outfile)
1238{
1239 const char *s;
1240 int literal = (opts->flags & PARSE_OPT_LITERAL_ARGHELP) ||
1241 !opts->argh || !!strpbrk(opts->argh, "()<>[]|");
1242 if (opts->flags & PARSE_OPT_OPTARG)
1243 if (opts->long_name)
1244 /*
1245 * TRANSLATORS: The "<%s>" part of this string
1246 * stands for an optional value given to a command
1247 * line option in the long form, and "<>" is there
1248 * as a convention to signal that it is a
1249 * placeholder (i.e. the user should substitute it
1250 * with the real value). If your language uses a
1251 * different convention, you can change "<%s>" part
1252 * to match yours, e.g. it might use "|%s|" instead,
1253 * or if the alphabet is different enough it may use
1254 * "%s" without any placeholder signal. Most
1255 * translations leave this message as is.
1256 */
1257 s = literal ? "[=%s]" : _("[=<%s>]");
1258 else
1259 /*
1260 * TRANSLATORS: The "<%s>" part of this string
1261 * stands for an optional value given to a command
1262 * line option in the short form, and "<>" is there
1263 * as a convention to signal that it is a
1264 * placeholder (i.e. the user should substitute it
1265 * with the real value). If your language uses a
1266 * different convention, you can change "<%s>" part
1267 * to match yours, e.g. it might use "|%s|" instead,
1268 * or if the alphabet is different enough it may use
1269 * "%s" without any placeholder signal. Most
1270 * translations leave this message as is.
1271 */
1272 s = literal ? "[%s]" : _("[<%s>]");
1273 else
1274 /*
1275 * TRANSLATORS: The "<%s>" part of this string stands for a
1276 * value given to a command line option, and "<>" is there
1277 * as a convention to signal that it is a placeholder
1278 * (i.e. the user should substitute it with the real value).
1279 * If your language uses a different convention, you can
1280 * change "<%s>" part to match yours, e.g. it might use
1281 * "|%s|" instead, or if the alphabet is different enough it
1282 * may use "%s" without any placeholder signal. Most
1283 * translations leave this message as is.
1284 */
1285 s = literal ? " %s" : _(" <%s>");
1286 return utf8_fprintf(outfile, s, opts->argh ? _(opts->argh) : _("..."));
1287}
1288
1289static int usage_indent(FILE *outfile)
1290{

Callers 1

Calls 1

utf8_fprintfFunction · 0.85

Tested by

no test coverage detected