/**/ static void scanpmsysparams(UNUSED(HashTable ht), ScanFunc func, int flags) { struct param spm; fillpmsysparams(&spm, "pid"); func(&spm.node, flags); fillpmsysparams(&spm, "ppid"); func(&spm.node, flags); } static struct paramdef partab[] = { SPECIALPMDEF("errnos", PM_ARRAY|PM_READONLY, &errnos_gsu, NULL, NULL), SPECIALPMDEF("sysparams", PM_READONLY, NULL, getpmsysparams, scanpmsysparams) }; static struct features module_features = { bintab, sizeof(bintab)/sizeof(*bintab), NULL, 0, NULL, 0, partab, sizeof(partab)/sizeof(*partab), 0 }; /* The load/unload routines required by the zsh library interface */ /**/
static struct builtin bintab[] = { BUILTIN("strftime", 0, bin_strftime, 2, 2, 0, "qrs:", NULL), }; static const struct gsu_integer epochseconds_gsu = { getcurrentsecs, NULL, stdunsetfn }; static const struct gsu_float epochrealtime_gsu = { getcurrentrealtime, NULL, stdunsetfn }; static const struct gsu_array epochtime_gsu = { getcurrenttime, NULL, stdunsetfn }; static struct paramdef patab[] = { SPECIALPMDEF("EPOCHSECONDS", PM_INTEGER|PM_READONLY, &epochseconds_gsu, NULL, NULL), SPECIALPMDEF("EPOCHREALTIME", PM_FFLOAT|PM_READONLY, &epochrealtime_gsu, NULL, NULL), SPECIALPMDEF("epochtime", PM_ARRAY|PM_READONLY, &epochtime_gsu, NULL, NULL) }; static struct features module_features = { bintab, sizeof(bintab)/sizeof(*bintab), NULL, 0, NULL, 0, patab, sizeof(patab)/sizeof(*patab), 0 }; /**/
pm->gsu.s = &nullsetscalar_gsu; pm->node.flags = PM_READONLY | PM_SCALAR; nlcode = &nl_vals[0]; for (element = (char **)nl_names; *element; element++, nlcode++) { if ((langstr = nl_langinfo(*nlcode)) != NULL) { pm->u.str = dupstring(langstr); pm->node.nam = dupstring(*element); func(&pm->node, flags); } } } static struct paramdef partab[] = { SPECIALPMDEF("langinfo", 0, NULL, getlanginfo, scanlanginfo) }; /**/ #endif /* HAVE_NL_LANGINFO */ static struct features module_features = { NULL, 0, NULL, 0, NULL, 0, #ifdef HAVE_NL_LANGINFO partab, sizeof(partab)/sizeof(*partab), #else NULL, 0, #endif 0
strcodes #else zstrcodes #endif ; *capcode; capcode++) { if ((tcstr = (char *)tgetstr(*capcode,&u)) != NULL && tcstr != (char *)-1) { pm->u.str = dupstring(tcstr); pm->node.nam = dupstring(*capcode); func(&pm->node, flags); } } } struct paramdef partab[] = { SPECIALPMDEF("termcap", PM_READONLY, NULL, gettermcap, scantermcap) }; /**/ #endif /* HAVE_TGETENT */ static struct features module_features = { #ifdef HAVE_TGETENT bintab, sizeof(bintab)/sizeof(*bintab), #else NULL, 0, #endif NULL, 0, NULL, 0, #ifdef HAVE_TGETENT partab, sizeof(partab)/sizeof(*partab),
static zlong getcurrentsecs(UNUSED(Param pm)) { return (zlong) time(NULL); } static struct builtin bintab[] = { BUILTIN("strftime", 0, bin_strftime, 2, 2, 0, "qrs:", NULL), }; static const struct gsu_integer epochseconds_gsu = { getcurrentsecs, NULL, stdunsetfn }; static struct paramdef patab[] = { SPECIALPMDEF("EPOCHSECONDS", PM_INTEGER|PM_READONLY, &epochseconds_gsu, NULL, NULL), }; static struct features module_features = { bintab, sizeof(bintab)/sizeof(*bintab), NULL, 0, NULL, 0, patab, sizeof(patab)/sizeof(*patab), 0 }; /**/ int setup_(UNUSED(Module m)) { return 0;
} *aptr = NULL; return ret; } static struct builtin bintab[] = { BUILTIN("sched", 0, bin_sched, 0, -1, 0, NULL, NULL), }; static const struct gsu_array sched_gsu = { schedgetfn, arrsetfn, stdunsetfn }; static struct paramdef partab[] = { SPECIALPMDEF("zsh_scheduled_events", PM_ARRAY|PM_READONLY, &sched_gsu, NULL, NULL) }; static struct features module_features = { bintab, sizeof(bintab)/sizeof(*bintab), NULL, 0, NULL, 0, partab, sizeof(partab)/sizeof(*partab), 0 }; /**/ int setup_(UNUSED(Module m)) { return 0;
pm->node.flags = PM_READONLY | PM_SCALAR; pm->gsu.s = &nullsetscalar_gsu; for (capname = (char **)strnames; *capname; capname++) { if ((tistr = (char *)tigetstr(*capname)) != NULL && tistr != (char *)-1) { pm->u.str = dupstring(tistr); pm->node.nam = dupstring(*capname); func(&pm->node, flags); } } } static struct paramdef partab[] = { SPECIALPMDEF("terminfo", PM_READONLY, NULL, getterminfo, scanterminfo) }; /**/ #endif /* USE_TERMINFO_MODULE */ static struct features module_features = { #ifdef USE_TERMINFO_MODULE bintab, sizeof(bintab)/sizeof(*bintab), #else NULL, 0, #endif NULL, 0, NULL, 0, #ifdef USE_TERMINFO_MODULE partab, sizeof(partab)/sizeof(*partab),