X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Fprograms%2Fdtlogin%2Fresource.c;h=6b63668964951d21dfc4567a16fb965b22e51f53;hb=419a7efff4541e7327bc1c4e28c4d8f16fb81035;hp=715d3ba75cc410c0cd07f525c875c23d39d82c9d;hpb=e54c164fe1e7eb56def239b67eaffe2c02817402;p=oweals%2Fcde.git diff --git a/cde/programs/dtlogin/resource.c b/cde/programs/dtlogin/resource.c index 715d3ba7..6b636689 100644 --- a/cde/programs/dtlogin/resource.c +++ b/cde/programs/dtlogin/resource.c @@ -16,7 +16,7 @@ * details. * * You should have received a copy of the GNU Lesser General Public - * License along with these librararies and programs; if not, write + * License along with these libraries and programs; if not, write * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ @@ -90,9 +90,6 @@ int langListTimeout; #ifdef DEF_NETWORK_DEV char *networkDev; #endif -#if defined(__osf__) -char *ignoreLocales; -#endif /* * Dtlogin will accept both Dtlogin and XDM resources. The string variable @@ -219,17 +216,8 @@ static char AppName[16] = DTLOGIN; #endif #ifndef DEF_LANG /* LANG default settings for various architectures */ -# ifdef __apollo -# define DEF_LANG "C" -# endif -# ifdef __osf__ -# define DEF_LANG "C" -# endif -# ifdef __hp_osf -# define DEF_LANG "en_US.88591" -# endif # ifdef sun /* default language under Solaris */ -# define DEF_LANG "C" +# define DEF_LANG "C" # endif #endif @@ -290,10 +278,6 @@ struct dmResources { "networkDevice","NetworkDevice",DM_STRING, &networkDev, DEF_NETWORK_DEV, #endif -#if defined(__osf__) -"ignoreLocales", "IgnoreLocales", DM_STRING, &ignoreLocales, - "", -#endif }; # define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0]) @@ -409,6 +393,7 @@ GetResource( char *name, char *class, int valueType, char **valuep, char *type; XrmValue value; char *string, *new_string; + char empty[] = ""; char str_buf[50]; int len; @@ -422,8 +407,13 @@ GetResource( char *name, char *class, int valueType, char **valuep, } else { - string = default_value; - len = (string == NULL ? 0 : strlen (string)); + if(default_value) { + string = default_value; + len = strlen (string); + } else { + string = empty; + len = 0; + } } Debug ("%s/%s value %*.*s\n", name, class, len, len, string); @@ -621,7 +611,7 @@ LoadDMResources( void ) keyFile = getFullFileName(keyFile, 0, NULL); accessFile = getFullFileName(accessFile, 0, NULL); -#ifndef __apollo /* set a TZ default for all OS except Domain */ + /* set a TZ default */ if (timeZone == NULL || strlen(timeZone) == 0) { /* @@ -629,7 +619,6 @@ LoadDMResources( void ) */ GetSysParms(&timeZone,0,0); } -#endif }