this patch adds (actually fixes) hexenworld rcon support for xqf. It applies to both xqf-1.0.5 and to the latest cvs snapshot. The rcon support is fixed by adding the latest huffman encoding and decoding routines from the uhexen2 project: sending the message doesn't actually need any encoding but if the received message isn't decoded, garbage is displayed especially for long responses. this patch is also submitted to the xqf project. see the xqf patch tracker entry #1806181 at: http://sourceforge.net/tracker/?func=detail&atid=313296&aid=1806181&group_id=13296 diff -urNp xqf-1.0.5/src/hufffreq.h xqf-1.0.5x/src/hufffreq.h --- xqf-1.0.5/src/hufffreq.h 1970-01-01 02:00:00.000000000 +0200 +++ xqf-1.0.5x/src/hufffreq.h 2007-10-02 09:06:05.000000000 +0300 @@ -0,0 +1,521 @@ +/* + hufffreq.h + huffman freq table for use in hexenworld networking + + Taken from the GPL'ed HexenWorld source code of Raven Software +*/ + +/* + 0.27588720, + 0.04243389, + 0.01598893, + 0.00737722, + 0.00557754, + 0.00547342, + 0.00823988, + 0.00449177, + 0.00986108, + 0.00560728, + 0.00654431, + 0.00376298, + 0.00498260, + 0.00400095, + 0.00655918, + 0.00232025, + 0.00504209, + 0.00285570, + 0.00124937, + 0.00147247, + 0.00226076, + 0.00141298, + 0.00467026, + 0.00336139, + 0.00123449, + 0.00126424, + 0.00166582, + 0.00129399, + 0.00114525, + 0.00116013, + 0.00078829, + 0.00080317, + 0.00639557, + 0.00123449, + 0.00127911, + 0.00102627, + 0.00182943, + 0.00141298, + 0.00269209, + 0.00127911, + 0.00224589, + 0.00093703, + 0.01972216, + 0.00135348, + 0.00477437, + 0.00337627, + 0.00743671, + 0.00765981, + 0.01951394, + 0.00319779, + 0.00330190, + 0.00267722, + 0.00235000, + 0.00159146, + 0.00285570, + 0.00141298, + 0.00151709, + 0.00139810, + 0.00468513, + 0.00117500, + 0.00202279, + 0.00544367, + 0.00096677, + 0.00136836, + 0.00913228, + 0.00316804, + 0.00138323, + 0.00078829, + 0.00942975, + 0.00590475, + 0.00168070, + 0.00089241, + 0.00095190, + 0.00166582, + 0.00077342, + 0.00071392, + 0.00086266, + 0.00060981, + 0.00075854, + 0.00065443, + 0.00126424, + 0.00047595, + 0.00068418, + 0.00099652, + 0.00065443, + 0.00096677, + 0.00072880, + 0.00050570, + 0.00071392, + 0.00102627, + 0.00120475, + 0.00056519, + 0.00281108, + 0.00175506, + 0.00047595, + 0.00154684, + 0.00160633, + 0.01091710, + 0.00365886, + 0.00355475, + 0.00937026, + 0.01105096, + 0.00404557, + 0.00206741, + 0.00389684, + 0.00456614, + 0.00215665, + 0.00191867, + 0.01072374, + 0.01051551, + 0.00467026, + 0.00867121, + 0.00542880, + 0.00105601, + 0.00649969, + 0.01280602, + 0.00510159, + 0.00316804, + 0.00456614, + 0.00523545, + 0.00157658, + 0.00191867, + 0.00121962, + 0.00065443, + 0.00080317, + 0.00052057, + 0.00080317, + 0.00147247, + 0.02236963, + 0.00258798, + 0.00059494, + 0.00060981, + 0.00038671, + 0.00044620, + 0.00055032, + 0.00093703, + 0.00072880, + 0.00062468, + 0.00059494, + 0.00047595, + 0.00044620, + 0.00182943, + 0.00066930, + 0.00077342, + 0.00114525, + 0.00062468, + 0.00059494, + 0.00049082, + 0.00059494, + 0.00074367, + 0.00090728, + 0.00069905, + 0.00075854, + 0.00077342, + 0.00069905, + 0.00055032, + 0.00075854, + 0.00049082, + 0.00104114, + 0.00062468, + 0.00397121, + 0.00080317, + 0.00072880, + 0.00062468, + 0.00163608, + 0.00046108, + 0.00055032, + 0.00056519, + 0.00102627, + 0.00071392, + 0.00092215, + 0.00078829, + 0.00660380, + 0.00058006, + 0.00065443, + 0.00049082, + 0.00118987, + 0.00077342, + 0.00065443, + 0.00077342, + 0.00151709, + 0.00083291, + 0.00074367, + 0.00098165, + 0.00108576, + 0.00081804, + 0.00145760, + 0.00144272, + 0.00394146, + 0.00104114, + 0.00099652, + 0.00209715, + 0.00502722, + 0.00309367, + 0.00123449, + 0.00096677, + 0.00090728, + 0.00206741, + 0.00147247, + 0.00147247, + 0.00129399, + 0.00087753, + 0.00120475, + 0.00116013, + 0.00145760, + 0.00120475, + 0.00138323, + 0.00123449, + 0.00166582, + 0.00087753, + 0.00171044, + 0.00239462, + 0.00156171, + 0.00154684, + 0.00217152, + 0.00226076, + 0.00211203, + 0.00153196, + 0.00174019, + 0.00145760, + 0.00168070, + 0.00145760, + 0.00123449, + 0.00165095, + 0.00188893, + 0.00138323, + 0.00120475, + 0.00154684, + 0.00138323, + 0.00191867, + 0.01866615, + 0.00139810, + 0.00153196, + 0.00093703, + 0.00121962, + 0.00116013, + 0.00075854, + 0.00105601, + 0.00432817, + 0.00315317, + 0.00407532, + 0.00227563, + 0.00081804, + 0.00121962, + 0.00110063, + 0.00090728, + 0.00108576, + 0.00065443, + 0.00096677, + 0.00655918, + 0.00153196, + 0.00251361, + 0.00312342, + 0.00243924, + 0.00660380, + 0.01700033 +*/ + 0.14473691, + 0.01147017, + 0.00167522, + 0.03831121, + 0.00356579, + 0.03811315, + 0.00178254, + 0.00199644, + 0.00183511, + 0.00225716, + 0.00211240, + 0.00308829, + 0.00172852, + 0.00186608, + 0.00215921, + 0.00168891, + 0.00168603, + 0.00218586, + 0.00284414, + 0.00161833, + 0.00196043, + 0.00151029, + 0.00173932, + 0.00218370, + 0.00934121, + 0.00220530, + 0.00381211, + 0.00185456, + 0.00194675, + 0.00161977, + 0.00186680, + 0.00182071, + 0.06421956, + 0.00537786, + 0.00514019, + 0.00487155, + 0.00493925, + 0.00503143, + 0.00514019, + 0.00453520, + 0.00454241, + 0.00485642, + 0.00422407, + 0.00593387, + 0.00458130, + 0.00343687, + 0.00342823, + 0.00531592, + 0.00324890, + 0.00333388, + 0.00308613, + 0.00293776, + 0.00258918, + 0.00259278, + 0.00377105, + 0.00267488, + 0.00227516, + 0.00415997, + 0.00248763, + 0.00301555, + 0.00220962, + 0.00206990, + 0.00270369, + 0.00231694, + 0.00273826, + 0.00450928, + 0.00384380, + 0.00504728, + 0.00221251, + 0.00376961, + 0.00232990, + 0.00312574, + 0.00291688, + 0.00280236, + 0.00252436, + 0.00229461, + 0.00294353, + 0.00241201, + 0.00366590, + 0.00199860, + 0.00257838, + 0.00225860, + 0.00260646, + 0.00187256, + 0.00266552, + 0.00242641, + 0.00219450, + 0.00192082, + 0.00182071, + 0.02185930, + 0.00157439, + 0.00164353, + 0.00161401, + 0.00187544, + 0.00186248, + 0.03338637, + 0.00186968, + 0.00172132, + 0.00148509, + 0.00177749, + 0.00144620, + 0.00192442, + 0.00169683, + 0.00209439, + 0.00209439, + 0.00259062, + 0.00194531, + 0.00182359, + 0.00159096, + 0.00145196, + 0.00128199, + 0.00158376, + 0.00171412, + 0.00243433, + 0.00345704, + 0.00156359, + 0.00145700, + 0.00157007, + 0.00232342, + 0.00154198, + 0.00140730, + 0.00288807, + 0.00152830, + 0.00151246, + 0.00250203, + 0.00224420, + 0.00161761, + 0.00714383, + 0.08188576, + 0.00802537, + 0.00119484, + 0.00123805, + 0.05632671, + 0.00305156, + 0.00105584, + 0.00105368, + 0.00099246, + 0.00090459, + 0.00109473, + 0.00115379, + 0.00261223, + 0.00105656, + 0.00124381, + 0.00100326, + 0.00127550, + 0.00089739, + 0.00162481, + 0.00100830, + 0.00097229, + 0.00078864, + 0.00107240, + 0.00084409, + 0.00265760, + 0.00116891, + 0.00073102, + 0.00075695, + 0.00093916, + 0.00106880, + 0.00086786, + 0.00185600, + 0.00608367, + 0.00133600, + 0.00075695, + 0.00122077, + 0.00566955, + 0.00108249, + 0.00259638, + 0.00077063, + 0.00166586, + 0.00090387, + 0.00087074, + 0.00084914, + 0.00130935, + 0.00162409, + 0.00085922, + 0.00093340, + 0.00093844, + 0.00087722, + 0.00108249, + 0.00098598, + 0.00095933, + 0.00427593, + 0.00496661, + 0.00102775, + 0.00159312, + 0.00118404, + 0.00114947, + 0.00104936, + 0.00154342, + 0.00140082, + 0.00115883, + 0.00110769, + 0.00161112, + 0.00169107, + 0.00107816, + 0.00142747, + 0.00279804, + 0.00085922, + 0.00116315, + 0.00119484, + 0.00128559, + 0.00146204, + 0.00130215, + 0.00101551, + 0.00091756, + 0.00161184, + 0.00236375, + 0.00131872, + 0.00214120, + 0.00088875, + 0.00138570, + 0.00211960, + 0.00094060, + 0.00088083, + 0.00094564, + 0.00090243, + 0.00106160, + 0.00088659, + 0.00114514, + 0.00095861, + 0.00108753, + 0.00124165, + 0.00427016, + 0.00159384, + 0.00170547, + 0.00104431, + 0.00091395, + 0.00095789, + 0.00134681, + 0.00095213, + 0.00105944, + 0.00094132, + 0.00141883, + 0.00102127, + 0.00101911, + 0.00082105, + 0.00158448, + 0.00102631, + 0.00087938, + 0.00139290, + 0.00114658, + 0.00095501, + 0.00161329, + 0.00126542, + 0.00113218, + 0.00123661, + 0.00101695, + 0.00112930, + 0.00317976, + 0.00085346, + 0.00101190, + 0.00189849, + 0.00105728, + 0.00186824, + 0.00092908, + 0.00160896 diff -urNp xqf-1.0.5/src/huffman.c xqf-1.0.5x/src/huffman.c --- xqf-1.0.5/src/huffman.c 1970-01-01 02:00:00.000000000 +0200 +++ xqf-1.0.5x/src/huffman.c 2007-10-02 09:06:05.000000000 +0300 @@ -0,0 +1,242 @@ +/* + huffman.c + huffman encoding/decoding for use in hexenworld networking + + Taken from the GPL'ed HexenWorld source code of Raven Software +*/ + +#include +#include +#include +#include +#include +#include "huffman.h" + +// +// huffman types and vars +// + +typedef struct huffnode_s +{ + struct huffnode_s *zero; + struct huffnode_s *one; + unsigned char val; + float freq; +} huffnode_t; + +typedef struct +{ + unsigned int bits; + int len; +} hufftab_t; + +static huffnode_t *HuffTree = NULL; +static hufftab_t HuffLookup[256]; + +static float HuffFreq[256] = +{ +# include "hufffreq.h" +}; + +int huff_failed = 0; + + +//============================================================================= + +// +// huffman functions +// + +static void FindTab (huffnode_t *tmp, int len, unsigned int bits) +{ + if (huff_failed) + return; + if (!tmp) + { + huff_failed = 1; + return; + } + + if (tmp->zero) + { + if (!tmp->one) + { + huff_failed = 1; + return; + } + if (len >= 32) + { + huff_failed = 1; + return; + } + FindTab (tmp->zero, len+1, bits<<1); + FindTab (tmp->one, len+1, (bits<<1)|1); + return; + } + + HuffLookup[tmp->val].len = len; + HuffLookup[tmp->val].bits = bits; + return; +} + +static unsigned char Masks[8] = +{ + 0x1, + 0x2, + 0x4, + 0x8, + 0x10, + 0x20, + 0x40, + 0x80 +}; + +static void PutBit (unsigned char *buf, int pos, int bit) +{ + if (bit) + buf[pos/8] |= Masks[pos%8]; + else + buf[pos/8] &=~Masks[pos%8]; +} + +static int GetBit (unsigned char *buf, int pos) +{ + if (buf[pos/8] & Masks[pos%8]) + return 1; + else + return 0; +} + +static void BuildTree (float *freq) +{ + float min1, min2; + int i, j, minat1, minat2; + huffnode_t *work[256]; + huffnode_t *tmp; + + for (i = 0; i < 256; i++) + { + work[i] = (huffnode_t *) malloc(sizeof(huffnode_t)); + work[i]->val = (unsigned char)i; + work[i]->freq = freq[i]; + work[i]->zero = 0; + work[i]->one = 0; + HuffLookup[i].len = 0; + } + + for (i = 0; i < 255; i++) + { + minat1 = -1; + minat2 = -1; + min1 = 1E30; + min2 = 1E30; + + for (j = 0; j < 256; j++) + { + if (!work[j]) + continue; + if (work[j]->freq < min1) + { + minat2 = minat1; + min2 = min1; + minat1 = j; + min1 = work[j]->freq; + } + else if (work[j]->freq < min2) + { + minat2 = j; + min2 = work[j]->freq; + } + } + if (minat1 < 0) + { + huff_failed = 1; + return; + } + if (minat2 < 0) + { + huff_failed = 1; + return; + } + tmp = (huffnode_t *) malloc(sizeof(huffnode_t)); + tmp->zero = work[minat2]; + tmp->one = work[minat1]; + tmp->freq = work[minat2]->freq + work[minat1]->freq; + tmp->val = 0xff; + work[minat1] = tmp; + work[minat2] = 0; + } + + HuffTree = tmp; + FindTab (HuffTree, 0, 0); +} + +void HuffDecode (unsigned char *in, unsigned char *out, int inlen, int *outlen, const int maxlen) +{ + int bits, tbits; + huffnode_t *tmp; + + if (*in == 0xff) + { + if (inlen > 1) + memcpy (out, in+1, inlen-1); + *outlen = inlen-1; + return; + } + + tbits = (inlen-1)*8 - *in; + bits = 0; + *outlen = 0; + + while (bits < tbits) + { + tmp = HuffTree; + do + { + if ( GetBit(in+1, bits) ) + tmp = tmp->one; + else + tmp = tmp->zero; + bits++; + } while (tmp->zero); + + if ( ++(*outlen) > maxlen ) + return; // out[maxlen - 1] is written already + *out++ = tmp->val; + } +} + +void HuffEncode (unsigned char *in, unsigned char *out, int inlen, int *outlen) +{ + int i, j, bitat; + unsigned int t; + + bitat = 0; + + for (i = 0; i < inlen; i++) + { + t = HuffLookup[in[i]].bits; + for (j = 0; j < HuffLookup[in[i]].len; j++) + { + PutBit (out+1, bitat + HuffLookup[in[i]].len-j-1, t&1); + t >>= 1; + } + bitat += HuffLookup[in[i]].len; + } + + *outlen = 1 + (bitat + 7)/8; + *out = 8 * ((*outlen)-1) - bitat; + + if (*outlen >= inlen+1) + { + *out = 0xff; + memcpy (out+1, in, inlen); + *outlen = inlen+1; + } +} + +void HuffInit (void) +{ + BuildTree(HuffFreq); +} + diff -urNp xqf-1.0.5/src/huffman.h xqf-1.0.5x/src/huffman.h --- xqf-1.0.5/src/huffman.h 1970-01-01 02:00:00.000000000 +0200 +++ xqf-1.0.5x/src/huffman.h 2007-10-02 09:06:05.000000000 +0300 @@ -0,0 +1,18 @@ +/* + huffman.h + huffman encoding/decoding for use in hexenworld networking + + Taken from the GPL'ed HexenWorld source code of Raven Software +*/ + +#ifndef __H2W_HUFFMAN_H +#define __H2W_HUFFMAN_H + +extern void HuffInit (void); +extern void HuffEncode (unsigned char *in, unsigned char *out, int inlen, int *outlen); +extern void HuffDecode (unsigned char *in, unsigned char *out, int inlen, int *outlen, const int maxlen); + +extern int huff_failed; + +#endif /* __H2W_HUFFMAN_H */ + diff -urNp xqf-1.0.5/src/Makefile.am xqf-1.0.5x/src/Makefile.am --- xqf-1.0.5/src/Makefile.am 2006-10-28 16:12:09.000000000 +0300 +++ xqf-1.0.5x/src/Makefile.am 2007-10-02 09:06:05.000000000 +0300 @@ -44,6 +44,7 @@ xqf_DEPENDENCIES = \ xqf_rcon_LDADD = @INTLLIBS@ $(GLIB_LIBS) $(XQFRCON_LIBS) @PACKAGE_LIBS@ xqf_rcon_SOURCES = \ rcon.c rcon.h \ + huffman.c huffman.h hufffreq.h \ debug.c debug.h \ utils.c utils.h xqf_rcon_CFLAGS = -DRCON_STANDALONE $(GLIB_CFLAGS) $(OLD_GTK_SUPPORT) @@ -68,6 +69,7 @@ pref.c \ psearch.c \ rc.c \ rcon.c \ +huffman.c \ server.c \ skin.c \ skin_pcx.c \ @@ -111,6 +113,8 @@ quake2_pal.h \ quake_pal.h \ rc.h \ rcon.h \ +huffman.h \ +hufffreq.h \ server.h \ skin.h \ skin_pcx.h \ diff -urNp xqf-1.0.5/src/rcon.c xqf-1.0.5x/src/rcon.c --- xqf-1.0.5/src/rcon.c 2006-06-18 15:53:59.000000000 +0300 +++ xqf-1.0.5x/src/rcon.c 2007-10-02 09:06:05.000000000 +0300 @@ -78,6 +78,35 @@ static int failed (char *name) { return TRUE; } +// HexenWorld support: + +// USE_HUFFENCODE: 0 or 1 +// If 1, rcon messages will be sent with huffman encoding. +// If 0, we shall cheat and add an extra (fifth) 255 to the +// header in order to send without huffman encoding. +// In either case, we MUST decode the received message. +#define USE_HUFFENCODE 1 + +static unsigned char huffbuff[PACKET_MAXSIZE]; // [65536] +static int huffman_inited = 0; + +static int huff_check (void) { + if (huffman_inited) + return 0; + if (huff_failed) { + no_huff: + fprintf (stderr, "HWRCON: Couldn't initialize Huffman compression!\n"); + rcon_print ("HWRCON: Couldn't initialize Huffman compression!\n"); + return 1; + } + if (!huffman_inited) { + HuffInit (); + if (huff_failed) + goto no_huff; + huffman_inited = 1; + } + return 0; +} static void rcon_print (char *fmt, ...) { #ifndef RCON_STANDALONE @@ -160,6 +189,7 @@ static int rcon_send(const char* cmd) { char* buf = NULL; size_t bufsize = 0; + int huffsize; int ret = -1; if(rcon_servertype == HL_SERVER && rcon_challenge == NULL) @@ -218,6 +248,19 @@ static int rcon_send(const char* cmd) strcpy(buf+sizeof(prefix), rcon_password); strcpy(buf+sizeof(prefix)+strlen(rcon_password)+1, cmd); } + else if (rcon_servertype == HW_SERVER) + { + if (huff_check ()) // do this even when not sending without encoding + return -1; // because we must decode the response.. +#if USE_HUFFENCODE + buf = g_strdup_printf("\377\377\377\377rcon %s %s", rcon_password, cmd); + bufsize = strlen(buf)+1; + HuffEncode ((unsigned char *)buf, huffbuff, bufsize, &huffsize); +#else + buf = g_strdup_printf("\377\377\377\377\377rcon %s %s", rcon_password, cmd); + bufsize = strlen(buf)+1; +#endif + } else { buf = g_strdup_printf("\377\377\377\377rcon %s %s",rcon_password, cmd); @@ -226,7 +269,13 @@ static int rcon_send(const char* cmd) rcon_print ("RCON> %s\n", cmd); - ret = send (rcon_fd, buf, bufsize, 0); +#if USE_HUFFENCODE + if (rcon_servertype == HW_SERVER) + ret = send (rcon_fd, huffbuff, huffsize, 0); + else +#endif + ret = send (rcon_fd, buf, bufsize, 0); + g_free(buf); return ret; } @@ -321,7 +370,18 @@ static char* rcon_receive() if (!packet) packet = g_malloc (PACKET_MAXSIZE); - size = recv (rcon_fd, packet, PACKET_MAXSIZE, 0); + if (rcon_servertype == HW_SERVER) + { + if (huff_check ()) + return msg; + // receive encoded message into the huffman buffer + size = recv (rcon_fd, huffbuff, PACKET_MAXSIZE, 0); + } + else + { + size = recv (rcon_fd, packet, PACKET_MAXSIZE, 0); + } + if (size < 0) { if(errno != EWOULDBLOCK) failed("recv"); @@ -330,8 +390,18 @@ static char* rcon_receive() { switch (rcon_servertype) { - case QW_SERVER: case HW_SERVER: + { + // decode the received message + HuffDecode (huffbuff, (unsigned char *)packet, size, &size, PACKET_MAXSIZE); + if (size > PACKET_MAXSIZE) + { + packet[PACKET_MAXSIZE-1] = '\0'; + failed("HuffDecode: Oversize!"); + break; + } + } + case QW_SERVER: case HL_SERVER: // "\377\377\377\377" msg = packet + 4 + 1; diff -urNp xqf-1.0.5/src/rcon.h xqf-1.0.5x/src/rcon.h --- xqf-1.0.5/src/rcon.h 2002-09-07 13:55:52.000000000 +0300 +++ xqf-1.0.5x/src/rcon.h 2007-10-02 09:06:05.000000000 +0300 @@ -20,6 +20,7 @@ #define __RCON_H__ #include "xqf.h" +#include "huffman.h" extern void rcon_dialog (const struct server *s, const char *passwd); diff -urNp xqf-1.0.5/src/Makefile.in xqf-1.0.5x/src/Makefile.in --- xqf-1.0.5/src/Makefile.in 2006-11-04 14:44:12.000000000 +0200 +++ xqf-1.0.5x/src/Makefile.in 2007-10-02 09:18:14.000000000 +0300 @@ -96,16 +96,17 @@ am_xqf_OBJECTS = addmaster.$(OBJEXT) add flt-player.$(OBJEXT) game.$(OBJEXT) history.$(OBJEXT) \ host.$(OBJEXT) launch.$(OBJEXT) menus.$(OBJEXT) \ pixmaps.$(OBJEXT) pref.$(OBJEXT) psearch.$(OBJEXT) \ - rc.$(OBJEXT) rcon.$(OBJEXT) server.$(OBJEXT) skin.$(OBJEXT) \ - skin_pcx.$(OBJEXT) sort.$(OBJEXT) source.$(OBJEXT) \ - srv-info.$(OBJEXT) srv-list.$(OBJEXT) srv-prop.$(OBJEXT) \ - stat.$(OBJEXT) statistics.$(OBJEXT) trayicon.$(OBJEXT) \ - utils.$(OBJEXT) xqf.$(OBJEXT) xqf-ui.$(OBJEXT) \ - xutils.$(OBJEXT) zipped.$(OBJEXT) redial.$(OBJEXT) \ - q3maps.$(OBJEXT) utmaps.$(OBJEXT) loadpixmap.$(OBJEXT) \ - splash.$(OBJEXT) scripts.$(OBJEXT) + rc.$(OBJEXT) rcon.$(OBJEXT) huffman.$(OBJEXT) server.$(OBJEXT) \ + skin.$(OBJEXT) skin_pcx.$(OBJEXT) sort.$(OBJEXT) \ + source.$(OBJEXT) srv-info.$(OBJEXT) srv-list.$(OBJEXT) \ + srv-prop.$(OBJEXT) stat.$(OBJEXT) statistics.$(OBJEXT) \ + trayicon.$(OBJEXT) utils.$(OBJEXT) xqf.$(OBJEXT) \ + xqf-ui.$(OBJEXT) xutils.$(OBJEXT) zipped.$(OBJEXT) \ + redial.$(OBJEXT) q3maps.$(OBJEXT) utmaps.$(OBJEXT) \ + loadpixmap.$(OBJEXT) splash.$(OBJEXT) scripts.$(OBJEXT) xqf_OBJECTS = $(am_xqf_OBJECTS) -am_xqf_rcon_OBJECTS = xqf_rcon-rcon.$(OBJEXT) xqf_rcon-debug.$(OBJEXT) \ +am_xqf_rcon_OBJECTS = xqf_rcon-rcon.$(OBJEXT) \ + xqf_rcon-huffman.$(OBJEXT) xqf_rcon-debug.$(OBJEXT) \ xqf_rcon-utils.$(OBJEXT) xqf_rcon_OBJECTS = $(am_xqf_rcon_OBJECTS) xqf_rcon_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) @@ -322,6 +323,7 @@ xqf_DEPENDENCIES = $(top_builddir)/src/z xqf_rcon_LDADD = @INTLLIBS@ $(GLIB_LIBS) $(XQFRCON_LIBS) @PACKAGE_LIBS@ xqf_rcon_SOURCES = \ rcon.c rcon.h \ + huffman.c huffman.h hufffreq.h \ debug.c debug.h \ utils.c utils.h @@ -346,6 +348,7 @@ pref.c \ psearch.c \ rc.c \ rcon.c \ +huffman.c \ server.c \ skin.c \ skin_pcx.c \ @@ -389,6 +392,8 @@ quake2_pal.h \ quake_pal.h \ rc.h \ rcon.h \ +huffman.h \ +hufffreq.h \ server.h \ skin.h \ skin_pcx.h \ @@ -575,6 +580,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gamesxml2c-gamesxml2c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/host.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/huffman.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxqf_dummy_GeoIP_so_0-libxqf_dummy_GeoIP_stubs.Po@am__quote@ @@ -608,6 +614,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf-ui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf_rcon-debug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf_rcon-huffman.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf_rcon-rcon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xqf_rcon-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xutils.Po@am__quote@ @@ -711,6 +718,22 @@ xqf_rcon-rcon.obj: rcon.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -c -o xqf_rcon-rcon.obj `if test -f 'rcon.c'; then $(CYGPATH_W) 'rcon.c'; else $(CYGPATH_W) '$(srcdir)/rcon.c'; fi` +xqf_rcon-huffman.o: huffman.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -MT xqf_rcon-huffman.o -MD -MP -MF "$(DEPDIR)/xqf_rcon-huffman.Tpo" -c -o xqf_rcon-huffman.o `test -f 'huffman.c' || echo '$(srcdir)/'`huffman.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xqf_rcon-huffman.Tpo" "$(DEPDIR)/xqf_rcon-huffman.Po"; else rm -f "$(DEPDIR)/xqf_rcon-huffman.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='huffman.c' object='xqf_rcon-huffman.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xqf_rcon-huffman.Po' tmpdepfile='$(DEPDIR)/xqf_rcon-huffman.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -c -o xqf_rcon-huffman.o `test -f 'huffman.c' || echo '$(srcdir)/'`huffman.c + +xqf_rcon-huffman.obj: huffman.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -MT xqf_rcon-huffman.obj -MD -MP -MF "$(DEPDIR)/xqf_rcon-huffman.Tpo" -c -o xqf_rcon-huffman.obj `if test -f 'huffman.c'; then $(CYGPATH_W) 'huffman.c'; else $(CYGPATH_W) '$(srcdir)/huffman.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xqf_rcon-huffman.Tpo" "$(DEPDIR)/xqf_rcon-huffman.Po"; else rm -f "$(DEPDIR)/xqf_rcon-huffman.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='huffman.c' object='xqf_rcon-huffman.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xqf_rcon-huffman.Po' tmpdepfile='$(DEPDIR)/xqf_rcon-huffman.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -c -o xqf_rcon-huffman.obj `if test -f 'huffman.c'; then $(CYGPATH_W) 'huffman.c'; else $(CYGPATH_W) '$(srcdir)/huffman.c'; fi` + xqf_rcon-debug.o: debug.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xqf_rcon_CFLAGS) $(CFLAGS) -MT xqf_rcon-debug.o -MD -MP -MF "$(DEPDIR)/xqf_rcon-debug.Tpo" -c -o xqf_rcon-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xqf_rcon-debug.Tpo" "$(DEPDIR)/xqf_rcon-debug.Po"; else rm -f "$(DEPDIR)/xqf_rcon-debug.Tpo"; exit 1; fi