Commit 8d91b501 authored by Guy L. Albertelli's avatar Guy L. Albertelli Committed by Alexandre Julliard

Reimplemented "relay=" and "snoop=" suboptions.

parent f53b0e89
......@@ -10,6 +10,7 @@
#include "winbase.h"
#include "winnls.h"
#include "ntddk.h"
#include "wine/library.h"
#include "options.h"
#include "version.h"
......@@ -165,6 +166,12 @@ static void do_debugmsg( const char *arg )
char *opt, *options = strdup(arg);
int i;
/* defined in relay32/relay386.c */
extern char **debug_relay_includelist;
extern char **debug_relay_excludelist;
/* defined in relay32/snoop.c */
extern char **debug_snoop_includelist;
extern char **debug_snoop_excludelist;
if (!(opt = strtok( options, "," ))) goto error;
do
......@@ -192,6 +199,48 @@ static void do_debugmsg( const char *arg )
{
if (*p == '+') set = ~0;
else clear = ~0;
if (!strncasecmp(p+1, "relay=", 6) ||
!strncasecmp(p+1, "snoop=", 6))
{
int i, l;
char *s, *s2, ***output, c;
if (strchr(p,','))
l=strchr(p,',')-p;
else
l=strlen(p);
set = ~0;
clear = 0;
output = (*p == '+') ?
((*(p+1) == 'r') ?
&debug_relay_includelist :
&debug_snoop_includelist) :
((*(p+1) == 'r') ?
&debug_relay_excludelist :
&debug_snoop_excludelist);
s = p + 7;
/* if there are n ':', there are n+1 modules, and we need
n+2 slots, last one being for the sentinel (NULL) */
i = 2;
while((s = strchr(s, ':'))) i++, s++;
*output = malloc(sizeof(char **) * i);
i = 0;
s = p + 7;
while((s2 = strchr(s, ':'))) {
c = *s2;
*s2 = '\0';
*((*output)+i) = _strupr(strdup(s));
*s2 = c;
s = s2 + 1;
i++;
}
c = *(p + l);
*(p + l) = '\0';
*((*output)+i) = _strupr(strdup(s));
*(p + l) = c;
*((*output)+i+1) = NULL;
*(p + 6) = '\0';
}
}
p++;
if (!strcmp( p, "all" )) p = ""; /* empty string means all */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment