I have been trying for the past three days to figure out this stupid problem. Then I thought, "Hey, maybe that's what circle's mailing list is for!" And so here comes the problem/question. I want to write a buffer straight to a specific file. Simple? Maybe, but I can't get the stupid thing to work, never tried anything like it before. Here's a mockup of the code I'm working on: -snip- static char 1_buf[MAX_INPUT_LENGTH]; -snip- *1_buf = '\0'; /* Would rather free this if I could */ sprintf(1_buf, "%s", arg); SEND_TO_Q(1_buf, d); SEND_TO_Q("\r\nThank you.\r\n", d); /* Here I need to first touch a file, then write 1_buf straight to it. */ STATE(d) = CON_MENU; break; -snip- I'm sure you get the picture, if not the need for something this harsh. Can anyone tell me how I can accomplish this? I've tried mocking several instances of fputs, fprintf and even vfprintf that I found in several other files, but it doesn't work. Won't even compile without warnings and stuff. Thnx: -FIRE Get your Free E-mail at http://randor.zzn.com ____________________________________________________________ Get your own Web-Based E-mail Service at http://www.zzn.com +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/11/01 PDT