Re: [CODE] say spell thought

From: Mundi King (kingmundi@yahoo.com)
Date: 11/28/98


thought of two problems,
the ofs adds one even if a match was found,
and, the nature of the for loop keeps checking
after finding a match, instead of starting over

while (*(lbuf + ofs)) {
  for (j = 0; *(syls[j].org); j++) {
    if (!strncmp(syls[j].org, lbuf + ofs, strlen(syls[j].org))) {
         strcat(buf, syls[j].news);
         ofs += strlen(syls[j].org);
         ofs-- /* to offset the ofs++ */
         /* to start the for loop over from the top */
         break;
       }
     ofs++;
     }

i am not very confident this is the right idea,
i will have to test it tomorrow when i have had
some sleep,

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


     +------------------------------------------------------------+
     | 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/15/00 PST