Complete.Org: Mailing Lists: Archives: freeciv-dev: January 1999:
[Freeciv-Dev] [patch] server output handling cleanup
Home

[Freeciv-Dev] [patch] server output handling cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] [patch] server output handling cleanup
From: Per Mathisen <permath@xxxxxxxxxxx>
Date: Thu, 21 Jan 1999 11:08:40 +0100 (MET)

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

Attachment: console.h
Description: Text document

Attachment: console.c
Description: Text document

Attachment: tmp2
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] [patch] server output handling cleanup, Per Mathisen <=