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

Side by Side Diff: src/processor/tokenize.cc

Issue 1292503005: Don't use strtok_s for mingw builds (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/
Patch Set: Created 5 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/processor/cfi_frame_info.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010, Google Inc. 1 // Copyright (c) 2010, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 29
30 #include <string.h> 30 #include <string.h>
31 31
32 #include <string> 32 #include <string>
33 #include <vector> 33 #include <vector>
34 34
35 #include "common/using_std_string.h" 35 #include "common/using_std_string.h"
36 36
37 namespace google_breakpad { 37 namespace google_breakpad {
38 38
39 #ifdef _WIN32 39 #ifdef _MSC_VER
40 #define strtok_r strtok_s 40 #define strtok_r strtok_s
41 #endif 41 #endif
42 42
43 using std::vector; 43 using std::vector;
44 44
45 bool Tokenize(char *line, 45 bool Tokenize(char *line,
46 const char *separators, 46 const char *separators,
47 int max_tokens, 47 int max_tokens,
48 vector<char*> *tokens) { 48 vector<char*> *tokens) {
49 tokens->clear(); 49 tokens->clear();
(...skipping 20 matching lines...) Expand all
70 } 70 }
71 71
72 void StringToVector(const string &str, vector<char> &vec) { 72 void StringToVector(const string &str, vector<char> &vec) {
73 vec.resize(str.length() + 1); 73 vec.resize(str.length() + 1);
74 std::copy(str.begin(), str.end(), 74 std::copy(str.begin(), str.end(),
75 vec.begin()); 75 vec.begin());
76 vec[str.length()] = '\0'; 76 vec[str.length()] = '\0';
77 } 77 }
78 78
79 } // namespace google_breakpad 79 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « src/processor/cfi_frame_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698