Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Unified Diff: src/utils.h

Issue 328343003: Remove dependency on Vector from platform files (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/utils.h
diff --git a/src/utils.h b/src/utils.h
index a2e3be535d3dc017afdc70a343479c2378bc7771..7dbb3f8314f501f2ad007f640e6b635e09de7953 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1164,6 +1164,13 @@ void FPRINTF_CHECKING PrintF(FILE* out, const char* format, ...);
// Prepends the current process ID to the output.
void PRINTF_CHECKING PrintPID(const char* format, ...);
+// Safe formatting print. Ensures that str is always null-terminated.
+// Returns the number of chars written, or -1 if output was truncated.
+int FPRINTF_CHECKING SNPrintF(Vector<char> str, const char* format, ...);
+int VSNPrintF(Vector<char> str, const char* format, va_list args);
+
+void StrNCpy(Vector<char> dest, const char* src, size_t n);
+
// Our version of fflush.
void Flush(FILE* out);
« src/platform-solaris.cc ('K') | « src/string-stream.cc ('k') | src/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698