MCPcopy Create free account
hub / github.com/coreutils/coreutils / main

Function main

src/od.c:1677–2065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1675}
1676
1677int
1678main (int argc, char **argv)
1679{
1680 int n_files;
1681 int l_c_m;
1682 idx_t desired_width = 0;
1683 bool modern = false;
1684 bool ok = true;
1685 idx_t width_per_block = 0;
1686 static char const multipliers[] = "bEGKkMmPQRTYZ0";
1687
1688 /* The maximum number of bytes that will be formatted.
1689 If negative, there is no limit. */
1690 intmax_t max_bytes_to_format = -1;
1691
1692 /* The old-style 'pseudo starting address' to be printed in parentheses
1693 after any true address. */
1694 intmax_t pseudo_start IF_LINT ( = 0);
1695
1696 initialize_main (&argc, &argv);
1697 set_program_name (argv[0]);
1698 setlocale (LC_ALL, "");
1699 bindtextdomain (PACKAGE, LOCALEDIR);
1700 textdomain (PACKAGE);
1701
1702 atexit (close_stdout);
1703
1704 while (true)
1705 {
1706 intmax_t tmp;
1707 enum strtol_error s_err;
1708 int oi = -1;
1709 int c = getopt_long (argc, argv, short_options, long_options, &oi);
1710 if (c == -1)
1711 break;
1712
1713 switch (c)
1714 {
1715 case 'A':
1716 modern = true;
1717 switch (optarg[0])
1718 {
1719 case 'd':
1720 format_address = format_address_std;
1721 address_base = 10;
1722 address_pad_len = 7;
1723 break;
1724 case 'o':
1725 format_address = format_address_std;
1726 address_base = 8;
1727 address_pad_len = 7;
1728 break;
1729 case 'x':
1730 format_address = format_address_std;
1731 address_base = 16;
1732 address_pad_len = 6;
1733 break;
1734 case 'n':

Callers

nothing calls this directly

Calls 9

xstr2nonnegFunction · 0.85
parse_old_offsetFunction · 0.85
open_next_fileFunction · 0.85
get_lcmFunction · 0.85
pad_at_overflowFunction · 0.85
dump_stringsFunction · 0.85
dumpFunction · 0.85
usageFunction · 0.70
skipFunction · 0.70

Tested by

no test coverage detected