Rename macroses: @echopath to @areapath, @echoname to @areaname, @echotype to @areatype
This commit is contained in:
parent
1523486ef1
commit
8023d3c623
@ -10,6 +10,11 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.5, /snapshot/
|
Notes for GoldED+ 1.1.5, /snapshot/
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
! Rename macroses:
|
||||||
|
@echopath to @areapath - path to echoarea base,
|
||||||
|
@echoname to @areaname - echoarea file name without path,
|
||||||
|
@echotype to @areatype - echoarea base type.
|
||||||
|
|
||||||
- Case insensitive regexp should work on Win9x now.
|
- Case insensitive regexp should work on Win9x now.
|
||||||
|
|
||||||
+ New config file token LatinToLocal.
|
+ New config file token LatinToLocal.
|
||||||
|
@ -388,40 +388,40 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
|||||||
|
|
||||||
if (strnieql(dst, "@echo", 5))
|
if (strnieql(dst, "@echo", 5))
|
||||||
{
|
{
|
||||||
if (tokenxchg(dst, "@echotype", AA->basetype()))
|
if (tokenxchg(dst, "@areatype", AA->basetype()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
char echopath[GMAXPATH];
|
char areapath[GMAXPATH];
|
||||||
char echoname[GMAXPATH];
|
char areaname[GMAXPATH];
|
||||||
|
|
||||||
strcpy(echopath, AA->path());
|
strcpy(areapath, AA->path());
|
||||||
echoname[0] = NUL;
|
areaname[0] = NUL;
|
||||||
|
|
||||||
size_t slashpos;
|
size_t slashpos;
|
||||||
size_t pathlen = strlen(echopath);
|
size_t pathlen = strlen(areapath);
|
||||||
|
|
||||||
for (slashpos = pathlen-1; slashpos < pathlen; slashpos--)
|
for (slashpos = pathlen-1; slashpos < pathlen; slashpos--)
|
||||||
if (isslash(echopath[slashpos])) break;
|
if (isslash(areapath[slashpos])) break;
|
||||||
|
|
||||||
if (slashpos < pathlen)
|
if (slashpos < pathlen)
|
||||||
{
|
{
|
||||||
strcpy(echoname, &echopath[slashpos+1]);
|
strcpy(areaname, &areapath[slashpos+1]);
|
||||||
echopath[slashpos+1] = NUL;
|
areapath[slashpos+1] = NUL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpy(echoname, echopath);
|
strcpy(areaname, areapath);
|
||||||
echopath[0] = NUL;
|
areapath[0] = NUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tokenxchg(dst, "@echopath", echopath))
|
if (tokenxchg(dst, "@areapath", areapath))
|
||||||
continue;
|
continue;
|
||||||
if (tokenxchg(dst, "@echoname", echoname))
|
if (tokenxchg(dst, "@areaname", areaname))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ptr1, *ptr2;
|
char *ptr1, *ptr2;
|
||||||
if (strnieql(dst, "@pad{", 5) &&
|
if (strnieql(dst, "@pad{", 5) &&
|
||||||
((ptr1 = strstr(dst+5, "}{")) != NULL) &&
|
((ptr1 = strstr(dst+5, "}{")) != NULL) &&
|
||||||
((ptr1-dst-5) > 2) &&
|
((ptr1-dst-5) > 2) &&
|
||||||
((ptr2 = strchr(ptr1+2, '}')) != NULL)
|
((ptr2 = strchr(ptr1+2, '}')) != NULL)
|
||||||
|
Reference in New Issue
Block a user