# Patch name: mccp-patch # Patch version: 1.0 # Author's name: Nick Burtner # Author's email: cstrife@1ststreet.com # Version of PennMUSH: 1.7.7p5 # Date patch made: Sun Jan 19 22:25:49 EST 2003 # Author is willing to support (yes/no): yes # Patch format: Context # # # This is a contributed PennMUSH patch. Its use is subject to the # same restrictions found in PennMUSH's hdrs/copyrite.h file. # # No warranty is given for this patch. It is not necessarily going # to work on your system, with any version of PennMUSH other than # the one above, etc. # # If the author given above was willing to support the patch, you # should write to the author if you have any questions or problems. Do # *NOT* send email messages to Javelin or any PennMUSH mailing list about # this patch! # # Below this line is the author's description of the patch, # followed by the patch itself. If the patch is in context diff # format, you'll probably apply it by typing: patch < patchfile # in your top-level MUSH directory, unless instructed otherwise # below. # # # Apply with patch -p0 < mccp-patch-final *** ../vanilla/pennmush/src/Makefile Sun Jan 19 21:38:24 2003 --- src/Makefile Sun Jan 19 20:53:20 2003 *************** *** 28,40 **** C_FILES=access.c atr_tab.c attrib.c boolexp.c bsd.c cmdlocal.c cmds.c \ command.c compress.c conf.c cque.c create.c db.c destroy.c \ extchat.c extmail.c filecopy.c flags.c function.c funcrypt.c \ ! fundb.c funlist.c \ funlocal.c funmath.c funmisc.c funstr.c funtime.c funufun.c game.c \ help.c htab.c ident.c local.c lock.c log.c look.c mycrypt.c mymalloc.c \ malias.c match.c memcheck.c move.c mysocket.c parse.c pcre.c \ ! player.c plyrlist.c predicat.c privtab.c ptab.c rob.c services.c \ ! set.c shs.c sig.c speech.c strdup.c strtree.c strutil.c \ ! tables.c timer.c unparse.c utils.c version.c warnings.c wild.c wiz.c H_FILES = ../hdrs/attrib.h ../hdrs/conf.h ../hdrs/copyrite.h ../hdrs/mushdb.h \ ../hdrs/flags.h ../hdrs/externs.h ../hdrs/case.h \ --- 28,40 ---- C_FILES=access.c atr_tab.c attrib.c boolexp.c bsd.c cmdlocal.c cmds.c \ command.c compress.c conf.c cque.c create.c db.c destroy.c \ extchat.c extmail.c filecopy.c flags.c function.c funcrypt.c \ ! fundb.c funlist.c \ funlocal.c funmath.c funmisc.c funstr.c funtime.c funufun.c game.c \ help.c htab.c ident.c local.c lock.c log.c look.c mycrypt.c mymalloc.c \ malias.c match.c memcheck.c move.c mysocket.c parse.c pcre.c \ ! player.c plyrlist.c predicat.c privtab.c ptab.c rob.c services.c \ ! set.c sig.c speech.c strdup.c strtree.c strutil.c \ ! tables.c timer.c unparse.c utils.c version.c warnings.c wild.c wiz.c H_FILES = ../hdrs/attrib.h ../hdrs/conf.h ../hdrs/copyrite.h ../hdrs/mushdb.h \ ../hdrs/flags.h ../hdrs/externs.h ../hdrs/case.h \ *************** *** 131,137 **** netmud: $(O_FILES) @echo "Making netmud." -mv -f netmud netmud~ ! $(CC) $(LDFLAGS) $(CCFLAGS) -o netmud $(O_FILES) $(LIBS) # By default, db.c initially allocates enough space for 5000 objects, then # grows the space if needed. To change this value, include --- 131,137 ---- netmud: $(O_FILES) @echo "Making netmud." -mv -f netmud netmud~ ! $(CC) $(LDFLAGS) $(CCFLAGS) -o netmud $(O_FILES) $(LIBS) -lz # By default, db.c initially allocates enough space for 5000 objects, then # grows the space if needed. To change this value, include *** ../vanilla/pennmush/src/attrib.c Sun Jan 19 21:37:10 2003 --- src/attrib.c Sun Jan 19 20:59:22 2003 *************** *** 146,152 **** if (!s || !*s) { AL_STR(ptr) = (unsigned char *) ""; } else { ! AL_STR(ptr) = compress(s); if (!AL_STR(ptr)) { AL_STR(ptr) = (unsigned char *) ""; return; --- 146,152 ---- if (!s || !*s) { AL_STR(ptr) = (unsigned char *) ""; } else { ! AL_STR(ptr) = mcompress(s); if (!AL_STR(ptr)) { AL_STR(ptr) = (unsigned char *) ""; return; *************** *** 271,277 **** if (!s || !*s) { AL_STR(ptr) = (unsigned char *) ""; } else { ! AL_STR(ptr) = compress(s); if (!AL_STR(ptr)) { AL_STR(ptr) = (unsigned char *) ""; return AE_ERROR; --- 271,277 ---- if (!s || !*s) { AL_STR(ptr) = (unsigned char *) ""; } else { ! AL_STR(ptr) = mcompress(s); if (!AL_STR(ptr)) { AL_STR(ptr) = (unsigned char *) ""; return AE_ERROR; *************** *** 522,528 **** && *AL_STR(ptr) #endif && (AttrCount(dest) < MAX_ATTRCOUNT)) { ! atr_new_add(dest, AL_NAME(ptr), uncompress(AL_STR(ptr)), AL_CREATOR(ptr), AL_FLAGS(ptr)); AttrCount(dest)++; } --- 522,528 ---- && *AL_STR(ptr) #endif && (AttrCount(dest) < MAX_ATTRCOUNT)) { ! atr_new_add(dest, AL_NAME(ptr), muncompress(AL_STR(ptr)), AL_CREATOR(ptr), AL_FLAGS(ptr)); AttrCount(dest)++; } *************** *** 573,579 **** st_insert(AL_NAME(ptr), &temp_attrib); if (AL_FLAGS(ptr) & AF_NOPROG || !(AL_FLAGS(ptr) & flag_mask)) continue; ! strcpy(tbuf1, uncompress(AL_STR(ptr))); s = tbuf1; do { s = strchr(s + 1, end); --- 573,579 ---- st_insert(AL_NAME(ptr), &temp_attrib); if (AL_FLAGS(ptr) & AF_NOPROG || !(AL_FLAGS(ptr) & flag_mask)) continue; ! strcpy(tbuf1, muncompress(AL_STR(ptr))); s = tbuf1; do { s = strchr(s + 1, end); *************** *** 626,632 **** if (AL_FLAGS(ptr) & (AF_NOPROG | AF_PRIVATE) || !(AL_FLAGS(ptr) & flag_mask)) continue; ! strcpy(tbuf1, uncompress(AL_STR(ptr))); s = tbuf1; do { s = strchr(s + 1, end); --- 626,632 ---- if (AL_FLAGS(ptr) & (AF_NOPROG | AF_PRIVATE) || !(AL_FLAGS(ptr) & flag_mask)) continue; ! strcpy(tbuf1, muncompress(AL_STR(ptr))); s = tbuf1; do { s = strchr(s + 1, end); *************** *** 705,711 **** old = atr_get_noparent(thing, "ALIAS"); if (old) { /* Old alias - we're allowed to change to a different case */ ! strcpy(tbuf1, uncompress(AL_STR(old))); if (s && (!*s || (strcasecmp(s, tbuf1) && !ok_player_name(s)))) { notify(player, T("That is not a valid alias.")); return -1; --- 705,711 ---- old = atr_get_noparent(thing, "ALIAS"); if (old) { /* Old alias - we're allowed to change to a different case */ ! strcpy(tbuf1, muncompress(AL_STR(old))); if (s && (!*s || (strcasecmp(s, tbuf1) && !ok_player_name(s)))) { notify(player, T("That is not a valid alias.")); return -1; *** ../vanilla/pennmush/src/boolexp.c Sun Jan 19 21:37:10 2003 --- src/boolexp.c Sun Jan 19 20:59:22 2003 *************** *** 308,314 **** } boolexp_recursion--; strcpy(tbuf1, b->data.atr_lock->text); ! strcpy(tbuf2, uncompress(a->value)); return local_wild_match(tbuf1, tbuf2); case BOOLEXP_EVAL: boolexp_recursion++; --- 308,314 ---- } boolexp_recursion--; strcpy(tbuf1, b->data.atr_lock->text); ! strcpy(tbuf2, muncompress(a->value)); return local_wild_match(tbuf1, tbuf2); case BOOLEXP_EVAL: boolexp_recursion++; *************** *** 855,861 **** return 0; if (!Can_Read_Attr(target, target, a)) return 0; ! asave = safe_uncompress(a->value); /* perform pronoun substitution */ save_global_regs("check_attrib_lock_save", preserve); bp = buff; --- 855,861 ---- return 0; if (!Can_Read_Attr(target, target, a)) return 0; ! asave = safe_muncompress(a->value); /* perform pronoun substitution */ save_global_regs("check_attrib_lock_save", preserve); bp = buff; *** ../vanilla/pennmush/src/bsd.c Sun Jan 19 21:38:24 2003 --- src/bsd.c Sun Jan 19 21:30:24 2003 *************** *** 82,87 **** --- 82,92 ---- #include #endif + + #ifdef MCCP + #include + #endif + #include "mushdb.h" #include "externs.h" #include "dbdefs.h" *************** *** 99,105 **** #include "ident.h" #include "strtree.h" #include "log.h" ! #ifdef MEM_CHECK #include "memcheck.h" #endif --- 104,110 ---- #include "ident.h" #include "strtree.h" #include "log.h" ! #include "command.h" #ifdef MEM_CHECK #include "memcheck.h" #endif *************** *** 175,180 **** --- 180,189 ---- #define CONN_TELNET 0x2 /* Send a telnet option to test client */ #define CONN_TELNET_QUERY 0x4 + /* Using a MCCP2 capable client */ + #define CONN_MCCP 0x8 + /* Send a MCCP2 option to test client */ + #define CONN_MCCP_QUERY 0x16 #define TELNET_ABLE(d) ((d)->conn_flags & (CONN_TELNET | CONN_TELNET_QUERY)) *************** *** 210,218 **** --- 219,237 ---- #define TN_SGA 3 /* Suppress go-ahead */ #define TN_LINEMODE 34 #define TN_NAWS 31 /* Negotiate About Window Size */ + #define TN_COMPRESS2 86 /* MCCP v2 */ void test_telnet(DESC *d); void setup_telnet(DESC *d); int handle_telnet(DESC *d, unsigned char **q, unsigned char *qend); + #ifdef MCCP + void setup_mccp(DESC *); + int process_compressed(DESC *, struct text_block *); + int compress_start(DESC *); + int compress_end(DESC *); + void *zlib_alloc(void *, unsigned int, unsigned int); + void zlib_free(void *, void *); + void do_compression(dbref, const char*); + #endif #define DESC_ITER_CONN(d) \ for(d = descriptor_list;(d);d=(d)->next) \ *************** *** 1587,1593 **** if (a) { if (!tbuf1) tbuf1 = (char *) mush_malloc(BUFFER_LEN, "string"); ! strcpy(tbuf1, uncompress(a->value)); if ((AL_FLAGS(a) & AF_REGEXP) ? regexp_match_case(tbuf1, notify_makestring(msgbuf, messages, NA_ASCII), --- 1606,1612 ---- if (a) { if (!tbuf1) tbuf1 = (char *) mush_malloc(BUFFER_LEN, "string"); ! strcpy(tbuf1, muncompress(a->value)); if ((AL_FLAGS(a) & AF_REGEXP) ? regexp_match_case(tbuf1, notify_makestring(msgbuf, messages, NA_ASCII), *************** *** 1617,1623 **** for (j = 1; j < 10; j++) wenv[j] = NULL; save_global_regs("inprefix_save", preserve); ! asave = safe_uncompress(a->value); ap = asave; bp = tbuf1; process_expression(tbuf1, &bp, &ap, target, speaker, speaker, --- 1636,1642 ---- for (j = 1; j < 10; j++) wenv[j] = NULL; save_global_regs("inprefix_save", preserve); ! asave = safe_muncompress(a->value); ap = asave; bp = tbuf1; process_expression(tbuf1, &bp, &ap, target, speaker, speaker, *************** *** 1657,1663 **** char *fwdstr, *orig, *curr; dbref fwd; ! orig = safe_uncompress(AL_STR(a)); fwdstr = trim_space_sep(orig, ' '); if (!tbuf1) --- 1676,1682 ---- char *fwdstr, *orig, *curr; dbref fwd; ! orig = safe_muncompress(AL_STR(a)); fwdstr = trim_space_sep(orig, ' '); if (!tbuf1) *************** *** 2484,2489 **** --- 2503,2511 ---- #ifdef USE_MAILER do_mail_purge(d->player); #endif + #ifdef MCCP + compress_end(d); + #endif } if (MAX_LOGINS) { login_number--; *************** *** 2610,2615 **** --- 2632,2642 ---- d->next = descriptor_list; d->prev = NULL; descriptor_list = d; + #ifdef MCCP + d->out_compress = NULL; + d->out_compress_buf = NULL; + d->is_compressed = 0; + #endif #ifdef NT_TCP *************** *** 2626,2631 **** --- 2653,2661 ---- #else d->width = 78; d->height = 24; + #ifdef MCCP + setup_mccp(d); + #endif test_telnet(d); welcome_user(d); #endif *************** *** 3249,3255 **** int cnt; for (qp = &d->output.head; ((cur = *qp) != NULL);) { ! cnt = send(d->descriptor, cur->start, cur->nchars, 0); if (cnt < 0) { #ifdef WIN32 if (cnt == SOCKET_ERROR && WSAGetLastError() == WSAEWOULDBLOCK) --- 3279,3294 ---- int cnt; for (qp = &d->output.head; ((cur = *qp) != NULL);) { ! #ifdef MCCP ! if (d->out_compress) { ! process_compressed(d, cur); ! cnt = send(d->descriptor, d->out_compress_buf, (d->out_compress->next_out - d->out_compress_buf), 0); ! } else { ! #endif ! cnt = send(d->descriptor, cur->start, cur->nchars, 0); ! #ifdef MCCP ! } ! #endif if (cnt < 0) { #ifdef WIN32 if (cnt == SOCKET_ERROR && WSAGetLastError() == WSAEWOULDBLOCK) *************** *** 3261,3280 **** #endif #endif return 1; return 0; } d->output_size -= cnt; d->output_chars += cnt; ! if (cnt == cur->nchars) { ! if (!cur->nxt) ! d->output.tail = qp; ! *qp = cur->nxt; #ifdef DEBUG ! do_rawlog(LT_ERR, "free_text_block(0x%x) at 2.", cur); #endif /* DEBUG */ ! free_text_block(cur); ! continue; /* do not adv ptr */ } cur->nchars -= cnt; cur->start += cnt; break; --- 3300,3338 ---- #endif #endif return 1; + #ifdef MCCP + d->out_compress->next_out = d->out_compress_buf; + #endif return 0; } d->output_size -= cnt; d->output_chars += cnt; ! #ifdef MCCP ! if (d->out_compress) { ! if (cnt == (d->out_compress->next_out - d->out_compress_buf)) { ! d->out_compress->next_out = d->out_compress_buf; ! if (!cur->nxt) { ! d->output.tail = qp; ! } ! *qp = cur->nxt; ! free_text_block(cur); ! continue; ! } ! } else { ! #endif ! if (cnt == cur->nchars) { ! if (!cur->nxt) ! d->output.tail = qp; ! *qp = cur->nxt; #ifdef DEBUG ! do_rawlog(LT_ERR, "free_text_block(0x%x) at 2.", cur); #endif /* DEBUG */ ! free_text_block(cur); ! continue; /* do not adv ptr */ ! } ! #ifdef MCCP } + #endif cur->nchars -= cnt; cur->start += cnt; break; *************** *** 3282,3288 **** return 1; } - void freeqs(DESC *d) { --- 3340,3345 ---- *************** *** 3342,3350 **** unsigned char query[3] = "\xFF\xFD\x22"; queue_newwrite(d, query, 3); d->conn_flags |= CONN_TELNET_QUERY; - process_output(d); } } void setup_telnet(DESC *d) --- 3399,3418 ---- unsigned char query[3] = "\xFF\xFD\x22"; queue_newwrite(d, query, 3); d->conn_flags |= CONN_TELNET_QUERY; } + process_output(d); + } + + #ifdef MCCP + void + setup_mccp(DESC *d) + { + unsigned char query[3] = "\xFF\xFB\x56"; + queue_newwrite(d, query, 3); + d->conn_flags |= CONN_MCCP_QUERY; + process_output(d); } + #endif void setup_telnet(DESC *d) *************** *** 3485,3490 **** --- 3553,3564 ---- #ifdef DEBUG_TELNET fprintf(stderr, "GOT IAC DO SGA, sending IAC WILL SGA IAG DO SGA\n"); #endif + #ifdef MCCP + } else if (**q == TN_COMPRESS2) { + do_log(LT_CONN, 0, 0, T("[%d/%s/%s] Switching to Compressed mode."), + d->descriptor, d->addr, d->ip); + compress_start(d); + #endif } else { /* Stuff we won't do */ unsigned char reply[3]; *************** *** 3660,3669 **** do_command(DESC *d, char *command) { int j; - depth = 0; (d->cmds)++; if (!strcmp(command, QUIT_COMMAND)) { return 0; } else if (!strcmp(command, LOGOUT_COMMAND)) { --- 3734,3743 ---- do_command(DESC *d, char *command) { int j; depth = 0; (d->cmds)++; + if (!strcmp(command, QUIT_COMMAND)) { return 0; } else if (!strcmp(command, LOGOUT_COMMAND)) { *************** *** 4040,4045 **** --- 4114,4122 ---- for (d = descriptor_list; d; d = dnext) { dnext = d->next; + #ifdef MCCP + compress_end(d); + #endif send(d->descriptor, T(shutdown_message), strlen(T(shutdown_message)), 0); send(d->descriptor, "\r\n", 2, 0); if (shutdown(d->descriptor, 2) < 0) *************** *** 5406,5411 **** --- 5483,5492 ---- putref(f, d->conn_flags); putref(f, d->width); putref(f, d->height); + #ifdef MCCP + putref(f, d->is_compressed); + compress_end(d); + #endif } /* for loop */ putref(f, 0); *************** *** 5471,5480 **** --- 5552,5567 ---- d->width = getref(f); d->height = getref(f); } + #ifdef MCCP + d->is_compressed = (int) getref(f); + #endif d->input_chars = 0; d->output_chars = 0; d->output_size = 0; d->output.head = 0; + #ifdef MCCP + d->out_compress = NULL; + #endif d->output.tail = &d->output.head; d->input.head = 0; d->input.tail = &d->input.head; *************** *** 5510,5518 **** fclose(f); remove(REBOOTFILE); flag_broadcast(0, 0, T("GAME: Reboot finished.")); } - #ifdef NT_TCP /* --------------------------------------------------------------------------- */ --- 5597,5611 ---- fclose(f); remove(REBOOTFILE); flag_broadcast(0, 0, T("GAME: Reboot finished.")); + #ifdef MCCP + DESC_ITER_CONN(d) { + if (d->is_compressed) { + compress_start(d); + } + } + #endif } #ifdef NT_TCP /* --------------------------------------------------------------------------- */ *************** *** 5769,5771 **** --- 5862,6062 ---- } #endif + + + #ifdef MCCP + #define COMPRESS_BUF_SIZE BUFFER_LEN + void * + zlib_alloc(void *opaque, unsigned int items, unsigned int size) + { + return calloc(items, size); + } + + void + zlib_free(void *opaque, void *address) + { + free(address); + } + + char enable_compress2[] = { + IAC, SB, TN_COMPRESS2, IAC, SE, 0 + }; + + + int + process_compressed(DESC *d, struct text_block *text) + { + + z_stream *s = d->out_compress; + + /* compress the data */ + s->next_in = (unsigned char *) text->start; + s->avail_in = text->nchars; + s->avail_out = COMPRESS_BUF_SIZE - (s->next_out - d->out_compress_buf); + + while (s->avail_in > 0 && s->avail_out > 0) { + + if (deflate(s, Z_SYNC_FLUSH) != Z_OK) { + return 0; + } + s->avail_out = COMPRESS_BUF_SIZE - (s->next_out - d->out_compress_buf); + } + d->output_size -= text->nchars; + d->output_size += (s->next_out - d->out_compress_buf); + return 1; + } + + int + compress_start(DESC *d) + { + + z_stream *s; + if (d->out_compress) { + return 1; + } + + d->is_compressed = 1; + + queue_newwrite(d, enable_compress2, sizeof(enable_compress2)); + process_output(d); + s = (z_stream *) malloc(sizeof(*s)); + d->out_compress_buf = (unsigned char *) malloc(COMPRESS_BUF_SIZE); + + s->next_in = NULL; + s->avail_in = 0; + + s->next_out = d->out_compress_buf; + s->avail_out = COMPRESS_BUF_SIZE; + + s->zalloc = zlib_alloc; + s->zfree = zlib_free; + s->opaque = NULL; + + if (deflateInit(s, 9) != Z_OK) { + + free(d->out_compress_buf); + free(s); + return 0; + } + + + d->out_compress = s; + return 1; + } + + int + compress_end(DESC *d) + { + + unsigned char dummy[1]; + int nWrite; + + if (!d->out_compress) { + return 1; + } + + d->is_compressed = 0; + + d->out_compress->avail_in = 0; + d->out_compress->next_in = dummy; + + if (deflate(d->out_compress, Z_FINISH) != Z_STREAM_END) { + return 0; + } + if ((nWrite = + send(d->descriptor, d->out_compress_buf, + d->out_compress->next_out - d->out_compress_buf, 0)) < 0) { + return 0; + } + process_output(d); + + deflateEnd(d->out_compress); + free(d->out_compress_buf); + free(d->out_compress); + d->out_compress = NULL; + d->out_compress_buf = NULL; + + return 1; + } + + FUNCTION(do_compress) + { + + DESC *d; + dbref target; + + target = executor; + + if ((target == NOTHING) || !Connected(target)) { + safe_str("#-1", buff, bp); + return; + } + + DESC_ITER_CONN(d) { + if (d->player == target) { + if (!d->out_compress) { + compress_start(d); + return; + } else { + compress_end(d); + return; + } + } + } + } + COMMAND(cmd_do_compress) { + + if (SW_ISSET(sw, SWITCH_ON)) { + do_compression(player, "on"); + } else if (SW_ISSET(sw, SWITCH_OFF)) { + do_compression(player, "off"); + } else { + do_compression(player, arg_left); + } + } + + void + do_compression(dbref player, const char *arg1) + { + DESC *d; + dbref target; + int comp_toggle; + + target = player; + + if (string_prefix(arg1, "on")) { + comp_toggle = 1; + } else if (string_prefix(arg1, "off")) { + comp_toggle = 0; + } else { + notify(player, T("Invalid parameter.")); + return; + } + + + DESC_ITER_CONN(d) { + if (d->player == target) { + if (comp_toggle) { + if (!d->out_compress) { + compress_start(d); + notify(player, "Compression Started."); + return; + } else { + notify(player, "Already compressing."); + return; + } + } else { + if (d->out_compress) { + compress_end(d); + notify(player, "Compression Ended."); + return; + } else { + notify(player, "Not Compressing to begin with."); + return; + } + } + } + } + } + + #endif *** ../vanilla/pennmush/src/command.c Sun Jan 19 21:38:16 2003 --- src/command.c Sun Jan 19 22:21:52 2003 *************** *** 96,101 **** --- 96,104 ---- cmd_config, CMD_T_ANY | CMD_T_EQSPLIT, 0, 0, 0}, {"@CPATTR", "CONVERT", cmd_cpattr, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_RS_ARGS, 0, 0, 0}, + #ifdef MCCP + {"@COMPRESS", "ON OFF", cmd_do_compress, CMD_T_ANY, 0, 0, 0}, + #endif {"@CREATE", NULL, cmd_create, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0, 0}, {"@CLONE", "PRESERVE", cmd_clone, CMD_T_ANY | CMD_T_NOGAGGED | CMD_T_EQSPLIT, *************** *** 1303,1309 **** if (!atr) return; ! code = safe_uncompress(AL_STR(atr)); if (!code) return; #ifdef MEM_CHECK --- 1306,1312 ---- if (!atr) return; ! code = safe_muncompress(AL_STR(atr)); if (!code) return; #ifdef MEM_CHECK *** ../vanilla/pennmush/src/comp_h.c Sun Jan 19 21:37:10 2003 --- src/comp_h.c Sun Jan 19 20:59:22 2003 *************** *** 64,70 **** * later uncompression will not go well. */ unsigned char * ! compress(const char *s) { CType stage; int bits = 0; --- 64,70 ---- * later uncompression will not go well. */ unsigned char * ! mcompress(const char *s) { CType stage; int bits = 0; *************** *** 136,142 **** * Stop when the leaf node turns out to be EOS. */ char * ! uncompress(const unsigned char *s) { /* to avoid generating memory problems, this function should be * used with something of the format --- 136,142 ---- * Stop when the leaf node turns out to be EOS. */ char * ! muncompress(const unsigned char *s) { /* to avoid generating memory problems, this function should be * used with something of the format *************** *** 172,178 **** } char * ! safe_uncompress(unsigned char const *s) { /* this function should be used when you're doing something like * char *attrib = safe_uncompress(a->value); --- 172,178 ---- } char * ! safe_muncompress(unsigned char const *s) { /* this function should be used when you're doing something like * char *attrib = safe_uncompress(a->value); *************** *** 181,187 **** * or you will create a horrendous memory leak. */ ! return (char *) strdup((char *) uncompress(s)); } --- 181,187 ---- * or you will create a horrendous memory leak. */ ! return (char *) strdup((char *) muncompress(s)); } *************** *** 536,542 **** exit(0); printf("Text: %s!\n", buffer); printf("Compressing\n"); ! strcpy(otherbuf, compress(buffer)); printf("Compressed: "); p1 = otherbuf; while (p1 && *p1) { --- 536,542 ---- exit(0); printf("Text: %s!\n", buffer); printf("Compressing\n"); ! strcpy(otherbuf, mcompress(buffer)); printf("Compressed: "); p1 = otherbuf; while (p1 && *p1) { *************** *** 547,553 **** printf("\n"); printf("Length: %d, Complength: %d\n", strlen(buffer), strlen(otherbuf)); printf("Uncompressing\n"); ! strcpy(newbuffer, uncompress(otherbuf)); printf("Text: %s!\n", newbuffer); printf("Strcoll(orig,uncomp) = %d\n", strcoll(newbuffer, buffer)); printf("strlen(orig) = %d, strlen(uncomp) = %d\n", strlen(buffer), --- 547,553 ---- printf("\n"); printf("Length: %d, Complength: %d\n", strlen(buffer), strlen(otherbuf)); printf("Uncompressing\n"); ! strcpy(newbuffer, muncompress(otherbuf)); printf("Text: %s!\n", newbuffer); printf("Strcoll(orig,uncomp) = %d\n", strcoll(newbuffer, buffer)); printf("strlen(orig) = %d, strlen(uncomp) = %d\n", strlen(buffer), *** ../vanilla/pennmush/src/comp_w.c Sun Jan 19 21:38:01 2003 --- src/comp_w.c Sun Jan 19 20:59:22 2003 *************** *** 226,232 **** /* See comments in comp_h.c about this function */ unsigned char * ! compress(s) char const *s; { const unsigned char *p; --- 226,232 ---- /* See comments in comp_h.c about this function */ unsigned char * ! mcompress(s) char const *s; { const unsigned char *p; *************** *** 266,272 **** char * ! uncompress(s) unsigned char const *s; { --- 266,272 ---- char * ! muncompress(s) unsigned char const *s; { *************** *** 312,318 **** char * ! safe_uncompress(s) unsigned char const *s; { /* this function should be used when you're doing something like --- 312,318 ---- char * ! safe_muncompress(s) unsigned char const *s; { /* this function should be used when you're doing something like *************** *** 322,328 **** * or you will create a horrendous memory leak. */ ! return (char *) strdup((char *) uncompress(s)); } --- 322,328 ---- * or you will create a horrendous memory leak. */ ! return (char *) strdup((char *) muncompress(s)); } *** ../vanilla/pennmush/src/comp_w8.c Sun Jan 19 21:38:01 2003 --- src/comp_w8.c Sun Jan 19 20:59:22 2003 *************** *** 230,236 **** /* See comment in comp_h.c about this function */ unsigned char * ! compress(s) char const *s; { const unsigned char *p; --- 230,236 ---- /* See comment in comp_h.c about this function */ unsigned char * ! mcompress(s) char const *s; { const unsigned char *p; *************** *** 270,276 **** char * ! uncompress(s) unsigned char const *s; { --- 270,276 ---- char * ! muncompress(s) unsigned char const *s; { *************** *** 318,324 **** char * ! safe_uncompress(s) unsigned char const *s; { /* this function should be used when you're doing something like --- 318,324 ---- char * ! safe_muncompress(s) unsigned char const *s; { /* this function should be used when you're doing something like *************** *** 328,334 **** * or you will create a horrendous memory leak. */ ! return (char *) strdup((char *) uncompress(s)); } --- 328,334 ---- * or you will create a horrendous memory leak. */ ! return (char *) strdup((char *) muncompress(s)); } *** ../vanilla/pennmush/src/cque.c Tue Nov 26 16:10:31 2002 --- src/cque.c Sun Jan 19 20:59:22 2003 *************** *** 96,102 **** return !strcmp(AL_NAME(a), "SEMAPHORE"); /* Only allow SEMAPHORE for now */ } else { /* Attribute is set. Check for proper owner and flags and value */ if ((AL_CREATOR(a) == GOD) && (AL_FLAGS(a) == SEMAPHORE_FLAGS)) { ! char *v = uncompress(AL_STR(a)); if (!*v || is_integer(v)) return 1; else --- 96,102 ---- return !strcmp(AL_NAME(a), "SEMAPHORE"); /* Only allow SEMAPHORE for now */ } else { /* Attribute is set. Check for proper owner and flags and value */ if ((AL_CREATOR(a) == GOD) && (AL_FLAGS(a) == SEMAPHORE_FLAGS)) { ! char *v = muncompress(AL_STR(a)); if (!*v || is_integer(v)) return 1; else *************** *** 120,126 **** char buff[MAX_COMMAND_LEN]; a = atr_get_noparent(player, name); if (a) ! num = parse_integer(uncompress(AL_STR(a))); num += am; if (num) { sprintf(buff, "%d", num); --- 120,126 ---- char buff[MAX_COMMAND_LEN]; a = atr_get_noparent(player, name); if (a) ! num = parse_integer(muncompress(AL_STR(a))); num += am; if (num) { sprintf(buff, "%d", num); *************** *** 274,280 **** atr_get(executor, strupper(atrname))); if (!a) return 0; ! start = safe_uncompress(AL_STR(a)); command = start; /* Trim off $-command or ^-command prefix */ if (*command == '$' || *command == '^') { --- 274,280 ---- atr_get(executor, strupper(atrname))); if (!a) return 0; ! start = safe_muncompress(AL_STR(a)); command = start; /* Trim off $-command or ^-command prefix */ if (*command == '$' || *command == '^') { *************** *** 786,792 **** add_to_sem(thing, 1, aname); a = atr_get_noparent(thing, aname); if (a) ! num = parse_integer(uncompress(a->value)); else num = 0; if (num <= 0) { --- 786,792 ---- add_to_sem(thing, 1, aname); a = atr_get_noparent(thing, aname); if (a) ! num = parse_integer(muncompress(a->value)); else num = 0; if (num <= 0) { *** ../vanilla/pennmush/src/db.c Sun Jan 19 21:38:24 2003 --- src/db.c Sun Jan 19 20:59:22 2003 *************** *** 472,483 **** case BOOLEXP_ATR: putstring(f, b->data.atr_lock->name); OUTPUT(putc(':', f)); ! putstring(f, uncompress(b->data.atr_lock->text)); break; case BOOLEXP_EVAL: putstring(f, b->data.atr_lock->name); OUTPUT(putc('/', f)); ! putstring(f, uncompress(b->data.atr_lock->text)); break; default: break; --- 472,483 ---- case BOOLEXP_ATR: putstring(f, b->data.atr_lock->name); OUTPUT(putc(':', f)); ! putstring(f, muncompress(b->data.atr_lock->text)); break; case BOOLEXP_EVAL: putstring(f, b->data.atr_lock->name); OUTPUT(putc('/', f)); ! putstring(f, muncompress(b->data.atr_lock->text)); break; default: break; *************** *** 555,561 **** continue; OUTPUT(fprintf(f, "]%s^%d^%d\n", AL_NAME(list), Owner(AL_CREATOR(list)), AL_FLAGS(list))); ! putstring(f, uncompress(AL_STR(list))); } OUTPUT(fprintf(f, "<\n")); return 0; --- 555,561 ---- continue; OUTPUT(fprintf(f, "]%s^%d^%d\n", AL_NAME(list), Owner(AL_CREATOR(list)), AL_FLAGS(list))); ! putstring(f, muncompress(AL_STR(list))); } OUTPUT(fprintf(f, "<\n")); return 0; *************** *** 678,684 **** OUTPUT(fprintf(f, "]%s^%d^%d\n", name, (int) owner, AL_FLAGS(list))); /* now check the attribute */ ! strcpy(tbuf1, uncompress(AL_STR(list))); /* get rid of unprintables and hard newlines */ lastp = '\0'; for (p = tbuf1; *p; p++) { --- 678,684 ---- OUTPUT(fprintf(f, "]%s^%d^%d\n", name, (int) owner, AL_FLAGS(list))); /* now check the attribute */ ! strcpy(tbuf1, muncompress(AL_STR(list))); /* get rid of unprintables and hard newlines */ lastp = '\0'; for (p = tbuf1; *p; p++) { *** ../vanilla/pennmush/src/destroy.c Sun Jan 19 21:38:06 2003 --- src/destroy.c Sun Jan 19 20:59:22 2003 *************** *** 821,827 **** /* Clear out names from the player list */ delete_player(thing, NULL); if ((atemp = atr_get_noparent(thing, "ALIAS")) != NULL) { ! strcpy(alias, uncompress(atemp->value)); delete_player(thing, alias); } /* Do all the thing-esque manipulations. */ --- 821,827 ---- /* Clear out names from the player list */ delete_player(thing, NULL); if ((atemp = atr_get_noparent(thing, "ALIAS")) != NULL) { ! strcpy(alias, muncompress(atemp->value)); delete_player(thing, alias); } /* Do all the thing-esque manipulations. */ *** ../vanilla/pennmush/src/extmail.c Sun Jan 19 21:38:24 2003 --- src/extmail.c Sun Jan 19 20:59:22 2003 *************** *** 159,165 **** static char sbuf[SUBJECT_LEN + 1]; char *p; if (mp->subject) { ! strncpy(sbuf, uncompress(mp->subject), SUBJECT_LEN); sbuf[SUBJECT_LEN] = '\0'; /* Stop at a return or a tab */ for (p = sbuf; *p; p++) { --- 159,165 ---- static char sbuf[SUBJECT_LEN + 1]; char *p; if (mp->subject) { ! strncpy(sbuf, muncompress(mp->subject), SUBJECT_LEN); sbuf[SUBJECT_LEN] = '\0'; /* Stop at a return or a tab */ for (p = sbuf; *p; p++) { *************** *** 456,468 **** tbuf1, (IsPlayer(mp->from) && Connected(mp->from) && (!hidden(mp->from) || Priv_Who(player))) ? " (Conn)" : " ", ! uncompress(mp->time), folderheader, Folder(mp), i[Folder(mp)], status_string(mp)); notify_format(player, T("Subject: %s"), get_subject(mp)); notify(player, DASH_LINE); if (SUPPORT_PUEBLO) notify_noenter(player, tprintf("%c/SAMP%c", TAG_START, TAG_END)); ! strcpy(tbuf1, uncompress(mp->message)); notify(player, tbuf1); if (SUPPORT_PUEBLO) notify_format(player, "%cSAMP%c%s%c/SAMP%c", TAG_START, TAG_END, --- 456,468 ---- tbuf1, (IsPlayer(mp->from) && Connected(mp->from) && (!hidden(mp->from) || Priv_Who(player))) ? " (Conn)" : " ", ! muncompress(mp->time), folderheader, Folder(mp), i[Folder(mp)], status_string(mp)); notify_format(player, T("Subject: %s"), get_subject(mp)); notify(player, DASH_LINE); if (SUPPORT_PUEBLO) notify_noenter(player, tprintf("%c/SAMP%c", TAG_START, TAG_END)); ! strcpy(tbuf1, muncompress(mp->message)); notify(player, tbuf1); if (SUPPORT_PUEBLO) notify_format(player, "%cSAMP%c%s%c/SAMP%c", TAG_START, TAG_END, *************** *** 525,531 **** (!hidden(mp->from) || Priv_Who(player))) ? '*' : ' '), chopstr(Name(mp->from), 12), ! 30, subj, mail_list_time(uncompress(mp->time), 1)); if (SUPPORT_PUEBLO) notify_noenter(player, tprintf("%c/A%c", TAG_START, TAG_END)); } --- 525,531 ---- (!hidden(mp->from) || Priv_Who(player))) ? '*' : ' '), chopstr(Name(mp->from), 12), ! 30, subj, mail_list_time(muncompress(mp->time), 1)); if (SUPPORT_PUEBLO) notify_noenter(player, tprintf("%c/A%c", TAG_START, TAG_END)); } *************** *** 668,674 **** if (!temp) { notify(player, T("MAIL: You can't reply to nonexistant mail.")); } else { ! send_mail(player, temp->from, uncompress(mp->subject), (char *) mp->message, M_FORWARD | M_REPLY, 1, 0); num_recpts++; } --- 668,674 ---- if (!temp) { notify(player, T("MAIL: You can't reply to nonexistant mail.")); } else { ! send_mail(player, temp->from, muncompress(mp->subject), (char *) mp->message, M_FORWARD | M_REPLY, 1, 0); num_recpts++; } *************** *** 684,690 **** if (!GoodObject(target) || !IsPlayer(target)) { notify_format(player, T("No such unique player: %s."), current); } else { ! send_mail(player, target, uncompress(mp->subject), (char *) mp->message, M_FORWARD, 1, 0); num_recpts++; } --- 684,690 ---- if (!GoodObject(target) || !IsPlayer(target)) { notify_format(player, T("No such unique player: %s."), current); } else { ! send_mail(player, target, muncompress(mp->subject), (char *) mp->message, M_FORWARD, 1, 0); num_recpts++; } *************** *** 760,766 **** if (subject_given) send_mail(player, temp->from, sbuf, message, mail_flags, silent, nosig); else ! send_mail(player, temp->from, uncompress(temp->subject), message, mail_flags | M_REPLY, silent, nosig); } else { /* send a new mail message */ --- 760,766 ---- if (subject_given) send_mail(player, temp->from, sbuf, message, mail_flags, silent, nosig); else ! send_mail(player, temp->from, muncompress(temp->subject), message, mail_flags | M_REPLY, silent, nosig); } else { /* send a new mail message */ *************** *** 909,922 **** else strcpy(sbuf, T("(no subject)")); if ((flags & M_FORWARD) && !string_prefix(sbuf, "Fwd:")) ! newp->subject = compress(chopstr(tprintf("Fwd: %s", sbuf), SUBJECT_LEN)); else if ((flags & M_REPLY) && !string_prefix(sbuf, "Re:")) ! newp->subject = compress(chopstr(tprintf("Re: %s", sbuf), SUBJECT_LEN)); else if ((a = atr_get_noparent(player, "MAILSUBJECT")) != NULL) /* Don't bother to uncompress a->value */ newp->subject = u_strdup(AL_STR(a)); else ! newp->subject = compress(sbuf); if (flags & M_FORWARD) { /* Forwarding passes the message already compressed */ newp->message = u_strdup((unsigned char *) message); --- 909,922 ---- else strcpy(sbuf, T("(no subject)")); if ((flags & M_FORWARD) && !string_prefix(sbuf, "Fwd:")) ! newp->subject = mcompress(chopstr(tprintf("Fwd: %s", sbuf), SUBJECT_LEN)); else if ((flags & M_REPLY) && !string_prefix(sbuf, "Re:")) ! newp->subject = mcompress(chopstr(tprintf("Re: %s", sbuf), SUBJECT_LEN)); else if ((a = atr_get_noparent(player, "MAILSUBJECT")) != NULL) /* Don't bother to uncompress a->value */ newp->subject = u_strdup(AL_STR(a)); else ! newp->subject = mcompress(sbuf); if (flags & M_FORWARD) { /* Forwarding passes the message already compressed */ newp->message = u_strdup((unsigned char *) message); *************** *** 931,937 **** buff = (char *) mush_malloc(BUFFER_LEN, "string"); if (!buff) panic(T("Failed to allocate string in send_mail")); ! ms = mailsig = safe_uncompress(AL_STR(a)); bp = buff; process_expression(buff, &bp, &ms, player, player, player, PE_DEFAULT, PT_DEFAULT, NULL); --- 931,937 ---- buff = (char *) mush_malloc(BUFFER_LEN, "string"); if (!buff) panic(T("Failed to allocate string in send_mail")); ! ms = mailsig = safe_muncompress(AL_STR(a)); bp = buff; process_expression(buff, &bp, &ms, player, player, player, PE_DEFAULT, PT_DEFAULT, NULL); *************** *** 941,953 **** mush_free((Malloc_t) buff, "string"); } *nm = '\0'; ! newp->message = compress(newmsg); mush_free((Malloc_t) newmsg, "string"); } strcpy(tbuf1, ctime(&mudtime)); tbuf1[strlen(tbuf1) - 1] = '\0'; /* whack the newline */ ! newp->time = compress(tbuf1); newp->read = flags & M_FMASK; /* Send to folder 0 */ /* Where do we insert it? After mp, wherever that is. --- 941,953 ---- mush_free((Malloc_t) buff, "string"); } *nm = '\0'; ! newp->message = mcompress(newmsg); mush_free((Malloc_t) newmsg, "string"); } strcpy(tbuf1, ctime(&mudtime)); tbuf1[strlen(tbuf1) - 1] = '\0'; /* whack the newline */ ! newp->time = mcompress(tbuf1); newp->read = flags & M_FMASK; /* Send to folder 0 */ /* Where do we insert it? After mp, wherever that is. *************** *** 1194,1206 **** for (mp = HEAD; mp != NULL; mp = mp->next) { if (Cleared(mp)) { fc++; ! cchars += strlen((char *) uncompress(mp->message)); } else if (Read(mp)) { fr++; ! fchars += strlen((char *) uncompress(mp->message)); } else { fu++; ! tchars += strlen((char *) uncompress(mp->message)); } } notify_format(player, --- 1194,1206 ---- for (mp = HEAD; mp != NULL; mp = mp->next) { if (Cleared(mp)) { fc++; ! cchars += strlen((char *) muncompress(mp->message)); } else if (Read(mp)) { fr++; ! fchars += strlen((char *) muncompress(mp->message)); } else { fu++; ! tchars += strlen((char *) muncompress(mp->message)); } } notify_format(player, *************** *** 1241,1251 **** else fu++; if (full == 2) ! fchars += strlen((char *) uncompress(mp->message)); } if (mp->to == target) { if (!tr && !tu) ! strcpy(last, (char *) uncompress(mp->time)); if (Cleared(mp)) tc++; else if (Read(mp)) --- 1241,1251 ---- else fu++; if (full == 2) ! fchars += strlen((char *) muncompress(mp->message)); } if (mp->to == target) { if (!tr && !tu) ! strcpy(last, (char *) muncompress(mp->time)); if (Cleared(mp)) tc++; else if (Read(mp)) *************** *** 1253,1259 **** else tu++; if (full == 2) ! tchars += strlen((char *) uncompress(mp->message)); } } --- 1253,1259 ---- else tu++; if (full == 2) ! tchars += strlen((char *) muncompress(mp->message)); } } *************** *** 1439,1445 **** /* That didn't work. Ok, try mailfun_fetch */ mp = mailfun_fetch(executor, nargs, args[0], args[1]); if (mp) { ! safe_str(uncompress(mp->message), buff, bp); return; } safe_str(T("#-1 INVALID MESSAGE OR PLAYER"), buff, bp); --- 1439,1445 ---- /* That didn't work. Ok, try mailfun_fetch */ mp = mailfun_fetch(executor, nargs, args[0], args[1]); if (mp) { ! safe_str(muncompress(mp->message), buff, bp); return; } safe_str(T("#-1 INVALID MESSAGE OR PLAYER"), buff, bp); *************** *** 1598,1610 **** for (mp = HEAD; mp != NULL; mp = mp->next) { if (Cleared(mp)) { fc++; ! cchars += strlen((char *) uncompress(mp->message)); } else if (Read(mp)) { fr++; ! fchars += strlen((char *) uncompress(mp->message)); } else { fu++; ! tchars += strlen((char *) uncompress(mp->message)); } } /* FORMAT --- 1598,1610 ---- for (mp = HEAD; mp != NULL; mp = mp->next) { if (Cleared(mp)) { fc++; ! cchars += strlen((char *) muncompress(mp->message)); } else if (Read(mp)) { fr++; ! fchars += strlen((char *) muncompress(mp->message)); } else { fu++; ! tchars += strlen((char *) muncompress(mp->message)); } } /* FORMAT *************** *** 1644,1654 **** else fu++; if (full == 2) ! fchars += strlen((char *) uncompress(mp->message)); } if (mp->to == target) { if (!tr && !tu) ! strcpy(last, (char *) uncompress(mp->time)); if (Cleared(mp)) tc++; else if (Read(mp)) --- 1644,1654 ---- else fu++; if (full == 2) ! fchars += strlen((char *) muncompress(mp->message)); } if (mp->to == target) { if (!tr && !tu) ! strcpy(last, (char *) muncompress(mp->time)); if (Cleared(mp)) tc++; else if (Read(mp)) *************** *** 1656,1662 **** else tu++; if (full == 2) ! tchars += strlen((char *) uncompress(mp->message)); } } --- 1656,1662 ---- else tu++; if (full == 2) ! tchars += strlen((char *) muncompress(mp->message)); } } *************** *** 1687,1693 **** if (!mp) safe_str("#-1", buff, bp); else ! safe_str(uncompress(mp->time), buff, bp); return; } --- 1687,1693 ---- if (!mp) safe_str("#-1", buff, bp); else ! safe_str(muncompress(mp->time), buff, bp); return; } *************** *** 1714,1720 **** if (!mp) safe_str("#-1", buff, bp); else ! safe_str(uncompress(mp->subject), buff, bp); return; } --- 1714,1720 ---- if (!mp) safe_str("#-1", buff, bp); else ! safe_str(muncompress(mp->subject), buff, bp); return; } *************** *** 1744,1755 **** for (mp = HEAD; mp != NULL; mp = mp->next) { putref(fp, mp->to); putref(fp, mp->from); ! putstring(fp, uncompress(mp->time)); if (mp->subject) ! putstring(fp, uncompress(mp->subject)); else putstring(fp, ""); ! putstring(fp, uncompress(mp->message)); putref(fp, mp->read); count++; } --- 1744,1755 ---- for (mp = HEAD; mp != NULL; mp = mp->next) { putref(fp, mp->to); putref(fp, mp->from); ! putstring(fp, muncompress(mp->time)); if (mp->subject) ! putstring(fp, muncompress(mp->subject)); else putstring(fp, ""); ! putstring(fp, muncompress(mp->message)); putref(fp, mp->read); count++; } *************** *** 1888,1903 **** mp = (struct mail *) mush_malloc(sizeof(struct mail), "mail"); mp->to = getref(fp); mp->from = getref(fp); ! mp->time = compress(getstring_noalloc(fp)); if (mail_flags & MDBF_SUBJECT) { ! tbuf = compress(getstring_noalloc(fp)); } ! mp->message = compress(getstring_noalloc(fp)); if (mail_flags & MDBF_SUBJECT) mp->subject = tbuf; else { ! strcpy(sbuf, uncompress(mp->message)); ! mp->subject = compress(chopstr(sbuf, SUBJECT_LEN)); } mp->read = getref(fp); mp->next = NULL; --- 1888,1903 ---- mp = (struct mail *) mush_malloc(sizeof(struct mail), "mail"); mp->to = getref(fp); mp->from = getref(fp); ! mp->time = mcompress(getstring_noalloc(fp)); if (mail_flags & MDBF_SUBJECT) { ! tbuf = mcompress(getstring_noalloc(fp)); } ! mp->message = mcompress(getstring_noalloc(fp)); if (mail_flags & MDBF_SUBJECT) mp->subject = tbuf; else { ! strcpy(sbuf, muncompress(mp->message)); ! mp->subject = mcompress(chopstr(sbuf, SUBJECT_LEN)); } mp->read = getref(fp); mp->next = NULL; *************** *** 1911,1927 **** mp = (struct mail *) mush_malloc(sizeof(struct mail), "mail"); mp->to = getref(fp); mp->from = getref(fp); ! mp->time = compress(getstring_noalloc(fp)); if (mail_flags & MDBF_SUBJECT) ! tbuf = compress(getstring_noalloc(fp)); else tbuf = NULL; ! mp->message = compress(getstring_noalloc(fp)); if (tbuf) mp->subject = tbuf; else { ! strcpy(sbuf, uncompress(mp->message)); ! mp->subject = compress(chopstr(sbuf, SUBJECT_LEN)); } mp->read = getref(fp); --- 1911,1927 ---- mp = (struct mail *) mush_malloc(sizeof(struct mail), "mail"); mp->to = getref(fp); mp->from = getref(fp); ! mp->time = mcompress(getstring_noalloc(fp)); if (mail_flags & MDBF_SUBJECT) ! tbuf = mcompress(getstring_noalloc(fp)); else tbuf = NULL; ! mp->message = mcompress(getstring_noalloc(fp)); if (tbuf) mp->subject = tbuf; else { ! strcpy(sbuf, muncompress(mp->message)); ! mp->subject = mcompress(chopstr(sbuf, SUBJECT_LEN)); } mp->read = getref(fp); *************** *** 1991,1997 **** a = (ATTR *) atr_get_noparent(player, "MAILFOLDERS"); if (!a) return -1; ! strcpy(str, uncompress(a->value)); sprintf(pat, ":%s:", strupper(name)); res = strstr(str, pat); if (!res) --- 1991,1997 ---- a = (ATTR *) atr_get_noparent(player, "MAILFOLDERS"); if (!a) return -1; ! strcpy(str, muncompress(a->value)); sprintf(pat, ":%s:", strupper(name)); res = strstr(str, pat); if (!res) *************** *** 2023,2029 **** strcpy(str, "unnamed"); return str; } ! strcpy(str, uncompress(a->value)); old = (char *) string_match(str, pat); if (old) { r = old + strlen(pat); --- 2023,2029 ---- strcpy(str, "unnamed"); return str; } ! strcpy(str, muncompress(a->value)); old = (char *) string_match(str, pat); if (old) { r = old + strlen(pat); *************** *** 2067,2073 **** old = NULL; a = (ATTR *) atr_get_noparent(player, "MAILFOLDERS"); if (a) { ! strcpy(str, uncompress(a->value)); old = (char *) string_match(str, pat); } if (old && *old) { --- 2067,2073 ---- old = NULL; a = (ATTR *) atr_get_noparent(player, "MAILFOLDERS"); if (a) { ! strcpy(str, muncompress(a->value)); old = (char *) string_match(str, pat); } if (old && *old) { *************** *** 2107,2113 **** set_player_folder(player, 0); return 0; } ! return atoi(uncompress(a->value)); } void --- 2107,2113 ---- set_player_folder(player, 0); return 0; } ! return atoi(muncompress(a->value)); } void *************** *** 2183,2189 **** do_log(LT_ERR, 0, 0, "MAIL: Couldn't malloc struct tm!"); return 0; } ! strcpy(msgtimestr, (char *) uncompress(mp->time)); if (do_convtime(msgtimestr, msgtm)) { #ifdef HAS_TIMELOCAL msgtime = timelocal(msgtm); --- 2183,2189 ---- do_log(LT_ERR, 0, 0, "MAIL: Couldn't malloc struct tm!"); return 0; } ! strcpy(msgtimestr, (char *) muncompress(mp->time)); if (do_convtime(msgtimestr, msgtm)) { #ifdef HAS_TIMELOCAL msgtime = timelocal(msgtm); *** ../vanilla/pennmush/src/flags.c Sun Jan 19 21:38:24 2003 --- src/flags.c Sun Jan 19 22:11:34 2003 *************** *** 63,69 **** {"VERBOSE", 'v', NOTYPE, VERBOSE, F_ANY, F_ANY}, {"ANSI", 'A', TYPE_PLAYER, PLAYER_ANSI, F_ANY, F_ANY}, - {"COLOR", 'C', TYPE_PLAYER, PLAYER_COLOR, F_ANY, F_ANY}, {"MONITOR", 'M', TYPE_PLAYER, PLAYER_MONITOR, F_ROYAL, F_ANY}, --- 63,68 ---- *************** *** 98,104 **** {"NO_LEAVE", 'N', TYPE_THING, THING_NOLEAVE, F_ANY, F_ANY}, {"LISTEN_PARENT", '^', TYPE_THING, THING_INHEARIT, F_ANY, F_ANY}, {"Z_TEL", 'Z', TYPE_THING, THING_Z_TEL, F_ANY, F_ANY}, ! {"ABODE", 'A', TYPE_ROOM, ROOM_ABODE, F_ANY, F_ANY}, {"FLOATING", 'F', TYPE_ROOM, ROOM_FLOATING, F_ANY, F_ANY}, {"JUMP_OK", 'J', TYPE_ROOM, ROOM_JUMP_OK, F_ANY, F_ANY}, --- 97,103 ---- {"NO_LEAVE", 'N', TYPE_THING, THING_NOLEAVE, F_ANY, F_ANY}, {"LISTEN_PARENT", '^', TYPE_THING, THING_INHEARIT, F_ANY, F_ANY}, {"Z_TEL", 'Z', TYPE_THING, THING_Z_TEL, F_ANY, F_ANY}, ! {"ABODE", 'A', TYPE_ROOM, ROOM_ABODE, F_ANY, F_ANY}, {"FLOATING", 'F', TYPE_ROOM, ROOM_FLOATING, F_ANY, F_ANY}, {"JUMP_OK", 'J', TYPE_ROOM, ROOM_JUMP_OK, F_ANY, F_ANY}, *************** *** 1033,1035 **** --- 1032,1035 ---- p = find_power(name); return ((p > -1) ? p : 0); } + *** ../vanilla/pennmush/src/function.c Sun Jan 19 21:38:24 2003 --- src/function.c Sun Jan 19 22:18:48 2003 *************** *** 211,216 **** --- 211,219 ---- {"DIST3D", fun_dist3d, 6, 6, FN_REG}, {"DIV", fun_div, 2, 2, FN_REG}, {"DOING", fun_doing, 1, 1, FN_REG}, + #ifdef MCCP + {"DO_COMPRESS", do_compress, 0, 0, FN_REG}, + #endif {"EDEFAULT", fun_edefault, 2, 2, FN_NOPARSE}, {"EDIT", fun_edit, 3, INT_MAX, FN_REG}, {"ELEMENT", fun_element, 3, 3, FN_REG}, *** ../vanilla/pennmush/src/fundb.c Sun Jan 19 21:38:06 2003 --- src/fundb.c Sun Jan 19 20:59:23 2003 *************** *** 56,62 **** a = atr_get(thing, strupper(attrib)); if (a) { if (Can_Read_Attr(executor, thing, a)) { ! if (strlen(value = uncompress(a->value)) < BUFFER_LEN) return value; else return T("#-1 ATTRIBUTE LENGTH TOO LONG"); --- 56,62 ---- a = atr_get(thing, strupper(attrib)); if (a) { if (Can_Read_Attr(executor, thing, a)) { ! if (strlen(value = muncompress(a->value)) < BUFFER_LEN) return value; else return T("#-1 ATTRIBUTE LENGTH TOO LONG"); *************** *** 229,235 **** parse_attrib(executor, mstr, &thing, &attrib); if (GoodObject(thing) && attrib && Can_Read_Attr(executor, thing, attrib)) { /* Ok, we've got it */ ! dp = safe_uncompress(attrib->value); safe_str(dp, buff, bp); free(dp); return; --- 229,235 ---- parse_attrib(executor, mstr, &thing, &attrib); if (GoodObject(thing) && attrib && Can_Read_Attr(executor, thing, attrib)) { /* Ok, we've got it */ ! dp = safe_muncompress(attrib->value); safe_str(dp, buff, bp); free(dp); return; *************** *** 262,268 **** safe_str(T(e_perm), buff, bp); return; } ! tp = tbuf = safe_uncompress(a->value); #ifdef MEM_CHECK add_check("fun_eval.attr_value"); #endif --- 262,268 ---- safe_str(T(e_perm), buff, bp); return; } ! tp = tbuf = safe_muncompress(a->value); #ifdef MEM_CHECK add_check("fun_eval.attr_value"); #endif *************** *** 304,310 **** safe_str(T(e_perm), buff, bp); return; } ! tp = tbuf = safe_uncompress(a->value); #ifdef MEM_CHECK add_check("fun_eval.attr_value"); #endif --- 304,310 ---- safe_str(T(e_perm), buff, bp); return; } ! tp = tbuf = safe_muncompress(a->value); #ifdef MEM_CHECK add_check("fun_eval.attr_value"); #endif *************** *** 343,349 **** return; } /* Ok, we've got it */ ! sp = sbuf = safe_uncompress(attrib->value); #ifdef MEM_CHECK add_check("fun_edefault.attr_value"); #endif --- 343,349 ---- return; } /* Ok, we've got it */ ! sp = sbuf = safe_muncompress(attrib->value); #ifdef MEM_CHECK add_check("fun_edefault.attr_value"); #endif *************** *** 1966,1972 **** a = atr_get_noparent(thing, "FOLLOWERS"); if (!a) return; ! s = uncompress(a->value); res = trim_space_sep(s, ' '); safe_str(res, buff, bp); return;; --- 1966,1972 ---- a = atr_get_noparent(thing, "FOLLOWERS"); if (!a) return; ! s = muncompress(a->value); res = trim_space_sep(s, ' '); safe_str(res, buff, bp); return;; *************** *** 1988,1994 **** a = atr_get_noparent(thing, "FOLLOWING"); if (!a) return; ! s = uncompress(a->value); res = trim_space_sep(s, ' '); safe_str(res, buff, bp); return;; --- 1988,1994 ---- a = atr_get_noparent(thing, "FOLLOWING"); if (!a) return; ! s = muncompress(a->value); res = trim_space_sep(s, ' '); safe_str(res, buff, bp); return;; *** ../vanilla/pennmush/src/funlist.c Sun Jan 19 21:37:10 2003 --- src/funlist.c Sun Jan 19 20:59:23 2003 *************** *** 363,369 **** if (!result || !rsave) panic("Unable to allocate memory in fun_fold"); ! abuf = safe_uncompress(attrib->value); /* save our stack */ tptr[0] = wenv[0]; --- 363,369 ---- if (!result || !rsave) panic("Unable to allocate memory in fun_fold"); ! abuf = safe_muncompress(attrib->value); /* save our stack */ tptr[0] = wenv[0]; *************** *** 506,512 **** if (!CanEval(executor, thing)) return; ! abuf = safe_uncompress(attrib->value); tptr = wenv[0]; --- 506,512 ---- if (!CanEval(executor, thing)) return; ! abuf = safe_muncompress(attrib->value); tptr = wenv[0]; *************** *** 998,1004 **** if (!CanEval(executor, thing)) return; up = ucomp_buff; ! safe_str(uncompress(attrib->value), ucomp_buff, &up); *up = '\0'; ucomp_executor = thing; --- 998,1004 ---- if (!CanEval(executor, thing)) return; up = ucomp_buff; ! safe_str(muncompress(attrib->value), ucomp_buff, &up); *up = '\0'; ucomp_executor = thing; *************** *** 2211,2217 **** if (!CanEval(executor, thing)) return; ! asave = safe_uncompress(attrib->value); /* save our stack */ save_global_env("step", preserve); --- 2211,2217 ---- if (!CanEval(executor, thing)) return; ! asave = safe_muncompress(attrib->value); /* save our stack */ save_global_env("step", preserve); *************** *** 2298,2304 **** return; strcpy(place, "1"); ! asave = safe_uncompress(attrib->value); /* save our stack */ tptr[0] = wenv[0]; --- 2298,2304 ---- return; strcpy(place, "1"); ! asave = safe_muncompress(attrib->value); /* save our stack */ tptr[0] = wenv[0]; *************** *** 2371,2377 **** if (!CanEval(executor, thing)) return; ! asave = safe_uncompress(attrib->value); /* save our stack */ save_global_env("fun_mix", tptr); --- 2371,2377 ---- if (!CanEval(executor, thing)) return; ! asave = safe_muncompress(attrib->value); /* save our stack */ save_global_env("fun_mix", tptr); *************** *** 2835,2841 **** char const *str; int offsets[99]; ! str = uncompress(AL_STR(atr)); if (pcre_exec(reharg->re, reharg->study, str, strlen(str), 0, 0, offsets, 99) >= 0) { if (reharg->first != 0) --- 2835,2841 ---- char const *str; int offsets[99]; ! str = muncompress(AL_STR(atr)); if (pcre_exec(reharg->re, reharg->study, str, strlen(str), 0, 0, offsets, 99) >= 0) { if (reharg->first != 0) *** ../vanilla/pennmush/src/funstr.c Sun Jan 19 21:38:06 2003 --- src/funstr.c Sun Jan 19 20:59:23 2003 *************** *** 48,54 **** if (!a) return 0; ! switch (*uncompress(a->value)) { case 'T': case 't': case 'P': --- 48,54 ---- if (!a) return 0; ! switch (*muncompress(a->value)) { case 'T': case 't': case 'P': *************** *** 829,835 **** return; strcpy(place, "0"); ! asave = safe_uncompress(attrib->value); /* save our stack */ tptr[0] = wenv[0]; --- 829,835 ---- return; strcpy(place, "0"); ! asave = safe_muncompress(attrib->value); /* save our stack */ tptr[0] = wenv[0]; *** ../vanilla/pennmush/src/funufun.c Tue Nov 26 16:10:31 2002 --- src/funufun.c Sun Jan 19 20:59:23 2003 *************** *** 109,115 **** for (; j < 10; j++) wenv[j] = NULL; ! tp = tbuf = safe_uncompress(attrib->value); process_expression(buff, bp, &tp, obj, executor, enactor, PE_DEFAULT, PT_DEFAULT, pe_info); free(tbuf); --- 109,115 ---- for (; j < 10; j++) wenv[j] = NULL; ! tp = tbuf = safe_muncompress(attrib->value); process_expression(buff, bp, &tp, obj, executor, enactor, PE_DEFAULT, PT_DEFAULT, pe_info); free(tbuf); *** ../vanilla/pennmush/src/game.c Sun Jan 19 21:38:24 2003 --- src/game.c Sun Jan 19 20:59:23 2003 *************** *** 554,560 **** if (IsPlayer(thing)) { if ((s = atr_get_noparent(thing, "ALIAS")) != NULL) { bp = buf; ! safe_str(uncompress(s->value), buf, &bp); *bp = '\0'; add_player(thing, buf); } --- 554,560 ---- if (IsPlayer(thing)) { if ((s = atr_get_noparent(thing, "ALIAS")) != NULL) { bp = buf; ! safe_str(muncompress(s->value), buf, &bp); *bp = '\0'; add_player(thing, buf); } *************** *** 1043,1049 **** while (thing != NOTHING) { a = atr_get_noparent(thing, type); if (a) { ! strcpy(alias, uncompress(a->value)); if (check_alias(command, alias) != 0) return thing; /* matched an alias */ } --- 1043,1049 ---- while (thing != NOTHING) { a = atr_get_noparent(thing, type); if (a) { ! strcpy(alias, muncompress(a->value)); if (check_alias(command, alias) != 0) return thing; /* matched an alias */ } *************** *** 1062,1068 **** char alias[BUFFER_LEN]; a = atr_get_noparent(loc, type); if (a) { ! strcpy(alias, uncompress(a->value)); return (check_alias(command, alias)); } else return 0; --- 1062,1068 ---- char alias[BUFFER_LEN]; a = atr_get_noparent(loc, type); if (a) { ! strcpy(alias, muncompress(a->value)); return (check_alias(command, alias)); } else return 0; *** ../vanilla/pennmush/src/log.c Sun Jan 19 21:38:24 2003 --- src/log.c Sun Jan 19 22:06:20 2003 *************** *** 23,28 **** --- 23,29 ---- #include "dbdefs.h" #include "log.h" #include "confmagic.h" + #include "ansi.h" char *quick_unparse(dbref object); void start_log(FILE ** fp, const char *filename); *** ../vanilla/pennmush/src/look.c Sun Jan 19 21:38:24 2003 --- src/look.c Sun Jan 19 20:59:23 2003 *************** *** 105,111 **** } *bp = '\0'; wenv[0] = arg; ! sp = save = safe_uncompress(a->value); bp = buff; process_expression(buff, &bp, &sp, loc, player, player, PE_DEFAULT, PT_DEFAULT, NULL); --- 105,111 ---- } *bp = '\0'; wenv[0] = arg; ! sp = save = safe_muncompress(a->value); bp = buff; process_expression(buff, &bp, &sp, loc, player, player, PE_DEFAULT, PT_DEFAULT, NULL); *************** *** 274,280 **** } *bp = '\0'; wenv[0] = arg; ! sp = save = safe_uncompress(a->value); bp = buff; process_expression(buff, &bp, &sp, loc, player, player, PE_DEFAULT, PT_DEFAULT, NULL); --- 274,280 ---- } *bp = '\0'; wenv[0] = arg; ! sp = save = safe_muncompress(a->value); bp = buff; process_expression(buff, &bp, &sp, loc, player, player, PE_DEFAULT, PT_DEFAULT, NULL); *************** *** 339,345 **** "%s [#%d%s] is veiled", AL_NAME(atr), Owner(AL_CREATOR(atr)), fbuf); } else { ! r = safe_uncompress(AL_STR(atr)); if (ShowAnsi(player)) notify_format(player, "%s%s [#%d%s]:%s %s", ANSI_HILITE, AL_NAME(atr), --- 339,345 ---- "%s [#%d%s] is veiled", AL_NAME(atr), Owner(AL_CREATOR(atr)), fbuf); } else { ! r = safe_muncompress(AL_STR(atr)); if (ShowAnsi(player)) notify_format(player, "%s%s [#%d%s]:%s %s", ANSI_HILITE, AL_NAME(atr), *************** *** 364,370 **** !strcmp(AL_NAME(atr), "DESCRIBE") && !strcmp(pattern, "*")) return 0; strcpy(fbuf, privs_to_letters(attr_privs, AL_FLAGS(atr))); ! r = safe_uncompress(AL_STR(atr)); if (ShowAnsi(player)) notify_format(player, "%s%s [#%d%s]:%s %s", ANSI_HILITE, AL_NAME(atr), --- 364,370 ---- !strcmp(AL_NAME(atr), "DESCRIBE") && !strcmp(pattern, "*")) return 0; strcpy(fbuf, privs_to_letters(attr_privs, AL_FLAGS(atr))); ! r = safe_muncompress(AL_STR(atr)); if (ShowAnsi(player)) notify_format(player, "%s%s [#%d%s]:%s %s", ANSI_HILITE, AL_NAME(atr), *************** *** 444,450 **** if (SUPPORT_PUEBLO && flag == 2) { a = atr_get(loc, "VRML_URL"); if (a) { ! tag(tprintf("IMG XCH_GRAPH=LOAD HREF=\"%s\"", uncompress(a->value))); } else { tag("IMG XCH_GRAPH=HIDE"); } --- 444,450 ---- if (SUPPORT_PUEBLO && flag == 2) { a = atr_get(loc, "VRML_URL"); if (a) { ! tag(tprintf("IMG XCH_GRAPH=LOAD HREF=\"%s\"", muncompress(a->value))); } else { tag("IMG XCH_GRAPH=HIDE"); } *************** *** 516,522 **** a = atr_get(thing, "DESCRIBE"); if (a) { /* We have a DESCRIBE, evaluate it into buff */ ! asave = safe_uncompress(a->value); ap = asave; bp = buff; process_expression(buff, &bp, &ap, thing, player, player, --- 516,522 ---- a = atr_get(thing, "DESCRIBE"); if (a) { /* We have a DESCRIBE, evaluate it into buff */ ! asave = safe_muncompress(a->value); ap = asave; bp = buff; process_expression(buff, &bp, &ap, thing, player, player, *************** *** 529,535 **** /* We have a DESCFORMAT, evaluate it into fbuff and use it */ /* If we have a DESCRIBE, pass the evaluated version as %0 */ wenv[0] = a ? buff : NULL; ! asave = safe_uncompress(f->value); ap = asave; fbp = fbuff; process_expression(fbuff, &fbp, &ap, thing, player, player, --- 529,535 ---- /* We have a DESCFORMAT, evaluate it into fbuff and use it */ /* If we have a DESCRIBE, pass the evaluated version as %0 */ wenv[0] = a ? buff : NULL; ! asave = safe_muncompress(f->value); ap = asave; fbp = fbuff; process_expression(fbuff, &fbp, &ap, thing, player, player, *************** *** 749,755 **** if (EX_PUBLIC_ATTRIBS && (brief != 1)) { a = atr_get_noparent(thing, "DESCRIBE"); if (a) { ! r = safe_uncompress(a->value); notify(player, r); free((Malloc_t) r); } --- 749,755 ---- if (EX_PUBLIC_ATTRIBS && (brief != 1)) { a = atr_get_noparent(thing, "DESCRIBE"); if (a) { ! r = safe_muncompress(a->value); notify(player, r); free((Malloc_t) r); } *************** *** 1268,1274 **** safe_chr(' ', msg, &bp); safe_str(dh->name, msg, &bp); safe_chr('=', msg, &bp); ! safe_str(uncompress(AL_STR(atr)), msg, &bp); *bp = '\0'; notify(player, msg); /* Now deal with attribute flags, if not FugueEditing */ --- 1268,1274 ---- safe_chr(' ', msg, &bp); safe_str(dh->name, msg, &bp); safe_chr('=', msg, &bp); ! safe_str(muncompress(AL_STR(atr)), msg, &bp); *bp = '\0'; notify(player, msg); /* Now deal with attribute flags, if not FugueEditing */ *************** *** 1379,1385 **** case 2: if (((a = atr_get_noparent(player, "TFPREFIX")) != NULL) && AL_STR(a) && *AL_STR(a)) { ! decompile_atrs(player, thing, dbnum, attrib, uncompress(AL_STR(a)), skipdef); } else decompile_atrs(player, thing, dbnum, attrib, "FugueEdit > ", skipdef); --- 1379,1385 ---- case 2: if (((a = atr_get_noparent(player, "TFPREFIX")) != NULL) && AL_STR(a) && *AL_STR(a)) { ! decompile_atrs(player, thing, dbnum, attrib, muncompress(AL_STR(a)), skipdef); } else decompile_atrs(player, thing, dbnum, attrib, "FugueEdit > ", skipdef); *** ../vanilla/pennmush/src/malias.c Sun Jan 19 21:37:10 2003 --- src/malias.c Sun Jan 19 20:59:23 2003 *************** *** 232,238 **** m->size = i; m->owner = player; m->name = mush_strdup(na, "malias_name"); ! m->desc = compress(na); #ifdef MEM_CHECK add_check("malias_desc"); #endif --- 232,238 ---- m->size = i; m->owner = player; m->name = mush_strdup(na, "malias_name"); ! m->desc = mcompress(na); #ifdef MEM_CHECK add_check("malias_desc"); #endif *************** *** 267,273 **** } notify_format(player, "%c%-12.12s %-35.35s %s %-15.15s", MALIAS_TOKEN, m->name, ! uncompress((unsigned char *) (m->desc)), get_shortprivs(m), Name(m->owner)); } } --- 267,273 ---- } notify_format(player, "%c%-12.12s %-35.35s %s %-15.15s", MALIAS_TOKEN, m->name, ! muncompress((unsigned char *) (m->desc)), get_shortprivs(m), Name(m->owner)); } } *************** *** 326,332 **** } else if (Wizard(player) || (player == m->owner)) { if (m->desc) free(m->desc); /* No need to update MEM_CHECK records here */ ! m->desc = compress(desc); notify(player, T("MAIL: Description changed.")); } else notify(player, T("MAIL: Permission denied.")); --- 326,332 ---- } else if (Wizard(player) || (player == m->owner)) { if (m->desc) free(m->desc); /* No need to update MEM_CHECK records here */ ! m->desc = mcompress(desc); notify(player, T("MAIL: Description changed.")); } else notify(player, T("MAIL: Permission denied.")); *************** *** 542,548 **** m = &malias[i]; notify_format(player, "#%-4d %c%-10.10s %-40.40s %-11.11s (%3d)", i, MALIAS_TOKEN, m->name, ! uncompress((unsigned char *) m->desc), Name(m->owner), m->size); } --- 542,548 ---- m = &malias[i]; notify_format(player, "#%-4d %c%-10.10s %-40.40s %-11.11s (%3d)", i, MALIAS_TOKEN, m->name, ! muncompress((unsigned char *) m->desc), Name(m->owner), m->size); } *************** *** 1050,1056 **** m->owner = getref(fp); m->name = mush_strdup(getstring_noalloc(fp), "malias_name"); ! m->desc = compress(getstring_noalloc(fp)); #ifdef MEM_CHECK add_check("malias_desc"); #endif --- 1050,1056 ---- m->owner = getref(fp); m->name = mush_strdup(getstring_noalloc(fp), "malias_name"); ! m->desc = mcompress(getstring_noalloc(fp)); #ifdef MEM_CHECK add_check("malias_desc"); #endif *************** *** 1090,1096 **** m = &malias[i]; putref(fp, m->owner); putstring(fp, (char *) (m->name)); ! putstring(fp, uncompress(m->desc)); putref(fp, m->nflags); putref(fp, m->mflags); --- 1090,1096 ---- m = &malias[i]; putref(fp, m->owner); putstring(fp, (char *) (m->name)); ! putstring(fp, muncompress(m->desc)); putref(fp, m->nflags); putref(fp, m->mflags); *** ../vanilla/pennmush/src/move.c Sun Jan 19 21:38:24 2003 --- src/move.c Sun Jan 19 20:59:23 2003 *************** *** 318,324 **** a = atr_get(exit_obj, "EXITTO"); if (!a) return NOTHING; ! abuf = safe_uncompress(a->value); if (!abuf) return NOTHING; if (!*abuf) { --- 318,325 ---- a = atr_get(exit_obj, "EXITTO"); if (!a) return NOTHING; ! ! abuf = safe_muncompress(a->value); if (!abuf) return NOTHING; if (!*abuf) { *************** *** 937,943 **** (void) atr_add(leader, "FOLLOWERS", unparse_dbref(follower), GOD, NOTHING); } else { bp = tbuf1; ! safe_str(uncompress(AL_STR(a)), tbuf1, &bp); safe_chr(' ', tbuf1, &bp); safe_dbref(follower, tbuf1, &bp); *bp = '\0'; --- 938,944 ---- (void) atr_add(leader, "FOLLOWERS", unparse_dbref(follower), GOD, NOTHING); } else { bp = tbuf1; ! safe_str(muncompress(AL_STR(a)), tbuf1, &bp); safe_chr(' ', tbuf1, &bp); safe_dbref(follower, tbuf1, &bp); *bp = '\0'; *************** *** 959,965 **** (void) atr_add(follower, "FOLLOWING", unparse_dbref(leader), GOD, NOTHING); } else { bp = tbuf1; ! safe_str(uncompress(AL_STR(a)), tbuf1, &bp); safe_chr(' ', tbuf1, &bp); safe_dbref(leader, tbuf1, &bp); *bp = '\0'; --- 960,966 ---- (void) atr_add(follower, "FOLLOWING", unparse_dbref(leader), GOD, NOTHING); } else { bp = tbuf1; ! safe_str(muncompress(AL_STR(a)), tbuf1, &bp); safe_chr(' ', tbuf1, &bp); safe_dbref(leader, tbuf1, &bp); *bp = '\0'; *************** *** 994,1007 **** ATTR *a; char tbuf1[BUFFER_LEN]; char flwr[BUFFER_LEN]; a = atr_get_noparent(leader, "FOLLOWERS"); if (!a) return; /* No followers, so no deletion */ /* Let's take it apart and put it back together w/o follower */ strcpy(flwr, unparse_dbref(follower)); ! strcpy(tbuf1, uncompress(AL_STR(a))); ! (void) atr_add(leader, "FOLLOWERS", ! remove_word(tbuf1, flwr, ' '), GOD, NOTHING); } /* Delete someone from a player's FOLLOWING attribute */ --- 995,1009 ---- ATTR *a; char tbuf1[BUFFER_LEN]; char flwr[BUFFER_LEN]; + a = atr_get_noparent(leader, "FOLLOWERS"); if (!a) return; /* No followers, so no deletion */ /* Let's take it apart and put it back together w/o follower */ strcpy(flwr, unparse_dbref(follower)); ! strcpy(tbuf1, muncompress(AL_STR(a))); ! (void) atr_add(leader, "FOLLOWERS", remove_word(tbuf1, flwr, ' '), GOD, ! NOTHING); } /* Delete someone from a player's FOLLOWING attribute */ *************** *** 1013,1026 **** ATTR *a; char tbuf1[BUFFER_LEN]; char ldr[BUFFER_LEN]; a = atr_get_noparent(follower, "FOLLOWING"); if (!a) return; /* Not following, so no deletion */ /* Let's take it apart and put it back together w/o leader */ strcpy(ldr, unparse_dbref(leader)); ! strcpy(tbuf1, uncompress(AL_STR(a))); ! (void) atr_add(follower, "FOLLOWING", ! remove_word(tbuf1, ldr, ' '), GOD, NOTHING); } static void --- 1015,1029 ---- ATTR *a; char tbuf1[BUFFER_LEN]; char ldr[BUFFER_LEN]; + a = atr_get_noparent(follower, "FOLLOWING"); if (!a) return; /* Not following, so no deletion */ /* Let's take it apart and put it back together w/o leader */ strcpy(ldr, unparse_dbref(leader)); ! strcpy(tbuf1, muncompress(AL_STR(a))); ! (void) atr_add(follower, "FOLLOWING", remove_word(tbuf1, ldr, ' '), GOD, ! NOTHING); } static void *************** *** 1055,1061 **** a = atr_get_noparent(player, "FOLLOWERS"); if (!a) return (char *) ""; ! strcpy(tbuf1, uncompress(AL_STR(a))); bp = buff; s = trim_space_sep(tbuf1, ' '); while (s) { --- 1058,1064 ---- a = atr_get_noparent(player, "FOLLOWERS"); if (!a) return (char *) ""; ! strcpy(tbuf1, muncompress(AL_STR(a))); bp = buff; s = trim_space_sep(tbuf1, ' '); while (s) { *************** *** 1087,1093 **** a = atr_get_noparent(player, "FOLLOWING"); if (!a) return (char *) ""; ! strcpy(tbuf1, uncompress(AL_STR(a))); bp = buff; s = trim_space_sep(tbuf1, ' '); while (s) { --- 1090,1096 ---- a = atr_get_noparent(player, "FOLLOWING"); if (!a) return (char *) ""; ! strcpy(tbuf1, muncompress(AL_STR(a))); bp = buff; s = trim_space_sep(tbuf1, ' '); while (s) { *************** *** 1119,1125 **** a = atr_get_noparent(follower, "FOLLOWING"); if (!a) return 0; /* Following no one */ ! strcpy(tbuf1, uncompress(AL_STR(a))); s = trim_space_sep(tbuf1, ' '); while (s) { sp = split_token(&s, ' '); --- 1122,1128 ---- a = atr_get_noparent(follower, "FOLLOWING"); if (!a) return 0; /* Following no one */ ! strcpy(tbuf1, muncompress(AL_STR(a))); s = trim_space_sep(tbuf1, ' '); while (s) { sp = split_token(&s, ' '); *************** *** 1141,1147 **** a = atr_get_noparent(leader, "FOLLOWERS"); if (!a) return; /* No one's following me */ ! strcpy(tbuf1, uncompress(AL_STR(a))); s = trim_space_sep(tbuf1, ' '); while (s) { sp = split_token(&s, ' '); --- 1144,1150 ---- a = atr_get_noparent(leader, "FOLLOWERS"); if (!a) return; /* No one's following me */ ! strcpy(tbuf1, muncompress(AL_STR(a))); s = trim_space_sep(tbuf1, ' '); while (s) { sp = split_token(&s, ' '); *************** *** 1167,1173 **** a = atr_get_noparent(follower, "FOLLOWING"); if (!a) return; /* I'm not following anyone */ ! strcpy(tbuf1, uncompress(AL_STR(a))); s = trim_space_sep(tbuf1, ' '); while (s) { sp = split_token(&s, ' '); --- 1170,1176 ---- a = atr_get_noparent(follower, "FOLLOWING"); if (!a) return; /* I'm not following anyone */ ! strcpy(tbuf1, muncompress(AL_STR(a))); s = trim_space_sep(tbuf1, ' '); while (s) { sp = split_token(&s, ' '); *************** *** 1198,1204 **** a = atr_get_noparent(leader, "FOLLOWERS"); if (!a) return; /* No followers */ ! strcpy(tbuf1, uncompress(AL_STR(a))); s = tbuf1; while (s) { sp = split_token(&s, ' '); --- 1201,1207 ---- a = atr_get_noparent(leader, "FOLLOWERS"); if (!a) return; /* No followers */ ! strcpy(tbuf1, muncompress(AL_STR(a))); s = tbuf1; while (s) { sp = split_token(&s, ' '); *** ../vanilla/pennmush/src/mysocket.c Sat Jan 4 20:01:49 2003 --- src/mysocket.c Sun Jan 19 20:59:24 2003 *************** *** 422,427 **** --- 422,431 ---- * SOFTWARE. */ + #if defined(LIBC_SCCS) && !defined(lint) + static char rcsid[] = + "$Id: mysocket.c 1.13 Thu, 01 Feb 2001 14:47:02 -0600 dunemush $"; + #endif /* LIBC_SCCS and not lint */ #define IN6ADDRSZ 16 #define INADDRSZ 4 *** ../vanilla/pennmush/src/parse.c Sun Jan 19 21:38:06 2003 --- src/parse.c Sun Jan 19 20:59:24 2003 *************** *** 639,645 **** temp[2] = '\0'; attrib = atr_get(executor, temp); if (attrib) ! safe_str(uncompress(attrib->value), buff, bp); break; default: /* just copy */ safe_chr(savec, buff, bp); --- 639,645 ---- temp[2] = '\0'; attrib = atr_get(executor, temp); if (attrib) ! safe_str(muncompress(attrib->value), buff, bp); break; default: /* just copy */ safe_chr(savec, buff, bp); *** ../vanilla/pennmush/src/player.c Sun Jan 19 21:38:24 2003 --- src/player.c Sun Jan 19 20:59:24 2003 *************** *** 64,70 **** if (!(a = atr_get_noparent(player, pword_attr))) return 1; /* No password attribute */ ! saved = strdup(uncompress(a->value)); if (!saved) return 0; --- 64,70 ---- if (!(a = atr_get_noparent(player, pword_attr))) return 1; /* No password attribute */ ! saved = strdup(muncompress(a->value)); if (!saved) return 0; *************** *** 451,476 **** s[8] = '0'; /* compare to last connect see if player gets salary */ a = atr_get_noparent(player, "LAST"); ! if (a && (strncmp(uncompress(a->value), s, 10) != 0)) giveto(player, Paycheck(player)); /* tell the player where he last connected from */ h = atr_get_noparent(player, "LASTSITE"); if (h && a) { ! strcpy(last_place, uncompress(h->value)); ! strcpy(last_time, uncompress(a->value)); notify_format(player, T("Last connect was from %s on %s."), last_place, last_time); } /* How about last failed connection */ h = atr_get_noparent(player, "LASTFAILED"); if (h && a) { ! strcpy(last_place, uncompress(h->value)); if (strlen(last_place) > 2) notify_format(player, T("Last FAILED connect was from %s."), last_place); } /* if there is no Lastsite, then the player is newly created. * the extra variables are a kludge to work around some weird ! * behavior involving uncompress. */ /* set the new attributes */ --- 451,476 ---- s[8] = '0'; /* compare to last connect see if player gets salary */ a = atr_get_noparent(player, "LAST"); ! if (a && (strncmp(muncompress(a->value), s, 10) != 0)) giveto(player, Paycheck(player)); /* tell the player where he last connected from */ h = atr_get_noparent(player, "LASTSITE"); if (h && a) { ! strcpy(last_place, muncompress(h->value)); ! strcpy(last_time, muncompress(a->value)); notify_format(player, T("Last connect was from %s on %s."), last_place, last_time); } /* How about last failed connection */ h = atr_get_noparent(player, "LASTFAILED"); if (h && a) { ! strcpy(last_place, muncompress(h->value)); if (strlen(last_place) > 2) notify_format(player, T("Last FAILED connect was from %s."), last_place); } /* if there is no Lastsite, then the player is newly created. * the extra variables are a kludge to work around some weird ! * behavior involving muncompress. */ /* set the new attributes */ *** ../vanilla/pennmush/src/predicat.c Sat Jan 4 20:01:49 2003 --- src/predicat.c Sun Jan 19 20:59:24 2003 *************** *** 132,138 **** /* no charges set, just execute the action */ return queue_attribute(thing, awhat, player); } else { ! strcpy(tbuf2, uncompress(AL_STR(b))); num = atoi(tbuf2); if (num) { /* charges left, decrement and execute */ --- 132,138 ---- /* no charges set, just execute the action */ return queue_attribute(thing, awhat, player); } else { ! strcpy(tbuf2, muncompress(AL_STR(b))); num = atoi(tbuf2); if (num) { /* charges left, decrement and execute */ *************** *** 205,217 **** save_global_env("did_it_save", preserves); } restore_global_env("did_it", myenv); ! asave = safe_uncompress(d->value); ap = asave; bp = buff; process_expression(buff, &bp, &ap, thing, player, player, PE_DEFAULT, PT_DEFAULT, NULL); *bp = '\0'; notify_by(thing, player, buff); free((Malloc_t) asave); } else if (def && *def) notify_by(thing, player, def); --- 205,218 ---- save_global_env("did_it_save", preserves); } restore_global_env("did_it", myenv); ! asave = safe_muncompress(d->value); ap = asave; bp = buff; process_expression(buff, &bp, &ap, thing, player, player, PE_DEFAULT, PT_DEFAULT, NULL); *bp = '\0'; notify_by(thing, player, buff); + free((Malloc_t) asave); } else if (def && *def) notify_by(thing, player, def); *************** *** 227,233 **** save_global_env("did_it_save", preserves); } restore_global_env("did_it", myenv); ! asave = safe_uncompress(d->value); ap = asave; bp = buff; safe_str(Name(player), buff, &bp); --- 228,234 ---- save_global_env("did_it_save", preserves); } restore_global_env("did_it", myenv); ! asave = safe_muncompress(d->value); ap = asave; bp = buff; safe_str(Name(player), buff, &bp); *************** *** 465,471 **** /* if he's got an RQUOTA attribute, his remaining quota is that */ a = atr_get_noparent(Owner(who), "RQUOTA"); if (a) ! return (atoi(uncompress(a->value))); /* else, count up his objects. If he has less than the START_QUOTA, * then his remaining quota is that minus his number of current objects. --- 466,472 ---- /* if he's got an RQUOTA attribute, his remaining quota is that */ a = atr_get_noparent(Owner(who), "RQUOTA"); if (a) ! return (atoi(muncompress(a->value))); /* else, count up his objects. If he has less than the START_QUOTA, * then his remaining quota is that minus his number of current objects. *************** *** 797,803 **** if (message && *message) { d = atr_get(target, message); if (d) { ! asave = safe_uncompress(d->value); ap = asave; bp = buff; process_expression(buff, &bp, &ap, target, player, player, --- 798,804 ---- if (message && *message) { d = atr_get(target, message); if (d) { ! asave = safe_muncompress(d->value); ap = asave; bp = buff; process_expression(buff, &bp, &ap, target, player, player, *************** *** 956,962 **** int found; char *s; ! s = (char *) uncompress(AL_STR(atr)); /* warning: static */ found = 0; while (*s && !found) { if ((!guh->insensitive && !strncmp(guh->lookfor, s, guh->len)) || --- 957,963 ---- int found; char *s; ! s = (char *) muncompress(AL_STR(atr)); /* warning: static */ found = 0; while (*s && !found) { if ((!guh->insensitive && !strncmp(guh->lookfor, s, guh->len)) || *************** *** 1023,1029 **** found = 0; tbp = tbuf1; ! s = (char *) uncompress(AL_STR(atr)); /* warning: static */ while (s && *s) { if ((gh->insensitive && !strncasecmp(gh->lookfor, s, gh->len)) || (!gh->insensitive && !strncmp(gh->lookfor, s, gh->len))) { --- 1024,1030 ---- found = 0; tbp = tbuf1; ! s = (char *) muncompress(AL_STR(atr)); /* warning: static */ while (s && *s) { if ((gh->insensitive && !strncasecmp(gh->lookfor, s, gh->len)) || (!gh->insensitive && !strncmp(gh->lookfor, s, gh->len))) { *** ../vanilla/pennmush/src/rob.c Sun Jan 19 21:38:24 2003 --- src/rob.c Sun Jan 19 20:59:24 2003 *************** *** 238,244 **** int cost = 0; ATTR *a; a = atr_get(who, "COST"); ! if (a && (amount < (cost = atoi(uncompress(a->value))))) { notify(player, T("Feeling poor today?")); giveto(player, amount); return; --- 238,244 ---- int cost = 0; ATTR *a; a = atr_get(who, "COST"); ! if (a && (amount < (cost = atoi(muncompress(a->value))))) { notify(player, T("Feeling poor today?")); giveto(player, amount); return; *** ../vanilla/pennmush/src/set.c Sun Jan 19 21:38:24 2003 --- src/set.c Sun Jan 19 20:59:24 2003 *************** *** 628,634 **** return; } /* we can read it. Copy the value. */ ! text = safe_uncompress(a->value); /* now we loop through our new object pairs and copy, calling @set. */ for (i = 1; i < MAX_ARG && (newpair[i] != NULL); i++) { --- 628,634 ---- return; } /* we can read it. Copy the value. */ ! text = safe_muncompress(a->value); /* now we loop through our new object pairs and copy, calling @set. */ for (i = 1; i < MAX_ARG && (newpair[i] != NULL); i++) { *************** *** 655,661 **** } } ! free((Malloc_t) text); /* safe_uncompress malloc()s memory */ if (copies) { notify_format(player, T("Attribute %s (%d copies)"), (move ? "moved" : "copied"), copies); --- 655,661 ---- } } ! free((Malloc_t) text); /* safe_muncompress malloc()s memory */ if (copies) { notify_format(player, T("Attribute %s (%d copies)"), (move ? "moved" : "copied"), copies); *************** *** 697,703 **** notify(player, T("You need to control an attribute to edit it.")); return 0; } ! s = (char *) uncompress(a->value); /* warning: pointer to static buffer */ if (!strcmp(val, "$")) { /* append */ --- 697,703 ---- notify(player, T("You need to control an attribute to edit it.")); return 0; } ! s = (char *) muncompress(a->value); /* warning: pointer to static buffer */ if (!strcmp(val, "$")) { /* append */ *** ../vanilla/pennmush/src/speech.c Sun Jan 19 21:38:06 2003 --- src/speech.c Sun Jan 19 20:59:24 2003 *************** *** 645,651 **** } if (repage) { a = atr_get_noparent(player, "LASTPAGED"); ! if (!a || !*((hp = head = safe_uncompress(a->value)))) { notify(player, T("You haven't paged anyone since connecting.")); mush_free((Malloc_t) tbuf2, "string"); return; --- 645,651 ---- } if (repage) { a = atr_get_noparent(player, "LASTPAGED"); ! if (!a || !*((hp = head = safe_muncompress(a->value)))) { notify(player, T("You haven't paged anyone since connecting.")); mush_free((Malloc_t) tbuf2, "string"); return; *************** *** 828,834 **** /* Figure out the 'name' of the player */ if (PAGE_ALIASES && (a = atr_get_noparent(player, "ALIAS"))) ! current = tprintf("%s(%s)", Name(player), uncompress(a->value)); else current = (char *) Name(player); --- 828,834 ---- /* Figure out the 'name' of the player */ if (PAGE_ALIASES && (a = atr_get_noparent(player, "ALIAS"))) ! current = tprintf("%s(%s)", Name(player), muncompress(a->value)); else current = (char *) Name(player); *************** *** 910,916 **** char *p, *bp; char *temp; /* need this so we don't leak memory * by failing to free the storage ! * allocated by safe_uncompress */ int i; --- 910,916 ---- char *p, *bp; char *temp; /* need this so we don't leak memory * by failing to free the storage ! * allocated by safe_muncompress */ int i; *************** *** 923,929 **** if (!a) return matched; ! filter = safe_uncompress(a->value); temp = filter; for (i = 0; (i < MAX_ARG) && !matched; i++) { --- 923,929 ---- if (!a) return matched; ! filter = safe_muncompress(a->value); temp = filter; for (i = 0; (i < MAX_ARG) && !matched; i++) { *************** *** 971,977 **** } wenv[0] = (char *) msg; save_global_regs("prefix_save", preserve); ! asave = safe_uncompress(a->value); ap = asave; process_expression(tbuf1, &bp, &ap, thing, orator, orator, PE_DEFAULT, PT_DEFAULT, NULL); --- 971,977 ---- } wenv[0] = (char *) msg; save_global_regs("prefix_save", preserve); ! asave = safe_muncompress(a->value); ap = asave; process_expression(tbuf1, &bp, &ap, thing, orator, orator, PE_DEFAULT, PT_DEFAULT, NULL); *** ../vanilla/pennmush/src/unparse.c Sun Jan 19 21:38:20 2003 --- src/unparse.c Sun Jan 19 20:59:25 2003 *************** *** 171,177 **** renv[j][0] = '\0'; strcpy(arg, unparse_dbref(loc)); wenv[0] = arg; ! sp = save = safe_uncompress(a->value); bp = tbuf1; process_expression(tbuf1, &bp, &sp, loc, player, player, PE_DEFAULT, PT_DEFAULT, NULL); --- 171,177 ---- renv[j][0] = '\0'; strcpy(arg, unparse_dbref(loc)); wenv[0] = arg; ! sp = save = safe_muncompress(a->value); bp = tbuf1; process_expression(tbuf1, &bp, &sp, loc, player, player, PE_DEFAULT, PT_DEFAULT, NULL); *************** *** 264,270 **** char *bp = fbuf; size_t len; ! strcpy(tbuf, uncompress(AL_STR(na))); len = strlen(Name(thing)); --- 264,270 ---- char *bp = fbuf; size_t len; ! strcpy(tbuf, muncompress(AL_STR(na))); len = strlen(Name(thing)); *** ../vanilla/pennmush/src/warnings.c Sun Jan 19 21:38:06 2003 --- src/warnings.c Sun Jan 19 20:59:25 2003 *************** *** 225,231 **** complain(player, i, "exit-unlinked", T("Variable exit has no %s attribute"), var); else { ! const char *x = uncompress(AL_STR(a)); if (!x || !*x) complain(player, i, "exit-unlinked", T("Variable exit has empty %s attribute"), var); --- 225,231 ---- complain(player, i, "exit-unlinked", T("Variable exit has no %s attribute"), var); else { ! const char *x = muncompress(AL_STR(a)); if (!x || !*x) complain(player, i, "exit-unlinked", T("Variable exit has empty %s attribute"), var); *** ../vanilla/pennmush/hdrs/dbdefs.h Sun Jan 19 21:38:06 2003 --- hdrs/dbdefs.h Sun Jan 19 22:08:35 2003 *************** *** 106,111 **** --- 106,112 ---- #define Vacation(x) 0 #endif + /* Flags that apply to players, and all their stuff, * so check the Owner() of the object. */ *** ../vanilla/pennmush/hdrs/externs.h Sun Jan 19 21:38:24 2003 --- hdrs/externs.h Sun Jan 19 20:59:25 2003 *************** *** 120,129 **** /* #define COMP_STATS /* */ #if (COMPRESSION_TYPE != 0) extern unsigned char * ! compress(char const *s) __attribute_malloc__; ! extern char *uncompress(unsigned char const *s); ! extern char *safe_uncompress(unsigned char const *s) __attribute_malloc__; #else extern char ucbuff[]; #define init_compress(f) 0 --- 120,129 ---- /* #define COMP_STATS /* */ #if (COMPRESSION_TYPE != 0) extern unsigned char * ! mcompress(char const *s) __attribute_malloc__; ! extern char *muncompress(unsigned char const *s); ! extern char *safe_muncompress(unsigned char const *s) __attribute_malloc__; #else extern char ucbuff[]; #define init_compress(f) 0 *** ../vanilla/pennmush/hdrs/flags.h Sun Jan 19 21:38:06 2003 --- hdrs/flags.h Sun Jan 19 22:04:10 2003 *************** *** 174,181 **** #define PLAYER_NOACCENTS 0x100000 /* Strip accented text on output */ #define PLAYER_PARANOID 0x200000 /* Paranoid nospoof */ - - /*-------------------------------------------------------------------------- * Thing flags */ --- 174,179 ---- *************** *** 187,193 **** #define THING_INHEARIT 0x80 /* checks parent chain for ^ patterns */ #define THING_Z_TEL 0x100 /* If set on ZMO players may only @tel within the zone */ - /*-------------------------------------------------------------------------- * Room flags */ --- 185,190 ---- *** ../vanilla/pennmush/hdrs/function.h Sun Jan 19 21:38:24 2003 --- hdrs/function.h Sun Jan 19 20:59:26 2003 *************** *** 29,35 **** /* Side-effect version of function no workie */ #define FN_NOSIDEFX 0x800 - #ifndef HAVE_FUN_DEFINED typedef struct fun FUN; #define HAVE_FUN_DEFINED --- 29,34 ---- *** ../vanilla/pennmush/hdrs/mushtype.h Sun Jan 19 21:38:01 2003 --- hdrs/mushtype.h Sun Jan 19 20:59:27 2003 *************** *** 9,14 **** --- 9,16 ---- #ifdef HAS_OPENSSL #include #endif + #include + /* Function number type */ typedef double NVAL; *************** *** 108,113 **** --- 110,120 ---- unsigned long output_chars; int width; int height; + #ifdef MCCP + z_stream *out_compress; + unsigned char *out_compress_buf; + int is_compressed; + #endif #ifdef HAS_OPENSSL BIO *bio; #endif *** ../vanilla/pennmush/Makefile Sun Jan 19 21:39:54 2003 --- Makefile Sun Jan 19 20:27:55 2003 *************** *** 13,19 **** CC=cc CCFLAGS=-g -O -I.. -I../hdrs -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-cast -Wnested-externs -Wmissing-declarations -W -Wcast-align -Wbad-function-cast -Wno-comment -Wundef -Wpointer-arith LDFLAGS= -L/usr/local/lib -L/usr/lib ! CLIBS=-lnsl -lm -lc -lcrypt -lresolv -lssl -lcrypto LNS=/bin/ln -s INSTALL=/usr/bin/install INSTALLDIR=/usr/bin/install -d --- 13,19 ---- CC=cc CCFLAGS=-g -O -I.. -I../hdrs -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-cast -Wnested-externs -Wmissing-declarations -W -Wcast-align -Wbad-function-cast -Wno-comment -Wundef -Wpointer-arith LDFLAGS= -L/usr/local/lib -L/usr/lib ! CLIBS=-lnsl -lm -lc -lcrypt -lresolv LNS=/bin/ln -s INSTALL=/usr/bin/install INSTALLDIR=/usr/bin/install -d