static void mp4m_system_execute (MP4H_BUILTIN_ARGS) { const char *type, *s; const builtin *bp; type = predefined_attribute ("type", &argc, argv, FALSE); if (!type) { MP4HERROR ((warning_status, errno, _("Warning:%s:%d: Missing `type' attribute in <%s>"), CURRENT_FILE_LINE, ARG (0))); return; } if (bad_argc (argv[0], argc, 1, 1)) return; s = xstrdup(type); bp = find_builtin_by_name(s); if (!bp) { MP4HERROR ((warning_status, errno, _("Warning:%s:%d: %s: Undefined type in <%s>"), CURRENT_FILE_LINE, type, ARG (0))); return; } (*(bp->func))(MP4H_BUILTIN_RECUR); }
static void mp4m_intl_bindtextdomain (MP4H_BUILTIN_ARGS) { const char *domain, *path; domain = predefined_attribute ("domain", &argc, argv, FALSE); path = predefined_attribute ("path", &argc, argv, FALSE); if (!domain) { MP4HERROR ((warning_status, 0, _("Warning:%s:%d: In <%s>, required attribute `%s' is not specified"), CURRENT_FILE_LINE, ARG (0), "domain")); return; } if (!path) { MP4HERROR ((warning_status, 0, _("Warning:%s:%d: In <%s>, required attribute `%s' is not specified"), CURRENT_FILE_LINE, ARG (0), "path")); return; } bindtextdomain (domain, path); }
static void mp4m_intl_bind_textdomain_codeset (MP4H_BUILTIN_ARGS) { const char *domain, *codeset; domain = predefined_attribute ("domain", &argc, argv, FALSE); codeset = predefined_attribute ("codeset", &argc, argv, FALSE); if (!domain) { MP4HERROR ((warning_status, 0, _("Warning:%s:%d: In <%s>, required attribute `%s' is not specified"), CURRENT_FILE_LINE, ARG (0), "domain")); return; } if (!codeset) { MP4HERROR ((warning_status, 0, _("Warning:%s:%d: In <%s>, required attribute `%s' is not specified"), CURRENT_FILE_LINE, ARG (0), "codeset")); return; } bind_textdomain_codeset (domain, codeset); }
static void mp4m_intl_gettext (MP4H_BUILTIN_ARGS) { const char *domain; char *cp, *msgstr; domain = predefined_attribute ("domain", &argc, argv, FALSE); for (cp = ARGBODY; *cp != '\0'; cp++) if (CHAR_SLASH == *cp) *cp = '/'; if (domain) msgstr = dgettext(domain, ARGBODY); else msgstr = gettext(ARGBODY); obstack_grow (obs, msgstr, strlen (msgstr)); }