(no subject)

From: Darklord (mattm@KRON.CS.CSUFRESNO.EDU)
Date: 08/15/97

  Har har har.. took me 24 hours to finally get an a.out file to work
.. but rest assured ill be adding it to my !CIRCLE mud before the end
of the month... btw dude..  Your method of :

S - -
  A -
  I -
    T -
    Y -   or whatever you had that was searching by char so deep into the
argument..   well go ahead and use your MD5 scheme.. seems that was my original
way of thinking.. regardless you will never be able to get around strcmp unless
you use  a so called dereferenced ptr..or (might be mistaken here but)
an address to the string.

  now... lets take a look at do_set  (from circle mud)
its a function that is addressed in the stack somewhere right.. well
wouldnt it be cool if you could take that address and match it to the
argument incomming.

  My code works.. thats all i know.. and im not releasing the hash interpreter
.. but i will offer this little piece of advice just to see how i somewhat
did it.

  I have a few utilities much like find_char _in_room() that can take an
idnum argument in.. and return its string.  Also.. the strings are never
freed.. must kept in whats called a string pool.. only to be passed along.

  Ok.. i admit.. it may sound stupid.. and use up a great deal of memory that
way... but i have it to where it autoexpands the hash table size if
needed. No big deal.. I may just have it auto reboot the mud every 7 days.
But at least I THINK it will be the fastest mud yet.  I duno.. besides
my server that im running on of course.. the code will be smooth.

  However.. Daniels code might have some nice tidbits too.. so im gonna
keep my mouth shut at this point :)

All arguments are saved.. if 2 arguemnts ar ethe same in a row.. it searches
through the history list so to speak before actually creating a new entry to
the hash table list.  etc etc.. if you know the basicas.. then enough said.

  Here is my little 1 liner that much of you old dogs probably didnt
already know  :)

  well in case you dont know where that goes.. it was in the old
  command_interpreter() in interpreter.c

  but a few things have changed.. such as the argument parsing.
  The arguments are interpreted in the main loop now instead of a stupid
  strcmp loop of the cmd list.

  I  still use a hard coded array for the cmd list.. but that will change
  as soon as i can get it to compile wiout affecting the main bin/bio
  But.. maybe friend can help me who programs for a DGD mud.

-------- My favorable snippit hot off my building mud -------
  else {
     (ch, at[1].argv, cmd, cmd_info[cmd].subcmd));
+   sprintf(buf, "Argument fn:  %p\r\n", *cmd_info[cmd].command_pointer);
+   send_to_char(buf, ch);

-----Legend -----
+  = a new line to add to your mud.. recalls circlemud v3 functions.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |

This archive was generated by hypermail 2b30 : 12/08/00 PST