OLD | NEW |
---|---|
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_OS_H_ | 5 #ifndef VM_OS_H_ |
6 #define VM_OS_H_ | 6 #define VM_OS_H_ |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 | 9 |
10 // Forward declarations. | 10 // Forward declarations. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 // | 75 // |
76 // This specification conforms to C99 standard which is implemented | 76 // This specification conforms to C99 standard which is implemented |
77 // by glibc 2.1+ with one exception: the C99 standard allows a | 77 // by glibc 2.1+ with one exception: the C99 standard allows a |
78 // negative return value. We will terminate the vm rather than let | 78 // negative return value. We will terminate the vm rather than let |
79 // that occur. | 79 // that occur. |
80 static int SNPrint(char* str, size_t size, const char* format, ...); | 80 static int SNPrint(char* str, size_t size, const char* format, ...); |
81 static int VSNPrint(char* str, size_t size, | 81 static int VSNPrint(char* str, size_t size, |
82 const char* format, | 82 const char* format, |
83 va_list args); | 83 va_list args); |
84 | 84 |
85 // Converts a C string to a 64 bit value. | |
86 // Returns false if it is unable to convert the string to a 64 bit value, | |
87 // the failure could be because of underflow/overflow or invalid characters. | |
88 // On success the function returns true and 'value' contains the converted | |
89 // value. | |
sra1
2012/07/11 21:46:43
Please document the valid inputs. E.g., one might
siva
2012/07/12 18:28:23
I have renamed it as 'StringToInteger' to avoid an
| |
90 static bool Strtoll(const char* str, int64_t* value); | |
91 | |
85 // Initialize the OS class. | 92 // Initialize the OS class. |
86 static void InitOnce(); | 93 static void InitOnce(); |
87 | 94 |
88 // Shut down the OS class. | 95 // Shut down the OS class. |
89 static void Shutdown(); | 96 static void Shutdown(); |
90 | 97 |
91 static void Abort(); | 98 static void Abort(); |
92 | 99 |
93 static void Exit(int code); | 100 static void Exit(int code); |
94 }; | 101 }; |
95 | 102 |
96 } // namespace dart | 103 } // namespace dart |
97 | 104 |
98 #endif // VM_OS_H_ | 105 #endif // VM_OS_H_ |
OLD | NEW |