Bugzilla Bug 255633: allow hyphen (-) and underscore (_) in log module

names.  The patch is contributed by Ed Catmur <ed@catmur.co.uk>. r=wtc.
This commit is contained in:
wtchang%redhat.com 2005-03-09 22:34:20 +00:00
Родитель 07c869f8ce
Коммит 7d2b0e0b7e
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -219,7 +219,7 @@ void _PR_InitLog(void)
PRInt32 bufSize = DEFAULT_BUF_SIZE; PRInt32 bufSize = DEFAULT_BUF_SIZE;
while (pos < evlen) { while (pos < evlen) {
PRIntn level = 1, count = 0, delta = 0; PRIntn level = 1, count = 0, delta = 0;
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]%n:%d%n", count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_]%n:%d%n",
module, &delta, &level, &delta); module, &delta, &level, &delta);
pos += delta; pos += delta;
if (count == 0) break; if (count == 0) break;
@ -328,7 +328,7 @@ static void _PR_SetLogModuleLevel( PRLogModuleInfo *lm )
while (pos < evlen) { while (pos < evlen) {
PRIntn level = 1, count = 0, delta = 0; PRIntn level = 1, count = 0, delta = 0;
count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]%n:%d%n", count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_]%n:%d%n",
module, &delta, &level, &delta); module, &delta, &level, &delta);
pos += delta; pos += delta;
if (count == 0) break; if (count == 0) break;