ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/shstr.h
(Generate patch)

Comparing deliantra/server/include/shstr.h (file contents):
Revision 1.12 by root, Mon Feb 5 02:07:40 2007 UTC vs.
Revision 1.13 by root, Mon Apr 23 15:27:46 2007 UTC

1#ifndef SHSTR_H__ 1#ifndef SHSTR_H__
2#define SHSTR_H__ 2#define SHSTR_H__
3
4#include <sstream>
3 5
4#include "util.h" 6#include "util.h"
5 7
6extern int buf_overflow (const char *buf1, const char *buf2, int bufsize); 8extern int buf_overflow (const char *buf1, const char *buf2, int bufsize);
7 9
111 do_not_use_strcmp_to_compare_shstr_values (); 113 do_not_use_strcmp_to_compare_shstr_values ();
112#endif 114#endif
113 return a != b; 115 return a != b;
114} 116}
115 117
118std::ostream &operator <<(std::ostream &o, const shstr &sh)
119{
120 o.write (sh.s, sh.length ());
121 return o;
122}
123
116// only good for mass comparisons to shstr objects 124// only good for mass comparisons to shstr objects
117struct shstr_cmp 125struct shstr_cmp
118{ 126{
119 const char *s; 127 const char *s;
120 128

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines