tMore incomplete prototypes corrected - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit fd337f75410505b0b71ed3d2bb5e7531f1cd3ad1
(DIR) parent ca410a7e90ddef4eccd77189a900af7c6ae62b4c
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Sun, 9 Sep 2001 21:48:11 +0000
More incomplete prototypes corrected
Diffstat:
M src/curses_client.c | 30 +++++++++++++++---------------
M src/curses_client.h | 2 +-
M src/gtk_client.c | 48 ++++++++++++++++----------------
3 files changed, 40 insertions(+), 40 deletions(-)
---
(DIR) diff --git a/src/curses_client.c b/src/curses_client.c
t@@ -41,7 +41,7 @@
#include "serverside.h"
#include "tstring.h"
-static void PrepareHighScoreScreen();
+static void PrepareHighScoreScreen(void);
static void PrintHighScore(char *Data);
static int ResizedFlag;
t@@ -56,14 +56,14 @@ static gchar FightPoint;
/* Function definitions; make them static so as not to clash with functions
of the same name in different clients */
-static void display_intro();
+static void display_intro(void);
static void ResizeHandle(int sig);
static void CheckForResize(Player *Play);
static int GetKey(char *allowed,char *orig_allowed,gboolean AllowOther,
gboolean PrintAllowed,gboolean ExpandOut);
-static void clear_bottom(), clear_screen();
+static void clear_bottom(void), clear_screen(void);
static void clear_line(int line), clear_exceptfor(int skip);
-static void nice_wait();
+static void nice_wait(void);
static void DisplayFightMessage(Player *Play,char *text);
static void DisplaySpyReports(char *Data,Player *From,Player *To);
static void display_message(char *buf);
t@@ -80,7 +80,7 @@ static void Bank(Player *Play);
static char DisplayMode,QuitRequest;
-static void start_curses() {
+static void start_curses(void) {
/* Initialises the curses library for accessing the screen */
cur_screen=newterm(NULL,stdout,stdin);
if (WantColour) {
t@@ -99,7 +99,7 @@ static void start_curses() {
curs_set(0);
}
-static void end_curses() {
+static void end_curses(void) {
/* Shuts down the curses screen library */
keypad(stdscr,FALSE);
curs_set(1);
t@@ -141,7 +141,7 @@ static void LogMessage(const gchar *log_domain,GLogLevelFlags log_level,
attrset(TextAttr); clear_bottom();
}
-void display_intro() {
+void display_intro(void) {
/* Displays a dopewars introduction screen */
GString *text;
attrset(TextAttr);
t@@ -195,7 +195,7 @@ void display_intro() {
}
#ifdef NETWORKING
-static void SelectServerManually() {
+static void SelectServerManually(void) {
/* Prompts the user to enter a server name and port to connect to */
gchar *text,*PortText;
if (ServerName[0]=='(') AssignName(&ServerName,"localhost");
t@@ -212,7 +212,7 @@ static void SelectServerManually() {
g_free(text); g_free(PortText);
}
-static char *SelectServerFromMetaServer() {
+static char *SelectServerFromMetaServer(void) {
/* Contacts the dopewars metaserver, and obtains a list of valid */
/* server/port pairs, one of which the user should select. */
/* Returns a pointer to a static string containing an error */
t@@ -594,7 +594,7 @@ static void GiveErrand(Player *Play) {
}
}
-static int want_to_quit() {
+static int want_to_quit(void) {
/* Asks the user if he/she _really_ wants to quit dopewars */
attrset(TextAttr);
clear_line(22);
t@@ -778,7 +778,7 @@ void HandleClientMessage(char *Message,Player *Play) {
}
}
-void PrepareHighScoreScreen() {
+void PrepareHighScoreScreen(void) {
/* Responds to a "starthiscore" message by clearing the screen and */
/* displaying the title for the high scores screen */
char *text;
t@@ -1079,13 +1079,13 @@ void clear_exceptfor(int skip) {
}
-void clear_bottom() {
+void clear_bottom(void) {
/* Clears screen lines 16 to 23 */
int i;
for (i=16;i<=23;i++) clear_line(i);
}
-void clear_screen() {
+void clear_screen(void) {
/* Clears the entire screen; 24 lines of 80 characters each */
int i;
for (i=0;i<Depth;i++) clear_line(i);
t@@ -1822,7 +1822,7 @@ static void Curses_DoGame(Player *Play) {
g_string_free(text,TRUE);
}
-void CursesLoop() {
+void CursesLoop(void) {
char c;
gchar *Name=NULL;
Player *Play;
t@@ -1862,7 +1862,7 @@ void CursesLoop() {
#include <glib.h>
#include "dopewars.h" /* We need this for the definition of '_' */
-void CursesLoop() {
+void CursesLoop(void) {
g_print(_("No curses client available - rebuild the binary passing the\n"
"--enable-curses-client option to configure, or use a windowed\n"
"client (if available) instead!\n"));
(DIR) diff --git a/src/curses_client.h b/src/curses_client.h
t@@ -26,6 +26,6 @@
#include <config.h>
#endif
-void CursesLoop();
+void CursesLoop(void);
#endif
(DIR) diff --git a/src/gtk_client.c b/src/gtk_client.c
t@@ -88,10 +88,10 @@ static void DestroyGtk(GtkWidget *widget,gpointer data);
static void NewGame(GtkWidget *widget,gpointer data);
static void ListScores(GtkWidget *widget,gpointer data);
static void ListInventory(GtkWidget *widget,gpointer data);
-static void NewGameDialog();
-static void StartGame();
-static void EndGame();
-static void UpdateMenus();
+static void NewGameDialog(void);
+static void StartGame(void);
+static void EndGame(void);
+static void UpdateMenus(void);
#ifdef NETWORKING
static void GetClientMessage(gpointer data,gint socket,
t@@ -100,7 +100,7 @@ static void SetSocketWriteTest(Player *Play,gboolean WriteTest);
#endif
static void HandleClientMessage(char *buf,Player *Play);
-static void PrepareHighScoreDialog();
+static void PrepareHighScoreDialog(void);
static void AddScoreToDialog(char *Data);
static void CompleteHighScoreDialog(gboolean AtEnd);
static void PrintMessage(char *Data);
t@@ -113,7 +113,7 @@ static void UpdateInventory(struct InventoryWidgets *Inven,
Inventory *Objects,int NumObjects,
gboolean AreDrugs);
static void JetButtonPressed(GtkWidget *widget,gpointer data);
-static void Jet();
+static void Jet(void);
static void DealDrugs(GtkWidget *widget,gpointer data);
static void DealGuns(GtkWidget *widget,gpointer data);
static void QuestionDialog(char *Data,Player *From);
t@@ -122,7 +122,7 @@ static void ListPlayers(GtkWidget *widget,gpointer data);
static void TalkToAll(GtkWidget *widget,gpointer data);
static void TalkToPlayers(GtkWidget *widget,gpointer data);
static void TalkDialog(gboolean TalkToAll);
-static GtkWidget *CreatePlayerList();
+static GtkWidget *CreatePlayerList(void);
static void UpdatePlayerList(GtkWidget *clist,gboolean IncludeSelf);
static void TipOff(GtkWidget *widget,gpointer data);
static void SpyOnPlayer(GtkWidget *widget,gpointer data);
t@@ -130,9 +130,9 @@ static void ErrandDialog(gint ErrandType);
static void SackBitch(GtkWidget *widget,gpointer data);
static void DestroyShowing(GtkWidget *widget,gpointer data);
static gint DisallowDelete(GtkWidget *widget,GdkEvent *event,gpointer data);
-static void GunShopDialog();
-static void NewNameDialog();
-static void UpdatePlayerLists();
+static void GunShopDialog(void);
+static void NewNameDialog(void);
+static void UpdatePlayerLists(void);
static void CreateInventory(GtkWidget *hbox,gchar *Objects,
GtkAccelGroup *accel_group,
gboolean CreateButtons,gboolean CreateHere,
t@@ -424,7 +424,7 @@ struct HiScoreDiaStruct {
};
static struct HiScoreDiaStruct HiScoreDialog;
-void PrepareHighScoreDialog() {
+void PrepareHighScoreDialog(void) {
/* Creates an empty dialog to display high scores */
GtkWidget *dialog,*vbox,*hsep,*table;
t@@ -640,7 +640,7 @@ struct combatant {
GtkWidget *name,*bitches,*healthprog,*healthlabel;
};
-static void CreateFightDialog() {
+static void CreateFightDialog(void) {
/* Creates an empty Fight dialog. Usually this only needs to be done once, */
/* as when the user "closes" it, it is only hidden, ready to be reshown */
/* later. Buttons for all actions are added here, and are hidden/shown */
t@@ -806,7 +806,7 @@ static void UpdateCombatant(gchar *DefendName,int DefendBitches,
g_free(BitchText); g_free(HealthText);
}
-static void FreeCombatants() {
+static void FreeCombatants(void) {
/* Cleans up the list of all players/cops involved in a fight. */
GArray *combatants;
combatants=(GArray *)gtk_object_get_data(GTK_OBJECT(FightDialog),
t@@ -1089,7 +1089,7 @@ void JetButtonPressed(GtkWidget *widget,gpointer data) {
}
}
-void Jet() {
+void Jet(void) {
GtkWidget *dialog,*table,*button,*label,*vbox;
GtkAccelGroup *accel_group;
gint boxsize,i,row,col;
t@@ -1163,7 +1163,7 @@ struct DealDiaStruct {
};
static struct DealDiaStruct DealDialog;
-static void UpdateDealDialog() {
+static void UpdateDealDialog(void) {
GString *text;
GtkAdjustment *spin_adj;
gint DrugInd,CanDrop,CanCarry,CanAfford,MaxDrug;
t@@ -1518,7 +1518,7 @@ void QuestionDialog(char *Data,Player *From) {
g_strfreev(split);
}
-void StartGame() {
+void StartGame(void) {
Player *Play;
Play=ClientData.Play=g_new(Player,1);
FirstClient=AddPlayer(0,Play,FirstClient);
t@@ -1538,7 +1538,7 @@ void StartGame() {
UpdatePlayerLists();
}
-void EndGame() {
+void EndGame(void) {
DisplayFightMessage(NULL);
gtk_widget_hide_all(ClientData.vbox);
gtk_editable_delete_text(GTK_EDITABLE(ClientData.messages),0,-1);
t@@ -1588,7 +1588,7 @@ static gint DrugSortFunc(GtkCList *clist,gconstpointer ptr1,
return 0;
}
-void UpdateMenus() {
+void UpdateMenus(void) {
gboolean MultiPlayer;
gint Bitches;
t@@ -2081,7 +2081,7 @@ static void CloseNewGameDia(GtkWidget *widget,
#endif
}
-void NewGameDialog() {
+void NewGameDialog(void) {
GtkWidget *vbox,*vbox2,*hbox,*label,*entry,*notebook,*frame,*button;
GtkWidget *dialog;
GtkAccelGroup *accel_group;
t@@ -2604,7 +2604,7 @@ void TalkDialog(gboolean TalkToAll) {
gtk_widget_show_all(dialog);
}
-GtkWidget *CreatePlayerList() {
+GtkWidget *CreatePlayerList(void) {
GtkWidget *clist;
gchar *text[1];
t@@ -2856,7 +2856,7 @@ static void NewNameOK(GtkWidget *widget,GtkWidget *window) {
g_free(text);
}
-void NewNameDialog() {
+void NewNameDialog(void) {
GtkWidget *window,*button,*hsep,*vbox,*label,*entry;
window=gtk_window_new(GTK_WINDOW_DIALOG);
t@@ -2899,7 +2899,7 @@ void NewNameDialog() {
gtk_widget_show_all(window);
}
-void GunShopDialog() {
+void GunShopDialog(void) {
GtkWidget *window,*button,*hsep,*vbox,*hbox;
GtkAccelGroup *accel_group;
gchar *text;
t@@ -2952,7 +2952,7 @@ void GunShopDialog() {
gtk_widget_show_all(window);
}
-void UpdatePlayerLists() {
+void UpdatePlayerLists(void) {
if (IsShowingPlayerList) UpdatePlayerList(ClientData.PlayerList,FALSE);
if (IsShowingTalkList) UpdatePlayerList(ClientData.TalkList,FALSE);
}
t@@ -2965,7 +2965,7 @@ static void DestroySpyReports(GtkWidget *widget,gpointer data) {
SpyReportsDialog=NULL;
}
-static void CreateSpyReports() {
+static void CreateSpyReports(void) {
GtkWidget *window,*button,*vbox,*notebook;
GtkAccelGroup *accel_group;