[btech-checkins] CVS: btechmux/src/hcode/include glue.h,1.4.2.7,1.4.2.8 macros.h,1.1.1.1,1.1.1.1.2.1
Brought to you by:
twouters
From: Thomas W. <two...@us...> - 2004-08-08 23:49:01
|
Update of /cvsroot/btech/btechmux/src/hcode/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12777/src/hcode/include Modified Files: Tag: btmux_1_4-branch glue.h macros.h Log Message: Annual (ahem) sync with the BitKeeper btechmux-stable tree (at btechmux.bkbits.net/btechmux-stable). I should sync more often but I've been short on time. If you want to keep in touch with the changes, consider using BK directly. This sync contains these BK changesets: # -------------------------------------------- # 03/09/30 th...@st... 1.26 # Skip sections that have no internals, when calculating weight of a unit. The MUX treats these sections as 'nonexistant' in all other places, too, but it's still possible (albeit difficult) to get something into those sections, eating up phantom weight. # # -------------------------------------------- # 03/10/01 th...@st... 1.27 # Safeguard against a 'shouldn't-happen' scenario that seems to have happened several times now on 3030MUX. (but was probably just generic memory corruption.) # -------------------------------------------- # 03/10/01 th...@st... 1.28.1.1 # Rather than safeguard against something, do the proper fix :) wcAmmoItems was incremented twice, in some circumstances. That's not very healthy. Remove the safeguard, it serves no purpose other than protect against hardware errors or memory corruption, both of which would cause other problems anyhow. # -------------------------------------------- # 03/10/01 th...@st... 1.30 # Merge stalker.xs4all.nl:/home/thomas/btsrc/bitkeeper/btechmux-stable # into stalker.xs4all.nl:/home/thomas/btsrc/btechmux-stable # -------------------------------------------- # 03/10/01 th...@ce... 1.31 # Ice glitchfixes: break through it while standing, and don't survive as tank breaking ice. # -------------------------------------------- # 03/10/01 th...@ce... 1.32 # More ice glitch fixes: properly break ice when picking a unit (but not a MechWarrior) up through it. # -------------------------------------------- # 03/10/01 th...@ce... 1.33 # Wups... don't sink hovertows. # -------------------------------------------- # 03/10/05 th...@st... 1.34 # Make MUX function 'btgetdbrefbyid' accept a map as well as a 'mech as its first argument. # -------------------------------------------- # 03/10/12 th...@st... 1.35 # - Fix bug in MechPrefs (MUX +bug #1152) and make sure it doesn't happen again. # - Add MechPrefs to xcodevalues. # # -------------------------------------------- # 03/10/12 th...@st... 1.36 # - Consider OOD-ing 'mechs as Jumping 'mechs where appropriate. # -------------------------------------------- # 03/10/14 th...@st... 1.37 # Add new 'c' option to LRS, for colorized terrain. # -------------------------------------------- # 03/10/14 th...@st... 1.38 # Don't cliff hovers that go from l0 bridge to l1 bridge. # -------------------------------------------- # 03/10/14 th...@st... 1.39 # Don't drown vehicles that manage to break l0 ice. # -------------------------------------------- # 03/10/15 th...@st... 1.40 # Add tactical/lrs-like argument handling to navigate. You can now say 'navigate 120 1' to see the hex bearing 120 of you as if you were in it, or 'navigate qq' to see the navigate for 'Mech 'qq'. Max range is the same as for 'tactical'. # -------------------------------------------- # 03/10/18 th...@st... 1.41 # - Add 'tactical b', for displaying valid DropShip landing zones # - Add the ability to run 'checklz x y' for hexes in TacRange. # -------------------------------------------- # 03/10/19 th...@st... 1.42 # - Add new 'btmechfreqs' function, returning the radio freqs on a 'Mech. It returns a comma separated list of entries, each of which is: # # <freqnum> | <frequency> | <freqflags> | <colorcode> # # Where freqnum starts at 1, frequency is the actual frequency set, colormode is the color setting for that channel (captial letters meaning bold), and freqflags is a bitvector-string with the following meaning: # # - 'a': Freq is digital # - 'b': Freq is muted # - 'c': Freq is set Relay # - 'd': Freq is set Info # - 'e': Freq is set Scan # # Comtitles are not returned because of escaping issues. # -------------------------------------------- # 03/10/19 th...@st... 1.43 # Make second argument to 'btstores' optional. When not passed, 'btstores' will return partname:amount pairs, separated by |'s, for all parts in the inventory of the object. # -------------------------------------------- # 03/10/19 th...@st... 1.44 # Patch from Tony to make tel() and @tel 'teleport' exits the same way the 'drop' command does. # -------------------------------------------- # 03/10/21 th...@st... 1.45 # Fix eternal loop when calling btdamagemech() with a 'clustersize' of 0. # -------------------------------------------- # 03/10/31 th...@st... 1.46 # Glitchfix. # -------------------------------------------- # 03/10/31 th...@st... 1.47 # Possibly fix memory corruption problems 3030 has been having, by fixing around tprintf (as suggested by Null @ 3029.) # -------------------------------------------- # 03/11/14 th...@ce... 1.44.1.1 # Fix buglet in btlostohex(): use proper range. # -------------------------------------------- # 03/11/15 th...@st... 1.48 # Fix possibly malicious crashing bug in macros. # -------------------------------------------- # 03/11/15 th...@ce... 1.49 # Merge http://btechmux.bkbits.net/btechmux-stable # into centurion.xs4all.nl:/home/thomas/btsrc/btechmux-stable # -------------------------------------------- # 03/11/20 th...@st... 1.50 # Misc cleanup fixes. Stuff that probably didn't cause any real-world bugs, but should be fixed anyway. # -------------------------------------------- # 03/11/23 th...@st... 1.51 # - Facilitate debugging by not closing stdin/stdout. Old behaviour can be had by defining CLOSE_STDIN somewhere, but I have no use for it yet. # - Zap rediculous 'filedecriptor caching' that just re-used fd0 for everything, brutally closing it if needed. I'm suprised this hasn't caused odd bugs where data went to the wrong file. Totally unnecessary. # - Various memory buglets found by Valgrind. Some things were obviously wrong but never went wrong thanks to the reliability of stack layout in GCC. Others were potentially wrong but probably never did any harm -- but I could be wrong. # # -------------------------------------------- # 04/02/09 th...@st... 1.52 # Fix off-by-one error in reading maps with an X size of MAPX (1000 by default.) # -------------------------------------------- # 04/02/10 th...@st... 1.53 # Open help/news files for reading, not writing. Oopsie from last changeset. # -------------------------------------------- # 04/02/12 th...@st... 1.54 # remove unused file. # -------------------------------------------- # 04/03/05 th...@ce... 1.49.1.1 # foobar changeset # -------------------------------------------- # 04/03/05 th...@ce... 1.49.1.2 # foobar2 # -------------------------------------------- # 04/05/08 th...@st... 1.55 # Properly display valid/invalid LZ's in 'tactical b' even when not using colours. Previously, the characters \240 and \241 (inverted exclamation mark and non-break space, respectively, in ISO 8859-1 and -15) were displayed. # # -------------------------------------------- # 04/05/08 th...@st... 1.56 # Protect some xcodevalues from being changed, to avoid memory corruption and the like. # -------------------------------------------- # 04/05/09 th...@st... 1.57 # Fix some buglets in previous fixes: don't close fd's that weren't opened, and when using memmove instead of strcpy, include the terminating NUL manually. # -------------------------------------------- # 04/05/09 th...@st... 1.58 # Fix typo in previous checkin, and compile before checking in. # -------------------------------------------- # 04/05/11 th...@ce... 1.59 # Merge http://btechmux.bkbits.net/btechmux-stable # into centurion.xs4all.nl:/home/thomas/btsrc/btechmux-stable # -------------------------------------------- # 04/05/11 th...@ce... 1.60 # Fix compiler warnings: # - Add a few missing include files # - Remove unused variables # -------------------------------------------- # 04/05/11 th...@ce... 1.61 # Fix small loophole where you could tell an out-of-LOS unit's approximate location by triangulating 'out of arc' messages. Always give the same 'out of los' message for mechID's that are not in LOS, even if the mechID's don't exist or if they are out of range or out of arc. # -------------------------------------------- # 04/05/11 th...@st... 1.62 # Fix off-by-one error in the kick-decision range check in autopilots. # -------------------------------------------- # 04/07/29 th...@st... 1.63 # Attempt to improve the dieroll's randomness somewhat. # -------------------------------------------- Index: glue.h =================================================================== RCS file: /cvsroot/btech/btechmux/src/hcode/include/glue.h,v retrieving revision 1.4.2.7 retrieving revision 1.4.2.8 diff -C2 -d -r1.4.2.7 -r1.4.2.8 *** glue.h 30 Sep 2003 01:38:36 -0000 1.4.2.7 --- glue.h 8 Aug 2004 23:48:19 -0000 1.4.2.8 *************** *** 377,382 **** mech_range}, {0, ! "LRS <M|T|E|L|S|H> [<BEARING> <RANGE> | <TARGET-ID>]", ! "Shows the long range map", mech_lrsmap}, {0, "TACTICAL [C | T | L] [<BEARING> <RANGE> | <TARGET-ID>]", "Shows the tactical map at the mech's location / at bearing and range / around chosen target", --- 377,382 ---- mech_range}, {0, ! "LRS <M|T|E|L|S|H|C> [<BEARING> <RANGE> | <TARGET-ID>]", ! "Shows the (Mech/Terrain/Elevation/LOS/Sensors/Height/Combined) long range map", mech_lrsmap}, {0, "TACTICAL [C | T | L] [<BEARING> <RANGE> | <TARGET-ID>]", "Shows the tactical map at the mech's location / at bearing and range / around chosen target", Index: macros.h =================================================================== RCS file: /cvsroot/btech/btechmux/src/hcode/include/macros.h,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** macros.h 3 Jan 2002 01:01:39 -0000 1.1.1.1 --- macros.h 8 Aug 2004 23:48:19 -0000 1.1.1.1.2.1 *************** *** 51,56 **** /* Dice-rolling function used everywhere converted to a macro */ ! #define Number(a,b) ((a) + random()%((b)-(a)+1)) ! #define skipws(name) while (name && *name && isspace(*name)) name++ --- 51,63 ---- /* Dice-rolling function used everywhere converted to a macro */ ! /* Shift the random number to get rid of the usually not-very-random ! lower order bits. Because Number() is used with a wide range of numbers, ! as high as 5000 at least, we do a little dance to determine the amount ! to shift */ ! #define Number(a,b) ((a) + (random() >> ( \ ! ((b) - (a)) > 16777216 ? 0 : \ ! ((b) - (a)) > 65536 ? 8 : \ ! ((b) - (a)) > 4096 ? 16 : 20 \ ! )) % ((b)-(a)+1)) #define skipws(name) while (name && *name && isspace(*name)) name++ |