version 1.55, 2006/09/17 19:03:15 |
version 1.56, 2006/09/24 09:04:05 |
|
|
} LstSrc; |
} LstSrc; |
|
|
static Suff *suffNull; /* The NULL suffix for this run */ |
static Suff *suffNull; /* The NULL suffix for this run */ |
|
static Suff *emptySuff; /* The empty suffix required for POSIX |
|
* single-suffix transformation rules */ |
|
|
|
|
static char *SuffStrIsPrefix(const char *, const char *); |
static char *SuffStrIsPrefix(const char *, const char *); |
|
|
static void SuffPrintName(void *); |
static void SuffPrintName(void *); |
static void SuffPrintSuff(void *); |
static void SuffPrintSuff(void *); |
static void SuffPrintTrans(void *); |
static void SuffPrintTrans(void *); |
static Suff *emptySuff(void); |
|
|
|
static LstNode suff_find_by_name(const char *); |
static LstNode suff_find_by_name(const char *); |
static LstNode transform_find_by_name(const char *); |
static LstNode transform_find_by_name(const char *); |
|
|
if (s == suffNull) |
if (s == suffNull) |
suffNull = NULL; |
suffNull = NULL; |
|
|
|
if (s == emptySuff) |
|
emptySuff = NULL; |
|
|
Lst_Destroy(&s->ref, NOFREE); |
Lst_Destroy(&s->ref, NOFREE); |
Lst_Destroy(&s->children, NOFREE); |
Lst_Destroy(&s->children, NOFREE); |
Lst_Destroy(&s->parents, NOFREE); |
Lst_Destroy(&s->parents, NOFREE); |
|
|
#endif |
#endif |
Lst_Init(&sufflist); |
Lst_Init(&sufflist); |
sNum = 0; |
sNum = 0; |
suffNull = emptySuff(); |
suffNull = emptySuff; |
} |
} |
|
|
/*- |
/*- |
|
|
* find a double rule over a singleton, hence we leave this |
* find a double rule over a singleton, hence we leave this |
* check until the end. |
* check until the end. |
* |
* |
|
* XXX: Use emptySuff over suffNull? |
*/ |
*/ |
*srcPtr = single; |
*srcPtr = single; |
*targPtr = suffNull; |
*targPtr = suffNull; |
|
|
* actually go on the suffix list or everyone will think that's its |
* actually go on the suffix list or everyone will think that's its |
* suffix. |
* suffix. |
*/ |
*/ |
|
emptySuff = suffNull = emalloc(sizeof(Suff)); |
|
|
suffNull = emptySuff(); |
suffNull->name = estrdup(""); |
|
suffNull->nameLen = 0; |
|
Lst_Init(&suffNull->searchPath); |
|
Dir_Concat(&suffNull->searchPath, dirSearchPath); |
|
Lst_Init(&suffNull->children); |
|
Lst_Init(&suffNull->parents); |
|
Lst_Init(&suffNull->ref); |
|
suffNull->sNum = sNum++; |
|
suffNull->flags = SUFF_NULL; |
|
|
} |
} |
|
|
Suff * |
|
emptySuff() |
|
{ |
|
Suff *s; |
|
s = emalloc(sizeof(Suff)); |
|
|
|
s->name = estrdup(""); |
|
s->nameLen = 0; |
|
Lst_Init(&s->searchPath); |
|
Dir_Concat(&s->searchPath, dirSearchPath); |
|
Lst_Init(&s->children); |
|
Lst_Init(&s->parents); |
|
Lst_Init(&s->ref); |
|
s->sNum = sNum++; |
|
s->flags = SUFF_NULL; |
|
return s; |
|
} |
|
|
|
/*- |
/*- |
*---------------------------------------------------------------------- |
*---------------------------------------------------------------------- |