327{
328 static const TCHAR digits_l[] =
_T(
"0123456789abcdef0x");
329 static const TCHAR digits_u[] =
_T(
"0123456789ABCDEF0X");
330 static const char *_nullstring = "(null)";
336 size_t prefixlen,
len;
337 int written = 1, written_all = 0;
340
342
343 while (written >= 0)
344 {
346
347
348 if (chr ==
_T(
'\0'))
break;
349
350
351 if ((chr !=
_T(
'%')) ||
353 {
354
356 written_all += written;
357 continue;
358 }
359
360
362 while (1)
363 {
369 else break;
371 }
372
373
375 {
376#ifdef _USER32_WSPRINTF
378 written_all += written;
379 continue;
380#else
381 fieldwidth =
va_arg(argptr,
int);
382 if (fieldwidth < 0)
383 {
385 fieldwidth = -fieldwidth;
386 }
388#endif
389 }
390 else
391 {
392 fieldwidth = 0;
393 while (chr >=
_T(
'0') && chr <=
_T(
'9'))
394 {
395 fieldwidth = fieldwidth * 10 + (chr -
_T(
'0'));
397 }
398 }
399
400
401 if (chr == '.')
402 {
404
406 {
407#ifdef _USER32_WSPRINTF
409 written_all += written;
410 continue;
411#else
414#endif
415 }
416 else
417 {
419 while (chr >=
_T(
'0') && chr <=
_T(
'9'))
420 {
423 }
424 }
425 }
427
428
429 do
430 {
433 else if (chr ==
_T(
'L'))
flags |= 0;
434 else if (chr ==
_T(
'F'))
flags |= 0;
436 {
438 }
439 else if (chr ==
_T(
'l'))
440 {
441
444 }
445 else if (chr ==
_T(
'I'))
446 {
448 {
450 }
452 {
455 }
459 {
461 }
462 else break;
463 }
464 else break;
466 }
468
469
473 prefix = 0;
474 switch (chr)
475 {
480 *
va_arg(argptr,
short*) = written_all;
481 else
482 *
va_arg(argptr,
int*) = written_all;
483 continue;
484
488#endif
489 goto case_char;
490
494#endif
495 case_char:
499 {
500 ((
wchar_t*)
string)[0] =
va_arg(argptr,
int);
501 ((
wchar_t*)
string)[1] =
_T(
'\0');
502 }
503 else
504 {
505 ((
char*)
string)[0] =
va_arg(argptr,
int);
506 ((
char*)
string)[1] =
_T(
'\0');
507 }
508 break;
509
512 if (nt_string && (string = nt_string->Buffer))
513 {
514 len = nt_string->Length;
516 break;
517 }
518 string = 0;
519 goto case_string;
520
523#ifndef _UNICODE
525#endif
526 goto case_string;
527
530#ifdef _UNICODE
532#endif
533
534 case_string:
535 if (!string)
536 {
537 string = (
TCHAR*)_nullstring;
538 flags &= ~FLAG_WIDECHAR;
539 }
540
543 else
546 break;
547
548#ifndef _USER32_WSPRINTF
558#else
559 flags &= ~FLAG_WIDECHAR;
560#endif
561
565 break;
566#endif
567
571
573 {
576 }
581
582 goto case_number;
583
587 {
590 }
591 goto case_unsigned;
592
595 flags &= ~FLAG_PAD_ZERO;
597
598
601
602
606 {
608#ifdef _USER32_WSPRINTF
609 fieldwidth += 2;
610#endif
611 }
612
614 case_unsigned:
616
617 case_number:
618#ifdef _UNICODE
620#else
621 flags &= ~FLAG_WIDECHAR;
622#endif
624
625
626 while (val64)
627 {
631 }
632
634 break;
635
636 default:
637
639 continue;
640 }
641
642
643 prefixlen = prefix ?
_tcslen(prefix) : 0;
647
648
650 {
652 {
654 written_all += written;
655 }
656 }
657
658
659 if (prefix)
660 {
662 if (written == -1) return -1;
663 written_all += written;
664 }
665
666
669 {
671 written_all += written;
672 }
673
674
677 else
679 if (written == -1) return -1;
680 written_all += written;
681
682#if 0 && SUPPORT_FLOAT
683
685 {
687 written_all += written;
689 }
690#endif
691
692
694 {
696 {
698 written_all += written;
699 }
700 }
701
702 }
703
704 if (written == -1) return -1;
705
706 return written_all;
707}
char * strchr(const char *String, int ch)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLenum GLint GLint * precision
static const int digits[]
static const DWORD padding[]
static int streamout_char(FILE *stream, int chr)
static int streamout_astring(FILE *stream, const char *string, size_t count)
#define va_arg_f(argptr, flags)
void format_float(TCHAR chr, unsigned int flags, int precision, TCHAR **string, const TCHAR **prefix, va_list *argptr)
static int streamout_wstring(FILE *stream, const wchar_t *string, size_t count)
#define va_arg_fu(argptr, flags)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList