Char * options;
...
// Cyclically check the values of the options string separated by commas. If disable is found, set vfb_enable = 0.
While (this_opt = strsep (& options ,","))! = NULL ){
If (! * This_opt)
Continue;
If (! Strncmp (this_opt, "Disable", 7 ))
Vfb_enable = 0;
}
// Return the first value sbegin, modify the first address of the string * s, and point to the second parameter
Char * strsep (char ** S, const char * CT)
{
Char * sbegin = * s, * end;
If (sbegin = NULL)
Return NULL;
End = strpbrk (sbegin, CT );
If (end)
* End ++ = '/0 ';
* S = end;
Return sbegin;
}
// Return the first character location equal to CT in CS
Char * strpbrk (const char * cs, const char * CT)
{
Const char * SC1, * SC2;
For (SC1 = cs; * SC1! = '/0'; ++ SC1 ){
For (SC2 = CT; * SC2! = '/0'; ++ SC2 ){
If (* SC1 = * SC2)
Return (char *) SC1;
}
}
Return NULL;
}