Lines Matching defs:ft

45 static Fmtpos_t* sffmtpos(Sfio_t* f,const char* form,va_list args,Sffmt_t* ft,int type)
47 static Fmtpos_t* sffmtpos(f,form,args,ft,type)
51 Sffmt_t* ft;
68 else if(!(fp = sffmtpos(f,form,args,ft,-1)) )
139 if(fp && fp[n].ft.fmt == 0)
140 { fp[n].ft.fmt = LEFTP;
141 fp[n].ft.form = (char*)form;
194 if(fp && fp[n].ft.fmt == 0)
195 { fp[n].ft.fmt = '.';
196 fp[n].ft.size = dot;
197 fp[n].ft.form = (char*)form;
232 if(fp && fp[n].ft.fmt == 0)
233 { fp[n].ft.fmt = 'I';
234 fp[n].ft.size = sizeof(int);
235 fp[n].ft.form = (char*)form;
319 if(fp && fp[argp].ft.fmt == 0)
320 { fp[argp].ft.form = (char*)form;
321 fp[argp].ft.fmt = fp[argp].fmt = fmt;
322 fp[argp].ft.size = size;
323 fp[argp].ft.flags = flags;
324 fp[argp].ft.width = width;
325 fp[argp].ft.precis = precis;
326 fp[argp].ft.base = base;
327 fp[argp].ft.t_str = t_str;
328 fp[argp].ft.n_str = n_str;
338 fp[n].ft.fmt = 0;
343 if(ft)
344 memcpy(&savft, ft, sizeof(*ft));
346 { if(fp[n].ft.fmt == 0) /* gap: pretend it's a 'd' pattern */
347 { fp[n].ft.fmt = 'd';
348 fp[n].ft.width = 0;
349 fp[n].ft.precis = 0;
350 fp[n].ft.base = 0;
351 fp[n].ft.size = 0;
352 fp[n].ft.t_str = 0;
353 fp[n].ft.n_str = 0;
354 fp[n].ft.flags = 0;
359 if(ft && ft->extf)
360 { fp[n].ft.version = ft->version;
361 fp[n].ft.extf = ft->extf;
362 fp[n].ft.eventf = ft->eventf;
364 fp[n].ft.width = fp[v].argv.i;
366 fp[n].ft.precis = fp[v].argv.i;
368 fp[n].ft.base = fp[v].argv.i;
370 fp[n].ft.t_str = fp[v].argv.s;
372 fp[n].ft.size = fp[v].argv.i;
374 memcpy(ft,&fp[n].ft,sizeof(Sffmt_t));
375 va_copy(ft->args,args);
376 ft->flags |= SFFMT_ARGPOS;
377 v = (*ft->extf)(f, (Void_t*)(&fp[n].argv), ft);
378 va_copy(args,ft->args);
379 memcpy(&fp[n].ft,ft,sizeof(Sffmt_t));
381 { memcpy(ft,&savft,sizeof(Sffmt_t));
382 ft = NIL(Sffmt_t*);
385 if(!(fp[n].ft.flags&SFFMT_VALUE) )
387 else if(_Sftype[fp[n].ft.fmt]&(SFFMT_INT|SFFMT_UINT) )
388 { if(fp[n].ft.size == sizeof(short))
389 { if(_Sftype[fp[n].ft.fmt]&SFFMT_INT)
393 else if(fp[n].ft.size == sizeof(char))
394 { if(_Sftype[fp[n].ft.fmt]&SFFMT_INT)
399 else if(_Sftype[fp[n].ft.fmt]&SFFMT_FLOAT )
400 { if(fp[n].ft.size == sizeof(float) )
406 if(fp[n].ft.fmt == LEFTP)
408 fp[n].ft.size = strlen(fp[n].argv.s);
410 else if(fp[n].ft.fmt == '.' || fp[n].ft.fmt == 'I')
412 else if(fp[n].ft.fmt == '!')
413 { if(ft)
414 memcpy(ft,&savft,sizeof(Sffmt_t));
415 fp[n].argv.ft = ft = va_arg(args, Sffmt_t*);
416 if(ft->form)
417 ft = NIL(Sffmt_t*);
418 if(ft)
419 memcpy(&savft,ft,sizeof(Sffmt_t));
423 else switch(_Sftype[fp[n].ft.fmt])
447 if(fp[n].ft.base >= 0)
450 else if((fp[n].ft.flags & SFFMT_LONG) ||
451 fp[n].ft.fmt == 'C' )
466 if(ft)
467 memcpy(ft,&savft,sizeof(Sffmt_t));