#include <memory.h>
#include <malloc.h>
#include "cellservdb.h"
+#include <afs/cm_config.h>
-#ifdef AFS_NT40_ENV
#include <windows.h>
#include <winsock2.h>
-#else
-#include <sys/socket.h>
-#endif
-
/*
* PROTOTYPES _________________________________________________________________
void CSDB_GetFileName (char *pszFilename)
{
-#ifdef AFS_NT40_ENV
- /* Find the appropriate AFSDCELL.INI */
- GetWindowsDirectory (pszFilename, MAX_CSDB_PATH);
-
- if (pszFilename[ strlen(pszFilename)-1 ] != '\\')
- strcat (pszFilename, "\\");
-
- strcat (pszFilename, "AFSDCELL.INI");
-#else
- strcpy (pszFilename, "/usr/vice/etc/CellServDB");
-#endif
+ cm_GetCellServDB(pszFilename, MAX_CSDB_PATH);
}
{
for (pLine = pCellServDB->pFirst; pLine; pLine = pLine->pNext)
{
-#ifdef AFS_NT40_ENV
sprintf (szLine, "%s\r\n", pLine->szLine);
-#else
- sprintf (szLine, "%s\n", pLine->szLine);
-#endif
fwrite (szLine, 1, strlen(szLine), pFile);
}
CELLDBLINEINFO Info;
if (!CSDB_CrackLine (&Info, pLine->szLine))
continue;
- if (!strcmpi (Info.szCell, pszCell))
+ if (!_stricmp (Info.szCell, pszCell))
return pLine;
}
return NULL;