#include "acpi.h"
#include "accommon.h"
Go to the source code of this file.
|
static ACPI_SIZE | AcpiUtBoundStringLength (const char *String, ACPI_SIZE Count) |
|
static char * | AcpiUtBoundStringOutput (char *String, const char *End, char c) |
|
static char * | AcpiUtFormatNumber (char *String, char *End, UINT64 Number, UINT8 Base, INT32 Width, INT32 Precision, UINT8 Type) |
|
static char * | AcpiUtPutNumber (char *String, UINT64 Number, UINT8 Base, BOOLEAN Upper) |
|
const char * | AcpiUtScanNumber (const char *String, UINT64 *NumberPtr) |
|
const char * | AcpiUtPrintNumber (char *String, UINT64 Number) |
|
int | vsnprintf (char *String, ACPI_SIZE Size, const char *Format, va_list Args) |
|
int | snprintf (char *String, ACPI_SIZE Size, const char *Format,...) |
|
int | sprintf (char *String, const char *Format,...) |
|
◆ _COMPONENT
◆ ACPI_FORMAT_LEFT
◆ ACPI_FORMAT_PREFIX
#define ACPI_FORMAT_PREFIX 0x40 |
◆ ACPI_FORMAT_SIGN
◆ ACPI_FORMAT_SIGN_PLUS
#define ACPI_FORMAT_SIGN_PLUS 0x02 |
◆ ACPI_FORMAT_SIGN_PLUS_SPACE
#define ACPI_FORMAT_SIGN_PLUS_SPACE 0x04 |
◆ ACPI_FORMAT_UPPER
#define ACPI_FORMAT_UPPER 0x20 |
◆ ACPI_FORMAT_ZERO
◆ AcpiUtBoundStringLength()
static ACPI_SIZE AcpiUtBoundStringLength |
( |
const char * |
String, |
|
|
ACPI_SIZE |
Count |
|
) |
| |
|
static |
Definition at line 105 of file utprint.c.
108{
110
111
113 {
117 }
118
120}
_In_ ULONG _In_ ULONG _In_ ULONG Length
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Referenced by vsnprintf().
◆ AcpiUtBoundStringOutput()
◆ AcpiUtFormatNumber()
Definition at line 290 of file utprint.c.
298{
305 char ReversedString[66];
306
307
308
309
310 if (Base < 2 || Base > 16)
311 {
313 }
314
316 {
317 Type &= ~ACPI_FORMAT_ZERO;
318 }
319
323
324
325
328 {
330 {
334 }
336 {
339 }
341 {
344 }
345 }
346 if (NeedPrefix)
347 {
350 {
352 }
353 }
354
355
356
359
360
361
363 {
365 }
366
368
369
370
372 {
374 {
376 }
377 }
379 {
381 }
382 if (NeedPrefix)
383 {
386 {
388 String, End, Upper ?
'X' :
'x');
389 }
390 }
392 {
394 {
396 }
397 }
398
399 while (
i <= --Precision)
400 {
402 }
404 {
407 }
409 {
411 }
412
414}
#define ACPI_PTR_DIFF(a, b)
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
#define ACPI_FORMAT_PREFIX
#define ACPI_FORMAT_UPPER
static char * AcpiUtBoundStringOutput(char *String, const char *End, char c)
static char * AcpiUtPutNumber(char *String, UINT64 Number, UINT8 Base, BOOLEAN Upper)
#define ACPI_FORMAT_SIGN_PLUS
#define ACPI_FORMAT_SIGN_PLUS_SPACE
Referenced by vsnprintf().
◆ AcpiUtPrintNumber()
Definition at line 249 of file utprint.c.
252{
253 char AsciiString[20];
254 const char *Pos1;
255 char *Pos2;
256
257
260
261 while (Pos1 != AsciiString)
262 {
263 *(Pos2++) = *(--Pos1);
264 }
265
266 *Pos2 = 0;
268}
◆ AcpiUtPutNumber()
Definition at line 171 of file utprint.c.
176{
177 const char *Digits;
180
181
184
186 {
188 }
189 else
190 {
192 {
194 *(
Pos++) = Digits[DigitIndex];
195 }
196 }
197
198
200}
unsigned long long UINT64
const char AcpiGbl_LowerHexDigits[]
const char AcpiGbl_UpperHexDigits[]
ACPI_STATUS AcpiUtDivide(UINT64 InDividend, UINT64 InDivisor, UINT64 *OutQuotient, UINT64 *OutRemainder)
Referenced by AcpiUtFormatNumber(), and AcpiUtPrintNumber().
◆ AcpiUtScanNumber()
Definition at line 217 of file utprint.c.
220{
222
223
225 {
228 }
229
232}
ACPI_STATUS AcpiUtShortMultiply(UINT64 InMultiplicand, UINT32 Multiplier, UINT64 *Outproduct)
Referenced by vsnprintf().
◆ snprintf()
Definition at line 736 of file utprint.c.
741{
744
745
749
751}
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
◆ sprintf()
◆ vsnprintf()
Definition at line 433 of file utprint.c.
438{
443 char Qualifier;
446 char *End;
452
453
455
456
459 } else {
461 }
462
464 {
466 {
468 continue;
469 }
470
473
474
475
476 do
477 {
480 {
482 }
484 {
486 }
488 {
490 }
492 {
494 }
496 {
498 }
499 else
500 {
501 break;
502 }
503
504 } while (1);
505
506
507
510 {
513 }
515 {
519 {
522 }
523 }
524
525
526
527 Precision = -1;
529 {
532 {
535 }
537 {
540 }
541
542 if (Precision < 0)
543 {
544 Precision = 0;
545 }
546 }
547
548
549
550 Qualifier = -1;
552 {
555
556 if (Qualifier ==
'l' && *
Format ==
'l')
557 {
558 Qualifier = 'L';
560 }
561 }
562
564 {
565 case '%':
566
568 continue;
569
570 case 'c':
571
573 {
575 {
577 }
578 }
579
582
584 {
586 }
587 continue;
588
589 case 's':
590
593 {
595 }
598 {
600 {
602 }
603 }
604
606 {
609 }
610
612 {
614 }
615 continue;
616
617 case 'o':
618
620 break;
621
622 case 'X':
623
626
627 case 'x':
628
630 break;
631
632 case 'd':
633 case 'i':
634
636
637 case 'u':
638
639 break;
640
641 case 'p':
642
644 {
645 Width = 2 *
sizeof (
void *);
647 }
648
652 continue;
653
654 default:
655
658 {
660 }
661 else
662 {
664 }
665 continue;
666 }
667
668 if (Qualifier == 'L')
669 {
672 {
674 }
675 }
676 else if (Qualifier == 'l')
677 {
680 {
682 }
683 }
684 else if (Qualifier == 'h')
685 {
688 {
690 }
691 }
692 else
693 {
696 {
698 }
699 }
700
703 }
704
706 {
708 {
710 }
711 else
712 {
713 End[-1] = '\0';
714 }
715 }
716
718}
#define ACPI_TO_INTEGER(p)
#define ACPI_CAST_PTR(t, p)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static ACPI_SIZE AcpiUtBoundStringLength(const char *String, ACPI_SIZE Count)
static char * AcpiUtFormatNumber(char *String, char *End, UINT64 Number, UINT8 Base, INT32 Width, INT32 Precision, UINT8 Type)
const char * AcpiUtScanNumber(const char *String, UINT64 *NumberPtr)