Lines Matching refs:form
127 char *form, *endf;
134 static char* _sfsetclass(const char* form, Accept_t* ac, int flags)
136 static char* _sfsetclass(form, ac, flags)
137 char* form; /* format string */
145 if(*form == '^') /* complementing this set */
147 form += 1;
154 if(*form == ']' || *form == '-') /* special first char */
155 { ac->ok[*form] = ac->yes;
156 form += 1;
158 ac->form = (char*)form;
162 for(n = 1; *form != ']'; form += n)
163 { if((c = *((uchar*)form)) == 0)
166 if(*(form+1) == '-')
167 { endc = *((uchar*)(form+2));
179 if((flags&SFFMT_LONG) && (n = (int)SFMBLEN(form,&mbs)) <= 0)
187 ac->endf = (char*)form;
188 return (char*)(form+1);
202 char *form = ac->form;
206 for(n = 1; *form != ']'; form += n)
207 { if((c = *((uchar*)form)) == 0)
210 if(*(form+1) == '-')
211 { endc = *((uchar*)(form+2));
218 if((n = mbrtowc(&fwc, form, ac->endf-form, &mbs)) > 1 &&
300 int sfvscanf(Sfio_t* f, reg const char* form, va_list args)
302 int sfvscanf(f,form,args)
304 reg char* form; /* scanning format */
355 if(!form || f->mode != SF_READ && _sfmode(f,SF_READ,0) < 0)
368 oform = (char*)form;
375 while((fmt = *form++))
392 if((n = (int)mbrtowc(&wc,form-1,SFMBMAX,&fmbs)) <= 0)
401 form += n-1;
415 if(*form == '%')
416 { form += 1;
422 if(*form == '\0')
425 if(*form == '*')
427 form += 1;
439 switch((fmt = *form++) )
442 t_str = (char*)form;
444 { switch(*form++)
447 form = t_str;
458 n_str = (form-1) - t_str;
474 { FMTSET(ft, form,args,
503 if(isdigit(*form))
504 { fmt = *form++;
507 else if(*form == '*')
508 { form = (*_Sffmtintf)(form+1,&n);
509 if(*form == '$')
510 { form += 1;
521 { FMTSET(ft, form,args, '.',dot, 0, 0,0,0,
539 for(v = fmt-'0'; isdigit(*form); ++form)
540 v = v*10 + (*form - '0');
542 if(*form == '$')
543 { form += 1;
560 if(*form == '*')
561 { form = (*_Sffmtintf)(form+1,&n);
562 if(*form == '$')
563 { form += 1;
574 { FMTSET(ft, form,args, 'I',sizeof(int), 0, 0,0,0,
586 else if(isdigit(*form))
587 for(size = 0, n = *form; isdigit(n); n = *++form)
593 if(*form == 'l')
594 { form += 1;
601 if(*form == 'h')
602 { form += 1;
682 { FMTSET(ft, form,args, fmt, size,flags, width,0,base, t_str,n_str);
696 { FMTGET(ft, form,args, fmt, size, flags, width,n,base);
713 if(!argv.ft->form && ft ) /* change extension functions */
715 (*ft->eventf)(f,SF_DPOP,(Void_t*)form,ft) < 0)
725 if(ft->form)
726 { fm->form = (char*)form; SFMBCPY(&fm->mbs,&fmbs);
734 form = ft->form; SFMBCLR(ft->mbs);
738 oform = (char*)form;
741 else fm->form = NIL(char*);
984 if(fmt == '[' && !(form = _sfsetclass(form,&acc,flags)) )
1058 { if(!form || !form[0])
1060 else if((*fm->eventf)(f,SF_DPOP,(Void_t*)form,ft) < 0)
1065 if((form = fm->form) )
1075 if(form && form[0])