aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llstreamtools.h
diff options
context:
space:
mode:
authorAleric Inglewood2010-11-07 16:55:50 +0100
committerAleric Inglewood2010-11-07 18:27:48 +0100
commit5b4356cefbaa7dbdc8656e7283c110a893b1a89c (patch)
tree43fae9945562c3281746370d623877840ed884b2 /linden/indra/llcommon/llstreamtools.h
parentIMP-688: ERROR: getString: Invalid string control nick01 (diff)
downloadmeta-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.h36
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
42bool skip_whitespace(std::istream& input_stream); 42LL_COMMON_API bool skip_whitespace(std::istream& input_stream);
43 43
44// skips whitespace and newlines 44// skips whitespace and newlines
45bool skip_emptyspace(std::istream& input_stream); 45LL_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 #
48bool skip_comments_and_emptyspace(std::istream& input_stream); 48LL_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
51bool skip_line(std::istream& input_stream); 51LL_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
54bool skip_to_next_word(std::istream& input_stream); 54LL_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
58bool skip_to_end_of_next_keyword(const char* keyword, std::istream& input_stream); 58LL_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
68bool get_word(std::string& output_string, std::istream& input_stream); 68LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream);
69bool get_line(std::string& output_string, std::istream& input_stream); 69LL_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
74bool get_word(std::string& output_string, std::istream& input_stream, int n); 74LL_COMMON_API bool get_word(std::string& output_string, std::istream& input_stream, int n);
75bool get_line(std::string& output_string, std::istream& input_stream, int n); 75LL_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
85bool remove_last_char(char c, std::string& line); 85LL_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'
90void unescape_string(std::string& line); 90LL_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"
95void escape_string(std::string& line); 95LL_COMMON_API void escape_string(std::string& line);
96 96
97// replaces each '\n' character with ' ' 97// replaces each '\n' character with ' '
98void replace_newlines_with_whitespace(std::string& line); 98LL_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
101void remove_double_quotes(std::string& line); 101LL_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
106void get_keyword_and_value(std::string& keyword, 106LL_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.
114std::streamsize fullread( 114LL_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
120std::istream& operator>>(std::istream& str, const char *tocheck); 120LL_COMMON_API std::istream& operator>>(std::istream& str, const char *tocheck);
121 121
122#endif 122#endif
123 123