diff options
author | Aleric Inglewood | 2010-11-07 16:55:50 +0100 |
---|---|---|
committer | Aleric Inglewood | 2010-11-07 18:27:48 +0100 |
commit | 5b4356cefbaa7dbdc8656e7283c110a893b1a89c (patch) | |
tree | 43fae9945562c3281746370d623877840ed884b2 /linden/indra/llcommon/llstreamtools.h | |
parent | IMP-688: ERROR: getString: Invalid string control nick01 (diff) | |
download | meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.zip meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.tar.gz meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.tar.bz2 meta-impy-5b4356cefbaa7dbdc8656e7283c110a893b1a89c.tar.xz |
IMP-692: SNOW-713: Global objects in libllcommon duplicated in plugins
See http://jira.secondlife.com/browse/SNOW-713
This patch makes llcommon shared. It contains the following snowglobe
(SVN) changesets: 3478, 3479, 3480, 3481, 3482, 3485, 3496, 3498, 3500,
3519 and 3531, plus the fix for all rejects. Note that changes
to scripts/automated_build_scripts/opensrc-build.sh (changesets 3500
and 3625) were ignored as we don't have scripts/automated_build_scripts.
Diffstat (limited to 'linden/indra/llcommon/llstreamtools.h')
-rw-r--r-- | linden/indra/llcommon/llstreamtools.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/linden/indra/llcommon/llstreamtools.h b/linden/indra/llcommon/llstreamtools.h index a6dc4d5..371fac5 100644 --- a/linden/indra/llcommon/llstreamtools.h +++ b/linden/indra/llcommon/llstreamtools.h | |||
@@ -39,23 +39,23 @@ | |||
39 | // unless specifed otherwise these all return input_stream.good() | 39 | // unless specifed otherwise these all return input_stream.good() |
40 | 40 | ||
41 | // skips spaces and tabs | 41 | // skips spaces and tabs |
42 | bool skip_whitespace(std::istream& input_stream); | 42 | LL_COMMON_API bool skip_whitespace(std::istream& input_stream); |
43 | 43 | ||
44 | // skips whitespace and newlines | 44 | // skips whitespace and newlines |
45 | bool skip_emptyspace(std::istream& input_stream); | 45 | LL_COMMON_API bool skip_emptyspace(std::istream& input_stream); |
46 | 46 | ||
47 | // skips emptyspace and lines that start with a # | 47 | // skips emptyspace and lines that start with a # |
48 | bool skip_comments_and_emptyspace(std::istream& input_stream); | 48 | LL_COMMON_API bool skip_comments_and_emptyspace(std::istream& input_stream); |
49 | 49 | ||
50 | // skips to character after next newline | 50 | // skips to character after next newline |
51 | bool skip_line(std::istream& input_stream); | 51 | LL_COMMON_API bool skip_line(std::istream& input_stream); |
52 | 52 | ||
53 | // skips to beginning of next non-emptyspace | 53 | // skips to beginning of next non-emptyspace |
54 | bool skip_to_next_word(std::istream& input_stream); | 54 | LL_COMMON_API bool skip_to_next_word(std::istream& input_stream); |
55 | 55 | ||
56 | // skips to character after the end of next keyword | 56 | // skips to character after the end of next keyword |
57 | // a 'keyword' is defined as the first word on a line | 57 | // a 'keyword' is defined as the first word on a line |
58 | bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream); | 58 | LL_COMMON_API bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream); |
59 | 59 | ||
60 | // skip_to_start_of_next_keyword() is disabled -- might tickle corruption bug | 60 | // skip_to_start_of_next_keyword() is disabled -- might tickle corruption bug |
61 | // in windows iostream | 61 | // in windows iostream |
@@ -65,14 +65,14 @@ bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream | |||
65 | 65 | ||
66 | // characters are pulled out of input_stream and appended to output_string | 66 | // characters are pulled out of input_stream and appended to output_string |
67 | // returns result of input_stream.good() after characters are pulled | 67 | // returns result of input_stream.good() after characters are pulled |
68 | bool get_word(std::string& output_string, std::istream& input_stream); | 68 | LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream); |
69 | bool get_line(std::string& output_string, std::istream& input_stream); | 69 | LL_COMMON_API bool get_line(std::string& output_string, std::istream& input_stream); |
70 | 70 | ||
71 | // characters are pulled out of input_stream (up to a max of 'n') | 71 | // characters are pulled out of input_stream (up to a max of 'n') |
72 | // and appended to output_string | 72 | // and appended to output_string |
73 | // returns result of input_stream.good() after characters are pulled | 73 | // returns result of input_stream.good() after characters are pulled |
74 | bool get_word(std::string& output_string, std::istream& input_stream, int n); | 74 | LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream, int n); |
75 | bool get_line(std::string& output_string, std::istream& input_stream, int n); | 75 | LL_COMMON_API bool get_line(std::string& output_string, std::istream& input_stream, int n); |
76 | 76 | ||
77 | // unget_line() is disabled -- might tickle corruption bug in windows iostream | 77 | // unget_line() is disabled -- might tickle corruption bug in windows iostream |
78 | //// backs up the input_stream by line_size + 1 characters | 78 | //// backs up the input_stream by line_size + 1 characters |
@@ -82,28 +82,28 @@ bool get_line(std::string& output_string, std::istream& input_stream, int n); | |||
82 | 82 | ||
83 | // removes the last char in 'line' if it matches 'c' | 83 | // removes the last char in 'line' if it matches 'c' |
84 | // returns true if removed last char | 84 | // returns true if removed last char |
85 | bool remove_last_char(char c, std::string& line); | 85 | LL_COMMON_API bool remove_last_char(char c, std::string& line); |
86 | 86 | ||
87 | // replaces escaped characters with the correct characters from left to right | 87 | // replaces escaped characters with the correct characters from left to right |
88 | // "\\" ---> '\\' | 88 | // "\\" ---> '\\' |
89 | // "\n" ---> '\n' | 89 | // "\n" ---> '\n' |
90 | void unescape_string(std::string& line); | 90 | LL_COMMON_API void unescape_string(std::string& line); |
91 | 91 | ||
92 | // replaces unescaped characters with expanded equivalents from left to right | 92 | // replaces unescaped characters with expanded equivalents from left to right |
93 | // '\\' ---> "\\" | 93 | // '\\' ---> "\\" |
94 | // '\n' ---> "\n" | 94 | // '\n' ---> "\n" |
95 | void escape_string(std::string& line); | 95 | LL_COMMON_API void escape_string(std::string& line); |
96 | 96 | ||
97 | // replaces each '\n' character with ' ' | 97 | // replaces each '\n' character with ' ' |
98 | void replace_newlines_with_whitespace(std::string& line); | 98 | LL_COMMON_API void replace_newlines_with_whitespace(std::string& line); |
99 | 99 | ||
100 | // erases any double-quote characters in line | 100 | // erases any double-quote characters in line |
101 | void remove_double_quotes(std::string& line); | 101 | LL_COMMON_API void remove_double_quotes(std::string& line); |
102 | 102 | ||
103 | // the 'keyword' is defined as the first word on a line | 103 | // the 'keyword' is defined as the first word on a line |
104 | // the 'value' is everything after the keyword on the same line | 104 | // the 'value' is everything after the keyword on the same line |
105 | // starting at the first non-whitespace and ending right before the newline | 105 | // starting at the first non-whitespace and ending right before the newline |
106 | void get_keyword_and_value(std::string& keyword, | 106 | LL_COMMON_API void get_keyword_and_value(std::string& keyword, |
107 | std::string& value, | 107 | std::string& value, |
108 | const std::string& line); | 108 | const std::string& line); |
109 | 109 | ||
@@ -111,13 +111,13 @@ void get_keyword_and_value(std::string& keyword, | |||
111 | // read anymore or until we hit the count. Some istream | 111 | // read anymore or until we hit the count. Some istream |
112 | // implimentations have a max that they will read. | 112 | // implimentations have a max that they will read. |
113 | // Returns the number of bytes read. | 113 | // Returns the number of bytes read. |
114 | std::streamsize fullread( | 114 | LL_COMMON_API std::streamsize fullread( |
115 | std::istream& istr, | 115 | std::istream& istr, |
116 | char* buf, | 116 | char* buf, |
117 | std::streamsize requested); | 117 | std::streamsize requested); |
118 | 118 | ||
119 | 119 | ||
120 | std::istream& operator>>(std::istream& str, const char *tocheck); | 120 | LL_COMMON_API std::istream& operator>>(std::istream& str, const char *tocheck); |
121 | 121 | ||
122 | #endif | 122 | #endif |
123 | 123 | ||