| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_FORMAT_MACROS_H_ | 5 #ifndef BASE_FORMAT_MACROS_H_ |
| 6 #define BASE_FORMAT_MACROS_H_ | 6 #define BASE_FORMAT_MACROS_H_ |
| 7 #pragma once | |
| 8 | 7 |
| 9 // This file defines the format macros for some integer types. | 8 // This file defines the format macros for some integer types. |
| 10 | 9 |
| 11 // To print a 64-bit value in a portable way: | 10 // To print a 64-bit value in a portable way: |
| 12 // int64_t value; | 11 // int64_t value; |
| 13 // printf("xyz:%" PRId64, value); | 12 // printf("xyz:%" PRId64, value); |
| 14 // The "d" in the macro corresponds to %d; you can also use PRIu64 etc. | 13 // The "d" in the macro corresponds to %d; you can also use PRIu64 etc. |
| 15 // | 14 // |
| 16 // For wide strings, prepend "Wide" to the macro: | 15 // For wide strings, prepend "Wide" to the macro: |
| 17 // int64_t value; | 16 // int64_t value; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 #define WidePRIu64 L"I64u" | 64 #define WidePRIu64 L"I64u" |
| 66 #define WidePRIx64 L"I64x" | 65 #define WidePRIx64 L"I64x" |
| 67 | 66 |
| 68 #if !defined(PRIuS) | 67 #if !defined(PRIuS) |
| 69 #define PRIuS "Iu" | 68 #define PRIuS "Iu" |
| 70 #endif | 69 #endif |
| 71 | 70 |
| 72 #endif | 71 #endif |
| 73 | 72 |
| 74 #endif // BASE_FORMAT_MACROS_H_ | 73 #endif // BASE_FORMAT_MACROS_H_ |
| OLD | NEW |