зеркало из https://github.com/github/ruby.git
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a26972d26f
Коммит
a60db057a2
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Jul 6 00:51:43 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
||||||
|
|
||||||
|
* win32/win32.c (NtCmdGlob): patterns should be separated and
|
||||||
|
NUL terminated.
|
||||||
|
|
||||||
Wed Jul 5 22:27:56 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
Wed Jul 5 22:27:56 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
||||||
|
|
||||||
* cygwin/GNUmakefile: use ruby.def to make rubycw.dll.
|
* cygwin/GNUmakefile: use ruby.def to make rubycw.dll.
|
||||||
|
|
|
@ -872,13 +872,28 @@ insert(char *path, ListInfo *listinfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
# include <sys/param.h>
|
||||||
|
#else
|
||||||
|
# define MAXPATHLEN 512
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
NtCmdGlob (NtCmdLineElement *patt)
|
NtCmdGlob (NtCmdLineElement *patt)
|
||||||
{
|
{
|
||||||
ListInfo listinfo;
|
ListInfo listinfo;
|
||||||
|
char buffer[MAXPATHLEN], *buf = buffer;
|
||||||
|
|
||||||
listinfo.head = listinfo.tail = 0;
|
listinfo.head = listinfo.tail = 0;
|
||||||
|
|
||||||
rb_glob(patt->str, insert, (VALUE)&listinfo);
|
if (patt->len >= MAXPATHLEN)
|
||||||
|
buf = ruby_xmalloc(patt->len + 1);
|
||||||
|
|
||||||
|
strncpy(buf, patt->str, patt->len);
|
||||||
|
buf[patt->len] = 0;
|
||||||
|
rb_glob(buf, insert, (VALUE)&listinfo);
|
||||||
|
if (buf != buffer)
|
||||||
|
free(buf);
|
||||||
|
|
||||||
if (listinfo.head && listinfo.tail) {
|
if (listinfo.head && listinfo.tail) {
|
||||||
listinfo.head->prev = patt->prev;
|
listinfo.head->prev = patt->prev;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче