Re: [CODE] calling char function from sprintf

From: Cathy Gore (cheron@arcanerealms.org)
Date: 09/05/01


And finally, the answer to the question has arisen.  Here's the working
function to use string_to_store inline:

provided you've got string_to_store working properly, add in this function
to utils.c, with a prototype in utils.h:

char *escape_quotes(char *source)
{
  char target[MAX_STRING_LENGTH * 2];

  if (source == NULL)
    return "\\\0";

  string_to_store(target, source);

  return (str_dup(target));  //ya, it's a hack, but it works.
}

HAHA! and to think we were frying our brains over this!  Almost smacked
myself when it finally fit together.

-Cheron
Arcane Realms

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST