#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include "clearcase.h"
#include "nedit_malloc.h"
#include <string.h>
#include <stdlib.h>
#include <X11/Intrinsic.h>
#ifdef HAVE_DEBUG_H
#include "../debug.h"
#endif
static int ClearCaseViewTagFound =
0;
static char *ClearCaseViewRoot =
NULL;
static const char *ClearCaseViewTag =
NULL;
const char* GetClearCaseVersionExtendedPath(
const char* fullname)
{
return(strstr(fullname,
"@@/"));
}
const char *GetClearCaseViewTag(
void)
{
if (!ClearCaseViewTagFound) {
const char *envPtr = getenv(
"CLEARCASE_ROOT");
if (envPtr !=
NULL) {
const char *tagPtr;
ClearCaseViewRoot = NEditStrdup(envPtr);
tagPtr = strrchr(ClearCaseViewRoot,
'/');
if (tagPtr !=
NULL) {
ClearCaseViewTag = ++tagPtr;
}
}
}
ClearCaseViewTagFound =
1;
return(ClearCaseViewTag);
}