| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 int n = vsnprintf(str.start(), str.length(), format, args); | 178 int n = vsnprintf(str.start(), str.length(), format, args); |
| 179 if (n < 0 || n >= str.length()) { | 179 if (n < 0 || n >= str.length()) { |
| 180 str[str.length() - 1] = '\0'; | 180 str[str.length() - 1] = '\0'; |
| 181 return -1; | 181 return -1; |
| 182 } else { | 182 } else { |
| 183 return n; | 183 return n; |
| 184 } | 184 } |
| 185 } | 185 } |
| 186 | 186 |
| 187 | 187 |
| 188 char* OS::StrChr(char* str, int c) { |
| 189 return strchr(str, c); |
| 190 } |
| 191 |
| 192 |
| 188 void OS::StrNCpy(Vector<char> dest, const char* src, size_t n) { | 193 void OS::StrNCpy(Vector<char> dest, const char* src, size_t n) { |
| 189 strncpy(dest.start(), src, n); | 194 strncpy(dest.start(), src, n); |
| 190 } | 195 } |
| 191 | 196 |
| 192 | 197 |
| 193 char* OS::StrDup(const char* str) { | 198 char* OS::StrDup(const char* str) { |
| 194 return strdup(str); | 199 return strdup(str); |
| 195 } | 200 } |
| 196 | 201 |
| 197 | 202 |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 } | 662 } |
| 658 | 663 |
| 659 // This sampler is no longer the active sampler. | 664 // This sampler is no longer the active sampler. |
| 660 active_sampler_ = NULL; | 665 active_sampler_ = NULL; |
| 661 active_ = false; | 666 active_ = false; |
| 662 } | 667 } |
| 663 | 668 |
| 664 #endif // ENABLE_LOGGING_AND_PROFILING | 669 #endif // ENABLE_LOGGING_AND_PROFILING |
| 665 | 670 |
| 666 } } // namespace v8::internal | 671 } } // namespace v8::internal |
| OLD | NEW |