| 1 |
diff -u -r pennmush-1.8.3p5\confmagic.h pennmush-1.8.3p5-patched\confmagic.h |
|---|
| 2 |
--- pennmush-1.8.3p5\confmagic.h Sun Jul 08 19:50:12 2007 |
|---|
| 3 |
+++ pennmush-1.8.3p5-patched\confmagic.h Fri Nov 23 03:24:17 2007 |
|---|
| 4 |
@@ -12,7 +12,9 @@ |
|---|
| 5 |
#ifndef _confmagic_h_ |
|---|
| 6 |
#define _confmagic_h_ |
|---|
| 7 |
|
|---|
| 8 |
- /* |
|---|
| 9 |
+#define inline __inline |
|---|
| 10 |
+ |
|---|
| 11 |
+/* |
|---|
| 12 |
* (which isn't exportable from the U.S.), then don't encrypt |
|---|
| 13 |
*/ |
|---|
| 14 |
#ifndef HAS_CRYPT |
|---|
| 15 |
diff -u -r pennmush-1.8.3p5\src\markup.c pennmush-1.8.3p5-patched\src\markup.c |
|---|
| 16 |
--- pennmush-1.8.3p5\src\markup.c Fri Oct 05 14:36:32 2007 |
|---|
| 17 |
+++ pennmush-1.8.3p5-patched\src\markup.c Fri Nov 23 03:20:41 2007 |
|---|
| 18 |
@@ -54,7 +54,7 @@ |
|---|
| 19 |
/* Now the code */ |
|---|
| 20 |
|
|---|
| 21 |
static int write_ansi_close(char *buff, char **bp); |
|---|
| 22 |
-static int write_ansi_letters(ansi_data cur, char *buff, char **bp); |
|---|
| 23 |
+static int write_ansi_letters(const ansi_data *cur, char *buff, char **bp); |
|---|
| 24 |
static int safe_markup(char const *a_tag, char *buf, char **bp, char type); |
|---|
| 25 |
static int |
|---|
| 26 |
safe_markup_cancel(char const *a_tag, char *buf, char **bp, char type); |
|---|
| 27 |
@@ -405,7 +405,7 @@ |
|---|
| 28 |
int retval = 0; |
|---|
| 29 |
retval += safe_chr(TAG_START, buff, bp); |
|---|
| 30 |
retval += safe_chr(MARKUP_COLOR, buff, bp); |
|---|
| 31 |
- retval += write_ansi_letters(*cur, buff, bp); |
|---|
| 32 |
+ retval += write_ansi_letters(cur, buff, bp); |
|---|
| 33 |
retval += safe_chr(TAG_END, buff, bp); |
|---|
| 34 |
return retval; |
|---|
| 35 |
} |
|---|
| 36 |
@@ -422,15 +422,15 @@ |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
static int |
|---|
| 40 |
-write_ansi_letters(const ansi_data cur, char *buff, char **bp) |
|---|
| 41 |
+write_ansi_letters(const ansi_data *cur, char *buff, char **bp) |
|---|
| 42 |
{ |
|---|
| 43 |
int retval = 0; |
|---|
| 44 |
char *save; |
|---|
| 45 |
save = *bp; |
|---|
| 46 |
- if (cur.fore == 'n') { |
|---|
| 47 |
- retval += safe_chr(cur.fore, buff, bp); |
|---|
| 48 |
+ if (cur->fore == 'n') { |
|---|
| 49 |
+ retval += safe_chr(cur->fore, buff, bp); |
|---|
| 50 |
} else { |
|---|
| 51 |
-#define CBIT_SET(x,y) (x.bits & y) |
|---|
| 52 |
+#define CBIT_SET(x,y) (x->bits & y) |
|---|
| 53 |
if (CBIT_SET(cur, CBIT_FLASH)) |
|---|
| 54 |
retval += safe_chr('f', buff, bp); |
|---|
| 55 |
if (CBIT_SET(cur, CBIT_HILITE)) |
|---|
| 56 |
@@ -440,7 +440,7 @@ |
|---|
| 57 |
if (CBIT_SET(cur, CBIT_UNDERSCORE)) |
|---|
| 58 |
retval += safe_chr('u', buff, bp); |
|---|
| 59 |
#undef CBIT_SET |
|---|
| 60 |
-#define CBIT_SET(x,y) (x.offbits & y) |
|---|
| 61 |
+#define CBIT_SET(x,y) (x->offbits & y) |
|---|
| 62 |
if (CBIT_SET(cur, CBIT_FLASH)) |
|---|
| 63 |
retval += safe_chr('F', buff, bp); |
|---|
| 64 |
if (CBIT_SET(cur, CBIT_HILITE)) |
|---|
| 65 |
@@ -451,10 +451,10 @@ |
|---|
| 66 |
retval += safe_chr('U', buff, bp); |
|---|
| 67 |
#undef CBIT_SET |
|---|
| 68 |
|
|---|
| 69 |
- if (cur.fore) |
|---|
| 70 |
- retval += safe_chr(cur.fore, buff, bp); |
|---|
| 71 |
- if (cur.back) |
|---|
| 72 |
- retval += safe_chr(cur.back, buff, bp); |
|---|
| 73 |
+ if (cur->fore) |
|---|
| 74 |
+ retval += safe_chr(cur->fore, buff, bp); |
|---|
| 75 |
+ if (cur->back) |
|---|
| 76 |
+ retval += safe_chr(cur->back, buff, bp); |
|---|
| 77 |
} |
|---|
| 78 |
|
|---|
| 79 |
if (retval) |
|---|
| 80 |
@@ -464,7 +464,7 @@ |
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
void |
|---|
| 84 |
-nest_ansi_data(ansi_data * old, ansi_data * cur) |
|---|
| 85 |
+nest_ansi_data(ansi_data *old, ansi_data *cur) |
|---|
| 86 |
{ |
|---|
| 87 |
if (cur->fore != 'n') { |
|---|
| 88 |
cur->bits |= old->bits; |
|---|
| 89 |
@@ -768,12 +768,12 @@ |
|---|
| 90 |
markup_information *info; |
|---|
| 91 |
|
|---|
| 92 |
ansi_data ansistack[BUFFER_LEN]; |
|---|
| 93 |
- ansistack[0] = ansi_null; |
|---|
| 94 |
int stacktop = 0; |
|---|
| 95 |
|
|---|
| 96 |
ansi_data tmpansi; |
|---|
| 97 |
int oldcodes = 0; |
|---|
| 98 |
|
|---|
| 99 |
+ ansistack[0] = ansi_null; |
|---|
| 100 |
|
|---|
| 101 |
if (!source) |
|---|
| 102 |
return NULL; |
|---|
| 103 |
@@ -1027,6 +1027,8 @@ |
|---|
| 104 |
optimize_ansi_string(ansi_string *as) |
|---|
| 105 |
{ |
|---|
| 106 |
int i, j; |
|---|
| 107 |
+ int target = -1; |
|---|
| 108 |
+ int len = 0; |
|---|
| 109 |
|
|---|
| 110 |
if (!as) |
|---|
| 111 |
return; |
|---|
| 112 |
@@ -1065,8 +1067,6 @@ |
|---|
| 113 |
} /* end outer loop */ |
|---|
| 114 |
} |
|---|
| 115 |
/* end if_optimized */ |
|---|
| 116 |
- int target = -1; |
|---|
| 117 |
- int len = 0; |
|---|
| 118 |
j = 0; |
|---|
| 119 |
|
|---|
| 120 |
/* Get rid of all removed markups |
|---|
| 121 |
@@ -1259,6 +1259,9 @@ |
|---|
| 122 |
|
|---|
| 123 |
markup_information *dm, *sm; |
|---|
| 124 |
|
|---|
| 125 |
+ ansi_data backansi; |
|---|
| 126 |
+ |
|---|
| 127 |
+ |
|---|
| 128 |
/* If src->len == 0, we might have only markup. Stand-alones. Ew! */ |
|---|
| 129 |
if (src->len <= 0 && src->nmarkups <= 0) |
|---|
| 130 |
return 0; |
|---|
| 131 |
@@ -1334,7 +1337,7 @@ |
|---|
| 132 |
/* Determine what old ansi might stretch across the new text. |
|---|
| 133 |
* This sets backansi to any ansi values (bits, colors) that |
|---|
| 134 |
* are continuous across an entire length of text. */ |
|---|
| 135 |
- ansi_data backansi = ansi_null; |
|---|
| 136 |
+ backansi = ansi_null; |
|---|
| 137 |
if (0 < loc && loc < dst->len) { |
|---|
| 138 |
backansi.offbits = dst->ansi[loc - 1].offbits & dst->ansi[loc].offbits; |
|---|
| 139 |
backansi.bits = dst->ansi[loc - 1].bits & dst->ansi[loc].bits; |
|---|
| 140 |
@@ -1392,6 +1395,7 @@ |
|---|
| 141 |
int end, d_end; |
|---|
| 142 |
int diff; |
|---|
| 143 |
int retval = 0; |
|---|
| 144 |
+ ansi_data backansi; |
|---|
| 145 |
markup_information *dm, *sm; |
|---|
| 146 |
|
|---|
| 147 |
if (loc < 0) |
|---|
| 148 |
@@ -1514,7 +1518,7 @@ |
|---|
| 149 |
* This sets backansi to any ansi values (bits, colors) that |
|---|
| 150 |
* are continuous across an entire length of text. |
|---|
| 151 |
*/ |
|---|
| 152 |
- ansi_data backansi = dst->ansi[loc]; |
|---|
| 153 |
+ backansi = dst->ansi[loc]; |
|---|
| 154 |
for (i = loc; i < end && !ansi_isnull(backansi); i++) { |
|---|
| 155 |
backansi.offbits &= dst->ansi[i].offbits; |
|---|
| 156 |
backansi.bits &= dst->ansi[i].bits; |
|---|
| 157 |
@@ -1911,7 +1915,6 @@ |
|---|
| 158 |
char type; |
|---|
| 159 |
|
|---|
| 160 |
ansi_data ansistack[BUFFER_LEN]; |
|---|
| 161 |
- ansistack[0] = ansi_null; |
|---|
| 162 |
ansi_data oldansi; |
|---|
| 163 |
ansi_data tmpansi; |
|---|
| 164 |
int ansitop = 0; |
|---|
| 165 |
@@ -1925,6 +1928,8 @@ |
|---|
| 166 |
|
|---|
| 167 |
int retval = 0; |
|---|
| 168 |
|
|---|
| 169 |
+ ansistack[0] = ansi_null; |
|---|
| 170 |
+ |
|---|
| 171 |
if (!str || !*str) |
|---|
| 172 |
return 0; |
|---|
| 173 |
|
|---|
| 174 |
@@ -2074,7 +2079,7 @@ |
|---|
| 175 |
} |
|---|
| 176 |
if (!ansi_isnull(tmpansi) && !ansi_equal(oldansi, tmpansi)) { |
|---|
| 177 |
retval += safe_str("[ansi(", buff, bp); |
|---|
| 178 |
- retval += write_ansi_letters(tmpansi, buff, bp); |
|---|
| 179 |
+ retval += write_ansi_letters(&tmpansi, buff, bp); |
|---|
| 180 |
retval += safe_chr(',', buff, bp); |
|---|
| 181 |
howmanyopen++; |
|---|
| 182 |
} |
|---|
| 183 |
diff -u -r pennmush-1.8.3p5\win32\cmds.h pennmush-1.8.3p5-patched\win32\cmds.h |
|---|
| 184 |
--- pennmush-1.8.3p5\win32\cmds.h Thu Nov 16 04:36:30 2006 |
|---|
| 185 |
+++ pennmush-1.8.3p5-patched\win32\cmds.h Fri Nov 23 03:05:54 2007 |
|---|
| 186 |
@@ -74,6 +74,7 @@ |
|---|
| 187 |
COMMAND_PROTO(cmd_mail); |
|---|
| 188 |
COMMAND_PROTO(cmd_malias); |
|---|
| 189 |
COMMAND_PROTO(cmd_map); |
|---|
| 190 |
+COMMAND_PROTO(cmd_message); |
|---|
| 191 |
COMMAND_PROTO(cmd_motd); |
|---|
| 192 |
COMMAND_PROTO(cmd_mvattr); |
|---|
| 193 |
COMMAND_PROTO(cmd_name); |
|---|
| 194 |
diff -u -r pennmush-1.8.3p5\win32\confmagic.h pennmush-1.8.3p5-patched\win32\confmagic.h |
|---|
| 195 |
--- pennmush-1.8.3p5\win32\confmagic.h Sun Jul 08 19:50:12 2007 |
|---|
| 196 |
+++ pennmush-1.8.3p5-patched\win32\confmagic.h Fri Nov 23 03:24:17 2007 |
|---|
| 197 |
@@ -12,7 +12,9 @@ |
|---|
| 198 |
#ifndef _confmagic_h_ |
|---|
| 199 |
#define _confmagic_h_ |
|---|
| 200 |
|
|---|
| 201 |
- /* |
|---|
| 202 |
+#define inline __inline |
|---|
| 203 |
+ |
|---|
| 204 |
+/* |
|---|
| 205 |
* (which isn't exportable from the U.S.), then don't encrypt |
|---|
| 206 |
*/ |
|---|
| 207 |
#ifndef HAS_CRYPT |
|---|
| 208 |
diff -u -r pennmush-1.8.3p5\win32\funs.h pennmush-1.8.3p5-patched\win32\funs.h |
|---|
| 209 |
--- pennmush-1.8.3p5\win32\funs.h Tue Jul 10 00:44:12 2007 |
|---|
| 210 |
+++ pennmush-1.8.3p5-patched\win32\funs.h Fri Nov 23 03:05:15 2007 |
|---|
| 211 |
@@ -199,6 +199,7 @@ |
|---|
| 212 |
FUNCTION_PROTO(fun_median); |
|---|
| 213 |
FUNCTION_PROTO(fun_member); |
|---|
| 214 |
FUNCTION_PROTO(fun_merge); |
|---|
| 215 |
+FUNCTION_PROTO(fun_message); |
|---|
| 216 |
FUNCTION_PROTO(fun_mid); |
|---|
| 217 |
FUNCTION_PROTO(fun_min); |
|---|
| 218 |
FUNCTION_PROTO(fun_mix); |
|---|