Changeset 841
- Timestamp:
- 05/15/07 11:46:49 (2 years ago)
- Files:
-
- 1.8.3/branches/devel/CHANGES.182 (modified) (1 diff)
- 1.8.3/branches/devel/hdrs/ansi.h (modified) (1 diff)
- 1.8.3/branches/devel/src/funlist.c (modified) (1 diff)
- 1.8.3/branches/devel/src/funmath.c (modified) (1 diff)
- 1.8.3/branches/devel/src/funtime.c (modified) (2 diffs)
- 1.8.3/branches/devel/src/markup.c (modified) (1 diff)
- 1.8.3/branches/devel/src/notify.c (modified) (7 diffs)
- 1.8.3/branches/devel/src/services.c (modified) (1 diff)
- 1.8.3/branches/devel/src/set.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/branches/devel/CHANGES.182
r838 r841 19 19 Minor changes: 20 20 * Removed the gmalloc malloc option. [SW] 21 * Assorted gcc warning fixes. [SW] 21 22 22 23 Version 1.8.2 patchlevel 4 May ??, 2007 1.8.3/branches/devel/hdrs/ansi.h
r660 r841 77 77 void init_ansi_codes(void); 78 78 79 #ifdef HAVE_STDINT_H 80 #include <stdint.h> 81 #endif 82 79 83 struct ansi_data { 80 charbits;81 charoffbits;84 uint8_t bits; 85 uint8_t offbits; 82 86 char fore; 83 87 char back; 1.8.3/branches/devel/src/funlist.c
r803 r841 2617 2617 /* string, regexp, replacement string. Acts like sed or perl's s///g, 2618 2618 * with an ig version */ 2619 // int re_subpatterns = -1; /**< Number of subpatterns in regexp */2620 // int *re_offsets; /**< Array of offsets to subpatterns */2621 // char *re_from = NULL; /**< Pointer to last match position */2622 2619 FUNCTION(fun_regreplace) 2623 2620 { 1.8.3/branches/devel/src/funmath.c
r807 r841 1275 1275 1276 1276 if (fabs(denom - 1) < 1.0e-10) 1277 safe_format(buff, bp, "%.0 lf", num);1277 safe_format(buff, bp, "%.0f", num); 1278 1278 else 1279 safe_format(buff, bp, "%.0 lf/%.0lf", num, denom);1279 safe_format(buff, bp, "%.0f/%.0f", num, denom); 1280 1280 } 1281 1281 1.8.3/branches/devel/src/funtime.c
r815 r841 239 239 str2[i] = '\0'; 240 240 if (!*str1) { 241 *secs += parse_integer(str2); / / no more chars, just add seconds and stop241 *secs += parse_integer(str2); /* no more chars, just add seconds and stop */ 242 242 break; 243 243 } … … 245 245 case 'd': 246 246 case 'D': 247 *secs += (parse_integer(str2) * 86400); / / days247 *secs += (parse_integer(str2) * 86400); /* days */ 248 248 break; 249 249 case 'h': 250 250 case 'H': 251 *secs += (parse_integer(str2) * 3600); / / hours251 *secs += (parse_integer(str2) * 3600); /* hours */ 252 252 break; 253 253 case 'm': 254 254 case 'M': 255 *secs += (parse_integer(str2) * 60); / / minutes255 *secs += (parse_integer(str2) * 60); /* minutes */ 256 256 break; 257 257 case 's': 258 258 case 'S': 259 259 case ' ': 260 *secs += parse_integer(str2); / / seconds260 *secs += parse_integer(str2); /* seconds */ 261 261 break; 262 262 default: 263 263 return 0; 264 264 } 265 str1++; / / move past the time char265 str1++; /* move past the time char */ 266 266 } 267 267 return 1; 1.8.3/branches/devel/src/markup.c
r807 r841 1070 1070 bi = (markup_information *) b; 1071 1071 1072 // if (ai->start == bi->start) return ai->priority - bi->priority;1073 1072 return ai->start - bi->start; 1074 1073 } 1.8.3/branches/devel/src/notify.c
r790 r841 301 301 bp = tbuf; 302 302 safe_str((char *) messages[type].message, tbuf, &bp); 303 safe_chr( IAC, tbuf, &bp);304 safe_chr( GOAHEAD, tbuf, &bp);303 safe_chr((char)IAC, tbuf, &bp); 304 safe_chr((char)GOAHEAD, tbuf, &bp); 305 305 *bp = '\0'; 306 306 return (unsigned char *) tbuf; … … 341 341 bp = tbuf; 342 342 safe_str((char *) messages[type].message, tbuf, &bp); 343 safe_chr( IAC, tbuf, &bp);344 safe_chr( GOAHEAD, tbuf, &bp);343 safe_chr((char)IAC, tbuf, &bp); 344 safe_chr((char)GOAHEAD, tbuf, &bp); 345 345 *bp = '\0'; 346 346 return (unsigned char *) tbuf; … … 358 358 case IAC: 359 359 if (type == NA_TPASCII) 360 safe_str ("\xFF\xFF", t, &o);360 safe_strl("\xFF\xFF", 2, t, &o); 361 361 else if (strip) 362 362 safe_str(accent_table[IAC].base, t, &o); … … 375 375 break; 376 376 case '\n': 377 safe_str ("\r\n", t, &o);377 safe_strl("\r\n", 2, t, &o); 378 378 break; 379 379 default: … … 391 391 bp = tbuf; 392 392 safe_str((char *) messages[type].message, tbuf, &bp); 393 safe_chr( IAC, tbuf, &bp);394 safe_chr( GOAHEAD, tbuf, &bp);393 safe_chr((char)IAC, tbuf, &bp); 394 safe_chr((char)GOAHEAD, tbuf, &bp); 395 395 *bp = '\0'; 396 396 return (unsigned char *) tbuf; … … 420 420 } 421 421 if (type == NA_TANSI || type == NA_TCOLOR) 422 safe_str ("\xFF\xFF", t, &o);422 safe_strl("\xFF\xFF", 2, t, &o); 423 423 else if (strip && accent_table[IAC].base) 424 424 safe_str(accent_table[IAC].base, t, &o); … … 524 524 bp = tbuf; 525 525 safe_str((char *) messages[type].message, tbuf, &bp); 526 safe_chr( IAC, tbuf, &bp);527 safe_chr( GOAHEAD, tbuf, &bp);526 safe_chr((char)IAC, tbuf, &bp); 527 safe_chr((char)GOAHEAD, tbuf, &bp); 528 528 *bp = '\0'; 529 529 return (unsigned char *) tbuf; 1.8.3/branches/devel/src/services.c
r758 r841 1 /* Win32 services routines */2 3 /* Author: Nick Gammon */ 4 5 #ifdef WIN32 1 /** \file services.c 2 * \brief Win32 services routines 3 * 4 * Original author: Nick Gammon 5 */ 6 6 7 7 #include "copyrite.h" 8 8 #include "config.h" 9 9 10 #ifdef WIN32 10 11 #include <windows.h> /* for service and thread routines */ 11 12 1.8.3/branches/devel/src/set.c
r817 r841 887 887 } 888 888 } else { 889 / / We don't do it - we just pemit it.889 /* We don't do it - we just pemit it. */ 890 890 if (!ansi_long_flag && ShowAnsi(player)) 891 891 notify_format(player, "%s - Set: %s", AL_NAME(a), tbuf_ansi);
