* 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
*/
#ifdef DEF_NETWORK_DEV
char *networkDev;
#endif
-#if defined(__osf__)
-char *ignoreLocales;
-#endif
/*
* Dtlogin will accept both Dtlogin and XDM resources. The string variable
# 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"
# endif
"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])
char *type;
XrmValue value;
char *string, *new_string;
+ char empty[] = "";
char str_buf[50];
int len;
}
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);
if (valueType == DM_STRING && *valuep) {
if (string != NULL && strlen (*valuep) == len && !strncmp (*valuep, string, len))
- return;
+ return 0;
else {
free (*valuep);
*(valuep) = NULL;
if (!new_string) {
LogOutOfMem(
ReadCatalog(MC_LOG_SET,MC_LOG_GET_RSC,MC_DEF_LOG_GET_RSC));
- return;
+ return 0;
}
strncpy (new_string, string, len);
new_string[len] = '\0';
break;
}
+
+ return 1;
}
XrmOptionDescRec configTable [] = {
strncpy(newname, tempName, tempLen);
strcpy(newname+tempLen, name);
free (langString);
+ free (tempName);
return(newname);
}
}
+
+ default:
+ /* special is of an unknown value */
+ return(NULL);
}
}