projects
/
oweals
/
cde.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rpc.cmsd: use TIRPC on Linux
[oweals/cde.git]
/
cde
/
programs
/
dtlogin
/
resource.c
diff --git
a/cde/programs/dtlogin/resource.c
b/cde/programs/dtlogin/resource.c
index 2c4e62ffa023e88f3e81b0094fd20095d4731078..6608dba540c99776a690642cb982bc21c5fcc90a 100644
(file)
--- 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
* details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with these librar
ar
ies 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
*/
* 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
#ifdef DEF_NETWORK_DEV
char *networkDev;
#endif
-#if defined(__osf__)
-char *ignoreLocales;
-#endif
/*
* Dtlogin will accept both Dtlogin and XDM resources. The string variable
/*
* Dtlogin will accept both Dtlogin and XDM resources. The string variable
@@
-222,12
+219,6
@@
static char AppName[16] = DTLOGIN;
# ifdef __apollo
# define DEF_LANG "C"
# endif
# 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
# ifdef sun /* default language under Solaris */
# define DEF_LANG "C"
# endif
@@
-290,10
+281,6
@@
struct dmResources {
"networkDevice","NetworkDevice",DM_STRING, &networkDev,
DEF_NETWORK_DEV,
#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])
};
# define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0])
@@
-409,6
+396,7
@@
GetResource( char *name, char *class, int valueType, char **valuep,
char *type;
XrmValue value;
char *string, *new_string;
char *type;
XrmValue value;
char *string, *new_string;
+ char empty[] = "";
char str_buf[50];
int len;
char str_buf[50];
int len;
@@
-422,8
+410,13
@@
GetResource( char *name, char *class, int valueType, char **valuep,
}
else
{
}
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);
}
Debug ("%s/%s value %*.*s\n", name, class, len, len, string);
@@
-435,7
+428,7
@@
GetResource( char *name, char *class, int valueType, char **valuep,
if (valueType == DM_STRING && *valuep) {
if (string != NULL && strlen (*valuep) == len && !strncmp (*valuep, string, len))
if (valueType == DM_STRING && *valuep) {
if (string != NULL && strlen (*valuep) == len && !strncmp (*valuep, string, len))
- return;
+ return
0
;
else {
free (*valuep);
*(valuep) = NULL;
else {
free (*valuep);
*(valuep) = NULL;
@@
-450,7
+443,7
@@
GetResource( char *name, char *class, int valueType, char **valuep,
if (!new_string) {
LogOutOfMem(
ReadCatalog(MC_LOG_SET,MC_LOG_GET_RSC,MC_DEF_LOG_GET_RSC));
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';
}
strncpy (new_string, string, len);
new_string[len] = '\0';
@@
-480,6
+473,8
@@
GetResource( char *name, char *class, int valueType, char **valuep,
break;
}
break;
}
+
+ return 1;
}
XrmOptionDescRec configTable [] = {
}
XrmOptionDescRec configTable [] = {
@@
-863,9
+858,14
@@
char * newname;
strncpy(newname, tempName, tempLen);
strcpy(newname+tempLen, name);
free (langString);
strncpy(newname, tempName, tempLen);
strcpy(newname+tempLen, name);
free (langString);
+ free (tempName);
return(newname);
}
}
return(newname);
}
}
+
+ default:
+ /* special is of an unknown value */
+ return(NULL);
}
}
}
}