Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
January 1999: [Freeciv-Dev] [patch] server output handling cleanup |
[Freeciv-Dev] [patch] server output handling cleanup[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
This patch cleans up output handling in the server and wraps all occurences of printf, puts, fflush and show_prompt into console_* functions. This additional layer of abstraction... o fixes the annoying scrolling-prompt buglet o makes the code easier to modify o adds a new undocumented feature, "RFC style", which makes it far easier to control the server from, say, a GUI frontend The "RFC style" can be triggered by issuing the "rfcstyle" command in the server, and it will prefix all output by a three-digit status number. This way a program/script controlling civserver does not need to rely on strings (which may be internationalised) to determine success/failure of commands. For some reason, cvs refused to add server/console.c and server/console.h to the diff, so they are included separatedly. The diff is against cvs current. Let me know what you think. Yours, Per
console.h
console.c
tmp2
|