Got another error though, although it got quite a way through compilation
grub.c:27: warning: conflicting types for built-in function 'trunc'
grub.c: In function 'rgrub_help':
grub.c:538: error: missing terminating " character
grub.c:539: error: expected ')' before 'search'
grub.c:539: error: stray '\' in program
grub.c:539: error: stray '\' in program
grub.c:539: error: missing terminating " character
grub.c:543: error: missing terminating " character
grub.c:544: error: stray '\' in program
grub.c:544: error: stray '\' in program
grub.c:544: error: missing terminating " character
grub.c:548: error: too few arguments to function 'send_to_char'
grub.c:548: error: expected ';' before '}' token
make[1]: *** [grub.o] Error 1
make[1]: Leaving directory `/home/smee/smaug1.8/src'
make: *** [all] Error 2
-------- Original Message --------
Subject: [SMAUG] Smaug v1.8
Date: Tue, 24 Apr 2007 07:41:49 +0900
From: Edmond <edmond@realms.game.org>
To: smaug@realms.game.org
For the first time since 1998, we have posted a newer version of
SMAUG for public consumption to the FTP site.
SMAUG v1.8 is public use portions of the code as it existed on Realms
of Despair on August 17th, 2002. This is the date that Realms
implemented v2.0 of SMAUG.
SMAUG v1.8 does not come with a complete record of changes, as there
are simply too many changes to be made and it was a segment of the
code source being constructed parallel to v2.0 without any revision
control while we were simultaneously implementing updates/changes to
implement for the v2.0 update.
This version of code has been implemented and stable on our mortal
build port for just over a year. Crash errors have only occurred
when attempting to bring files back from v2.0 to 1.8 due to missing
flags/bvs, etc...
I also specify that there are still things we have left out of the
v1.8 release to the public that are Realms of Despair
specific. Certain methods of tracking cheats, items, objects, and
hacking specific fixes were omitted as they have been in all prior releases.
Finally, the online help files also remain rather inept, as
always. One would be well advised to run a "diff" between the new
code and 1.4a code to see what changes are available and how they
function in code speak. I've been attempting to get this release out
for over a year but do not have the coder resource time to
create/compare/compile all of the help files or adjust the help files
out from the existing 2.1 code on Realms main port.
Apologies in advance for the inadequacies. Looking forward to
responses from the public at large.
If there is a snippet of code or bug fix that has been integrated
into v1.8 (Blodkai and I did quite a bit of this) that wasn't
credited to you properly and you can confirm that it was yours,
please let us know right away so we can properly credit you here and
in the distributed source.
When you said you hadn't hear of it I thought the file might be a bit dodgy, didn't know if they were still working on it.
Line 27 onwards
{
if ( strlen(s) > len )
s[len] = '\0';
}
Line 538 onwards
void rgrub_help (CHAR_DATA *ch)
{
send_to_char( "Syntax:\n\r", ch);
send_to_char( "rgrub <type> n lo hi - type search.\n\r"
" list room vnums between lo and hi that match n on <type> of
search.\n\r", ch );
send_to_char( " e.g. rgrub st 6 901 969 - list all rooms in Olympus\n\r"
" that are sectortype 6.\n\r", ch );
send_to_char( " e.g. rgrub st 2 - list all rooms sectortype 2.\n\r", ch );
send_to_char( " e.g. rgrub f nomob 901 969 - list all rooms in
Olympus\n\r"
" that are flagged nomon.\n\r", ch );
send_to_char( " e.g. rgrub f nomob - list all rooms flagged nomob.\n\r",
ch );
}
void do_rgrub (CHAR_DATA *ch, char *argument)
{
/* modified by Edmond to support room flag searches 000820 */
#define RGRUB_MAX_SIZE 5000
ROOM_INDEX_DATA *pRoom;
int x, lo, hi, hit_cou, cou, vnum[RGRUB_MAX_SIZE];
extern ROOM_INDEX_DATA *room_index_hash[MAX_KEY_HASH];
char arg1[MAX_STRING_LENGTH];
char arg2[MAX_STRING_LENGTH];
char arg3[MAX_STRING_LENGTH];
char arg4[MAX_STRING_LENGTH];
The strings shouldn't break in the middle of the line like that; is that what it looks like in your source, or is that an artifact of pasting to the forum?
It's ok for several strings to appear in a row, e.g.
This is just completely weird style; I don't know why the SMAUG authors insist on casting their lvalues, it's just not right and it's unclear what it's supposed to mean in the first place. Anyhow.
What you want to do is move the cast from the left side to the right side, and adjust it so that it's casting to whatever type vd->data is. I imagine it is a void*, so you probably want to cast to void*.
(I wonder if that code is 64-bit system safe...)