[ACPICA]
[reactos.git] / reactos / drivers / bus / acpi / acpica / utilities / utprint.c
1 /******************************************************************************
2 *
3 * Module Name: utprint - Formatted printing routines
4 *
5 *****************************************************************************/
6
7 /******************************************************************************
8 *
9 * 1. Copyright Notice
10 *
11 * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
12 * All rights reserved.
13 *
14 * 2. License
15 *
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
19 * property rights.
20 *
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
27 *
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
36 *
37 * The above copyright and patent license is granted only if the following
38 * conditions are met:
39 *
40 * 3. Conditions
41 *
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
53 *
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
64 * make.
65 *
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
70 * distribution.
71 *
72 * 3.4. Intel retains all right, title, and interest in and to the Original
73 * Intel Code.
74 *
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
79 *
80 * 4. Disclaimer and Export Compliance
81 *
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88 * PARTICULAR PURPOSE.
89 *
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97 * LIMITED REMEDY.
98 *
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
113 *
114 *****************************************************************************/
115
116 #include "acpi.h"
117 #include "accommon.h"
118
119 #define _COMPONENT ACPI_UTILITIES
120 ACPI_MODULE_NAME ("utprint")
121
122
123 #define ACPI_FORMAT_SIGN 0x01
124 #define ACPI_FORMAT_SIGN_PLUS 0x02
125 #define ACPI_FORMAT_SIGN_PLUS_SPACE 0x04
126 #define ACPI_FORMAT_ZERO 0x08
127 #define ACPI_FORMAT_LEFT 0x10
128 #define ACPI_FORMAT_UPPER 0x20
129 #define ACPI_FORMAT_PREFIX 0x40
130
131
132 /* Local prototypes */
133
134 static ACPI_SIZE
135 AcpiUtBoundStringLength (
136 const char *String,
137 ACPI_SIZE Count);
138
139 static char *
140 AcpiUtBoundStringOutput (
141 char *String,
142 const char *End,
143 char c);
144
145 static char *
146 AcpiUtFormatNumber (
147 char *String,
148 char *End,
149 UINT64 Number,
150 UINT8 Base,
151 INT32 Width,
152 INT32 Precision,
153 UINT8 Type);
154
155 static char *
156 AcpiUtPutNumber (
157 char *String,
158 UINT64 Number,
159 UINT8 Base,
160 BOOLEAN Upper);
161
162
163 /* Module globals */
164
165 static const char AcpiGbl_LowerHexDigits[] = "0123456789abcdef";
166 static const char AcpiGbl_UpperHexDigits[] = "0123456789ABCDEF";
167
168
169 /*******************************************************************************
170 *
171 * FUNCTION: AcpiUtBoundStringLength
172 *
173 * PARAMETERS: String - String with boundary
174 * Count - Boundary of the string
175 *
176 * RETURN: Length of the string. Less than or equal to Count.
177 *
178 * DESCRIPTION: Calculate the length of a string with boundary.
179 *
180 ******************************************************************************/
181
182 static ACPI_SIZE
183 AcpiUtBoundStringLength (
184 const char *String,
185 ACPI_SIZE Count)
186 {
187 UINT32 Length = 0;
188
189
190 while (*String && Count)
191 {
192 Length++;
193 String++;
194 Count--;
195 }
196
197 return (Length);
198 }
199
200
201 /*******************************************************************************
202 *
203 * FUNCTION: AcpiUtBoundStringOutput
204 *
205 * PARAMETERS: String - String with boundary
206 * End - Boundary of the string
207 * c - Character to be output to the string
208 *
209 * RETURN: Updated position for next valid character
210 *
211 * DESCRIPTION: Output a character into a string with boundary check.
212 *
213 ******************************************************************************/
214
215 static char *
216 AcpiUtBoundStringOutput (
217 char *String,
218 const char *End,
219 char c)
220 {
221
222 if (String < End)
223 {
224 *String = c;
225 }
226
227 ++String;
228 return (String);
229 }
230
231
232 /*******************************************************************************
233 *
234 * FUNCTION: AcpiUtPutNumber
235 *
236 * PARAMETERS: String - Buffer to hold reverse-ordered string
237 * Number - Integer to be converted
238 * Base - Base of the integer
239 * Upper - Whether or not using upper cased digits
240 *
241 * RETURN: Updated position for next valid character
242 *
243 * DESCRIPTION: Convert an integer into a string, note that, the string holds a
244 * reversed ordered number without the trailing zero.
245 *
246 ******************************************************************************/
247
248 static char *
249 AcpiUtPutNumber (
250 char *String,
251 UINT64 Number,
252 UINT8 Base,
253 BOOLEAN Upper)
254 {
255 const char *Digits;
256 UINT64 DigitIndex;
257 char *Pos;
258
259
260 Pos = String;
261 Digits = Upper ? AcpiGbl_UpperHexDigits : AcpiGbl_LowerHexDigits;
262
263 if (Number == 0)
264 {
265 *(Pos++) = '0';
266 }
267 else
268 {
269 while (Number)
270 {
271 (void) AcpiUtDivide (Number, Base, &Number, &DigitIndex);
272 *(Pos++) = Digits[DigitIndex];
273 }
274 }
275
276 /* *(Pos++) = '0'; */
277 return (Pos);
278 }
279
280
281 /*******************************************************************************
282 *
283 * FUNCTION: AcpiUtScanNumber
284 *
285 * PARAMETERS: String - String buffer
286 * NumberPtr - Where the number is returned
287 *
288 * RETURN: Updated position for next valid character
289 *
290 * DESCRIPTION: Scan a string for a decimal integer.
291 *
292 ******************************************************************************/
293
294 const char *
295 AcpiUtScanNumber (
296 const char *String,
297 UINT64 *NumberPtr)
298 {
299 UINT64 Number = 0;
300
301
302 while (ACPI_IS_DIGIT (*String))
303 {
304 Number *= 10;
305 Number += *(String++) - '0';
306 }
307
308 *NumberPtr = Number;
309 return (String);
310 }
311
312
313 /*******************************************************************************
314 *
315 * FUNCTION: AcpiUtPrintNumber
316 *
317 * PARAMETERS: String - String buffer
318 * Number - The number to be converted
319 *
320 * RETURN: Updated position for next valid character
321 *
322 * DESCRIPTION: Print a decimal integer into a string.
323 *
324 ******************************************************************************/
325
326 const char *
327 AcpiUtPrintNumber (
328 char *String,
329 UINT64 Number)
330 {
331 char AsciiString[20];
332 const char *Pos1;
333 char *Pos2;
334
335
336 Pos1 = AcpiUtPutNumber (AsciiString, Number, 10, FALSE);
337 Pos2 = String;
338
339 while (Pos1 != AsciiString)
340 {
341 *(Pos2++) = *(--Pos1);
342 }
343
344 *Pos2 = 0;
345 return (String);
346 }
347
348
349 /*******************************************************************************
350 *
351 * FUNCTION: AcpiUtFormatNumber
352 *
353 * PARAMETERS: String - String buffer with boundary
354 * End - Boundary of the string
355 * Number - The number to be converted
356 * Base - Base of the integer
357 * Width - Field width
358 * Precision - Precision of the integer
359 * Type - Special printing flags
360 *
361 * RETURN: Updated position for next valid character
362 *
363 * DESCRIPTION: Print an integer into a string with any base and any precision.
364 *
365 ******************************************************************************/
366
367 static char *
368 AcpiUtFormatNumber (
369 char *String,
370 char *End,
371 UINT64 Number,
372 UINT8 Base,
373 INT32 Width,
374 INT32 Precision,
375 UINT8 Type)
376 {
377 char *Pos;
378 char Sign;
379 char Zero;
380 BOOLEAN NeedPrefix;
381 BOOLEAN Upper;
382 INT32 i;
383 char ReversedString[66];
384
385
386 /* Parameter validation */
387
388 if (Base < 2 || Base > 16)
389 {
390 return (NULL);
391 }
392
393 if (Type & ACPI_FORMAT_LEFT)
394 {
395 Type &= ~ACPI_FORMAT_ZERO;
396 }
397
398 NeedPrefix = ((Type & ACPI_FORMAT_PREFIX) && Base != 10) ? TRUE : FALSE;
399 Upper = (Type & ACPI_FORMAT_UPPER) ? TRUE : FALSE;
400 Zero = (Type & ACPI_FORMAT_ZERO) ? '0' : ' ';
401
402 /* Calculate size according to sign and prefix */
403
404 Sign = '\0';
405 if (Type & ACPI_FORMAT_SIGN)
406 {
407 if ((INT64) Number < 0)
408 {
409 Sign = '-';
410 Number = - (INT64) Number;
411 Width--;
412 }
413 else if (Type & ACPI_FORMAT_SIGN_PLUS)
414 {
415 Sign = '+';
416 Width--;
417 }
418 else if (Type & ACPI_FORMAT_SIGN_PLUS_SPACE)
419 {
420 Sign = ' ';
421 Width--;
422 }
423 }
424 if (NeedPrefix)
425 {
426 Width--;
427 if (Base == 16)
428 {
429 Width--;
430 }
431 }
432
433 /* Generate full string in reverse order */
434
435 Pos = AcpiUtPutNumber (ReversedString, Number, Base, Upper);
436 i = ACPI_PTR_DIFF (Pos, ReversedString);
437
438 /* Printing 100 using %2d gives "100", not "00" */
439
440 if (i > Precision)
441 {
442 Precision = i;
443 }
444
445 Width -= Precision;
446
447 /* Output the string */
448
449 if (!(Type & (ACPI_FORMAT_ZERO | ACPI_FORMAT_LEFT)))
450 {
451 while (--Width >= 0)
452 {
453 String = AcpiUtBoundStringOutput (String, End, ' ');
454 }
455 }
456 if (Sign)
457 {
458 String = AcpiUtBoundStringOutput (String, End, Sign);
459 }
460 if (NeedPrefix)
461 {
462 String = AcpiUtBoundStringOutput (String, End, '0');
463 if (Base == 16)
464 {
465 String = AcpiUtBoundStringOutput (String, End,
466 Upper ? 'X' : 'x');
467 }
468 }
469 if (!(Type & ACPI_FORMAT_LEFT))
470 {
471 while (--Width >= 0)
472 {
473 String = AcpiUtBoundStringOutput (String, End, Zero);
474 }
475 }
476
477 while (i <= --Precision)
478 {
479 String = AcpiUtBoundStringOutput (String, End, '0');
480 }
481 while (--i >= 0)
482 {
483 String = AcpiUtBoundStringOutput (String, End,
484 ReversedString[i]);
485 }
486 while (--Width >= 0)
487 {
488 String = AcpiUtBoundStringOutput (String, End, ' ');
489 }
490
491 return (String);
492 }
493
494
495 /*******************************************************************************
496 *
497 * FUNCTION: AcpiUtVsnprintf
498 *
499 * PARAMETERS: String - String with boundary
500 * Size - Boundary of the string
501 * Format - Standard printf format
502 * Args - Argument list
503 *
504 * RETURN: Number of bytes actually written.
505 *
506 * DESCRIPTION: Formatted output to a string using argument list pointer.
507 *
508 ******************************************************************************/
509
510 int
511 AcpiUtVsnprintf (
512 char *String,
513 ACPI_SIZE Size,
514 const char *Format,
515 va_list Args)
516 {
517 UINT8 Base;
518 UINT8 Type;
519 INT32 Width;
520 INT32 Precision;
521 char Qualifier;
522 UINT64 Number;
523 char *Pos;
524 char *End;
525 char c;
526 const char *s;
527 const void *p;
528 INT32 Length;
529 int i;
530
531
532 Pos = String;
533 End = String + Size;
534
535 for (; *Format; ++Format)
536 {
537 if (*Format != '%')
538 {
539 Pos = AcpiUtBoundStringOutput (Pos, End, *Format);
540 continue;
541 }
542
543 Type = 0;
544 Base = 10;
545
546 /* Process sign */
547
548 do
549 {
550 ++Format;
551 if (*Format == '#')
552 {
553 Type |= ACPI_FORMAT_PREFIX;
554 }
555 else if (*Format == '0')
556 {
557 Type |= ACPI_FORMAT_ZERO;
558 }
559 else if (*Format == '+')
560 {
561 Type |= ACPI_FORMAT_SIGN_PLUS;
562 }
563 else if (*Format == ' ')
564 {
565 Type |= ACPI_FORMAT_SIGN_PLUS_SPACE;
566 }
567 else if (*Format == '-')
568 {
569 Type |= ACPI_FORMAT_LEFT;
570 }
571 else
572 {
573 break;
574 }
575 } while (1);
576
577 /* Process width */
578
579 Width = -1;
580 if (ACPI_IS_DIGIT (*Format))
581 {
582 Format = AcpiUtScanNumber (Format, &Number);
583 Width = (INT32) Number;
584 }
585 else if (*Format == '*')
586 {
587 ++Format;
588 Width = va_arg (Args, int);
589 if (Width < 0)
590 {
591 Width = -Width;
592 Type |= ACPI_FORMAT_LEFT;
593 }
594 }
595
596 /* Process precision */
597
598 Precision = -1;
599 if (*Format == '.')
600 {
601 ++Format;
602 if (ACPI_IS_DIGIT(*Format))
603 {
604 Format = AcpiUtScanNumber (Format, &Number);
605 Precision = (INT32) Number;
606 }
607 else if (*Format == '*')
608 {
609 ++Format;
610 Precision = va_arg (Args, int);
611 }
612 if (Precision < 0)
613 {
614 Precision = 0;
615 }
616 }
617
618 /* Process qualifier */
619
620 Qualifier = -1;
621 if (*Format == 'h' || *Format == 'l' || *Format == 'L')
622 {
623 Qualifier = *Format;
624 ++Format;
625
626 if (Qualifier == 'l' && *Format == 'l')
627 {
628 Qualifier = 'L';
629 ++Format;
630 }
631 }
632
633 switch (*Format)
634 {
635 case '%':
636
637 Pos = AcpiUtBoundStringOutput (Pos, End, '%');
638 continue;
639
640 case 'c':
641
642 if (!(Type & ACPI_FORMAT_LEFT))
643 {
644 while (--Width > 0)
645 {
646 Pos = AcpiUtBoundStringOutput (Pos, End, ' ');
647 }
648 }
649
650 c = (char) va_arg (Args, int);
651 Pos = AcpiUtBoundStringOutput (Pos, End, c);
652
653 while (--Width > 0)
654 {
655 Pos = AcpiUtBoundStringOutput (Pos, End, ' ');
656 }
657 continue;
658
659 case 's':
660
661 s = va_arg (Args, char *);
662 if (!s)
663 {
664 s = "<NULL>";
665 }
666 Length = AcpiUtBoundStringLength (s, Precision);
667 if (!(Type & ACPI_FORMAT_LEFT))
668 {
669 while (Length < Width--)
670 {
671 Pos = AcpiUtBoundStringOutput (Pos, End, ' ');
672 }
673 }
674 for (i = 0; i < Length; ++i)
675 {
676 Pos = AcpiUtBoundStringOutput (Pos, End, *s);
677 ++s;
678 }
679 while (Length < Width--)
680 {
681 Pos = AcpiUtBoundStringOutput (Pos, End, ' ');
682 }
683 continue;
684
685 case 'o':
686
687 Base = 8;
688 break;
689
690 case 'X':
691
692 Type |= ACPI_FORMAT_UPPER;
693
694 case 'x':
695
696 Base = 16;
697 break;
698
699 case 'd':
700 case 'i':
701
702 Type |= ACPI_FORMAT_SIGN;
703
704 case 'u':
705
706 break;
707
708 case 'p':
709
710 if (Width == -1)
711 {
712 Width = 2 * sizeof (void *);
713 Type |= ACPI_FORMAT_ZERO;
714 }
715
716 p = va_arg (Args, void *);
717 Pos = AcpiUtFormatNumber (Pos, End,
718 ACPI_TO_INTEGER (p), 16, Width, Precision, Type);
719 continue;
720
721 default:
722
723 Pos = AcpiUtBoundStringOutput (Pos, End, '%');
724 if (*Format)
725 {
726 Pos = AcpiUtBoundStringOutput (Pos, End, *Format);
727 }
728 else
729 {
730 --Format;
731 }
732 continue;
733 }
734
735 if (Qualifier == 'L')
736 {
737 Number = va_arg (Args, UINT64);
738 if (Type & ACPI_FORMAT_SIGN)
739 {
740 Number = (INT64) Number;
741 }
742 }
743 else if (Qualifier == 'l')
744 {
745 Number = va_arg (Args, unsigned long);
746 if (Type & ACPI_FORMAT_SIGN)
747 {
748 Number = (INT32) Number;
749 }
750 }
751 else if (Qualifier == 'h')
752 {
753 Number = (UINT16) va_arg (Args, int);
754 if (Type & ACPI_FORMAT_SIGN)
755 {
756 Number = (INT16) Number;
757 }
758 }
759 else
760 {
761 Number = va_arg (Args, unsigned int);
762 if (Type & ACPI_FORMAT_SIGN)
763 {
764 Number = (signed int) Number;
765 }
766 }
767
768 Pos = AcpiUtFormatNumber (Pos, End, Number, Base,
769 Width, Precision, Type);
770 }
771
772 if (Size > 0)
773 {
774 if (Pos < End)
775 {
776 *Pos = '\0';
777 }
778 else
779 {
780 End[-1] = '\0';
781 }
782 }
783
784 return (ACPI_PTR_DIFF (Pos, String));
785 }
786
787
788 /*******************************************************************************
789 *
790 * FUNCTION: AcpiUtSnprintf
791 *
792 * PARAMETERS: String - String with boundary
793 * Size - Boundary of the string
794 * Format, ... - Standard printf format
795 *
796 * RETURN: Number of bytes actually written.
797 *
798 * DESCRIPTION: Formatted output to a string.
799 *
800 ******************************************************************************/
801
802 int
803 AcpiUtSnprintf (
804 char *String,
805 ACPI_SIZE Size,
806 const char *Format,
807 ...)
808 {
809 va_list Args;
810 int Length;
811
812
813 va_start (Args, Format);
814 Length = AcpiUtVsnprintf (String, Size, Format, Args);
815 va_end (Args);
816
817 return (Length);
818 }
819
820
821 #ifdef ACPI_APPLICATION
822 /*******************************************************************************
823 *
824 * FUNCTION: AcpiUtFileVprintf
825 *
826 * PARAMETERS: File - File descriptor
827 * Format - Standard printf format
828 * Args - Argument list
829 *
830 * RETURN: Number of bytes actually written.
831 *
832 * DESCRIPTION: Formatted output to a file using argument list pointer.
833 *
834 ******************************************************************************/
835
836 int
837 AcpiUtFileVprintf (
838 ACPI_FILE File,
839 const char *Format,
840 va_list Args)
841 {
842 ACPI_CPU_FLAGS Flags;
843 int Length;
844
845
846 Flags = AcpiOsAcquireLock (AcpiGbl_PrintLock);
847 Length = AcpiUtVsnprintf (AcpiGbl_PrintBuffer,
848 sizeof (AcpiGbl_PrintBuffer), Format, Args);
849
850 (void) AcpiOsWriteFile (File, AcpiGbl_PrintBuffer, Length, 1);
851 AcpiOsReleaseLock (AcpiGbl_PrintLock, Flags);
852
853 return (Length);
854 }
855
856
857 /*******************************************************************************
858 *
859 * FUNCTION: AcpiUtFilePrintf
860 *
861 * PARAMETERS: File - File descriptor
862 * Format, ... - Standard printf format
863 *
864 * RETURN: Number of bytes actually written.
865 *
866 * DESCRIPTION: Formatted output to a file.
867 *
868 ******************************************************************************/
869
870 int
871 AcpiUtFilePrintf (
872 ACPI_FILE File,
873 const char *Format,
874 ...)
875 {
876 va_list Args;
877 int Length;
878
879
880 va_start (Args, Format);
881 Length = AcpiUtFileVprintf (File, Format, Args);
882 va_end (Args);
883
884 return (Length);
885 }
886 #endif