mirror of
https://github.com/0intro/conterm
synced 2024-11-24 14:49:40 +03:00
memrchr -> mymemrchr for FreeBSD
This commit is contained in:
parent
347c54dbd3
commit
46bd8d37d2
@ -1010,7 +1010,7 @@ parsename(char *name, Elemlist *e)
|
||||
}
|
||||
|
||||
void*
|
||||
memrchr(void *va, int c, long n)
|
||||
mymemrchr(void *va, int c, long n)
|
||||
{
|
||||
uchar *a, *e;
|
||||
|
||||
@ -1150,7 +1150,7 @@ namec(char *aname, int amode, int omode, ulong perm)
|
||||
strcpy(tmperrbuf, up->errstr);
|
||||
NameError:
|
||||
len = prefix+e.off[npath];
|
||||
if(len < ERRMAX/3 || (name=memrchr(aname, '/', len))==nil || name==aname)
|
||||
if(len < ERRMAX/3 || (name=mymemrchr(aname, '/', len))==nil || name==aname)
|
||||
snprint(up->genbuf, sizeof up->genbuf, "%.*s", len, aname);
|
||||
else
|
||||
snprint(up->genbuf, sizeof up->genbuf, "...%.*s", (int)(len-(name-aname)), name);
|
||||
|
Loading…
Reference in New Issue
Block a user