#define AFS_THISCELL "ThisCell"
#define AFS_CELLSERVDB_UNIX "CellServDB"
#define AFS_CELLSERVDB_NT "afsdcell.ini"
+#ifndef AFSDIR_CLIENT_ETC_DIRPATH
#define AFSDIR_CLIENT_ETC_DIRPATH "c:/afs"
+#endif
#if defined(DJGPP) || defined(AFS_WIN95_ENV)
#define AFS_CELLSERVDB AFS_CELLSERVDB_UNIX
#ifdef DJGPP
{
FILE *thisCell;
char thisCellPath[256];
- char *afsconf_path;
char *newline;
#ifdef DJGPP
strcpy(thisCellPath, cm_confDir);
#else
/* Win 95 */
+ char *afsconf_path;
afsconf_path = getenv("AFSCONF");
if (!afsconf_path)
strcpy(thisCellPath, AFSDIR_CLIENT_ETC_DIRPATH);
cm_configFile_t *cm_CommonOpen(char *namep, char *rwp)
{
char wdir[256];
- long code;
- long tlen;
- FILE *tfilep;
- char *afsconf_path;
+ long code;
+ long tlen;
+ FILE *tfilep;
#if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
code = GetWindowsDirectory(wdir, sizeof(wdir));
- if (code == 0 || code > sizeof(wdir)) return NULL;
+ if (code == 0 || code > sizeof(wdir))
+ return 0;
/* add trailing backslash, if required */
tlen = strlen(wdir);
#ifdef DJGPP
strcpy(wdir,cm_confDir);
#else
- afsconf_path = getenv("AFSCONF");
+ char *afsconf_path = getenv("AFSCONF");
if (!afsconf_path)
strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
else
long cm_CloseCellFile(cm_configFile_t *filep)
{
char wdir[256];
- char sdir[256];
- long code;
- long closeCode;
- int tlen;
- char *afsconf_path;
-
+ char sdir[256];
+ long code;
+ long closeCode;
+ int tlen;
+#ifdef AFS_WIN95_ENV
+ char *afsconf_path;
+#endif
closeCode = fclose((FILE *)filep);
#if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
void cm_GetConfigDir(char *dir)
{
char wdir[256];
- char *afsconf_path;
- int code;
- int tlen;
+ int code;
+ int tlen;
+#ifdef AFS_WIN95_ENV
+ char *afsconf_path;
+#endif
#if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
code = GetWindowsDirectory(wdir, sizeof(wdir));