⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inittime.c

📁 C语言库函数的原型,有用的拿去
💻 C
📖 第 1 页 / 共 2 页
字号:

        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVDAYNAME1, &lc_time->_W_wday_abbr[1]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVDAYNAME2, &lc_time->_W_wday_abbr[2]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVDAYNAME3, &lc_time->_W_wday_abbr[3]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVDAYNAME4, &lc_time->_W_wday_abbr[4]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVDAYNAME5, &lc_time->_W_wday_abbr[5]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVDAYNAME6, &lc_time->_W_wday_abbr[6]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVDAYNAME7, &lc_time->_W_wday_abbr[0]);

        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SDAYNAME1, &lc_time->_W_wday[1]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SDAYNAME2, &lc_time->_W_wday[2]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SDAYNAME3, &lc_time->_W_wday[3]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SDAYNAME4, &lc_time->_W_wday[4]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SDAYNAME5, &lc_time->_W_wday[5]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SDAYNAME6, &lc_time->_W_wday[6]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SDAYNAME7, &lc_time->_W_wday[0]);

        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME1, &lc_time->_W_month_abbr[0]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME2, &lc_time->_W_month_abbr[1]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME3, &lc_time->_W_month_abbr[2]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME4, &lc_time->_W_month_abbr[3]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME5, &lc_time->_W_month_abbr[4]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME6, &lc_time->_W_month_abbr[5]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME7, &lc_time->_W_month_abbr[6]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME8, &lc_time->_W_month_abbr[7]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME9, &lc_time->_W_month_abbr[8]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME10, &lc_time->_W_month_abbr[9]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME11, &lc_time->_W_month_abbr[10]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SABBREVMONTHNAME12, &lc_time->_W_month_abbr[11]);

        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME1, &lc_time->_W_month[0]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME2, &lc_time->_W_month[1]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME3, &lc_time->_W_month[2]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME4, &lc_time->_W_month[3]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME5, &lc_time->_W_month[4]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME6, &lc_time->_W_month[5]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME7, &lc_time->_W_month[6]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME8, &lc_time->_W_month[7]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME9, &lc_time->_W_month[8]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME10, &lc_time->_W_month[9]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME11, &lc_time->_W_month[10]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_SMONTHNAME12, &lc_time->_W_month[11]);

        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_S1159, &lc_time->_W_ampm[0]);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, langid, LOCALE_S2359, &lc_time->_W_ampm[1]);

        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, ctryid, LOCALE_SSHORTDATE, &lc_time->_W_ww_sdatefmt);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, ctryid, LOCALE_SLONGDATE, &lc_time->_W_ww_ldatefmt);
        ret |= __getlocaleinfo(&locinfo, LC_WSTR_TYPE, ctryid, LOCALE_STIMEFORMAT, &lc_time->_W_ww_timefmt);

        return ret;
}

/*
 *  Free the localized time strings.
 *  Of course, this can be beautified with some loops!
 */
void __cdecl __free_lc_time (
        struct __lc_time_data *lc_time
        )
{
        if (lc_time == NULL)
                return;

        _free_crt (lc_time->wday_abbr[1]);
        _free_crt (lc_time->wday_abbr[2]);
        _free_crt (lc_time->wday_abbr[3]);
        _free_crt (lc_time->wday_abbr[4]);
        _free_crt (lc_time->wday_abbr[5]);
        _free_crt (lc_time->wday_abbr[6]);
        _free_crt (lc_time->wday_abbr[0]);

        _free_crt (lc_time->wday[1]);
        _free_crt (lc_time->wday[2]);
        _free_crt (lc_time->wday[3]);
        _free_crt (lc_time->wday[4]);
        _free_crt (lc_time->wday[5]);
        _free_crt (lc_time->wday[6]);
        _free_crt (lc_time->wday[0]);

        _free_crt (lc_time->month_abbr[0]);
        _free_crt (lc_time->month_abbr[1]);
        _free_crt (lc_time->month_abbr[2]);
        _free_crt (lc_time->month_abbr[3]);
        _free_crt (lc_time->month_abbr[4]);
        _free_crt (lc_time->month_abbr[5]);
        _free_crt (lc_time->month_abbr[6]);
        _free_crt (lc_time->month_abbr[7]);
        _free_crt (lc_time->month_abbr[8]);
        _free_crt (lc_time->month_abbr[9]);
        _free_crt (lc_time->month_abbr[10]);
        _free_crt (lc_time->month_abbr[11]);

        _free_crt (lc_time->month[0]);
        _free_crt (lc_time->month[1]);
        _free_crt (lc_time->month[2]);
        _free_crt (lc_time->month[3]);
        _free_crt (lc_time->month[4]);
        _free_crt (lc_time->month[5]);
        _free_crt (lc_time->month[6]);
        _free_crt (lc_time->month[7]);
        _free_crt (lc_time->month[8]);
        _free_crt (lc_time->month[9]);
        _free_crt (lc_time->month[10]);
        _free_crt (lc_time->month[11]);

        _free_crt (lc_time->ampm[0]);
        _free_crt (lc_time->ampm[1]);

        _free_crt (lc_time->ww_sdatefmt);
        _free_crt (lc_time->ww_ldatefmt);
        _free_crt (lc_time->ww_timefmt);


        _free_crt (lc_time->_W_wday_abbr[1]);
        _free_crt (lc_time->_W_wday_abbr[2]);
        _free_crt (lc_time->_W_wday_abbr[3]);
        _free_crt (lc_time->_W_wday_abbr[4]);
        _free_crt (lc_time->_W_wday_abbr[5]);
        _free_crt (lc_time->_W_wday_abbr[6]);
        _free_crt (lc_time->_W_wday_abbr[0]);

        _free_crt (lc_time->_W_wday[1]);
        _free_crt (lc_time->_W_wday[2]);
        _free_crt (lc_time->_W_wday[3]);
        _free_crt (lc_time->_W_wday[4]);
        _free_crt (lc_time->_W_wday[5]);
        _free_crt (lc_time->_W_wday[6]);
        _free_crt (lc_time->_W_wday[0]);

        _free_crt (lc_time->_W_month_abbr[0]);
        _free_crt (lc_time->_W_month_abbr[1]);
        _free_crt (lc_time->_W_month_abbr[2]);
        _free_crt (lc_time->_W_month_abbr[3]);
        _free_crt (lc_time->_W_month_abbr[4]);
        _free_crt (lc_time->_W_month_abbr[5]);
        _free_crt (lc_time->_W_month_abbr[6]);
        _free_crt (lc_time->_W_month_abbr[7]);
        _free_crt (lc_time->_W_month_abbr[8]);
        _free_crt (lc_time->_W_month_abbr[9]);
        _free_crt (lc_time->_W_month_abbr[10]);
        _free_crt (lc_time->_W_month_abbr[11]);

        _free_crt (lc_time->_W_month[0]);
        _free_crt (lc_time->_W_month[1]);
        _free_crt (lc_time->_W_month[2]);
        _free_crt (lc_time->_W_month[3]);
        _free_crt (lc_time->_W_month[4]);
        _free_crt (lc_time->_W_month[5]);
        _free_crt (lc_time->_W_month[6]);
        _free_crt (lc_time->_W_month[7]);
        _free_crt (lc_time->_W_month[8]);
        _free_crt (lc_time->_W_month[9]);
        _free_crt (lc_time->_W_month[10]);
        _free_crt (lc_time->_W_month[11]);

        _free_crt (lc_time->_W_ampm[0]);
        _free_crt (lc_time->_W_ampm[1]);

        _free_crt (lc_time->_W_ww_sdatefmt);
        _free_crt (lc_time->_W_ww_ldatefmt);
        _free_crt (lc_time->_W_ww_timefmt);

/* Don't need to make these pointers NULL */
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -