MCPcopy Create free account
hub / github.com/RsyncProject/rsync / main

Function main

tls.c:270–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270int
271main(int argc, char *argv[])
272{
273 poptContext pc;
274 const char **extra_args;
275 int opt;
276
277 pc = poptGetContext(PROGRAM, argc, (const char **)argv, long_options, 0);
278 while ((opt = poptGetNextOpt(pc)) != -1) {
279 switch (opt) {
280 case 'h':
281 tls_usage(0);
282 default:
283 fprintf(stderr, "%s: %s\n",
284 poptBadOption(pc, POPT_BADOPTION_NOALIAS),
285 poptStrerror(opt));
286 tls_usage(1);
287 }
288 }
289
290 extra_args = poptGetArgs(pc);
291 if (!extra_args || *extra_args == NULL)
292 tls_usage(1);
293
294 for (; *extra_args; extra_args++)
295 list_file(*extra_args);
296 poptFreeContext(pc);
297
298 return 0;
299}

Callers

nothing calls this directly

Calls 8

poptGetContextFunction · 0.85
poptGetNextOptFunction · 0.85
tls_usageFunction · 0.85
poptBadOptionFunction · 0.85
poptStrerrorFunction · 0.85
poptGetArgsFunction · 0.85
list_fileFunction · 0.85
poptFreeContextFunction · 0.85

Tested by

no test coverage detected