Print this page
make: translate using gettext, rather than the unmaintainable catgets
*** 34,44 ****
* Included files
*/
#include <mksh/dosys.h> /* redirect_io() */
#include <mksh/misc.h> /* retmem() */
#include <mksh/mksh.h>
- #include <mksdmsi18n/mksdmsi18n.h>
#include <errno.h>
#include <signal.h>
/*
--- 34,43 ----
*** 79,95 ****
static void
init_mksh_globals(char *shell)
{
/*
! MBSTOWCS(wcs_buffer, NOCATGETS("SHELL"));
shell_name = GETNAME(wcs_buffer, FIND_LENGTH);
MBSTOWCS(wcs_buffer, shell);
(void) SETVAR(shell_name, GETNAME(wcs_buffer, FIND_LENGTH), false);
*/
char * dmake_shell;
! if ((dmake_shell = getenv(NOCATGETS("DMAKE_SHELL"))) == NULL) {
dmake_shell = shell;
}
MBSTOWCS(wcs_buffer, dmake_shell);
shell_name = GETNAME(wcs_buffer, FIND_LENGTH);
}
--- 78,94 ----
static void
init_mksh_globals(char *shell)
{
/*
! MBSTOWCS(wcs_buffer, "SHELL");
shell_name = GETNAME(wcs_buffer, FIND_LENGTH);
MBSTOWCS(wcs_buffer, shell);
(void) SETVAR(shell_name, GETNAME(wcs_buffer, FIND_LENGTH), false);
*/
char * dmake_shell;
! if ((dmake_shell = getenv("DMAKE_SHELL")) == NULL) {
dmake_shell = shell;
}
MBSTOWCS(wcs_buffer, dmake_shell);
shell_name = GETNAME(wcs_buffer, FIND_LENGTH);
}
*** 106,130 ****
int length;
int oldpathlen;
char *sp_dep_value;
/* check if SUNPRO_DEPENDENCIES is set in the environment */
! if ((sp_dep_value = getenv(NOCATGETS("SUNPRO_DEPENDENCIES"))) != NULL) {
oldpathlen = strlen(oldpath);
/* check if oldpath is indeed in the value of SUNPRO_DEPENDENCIES */
if (strncmp(oldpath, sp_dep_value, oldpathlen) == 0) {
(void) sprintf(buf,
"%s%s",
newpath,
sp_dep_value + oldpathlen);
length = 2 +
! strlen(NOCATGETS("SUNPRO_DEPENDENCIES")) +
strlen(buf);
env = getmem(length);
(void) sprintf(env,
"%s=%s",
! NOCATGETS("SUNPRO_DEPENDENCIES"),
buf);
(void) putenv(env);
}
}
}
--- 105,129 ----
int length;
int oldpathlen;
char *sp_dep_value;
/* check if SUNPRO_DEPENDENCIES is set in the environment */
! if ((sp_dep_value = getenv("SUNPRO_DEPENDENCIES")) != NULL) {
oldpathlen = strlen(oldpath);
/* check if oldpath is indeed in the value of SUNPRO_DEPENDENCIES */
if (strncmp(oldpath, sp_dep_value, oldpathlen) == 0) {
(void) sprintf(buf,
"%s%s",
newpath,
sp_dep_value + oldpathlen);
length = 2 +
! strlen("SUNPRO_DEPENDENCIES") +
strlen(buf);
env = getmem(length);
(void) sprintf(env,
"%s=%s",
! "SUNPRO_DEPENDENCIES",
buf);
(void) putenv(env);
}
}
}