Hey, So I'm changing my code to fix the problem with the new output buffer system in pl22 and 3.1, and I was wondering if what I'm doing is right. I don't want to put the proc color in vwrite_to_output, because then a code snippet like this: send_to_char(ch, "&W"); // &W is my bright white colorcode list_char_to_char(world[IN_ROOM(ch)].people, ch); would send a proc_color for the &W, then for the player description/title etc i have a few special additions i made to easycolor, but for them to work the two need to be one stringe when proc_color changes them ie: &WAtrius stands here.&0 So my plan was to place the proc_color in process_output(...) because that will accomplish what I need I changed proc_color to return an int, and it returns (lengthofnewstring - lengthofoldstring) int process_output(...) { ...snip.... /* we may need this \r\n for later -- see below */ strcpy(i, "\r\n"); /* strcpy: OK (for 'MAX_SOCK_BUF >= 3') */ //amud color fix //My freaky colorcode fix sizechange = proc_color(t->output, clvl); t->bufptr += sizechange; t->bufspace -= sizechange; /* now, append the 'real' output */ strcpy(osb, t->output); /* strcpy: OK (t->output:LARGE_BUFSIZE < osb:MAX_SOCK_BUF-2) */ ...snip... } Does this accurately update everything that needs to be updated? or is there some other buffer size related variable I need to change? thanks a bunch, rj -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/26/03 PDT