aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-31 19:53:24 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-31 19:53:24 +0100
commit297b38645f209ad914b2664564057cd714a66618 (patch)
treed1e2bbaf8647abf7394a662a38d766257c78fc06 /FICS
parent2f72de03d5e78437df7d47e396d7ba3c5c5a5c7a (diff)
Reformatted player_zero()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/playerdb.c255
1 files changed, 125 insertions, 130 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 55235da..fb52822 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -104,138 +104,133 @@ PUBLIC int player_new()
return new;
}
-#define INVALID ((char *) -42)
-
-PUBLIC int player_zero(int p)
+PUBLIC int
+player_zero(int p)
{
- int i;
+#define INVALID ((char *)-42)
+ int i;
- parray[p].name = NULL;
- parray[p].login = NULL;
- parray[p].fullName = NULL;
- parray[p].emailAddress = NULL;
- parray[p].prompt = def_prompt;
- parray[p].partner = -1;
- parray[p].passwd = NULL;
- parray[p].socket = -1;
- parray[p].registered = 0;
- parray[p].status = PLAYER_NEW;
- parray[p].s_stats.num = 0;
- parray[p].s_stats.win = 0;
- parray[p].s_stats.los = 0;
- parray[p].s_stats.dra = 0;
- parray[p].s_stats.rating = 0;
- parray[p].s_stats.sterr = 350.0;
- parray[p].s_stats.ltime = 0;
- parray[p].s_stats.best = 0;
- parray[p].s_stats.whenbest = 0;
- parray[p].b_stats.num = 0;
- parray[p].b_stats.win = 0;
- parray[p].b_stats.los = 0;
- parray[p].b_stats.dra = 0;
- parray[p].b_stats.rating = 0;
- parray[p].b_stats.sterr = 350.0;
- parray[p].b_stats.ltime = 0;
- parray[p].b_stats.best = 0;
- parray[p].b_stats.whenbest = 0;
- parray[p].w_stats.num = 0;
- parray[p].w_stats.win = 0;
- parray[p].w_stats.los = 0;
- parray[p].w_stats.dra = 0;
- parray[p].w_stats.rating = 0;
- parray[p].w_stats.sterr = 350.0;
- parray[p].w_stats.ltime = 0;
- parray[p].w_stats.best = 0;
- parray[p].w_stats.whenbest = 0;
- parray[p].l_stats.num = 0;
- parray[p].l_stats.win = 0;
- parray[p].l_stats.los = 0;
- parray[p].l_stats.dra = 0;
- parray[p].l_stats.rating = 0;
- parray[p].l_stats.sterr = 350.0;
- parray[p].l_stats.ltime = 0;
- parray[p].l_stats.best = 0;
- parray[p].l_stats.whenbest = 0;
- parray[p].bug_stats.num = 0;
- parray[p].bug_stats.win = 0;
- parray[p].bug_stats.los = 0;
- parray[p].bug_stats.dra = 0;
- parray[p].bug_stats.rating = 0;
- parray[p].bug_stats.sterr = 350.0;
- parray[p].bug_stats.ltime = 0;
- parray[p].bug_stats.best = 0;
- parray[p].bug_stats.whenbest = 0;
- parray[p].d_time = 2;
- parray[p].d_inc = 12;
- parray[p].d_height = 24;
- parray[p].d_width = 79;
- parray[p].language = LANG_DEFAULT;
- parray[p].last_file = NULL;
- parray[p].last_file_byte = 0L;
- parray[p].open = 1;
- parray[p].rated = 0;
- parray[p].ropen = 1;
- parray[p].bell = 0;
- parray[p].timeOfReg = 0;
- parray[p].totalTime = 0;
- parray[p].pgn = 0;
- parray[p].notifiedby = 0;
- parray[p].i_login = 0;
- parray[p].i_game = 0;
- parray[p].i_shout = 1;
- parray[p].i_cshout = 1;
- parray[p].i_tell = 1;
- parray[p].i_kibitz = 1;
- parray[p].kiblevel = 0;
- parray[p].private = 0;
- parray[p].jprivate = 0;
- parray[p].automail = 0;
- parray[p].i_mailmess = 0;
- parray[p].style = 0;
- parray[p].promote = QUEEN;
- parray[p].game = -1;
- parray[p].last_tell = -1;
- parray[p].last_channel = -1;
- parray[p].logon_time = 0;
- parray[p].last_command_time = 0;
- parray[p].num_from = 0;
- parray[p].num_to = 0;
- parray[p].adminLevel = 0;
- parray[p].i_admin = 1;
-/* parray[p].computer = 0; */
- parray[p].num_plan = 0;
- for (i = 0; i < MAX_PLAN; i++)
- parray[p].planLines[i] = INVALID;
- parray[p].num_formula = 0;
- for (i = 0; i < MAX_FORMULA; i++)
- parray[p].formulaLines[i] = NULL;
- parray[p].formula = NULL;
-/* parray[p].nochannels = 0; */
- parray[p].num_white = 0;
- parray[p].num_black = 0;
- parray[p].num_observe = 0;
-/* parray[p].uscfRating = 0; */
-/* parray[p].network_player = 0; */
- parray[p].thisHost = 0;
- parray[p].lastHost = 0;
- parray[p].lastColor = WHITE;
- parray[p].numAlias = 0;
- for (i = 0; i < MAX_ALIASES; i++) {
- parray[p].alias_list[i].comm_name = INVALID;
- parray[p].alias_list[i].alias = INVALID;
- }
- parray[p].opponent = -1;
- parray[p].last_opponent = -1;
- parray[p].highlight = 0;
-/* parray[p].query_log = NULL; */
- parray[p].lastshout_a = 0;
- parray[p].lastshout_b = 0;
- parray[p].sopen = 0;
- parray[p].simul_info.numBoards = 0;
- parray[p].num_comments = 0;
- parray[p].flip = 0;
- parray[p].lists = NULL;
- return 0;
+ parray[p].name = NULL;
+ parray[p].login = NULL;
+ parray[p].fullName = NULL;
+ parray[p].emailAddress = NULL;
+ parray[p].prompt = def_prompt;
+ parray[p].partner = -1;
+ parray[p].passwd = NULL;
+ parray[p].socket = -1;
+ parray[p].registered = 0;
+ parray[p].status = PLAYER_NEW;
+ parray[p].s_stats.num = 0;
+ parray[p].s_stats.win = 0;
+ parray[p].s_stats.los = 0;
+ parray[p].s_stats.dra = 0;
+ parray[p].s_stats.rating = 0;
+ parray[p].s_stats.sterr = 350.0;
+ parray[p].s_stats.ltime = 0;
+ parray[p].s_stats.best = 0;
+ parray[p].s_stats.whenbest = 0;
+ parray[p].b_stats.num = 0;
+ parray[p].b_stats.win = 0;
+ parray[p].b_stats.los = 0;
+ parray[p].b_stats.dra = 0;
+ parray[p].b_stats.rating = 0;
+ parray[p].b_stats.sterr = 350.0;
+ parray[p].b_stats.ltime = 0;
+ parray[p].b_stats.best = 0;
+ parray[p].b_stats.whenbest = 0;
+ parray[p].w_stats.num = 0;
+ parray[p].w_stats.win = 0;
+ parray[p].w_stats.los = 0;
+ parray[p].w_stats.dra = 0;
+ parray[p].w_stats.rating = 0;
+ parray[p].w_stats.sterr = 350.0;
+ parray[p].w_stats.ltime = 0;
+ parray[p].w_stats.best = 0;
+ parray[p].w_stats.whenbest = 0;
+ parray[p].l_stats.num = 0;
+ parray[p].l_stats.win = 0;
+ parray[p].l_stats.los = 0;
+ parray[p].l_stats.dra = 0;
+ parray[p].l_stats.rating = 0;
+ parray[p].l_stats.sterr = 350.0;
+ parray[p].l_stats.ltime = 0;
+ parray[p].l_stats.best = 0;
+ parray[p].l_stats.whenbest = 0;
+ parray[p].bug_stats.num = 0;
+ parray[p].bug_stats.win = 0;
+ parray[p].bug_stats.los = 0;
+ parray[p].bug_stats.dra = 0;
+ parray[p].bug_stats.rating = 0;
+ parray[p].bug_stats.sterr = 350.0;
+ parray[p].bug_stats.ltime = 0;
+ parray[p].bug_stats.best = 0;
+ parray[p].bug_stats.whenbest = 0;
+ parray[p].d_time = 2;
+ parray[p].d_inc = 12;
+ parray[p].d_height = 24;
+ parray[p].d_width = 79;
+ parray[p].language = LANG_DEFAULT;
+ parray[p].last_file = NULL;
+ parray[p].last_file_byte = 0L;
+ parray[p].open = 1;
+ parray[p].rated = 0;
+ parray[p].ropen = 1;
+ parray[p].bell = 0;
+ parray[p].timeOfReg = 0;
+ parray[p].totalTime = 0;
+ parray[p].pgn = 0;
+ parray[p].notifiedby = 0;
+ parray[p].i_login = 0;
+ parray[p].i_game = 0;
+ parray[p].i_shout = 1;
+ parray[p].i_cshout = 1;
+ parray[p].i_tell = 1;
+ parray[p].i_kibitz = 1;
+ parray[p].kiblevel = 0;
+ parray[p].private = 0;
+ parray[p].jprivate = 0;
+ parray[p].automail = 0;
+ parray[p].i_mailmess = 0;
+ parray[p].style = 0;
+ parray[p].promote = QUEEN;
+ parray[p].game = -1;
+ parray[p].last_tell = -1;
+ parray[p].last_channel = -1;
+ parray[p].logon_time = 0;
+ parray[p].last_command_time = 0;
+ parray[p].num_from = 0;
+ parray[p].num_to = 0;
+ parray[p].adminLevel = 0;
+ parray[p].i_admin = 1;
+ parray[p].num_plan = 0;
+ for (i = 0; i < MAX_PLAN; i++)
+ parray[p].planLines[i] = INVALID;
+ parray[p].num_formula = 0;
+ for (i = 0; i < MAX_FORMULA; i++)
+ parray[p].formulaLines[i] = NULL;
+ parray[p].formula = NULL;
+ parray[p].num_white = 0;
+ parray[p].num_black = 0;
+ parray[p].num_observe = 0;
+ parray[p].thisHost = 0;
+ parray[p].lastHost = 0;
+ parray[p].lastColor = WHITE;
+ parray[p].numAlias = 0;
+ for (i = 0; i < MAX_ALIASES; i++) {
+ parray[p].alias_list[i].comm_name = INVALID;
+ parray[p].alias_list[i].alias = INVALID;
+ }
+ parray[p].opponent = -1;
+ parray[p].last_opponent = -1;
+ parray[p].highlight = 0;
+ parray[p].lastshout_a = 0;
+ parray[p].lastshout_b = 0;
+ parray[p].sopen = 0;
+ parray[p].simul_info.numBoards = 0;
+ parray[p].num_comments = 0;
+ parray[p].flip = 0;
+ parray[p].lists = NULL;
+ return 0;
}
PUBLIC int