Try these two functions. Just wrote them then in like 3min, haven't tested
them. It allows you to send wchar_t strings.
All it really does is substitutes 0x00 for 0xFF. So you loose the use of
0x00FF and 0x characters.
I think I forgot to check for wchar_t string ending in the Encode function
Garry that would mean sending twice as much as he wants to. You could waste
a lot of bandwidth :(
~Haza
___
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
In my case it is quite possible for 0xFF to occur, so I ended up doing, as I
mentioned previously, a sort of base-128 workaround like below. It works, it's
just really lame. Oh well, thanks though.
my_uint16_t my_htons(my_uint16_t i) {
assert(i < 255*255);
my_uint16_t encoded_i = 0;
Could these work?
void Q_hextobinary( const char *in, int numchars, unsigned char *out,
int maxoutputbytes );
void Q_binarytohex( const unsigned char *in, int inputbytes, char
*out, int outsize );
garry
On Nov 12, 2007 1:40 AM, <[EMAIL PROTECTED]> wrote:
> In my case it is quite possible for 0x
4 matches
Mail list logo