34 
  35 static const char *cmdname;
  36 
  37 struct table {
  38         char    *name;                  /* name of the table */
  39         int     (*func)(const char **); /* function to do the lookup */
  40 };
  41 
  42 static struct table t[] = {
  43         { "passwd",     dogetpw },
  44         { "shadow",     dogetsp },
  45         { "group",      dogetgr },
  46         { "hosts",      dogethost },
  47         { "ipnodes",    dogetipnodes },
  48         { "services",   dogetserv },
  49         { "protocols",  dogetproto },
  50         { "ethers",     dogetethers },
  51         { "networks",   dogetnet },
  52         { "netmasks",   dogetnetmask },
  53         { "project",    dogetproject },
  54         { NULL,         NULL }
  55 };
  56 
  57 static  void usage(void) __NORETURN;
  58 
  59 int
  60 main(int argc, const char **argv)
  61 {
  62         struct table *p;
  63 
  64         (void) setlocale(LC_ALL, "");
  65 
  66 #if !defined(TEXT_DOMAIN)
  67 #define TEXT_DOMAIN     "SYS_TEXT"
  68 #endif
  69 
  70         (void) textdomain(TEXT_DOMAIN);
  71 
  72         cmdname = argv[0];
  73 
 
 | 
 
 
  34 
  35 static const char *cmdname;
  36 
  37 struct table {
  38         char    *name;                  /* name of the table */
  39         int     (*func)(const char **); /* function to do the lookup */
  40 };
  41 
  42 static struct table t[] = {
  43         { "passwd",     dogetpw },
  44         { "shadow",     dogetsp },
  45         { "group",      dogetgr },
  46         { "hosts",      dogethost },
  47         { "ipnodes",    dogetipnodes },
  48         { "services",   dogetserv },
  49         { "protocols",  dogetproto },
  50         { "ethers",     dogetethers },
  51         { "networks",   dogetnet },
  52         { "netmasks",   dogetnetmask },
  53         { "project",    dogetproject },
  54         { "netgroup",   dogetnetgr },
  55         { NULL,         NULL }
  56 };
  57 
  58 static  void usage(void) __NORETURN;
  59 
  60 int
  61 main(int argc, const char **argv)
  62 {
  63         struct table *p;
  64 
  65         (void) setlocale(LC_ALL, "");
  66 
  67 #if !defined(TEXT_DOMAIN)
  68 #define TEXT_DOMAIN     "SYS_TEXT"
  69 #endif
  70 
  71         (void) textdomain(TEXT_DOMAIN);
  72 
  73         cmdname = argv[0];
  74 
 
 |