+static void fdom_split(const char *fdom, const char **dom_r, int *qf_r,
+ char *ownflags, int ownflags_l) {
+ int qf;
+ char *ep;
+
+ qf= strtoul(fdom,&ep,0);
+ if (*ep == ',' && strchr(ep,'/')) {
+ ep++;
+ while (*ep != '/') {
+ if (--ownflags_l <= 0) { fputs("too many flags\n",stderr); exit(3); }
+ *ownflags++= *ep++;
+ }
+ }
+ if (*ep != '/') { *dom_r= fdom; *qf_r= 0; }
+ else { *dom_r= ep+1; *qf_r= qf; }
+ *ownflags= 0;
+}
+