X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fttt-error.c;h=d3e57cba6791da535d6ac64f90ad2aad5de51bc7;hb=47ff725ff3b109b94a23ea7c8c07c8b1417e31ef;hp=26ab09dc24e9b12ef3860f56cd717270fe2b74b9;hpb=907321c065fb1383e800f0794981df91d4327f57;p=ttt diff --git a/src/ttt-error.c b/src/ttt-error.c index 26ab09d..d3e57cb 100644 --- a/src/ttt-error.c +++ b/src/ttt-error.c @@ -26,27 +26,31 @@ ttt_error_string (ttt_error_t error) { switch (error) { case TTT_ERROR_NONE: - return "ERROT NONE\n"; - case TTT_ERROR_NONAMESET: - return "ERROR NONAMESET\n"; - case TTT_ERROR_INVALIDNAME: - return "ERROR INVALIDNAME\n"; + return "ERROR NONEi\r\n"; + case TTT_ERROR_NO_NAME_SET: + return "ERROR NO_NAME_SET\r\n"; + case TTT_ERROR_INVALID_NAME: + return "ERROR INVALID_NAME\r\n"; case TTT_ERROR_COMMAND: - return "ERROR COMMAND\n"; + return "ERROR COMMAND\r\n"; case TTT_ERROR_SYNTAX: - return "ERROR SYNTAX\n"; - case TTT_ERROR_NOTNUMBER: - return "ERROR NOTNUMBER\n"; - case TTT_ERROR_NOTGRID: - return "ERROR NOTGRID\n"; - case TTT_ERROR_NOUSER: - return "ERROR NOUSER\n"; - case TTT_ERROR_NOTINGAME: - return "ERROR_NOTINGAME\n"; - case TTT_ERROR_NOTPLAYING: - return "ERROR_NOTPLAYING\n"; - case TTT_ERROR_NOTYOURTURN: - return "ERROR NOTYOURTURN\n"; + return "ERROR SYNTAX\r\n"; + case TTT_ERROR_NOT_NUMBER: + return "ERROR NOT_NUMBER\r\n"; + case TTT_ERROR_NOT_GRID: + return "ERROR NOT_GRID\r\n"; + case TTT_ERROR_NO_USER: + return "ERROR NO_USER\r\n"; + case TTT_ERROR_NOT_IN_GAME: + return "ERROR_NOT_IN_GAME\r\n"; + case TTT_ERROR_NOT_PLAYING: + return "ERROR_NOT_PLAYING\r\n"; + case TTT_ERROR_NOT_YOUR_TURN: + return "ERROR NOT_YOUR_TURN\r\n"; + /* Not an actual protocol errror, so this should never happen. */ + case TTT_ERROR_QUIT_REQUESTED: + ASSERT_NOT_REACHED; + break; } ASSERT_NOT_REACHED;