Changeset 503
- Timestamp:
- 08/16/06 02:34:58 (2 years ago)
- Files:
-
- 1.8.0/CHANGES.180 (modified) (1 diff)
- 1.8.0/Configure (modified) (2 diffs)
- 1.8.0/Patchlevel (modified) (1 diff)
- 1.8.0/game/txt/hlp/pennv180.hlp (modified) (2 diffs)
- 1.8.0/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.8.0/hdrs/version.h (modified) (1 diff)
- 1.8.0/options.h.dist (modified) (1 diff)
- 1.8.0/src/sql.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.0/CHANGES.180
r501 r503 12 12 13 13 ========================================================================== 14 15 Version 1.8.0 patchlevel 10 January 29, 2006 16 17 Minor changes: 18 * Row and field separators in sql() may now by more than one 19 character. Patch by Walker@M*U*S*H. 20 Fixes: 21 * Fix to GNU libc detection in Configure by Petr Salinger. 22 * Definition of MAILER in options.h.dist made to work by Luke@M*U*S*H. 23 * Fix to double-parsing of row and field separators in sql() 24 by Walker@M*U*S*H. 25 14 26 15 27 Version 1.8.0 patchlevel 9 December 12, 2005 1.8.0/Configure
r499 r503 21 21 # $Id: Head.U 1.3 Mon, 10 Nov 2003 14:51:32 -0600 dunemush $ 22 22 # 23 # Generated on Thu Sep 15 18:12:50 CDT 2005[metaconfig 3.0 PL70]23 # Generated on Fri Jan 13 22:05:44 CST 2006 [metaconfig 3.0 PL70] 24 24 25 25 cat >/tmp/c1$$ <<EOF … … 3149 3149 ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then 3150 3150 val="$define" 3151 echo "You are using the GNU C Library" 3151 echo "You are using the GNU C Library" >&4 3152 else 3153 cat >gnulibc.c <<EOM 3154 #include <features.h> 3155 int main() 3156 { 3157 #ifdef __GLIBC__ 3158 return 0; 3159 #else 3160 return 1; 3161 #endif 3162 } 3163 EOM 3164 if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \ 3165 ./gnulibc; then 3166 val="$define" 3167 echo "You are using the GNU C Library" >&4 3152 3168 else 3153 3169 val="$undef" 3154 echo "You are not using the GNU C Library" 3170 echo "You are not using the GNU C Library" >&4 3171 fi 3155 3172 fi 3156 3173 $rm -f gnulibc* 1.8.0/Patchlevel
r501 r503 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.8.0p 92 This is PennMUSH 1.8.0p10 1.8.0/game/txt/hlp/pennv180.hlp
r501 r503 1 & 1.8.0p 91 & 1.8.0p10 2 2 & changes 3 3 This is a list of changes in this patchlevel which are probably of … … 12 12 be read in 'help patchlevels'. 13 13 14 Version 1.8.0 patchlevel 10 January 29, 2006 15 16 Minor changes: 17 * Row and field separators in sql() may now by more than one 18 character. Patch by Walker@M*U*S*H. 19 Fixes: 20 * Fix to GNU libc detection in Configure by Petr Salinger. 21 * Definition of MAILER in options.h.dist made to work by Luke@M*U*S*H. 22 * Fix to double-parsing of row and field separators in sql() 23 by Walker@M*U*S*H. 24 25 26 & 1.8.0p9 14 27 Version 1.8.0 patchlevel 9 December 12, 2005 15 28 1.8.0/game/txt/hlp/pennvOLD.hlp
r501 r503 4418 4418 type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 4419 4419 4420 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 4420 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 4421 4421 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 4422 4422 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 1.8.0/hdrs/version.h
r501 r503 1 1 #define VERSION "1.8.0" 2 #define PATCHLEVEL " 9"3 #define PATCHDATE "[ 12/12/2005]"4 #define NUMVERSION 10080000 092 #define PATCHLEVEL "10" 3 #define PATCHDATE "[01/29/2006]" 4 #define NUMVERSION 1008000010 1.8.0/options.h.dist
r459 r503 115 115 * If it doesn't, you could probably write a wrapper for it. 116 116 * Example: #define MAILER "/full/path/to/other/mailer" 117 /* #define MAILER /**/118 117 */ 118 /* #define MAILER "" /* */ 119 119 120 120 #endif 1.8.0/src/sql.c
r497 r503 36 36 #define MYSQL_RETRY_TIMES 3 37 37 38 static int safe_sql_query(dbref player, char *q_string, char row_delim,39 char field_delim, char *buff, char **bp);38 static int safe_sql_query(dbref player, char *q_string, char *rowsep, 39 char *fieldsep, char *buff, char **bp); 40 40 static int sql_init(void); 41 41 … … 84 84 } 85 85 86 #define print_sep(s,b,p) if (s) safe_chr(s,b,p)87 88 86 static int 89 safe_sql_query(dbref player, char *q_string, char row_delim, char field_delim,87 safe_sql_query(dbref player, char *q_string, char *rowsep, char *fieldsep, 90 88 char *buff, char **bp) 91 89 { … … 153 151 while ((row_p = mysql_fetch_row(qres)) != NULL) { 154 152 if (i++ > 0) { 155 print_sep(row_delim, buff, bp);153 safe_str(rowsep, buff, bp); 156 154 } 157 155 for (j = 0; j < got_fields; j++) { 158 156 if (j > 0) { 159 print_sep(field_delim, buff, bp);157 safe_str(fieldsep, buff, bp); 160 158 } 161 159 if (row_p[j] && *row_p[j]) … … 193 191 FUNCTION(fun_sql) 194 192 { 195 char row_delim, field_delim; 193 char *rowsep = (char *) " "; 194 char *fieldsep = (char *) " "; 196 195 197 196 if (!Sql_Ok(executor)) { … … 201 200 202 201 if (nargs >= 2) { 203 /* we have a delimiter in args[2]. Got to parse it */ 204 char insep[BUFFER_LEN]; 205 char *isep = insep; 206 const char *arg2 = args[1]; 207 process_expression(insep, &isep, &arg2, executor, caller, enactor, 208 PE_DEFAULT, PT_DEFAULT, pe_info); 209 *isep = '\0'; 210 strcpy(args[1], insep); 202 /* we have a row separator in args[1]. */ 203 rowsep = args[1]; 211 204 } 212 205 213 206 if (nargs >= 3) { 214 /* we have a delimiter in args[3]. Got to parse it */ 215 char insep[BUFFER_LEN]; 216 char *isep = insep; 217 const char *arg3 = args[2]; 218 process_expression(insep, &isep, &arg3, executor, caller, enactor, 219 PE_DEFAULT, PT_DEFAULT, pe_info); 220 *isep = '\0'; 221 strcpy(args[2], insep); 222 } 223 224 if (!delim_check(buff, bp, nargs, args, 2, &row_delim)) 225 return; 226 if (nargs < 3) 227 field_delim = ' '; 228 else if (!delim_check(buff, bp, nargs, args, 3, &field_delim)) 229 return; 230 231 safe_sql_query(executor, args[0], row_delim, field_delim, buff, bp); 207 /* we have a field separator in args[2]. Got to parse it */ 208 fieldsep = args[2]; 209 } 210 211 safe_sql_query(executor, args[0], rowsep, fieldsep, buff, bp); 232 212 } 233 213 … … 262 242 263 243 COMMAND (cmd_sql) { 264 safe_sql_query(player, arg_left, ' ', ' ', NULL, NULL);244 safe_sql_query(player, arg_left, NULL, NULL, NULL, NULL); 265 245 } 266 246
