Allow multiple warnings in #pragma warning enable/disable

Make it possible to specify multiple warning numbers in #pragma warning
enable/disable. The values must be separated with commas (possibly with
whitespace in between).
This commit is contained in:
Zeex 2014-01-05 16:29:34 +07:00
parent 634f40953b
commit 1989a6dd37

View File

@ -1175,12 +1175,16 @@ static int command(void)
if (ok) {
if (strcmp(str,"enable")==0) {
cell val;
preproc_expr(&val,NULL);
pc_enablewarning(val,1);
do {
preproc_expr(&val,NULL);
pc_enablewarning(val,1);
} while (*lptr!='\0');
} else if (strcmp(str,"disable")==0) {
cell val;
preproc_expr(&val,NULL);
pc_enablewarning(val,0);
do {
preproc_expr(&val,NULL);
pc_enablewarning(val,0);
} while (*lptr!='\0');
} else if (strcmp(str,"push")==0) {
pc_pushwarnings();
} else if (strcmp(str,"pop")==0) {