openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glibc/2.29-r0/git/locale/programs/record-status.c
struct locale_state push_locale(void)
{
    int saved_errno;
    const char* orig;
    char* copy = NULL;

    saved_errno = errno;

    orig = setlocale(LC_CTYPE, NULL);
    if (orig == NULL)
        error(0, 0, "failed to read locale!");

    if (setlocale(LC_CTYPE, "") == NULL)
        error(0, 0, "failed to set locale!");

    errno = saved_errno;

    if (orig != NULL)
        copy = strdup(orig);

    /* We will return either a valid locale or NULL if we failed
       to save the locale.  */
    return (struct locale_state){.cur_locale = copy};
}
/* Alter the current locale to match the locale configured by the
   user, and return the previous saved state.  */
Alter the current locale to match the locale configured by the
user, and return the previous saved state.
Alter the current locale to match the locale configured by the user and return the previous saved state .
struct locale_state push_locale(void)
{
    int saved_errno;
    const char* orig;
    char* copy = NULL;
    saved_errno = errno;
    orig = setlocale(LC_CTYPE, NULL);
    if (orig == NULL)
        error(0, 0, "failed to read locale!");
    if (setlocale(LC_CTYPE, "") == NULL)
        error(0, 0, "failed to set locale!");
    errno = saved_errno;
    if (orig != NULL)
        copy = strdup(orig);
    return (struct locale_state){.cur_locale = copy};
}
struct locale_state push_locale ( void ) { int saved_errno ; const char * orig ; char * copy = NULL ; saved_errno = errno ; orig = setlocale ( LC_CTYPE , NULL ) ; if ( orig == NULL ) error ( 0 , 0 , " " ) ; if ( setlocale ( LC_CTYPE , " " ) == NULL ) error ( 0 , 0 , " " ) ; errno = saved_errno ; if ( orig != NULL ) copy = strdup ( orig ) ; return ( struct locale_state ) { . cur_locale = copy } ; }
Alter the current locale to match the locale configured by the
user, and return the previous saved state.
Alter the current locale to match the locale configured by the user and return the previous saved state .
/* We will return either a valid locale or NULL if we failed
       to save the locale.  */