-/*---------------------------------------------------------
- | helpers for argument scanning
- +--------------------------------------------------------- */
-
-static const char *current_argument(int optid)
-{
- if (optarg == 0) {
- ERROR("option [--%s] needs a value i.e. --%s=xxx",
- name_of_optid(optid), name_of_optid(optid));
- exit(1);
- }
- return optarg;
-}
-
-static char *argvalstr(int optid)
-{
- char *result = strdup(current_argument(optid));
- if (result == NULL) {
- ERROR("can't alloc memory");
- exit(1);
- }
- return result;
-}
-