[code] interpreter.c headaches

From: Andrew Helm (ashe@IGLOU.COM)
Date: 10/05/97

I'm getting a little fed up with interpreter.c
It all started innocently enough. I noticed that skip_spaces()
did something unintuitive: it increments the pointer passed
to it in order to skip the spaces at the beginning of the string.
The fact that it takes a pointer to a pointer to char should
be a hint that something is up, but it's not immediately obvious
to someone who isn't thinking about it why skip_spaces(buf)
would be a very, very bad thing. So I changed it, and
find_skill_num() broke. It relied on skip_spaces() old
behavior of just incrementing the pointer. So I changed
find_skill_num() and rewrote a few other things that were
breaking. I'd like people's opinion on what the best way to
handle skip_spaces() is. What do you think the stock Circle
behavior should be?

Also, I noticed that strings were lowercased in many places
throughout interpreter.c. Sometimes they were lowercased
more than once. One particularly bad example is search_block()
(and hence fill_word(), one_argument(), one_word(), and
all the others that depend on it) which not only discards
case sensitivity but permanently modifies the string to all
lower case letters. In my opinion, it should be the
responsibility of "higher" functions (and hence putting the
responsibility in the end programmer's hands instead of
whoever coded the utility functions) like special procs,
ACMDs, etc. to decide if case sensitivity is desired. There
are exceptions, but functions that are "general utility"
functions shouldn't assume such things. Any opinions?

     | 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